aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-02-15 14:59:20 -0500
committerDan Timoney <dtimoney@att.com>2017-02-15 15:02:52 -0500
commit09b58e1832480e9529124ae422f040028546daff (patch)
treebc9600d325250ff9ad18a7a0f78f81750bcad839
parent9e84a53855f414a71633d73d76a8438cb25e1b58 (diff)
Initial commit for OpenECOMP SDN-C adaptors
Change-Id: I8d42e44d15fd85aee5b00d27e45da6751dda02b9 Signed-off-by: Dan Timoney <dtimoney@att.com>
-rwxr-xr-x.gitignore38
-rw-r--r--.gitreview4
-rw-r--r--LICENSE.txt22
-rw-r--r--README.md8
-rwxr-xr-xaai-service/.gitignore34
-rwxr-xr-xaai-service/README.md0
-rwxr-xr-xaai-service/features/pom.xml155
-rw-r--r--aai-service/features/src/main/resources/features.xml46
-rwxr-xr-xaai-service/installer/pom.xml141
-rw-r--r--aai-service/installer/src/assembly/assemble_installer_zip.xml58
-rw-r--r--aai-service/installer/src/assembly/assemble_mvnrepo_zip.xml48
-rw-r--r--aai-service/installer/src/main/resources/scripts/install-feature.sh40
-rwxr-xr-xaai-service/pom.xml44
-rwxr-xr-xaai-service/provider/pom.xml209
-rwxr-xr-xaai-service/provider/src/main/java/META-INF/sun-jaxb.episode376
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AaiInternal.java114
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Action.java109
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ActionData.java102
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Actions.java99
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AvailabilityZone.java186
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AvailabilityZones.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Business.java72
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudInfrastructure.java101
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudRegion.java518
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudRegions.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ConstrainedElementSet.java214
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ConstrainedElementSets.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CtagAssignment.java124
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CtagAssignments.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Customer.java214
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Customers.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/EdgePropNames.java264
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ElementChoiceSet.java213
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ElementChoiceSets.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ExtraProperties.java44
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ExtraProperty.java74
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Flavor.java382
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Flavors.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GenericVnf.java1263
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GenericVnfs.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GroupAssignment.java214
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GroupAssignments.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Image.java380
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Images.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/IncludeNodeFilter.java74
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InstanceFilter.java44
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InstanceFilters.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Inventory.java238
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryItem.java170
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryItemData.java102
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryResponseItem.java130
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryResponseItems.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/KeyData.java102
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3InterfaceIpv4AddressList.java302
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3InterfaceIpv6AddressList.java302
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3Network.java743
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3Networks.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LInterface.java419
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LInterfaces.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LagInterface.java214
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LagInterfaces.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LogicalLink.java494
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LogicalLinks.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Metadata.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Metadatum.java130
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Model.java325
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelAndNamedQuerySearch.java130
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelConstraint.java130
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelConstraints.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelElement.java344
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelElements.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Models.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueries.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQuery.java343
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueryElement.java305
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueryElements.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Network.java212
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NotificationEvent.java102
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NotificationEventHeader.java403
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Notify.java192
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ObjectFactory.java1015
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PInterface.java326
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PInterfaces.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PhysicalLink.java298
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PhysicalLinks.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pnf.java514
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pnfs.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Properties.java102
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PropertyConstraint.java186
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PropertyConstraints.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pserver.java624
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pservers.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/QueryParameters.java101
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedLookup.java277
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedLookups.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedToProperty.java102
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Relationship.java170
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelationshipData.java102
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelationshipList.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ReservedPropNames.java217
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ResponseList.java74
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ResultData.java102
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Search.java74
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SearchResults.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SecondaryFilter.java130
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SegmentationAssignment.java130
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SegmentationAssignments.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Service.java214
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceDesignAndCreation.java128
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceInstance.java521
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceInstances.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceSubscription.java186
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceSubscriptions.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Services.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Snapshot.java381
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Snapshots.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/StartNodeFilter.java102
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Subnet.java402
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Subnets.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/TaggedInventoryItemList.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Tenant.java185
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Tenants.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Update.java169
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/UpdateNodeKey.java102
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VfModule.java374
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VfModules.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vlan.java397
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vlans.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vnfc.java338
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vnfcs.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Volume.java158
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VolumeGroup.java242
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VolumeGroups.java81
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Volumes.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vserver.java337
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vservers.java79
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/package-info.java9
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIClient.java150
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIDeclarations.java1946
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIExecutorInterface.java29
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIRequest.java260
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIService.java3301
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIServiceActivator.java228
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIServiceException.java77
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAITrinityService.java38
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/CloudRegionRequest.java120
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/CustomerRequest.java126
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/EchoRequest.java93
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GVnfLInterfaceRequest.java137
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenVnfrVLanRequest.java132
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericQueryRequest.java145
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericVnfLInterfaceRequest.java125
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericVnfRequest.java145
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3InterfaceIpv4AddressListRequest.java196
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3InterfaceIpv6AddressListRequest.java163
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3NetworkRequest.java130
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LInterfaceRequest.java244
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LagInterfacePnfRequest.java126
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LogicalLinkRequest.java110
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/NamedQueryRequest.java133
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/NodesQueryRequest.java145
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PInterfacePnfRequest.java126
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PInterfaceRequest.java133
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PServerRequest.java116
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PathRequest.java88
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PhysicalLinkRequest.java113
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PnfRequest.java117
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/RelationshipRequest.java127
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SelfLinkRequest.java86
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceInstanceRequest.java120
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceRequest.java109
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceSubscriptionRequest.java120
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SubInterfaceRequest.java185
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SubnetRequest.java116
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/TenantRequest.java145
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VLanRequest.java137
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VServerVLanRequest.java148
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VfModuleRequest.java116
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VnfcRequest.java107
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VolumeGroupRequest.java106
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VserverRequest.java156
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/AAIDatum.java26
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/EchoResponse.java76
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ErrorResponse.java78
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/RequestError.java78
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResourceVersion.java28
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResponseMessage.java122
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResponseMessages.java78
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ServiceException.java126
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/SubInterface.java171
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/Variables.java78
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/notify/KeyDatum.java99
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/notify/NotifyEvent.java170
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Flavor.java122
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Host.java122
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Image.java237
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/IpAddress.java168
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Relationship.java147
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/RelationshipDatum.java124
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/RelationshipList.java101
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/VServer.java262
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/InstanceFilter.java104
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/InstanceFilters.java78
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/NamedQuery.java76
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/NamedQueryData.java102
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/QueryParameters.java76
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/Action.java101
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/ActionDatum.java99
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/Update.java124
-rw-r--r--aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/UpdateNodeKey.java99
-rwxr-xr-xaai-service/provider/src/main/resources/aai-schema-bindings.xjb11
-rwxr-xr-xaai-service/provider/src/main/resources/aai_schema_v8.xsd3699
-rw-r--r--aai-service/provider/src/test/java/org/openecomp/sdnc/sli/aai/r1607/R1607AutoGeneratedTest.java490
-rw-r--r--aai-service/provider/src/test/resources/aaiclient.properties251
-rw-r--r--example-settings.xml163
-rw-r--r--jenkins-settings.xml168
-rwxr-xr-xmdsal-resource/.gitignore34
-rwxr-xr-xmdsal-resource/features/pom.xml134
-rw-r--r--mdsal-resource/features/src/main/resources/features.xml38
-rwxr-xr-xmdsal-resource/installer/pom.xml135
-rw-r--r--mdsal-resource/installer/src/assembly/assemble_installer_zip.xml58
-rw-r--r--mdsal-resource/installer/src/assembly/assemble_mvnrepo_zip.xml48
-rw-r--r--mdsal-resource/installer/src/main/resources/scripts/install-feature.sh40
-rwxr-xr-xmdsal-resource/pom.xml46
-rwxr-xr-xmdsal-resource/provider/pom.xml122
-rw-r--r--mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/ConfigResource.java149
-rw-r--r--mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/MdsalResourceActivator.java106
-rw-r--r--mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/OperationalResource.java149
-rw-r--r--mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/RestService.java213
-rwxr-xr-xmdsal-resource/provider/src/main/resources/IPV4_ADDRESS_POOL.csv9
-rwxr-xr-xmdsal-resource/provider/src/main/resources/VLAN_ID_POOL.csv22
-rw-r--r--mdsal-resource/provider/src/main/resources/crtables.sql70
-rw-r--r--mdsal-resource/provider/src/main/resources/svclogic.properties26
-rwxr-xr-xpom.xml82
-rwxr-xr-xresource-assignment/.gitignore34
-rwxr-xr-xresource-assignment/.sonar/checkstyle.xml1
-rwxr-xr-xresource-assignment/.sonar/pmd.xml67
-rwxr-xr-xresource-assignment/features/pom.xml133
-rw-r--r--resource-assignment/features/src/main/resources/features.xml40
-rwxr-xr-xresource-assignment/installer/pom.xml135
-rw-r--r--resource-assignment/installer/src/assembly/assemble_installer_zip.xml58
-rw-r--r--resource-assignment/installer/src/assembly/assemble_mvnrepo_zip.xml48
-rw-r--r--resource-assignment/installer/src/main/resources/scripts/install-feature.sh40
-rwxr-xr-xresource-assignment/pom.xml43
-rwxr-xr-xresource-assignment/provider/pom.xml115
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/LockHelper.java35
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/LockHelperImpl.java166
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/ResourceLockedException.java41
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/SynchronizedFunction.java56
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/dao/ResourceLockDao.java43
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/dao/ResourceLockDaoImpl.java109
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/data/ResourceLock.java34
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ReleaseRequestType.java45
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ReserveRequestType.java43
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ResourceAllocator.java829
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/AffinityAllocationRule.java68
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/DbAllocationRule.java148
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/ServingSiteAllocationRule.java80
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/VrfAllocationRule.java111
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/AnyVrfPresentCheck.java74
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/ExcludeVpeCheck.java57
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/HubWithRgCheck.java100
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java92
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/ProvStatusCheck.java49
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/VpeLockCheck.java92
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/AllocationRule.java37
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocationDefinition.java60
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocator.java35
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocatorImpl.java184
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointData.java33
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EquipmentCheck.java35
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/PreferenceRule.java30
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/ServiceData.java34
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/comp/EquipmentReader.java32
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/ServerDao.java30
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/ServerDaoImpl.java64
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VpePortDao.java32
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VpePortDaoImpl.java81
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VplspePortDao.java30
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VplspePortDaoImpl.java70
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/data/EquipmentData.java31
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/data/EquipmentLevel.java26
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/pref/AffinityLinkPref.java85
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/pref/EvcExistingVrfPref.java60
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/reader/VpePortReader.java60
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/comp/AllocationRequestBuilder.java42
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/comp/AllocationRequestBuilderImpl.java172
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDao.java28
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDaoImpl.java85
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxServerSpeedDao.java28
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxServerSpeedDaoImpl.java86
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ParameterDao.java27
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ParameterDaoImpl.java57
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/RangeRuleDao.java32
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/RangeRuleDaoImpl.java70
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ResourceRuleDao.java38
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ResourceRuleDaoImpl.java117
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/VpeLockDao.java27
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/VpeLockDaoImpl.java48
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/RangeRule.java33
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ResourceRule.java39
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ResourceThreshold.java28
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ThresholdStatus.java32
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/dao/ServiceResourceDao.java38
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/dao/ServiceResourceDaoImpl.java110
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/data/ServiceResource.java32
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/data/ServiceStatus.java27
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/AllocationFunction.java330
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ReleaseFunction.java88
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceLoader.java39
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceManager.java41
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceManagerImpl.java128
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/ResourceDao.java39
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItem.java37
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItemJdbcDao.java35
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItemJdbcDaoImpl.java126
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/Resource.java32
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceDaoImpl.java370
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceJdbcDao.java39
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceJdbcDaoImpl.java144
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoad.java33
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoadJdbcDao.java36
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoadJdbcDaoImpl.java112
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationAction.java26
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationItem.java36
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationOutcome.java28
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationRequest.java35
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationStatus.java27
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/InitAction.java36
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationItem.java27
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationOutcome.java28
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationRequest.java29
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelResource.java30
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationItem.java27
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationOutcome.java29
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationRequest.java31
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitResource.java27
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiAssetAllocationOutcome.java30
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiAssetAllocationRequest.java32
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiResourceAllocationOutcome.java29
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiResourceAllocationRequest.java30
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationItem.java29
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationOutcome.java30
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationRequest.java36
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeResource.java29
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/Resource.java32
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceKey.java50
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceLoad.java32
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceType.java26
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/LabelUtil.java95
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/LimitUtil.java334
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/RangeUtil.java110
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/ResourceUtil.java49
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/db/DataSourceWrap.java98
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/expr/ExpressionEvaluator.java207
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/speed/SpeedUtil.java41
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/str/StrUtil.java305
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/vrf/VpnParam.java30
-rw-r--r--resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/vrf/VrfUtil.java76
-rw-r--r--resource-assignment/provider/src/main/resources/META-INF/spring/resource-assignment-context.xml275
-rw-r--r--resource-assignment/provider/src/main/resources/META-INF/spring/resource-assignment-osgi-context.xml39
-rw-r--r--resource-assignment/provider/src/main/resources/resource-allocator.properties26
-rw-r--r--resource-assignment/provider/src/main/resources/sql/001_resource_rule_ddl.sql32
-rw-r--r--resource-assignment/provider/src/main/resources/sql/002_max_port_speed_ddl.sql29
-rw-r--r--resource-assignment/provider/src/main/resources/sql/003_max_server_speed_ddl.sql28
-rw-r--r--resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/DataSetup.java261
-rw-r--r--resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestIsAvailable.java424
-rw-r--r--resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestQuery.java85
-rw-r--r--resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestRelease.java430
-rw-r--r--resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestReserve.java681
-rw-r--r--resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestReserve2.java77
-rw-r--r--resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/rm/DataSetup.java106
-rw-r--r--resource-assignment/provider/src/test/java/jtest/util/org/openecomp/sdnc/ra/TestDb.java37
-rw-r--r--resource-assignment/provider/src/test/java/jtest/util/org/openecomp/sdnc/ra/TestTable.java84
-rw-r--r--resource-assignment/provider/src/test/resources/homing-req.json46
-rw-r--r--resource-assignment/provider/src/test/resources/log4j.properties26
-rwxr-xr-xresource-assignment/provider/src/test/resources/param.txt44
-rw-r--r--resource-assignment/provider/src/test/resources/sql/data.sql120
-rw-r--r--resource-assignment/provider/src/test/resources/sql/schema.sql201
-rw-r--r--resource-assignment/provider/src/test/resources/svc-topology-req.json195
-rw-r--r--resource-assignment/provider/src/test/resources/test-context.xml297
-rwxr-xr-xsql-resource/.gitignore34
-rwxr-xr-xsql-resource/features/pom.xml134
-rw-r--r--sql-resource/features/src/main/resources/features.xml39
-rwxr-xr-xsql-resource/installer/pom.xml135
-rw-r--r--sql-resource/installer/src/assembly/assemble_installer_zip.xml58
-rw-r--r--sql-resource/installer/src/assembly/assemble_mvnrepo_zip.xml48
-rw-r--r--sql-resource/installer/src/main/resources/scripts/install-feature.sh40
-rwxr-xr-xsql-resource/pom.xml43
-rwxr-xr-xsql-resource/provider/pom.xml105
-rw-r--r--sql-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/sql/SqlResource.java447
-rw-r--r--sql-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/sql/SqlResourceActivator.java67
-rw-r--r--sql-resource/provider/src/main/resources/svclogic.properties34
-rw-r--r--sql-resource/provider/src/test/java/org/openecomp/sdnc/sli/resource/sql/SqlResourceTest.java218
-rwxr-xr-xsql-resource/provider/src/test/resources/delete.tests2
-rwxr-xr-xsql-resource/provider/src/test/resources/query.tests5
-rwxr-xr-xsql-resource/provider/src/test/resources/save.tests13
-rw-r--r--sql-resource/provider/src/test/resources/simplelogger.properties22
-rw-r--r--sql-resource/provider/src/test/resources/svclogic.properties34
-rw-r--r--version.properties14
400 files changed, 58527 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100755
index 0000000..2932cb9
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,38 @@
+#####standard .git ignore entries#####
+
+## IDE Specific Files ##
+org.eclipse.core.resources.prefs
+.classpath
+.project
+.settings
+.idea
+.externalToolBuilders
+maven-eclipse.xml
+workspace
+.checkstyle
+
+## Compilation Files ##
+*.class
+**/target
+target
+target-ide
+MANIFEST.MF
+
+## Misc Ignores (OS specific etc) ##
+bin/
+dist
+*~
+*.ipr
+*.iml
+*.iws
+classes
+out/
+.DS_STORE
+.metadata
+provider/src/main/java/META-INF/
+provider/src/main/java/inventory/
+
+## BlackDuck generated file
+sdnc-adaptors_bdio.jsonld
+blackDuckHubProjectName.txt
+blackDuckHubProjectVersionName.txt
diff --git a/.gitreview b/.gitreview
new file mode 100644
index 0000000..083cfb2
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,4 @@
+[gerrit]
+host=gerrit.openecomp.org
+port=29418
+project=sdnc/adaptors.git
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000..3ea5081
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,22 @@
+/*
+ * ============LICENSE_START==========================================
+ * ===================================================================
+ * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+ * ===================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ *
+ * ECOMP and OpenECOMP are trademarks
+ * and service marks of AT&T Intellectual Property.
+ *
+ */
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..c1e7af9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,8 @@
+This source repository contains the code for the SDN Controller adaptors.
+To compile this code:
+
+1. Make sure your local Maven settings file ($HOME/.m2/settings.xml) contains references to the OpenECOMP repositories and OpenDaylight repositories. See example-settings.xml for an example.
+
+2. To compile, run "mvn clean install".
+
+
diff --git a/aai-service/.gitignore b/aai-service/.gitignore
new file mode 100755
index 0000000..b73caf3
--- /dev/null
+++ b/aai-service/.gitignore
@@ -0,0 +1,34 @@
+#####standard .git ignore entries#####
+
+## IDE Specific Files ##
+org.eclipse.core.resources.prefs
+.classpath
+.project
+.settings
+.idea
+.externalToolBuilders
+maven-eclipse.xml
+workspace
+
+## Compilation Files ##
+*.class
+**/target
+target
+target-ide
+MANIFEST.MF
+
+## Misc Ignores (OS specific etc) ##
+bin/
+dist
+*~
+*.ipr
+*.iml
+*.iws
+classes
+out/
+.DS_STORE
+.metadata
+
+## Folders which contain auto generated source code ##
+yang-gen-config
+yang-gen-sal
diff --git a/aai-service/README.md b/aai-service/README.md
new file mode 100755
index 0000000..e69de29
--- /dev/null
+++ b/aai-service/README.md
diff --git a/aai-service/features/pom.xml b/aai-service/features/pom.xml
new file mode 100755
index 0000000..90bd936
--- /dev/null
+++ b/aai-service/features/pom.xml
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>aai-service</artifactId>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>aai-service-features</artifactId>
+ <name>AAI Interface Service - Features</name>
+
+ <packaging>jar</packaging>
+
+ <dependencies>
+
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>aai-service-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>features-mdsal</artifactId>
+ <version>${odl.mdsal.features.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+
+ <scope>runtime</scope>
+ </dependency>
+
+
+ <!-- dependency for opendaylight-karaf-empty for use by testing -->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>opendaylight-karaf-empty</artifactId>
+ <version>${odl.karaf.empty.distro.version}</version>
+ <type>zip</type>
+ </dependency>
+
+
+ <dependency>
+ <!-- Required for launching the feature tests -->
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>features-test</artifactId>
+ <version>${odl.commons.opendaylight.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>features-yangtools</artifactId>
+ <version>${odl.yangtools.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-client</artifactId>
+ <version>1.17</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ <version>1.17</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <filtering>true</filtering>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>filter</id>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- launches the feature test, which validates that your karaf feature
+ can be installed inside of a karaf container. It doesn't validate that your
+ functionality works correctly, just that you have all of the dependent bundles
+ defined correctly.
+ <plugin>
+
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.16</version>
+ <configuration>
+ <systemPropertyVariables>
+ <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
+ <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
+ <karaf.distro.version>${odl.karaf.empty.distro.version}</karaf.distro.version>
+ </systemPropertyVariables>
+ <dependenciesToScan>
+ <dependency>org.opendaylight.yangtools:features-test</dependency>
+ </dependenciesToScan>
+ </configuration>
+ </plugin>
+ -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/classes/${features.file}</file>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/aai-service/features/src/main/resources/features.xml b/aai-service/features/src/main/resources/features.xml
new file mode 100644
index 0000000..a1645b8
--- /dev/null
+++ b/aai-service/features/src/main/resources/features.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+
+<features name="sdnc-aai-service-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+
+ <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features</repository>
+
+ <feature name='sdnc-aai-service' description="sdnc-aai-service" version='${project.version}'>
+ <!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
+ <feature version="${odl.mdsal.version}">odl-mdsal-broker</feature>
+ <feature>sdnc-sli</feature>
+ <bundle>mvn:org.openecomp.sdnc.adaptors/aai-service-provider/${project.version}</bundle>
+ <bundle>mvn:com.sun.jersey/jersey-client/${jersey.client.version}</bundle>
+ <bundle>mvn:com.sun.jersey/jersey-core/${jersey.version}</bundle>
+ <bundle>mvn:org.apache.httpcomponents/httpcore-osgi/${apache.httpcomponents.version}</bundle>
+ <bundle>mvn:org.apache.httpcomponents/httpclient-osgi/${apache.httpcomponents.version}</bundle>
+ <bundle>mvn:com.fasterxml.jackson.core/jackson-databind/${jackson.version}</bundle>
+ <bundle>mvn:com.fasterxml.jackson.core/jackson-annotations/${jackson.version}</bundle>
+ <bundle>mvn:com.fasterxml.jackson.core/jackson-core/${jackson.version}</bundle>
+ <bundle>mvn:commons-lang/commons-lang/${commons.lang.version}</bundle>
+ <bundle>mvn:com.fasterxml.jackson.module/jackson-module-jaxb-annotations/${jackson.version}</bundle>
+ <!--
+ <bundle>mvn:org.jvnet.jaxb2_commons/jaxb2-basics-runtime/${jvnet.jaxb2.version}</bundle>
+ -->
+ </feature>
+</features>
diff --git a/aai-service/installer/pom.xml b/aai-service/installer/pom.xml
new file mode 100755
index 0000000..b632c54
--- /dev/null
+++ b/aai-service/installer/pom.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>aai-service</artifactId>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>aai-service-installer</artifactId>
+ <name>AAI Adaptor - Karaf Installer</name>
+ <packaging>pom</packaging>
+
+ <properties>
+ <application.name>sdnc-aai-service</application.name>
+ <features.boot>sdnc-aai-service</features.boot>
+ <features.repositories>mvn:org.openecomp.sdnc.adaptors/aai-service-features/${project.version}/xml/features</features.repositories>
+ <include.transitive.dependencies>false</include.transitive.dependencies>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>aai-service-features</artifactId>
+ <version>${project.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>aai-service-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jvnet.jaxb2_commons</groupId>
+ <artifactId>jaxb2-basics-runtime</artifactId>
+ <version>${jvnet.jaxb2.version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>maven-repo-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>false</attach>
+ <finalName>stage/${application.name}-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ <execution>
+ <id>installer-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>true</attach>
+ <finalName>${application.name}-${project.version}-installer</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>prepare-package</phase>
+ <configuration>
+ <transitive>false</transitive>
+ <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <useRepositoryLayout>true</useRepositoryLayout>
+ <addParentPoms>false</addParentPoms>
+ <copyPom>false</copyPom>
+ <includeGroupIds>org.openecomp.sdnc,org.jvnet.jaxb2_commons</includeGroupIds>
+ <excludeArtifactIds>sli-common,sli-provider,dblib-provider,dblib-common</excludeArtifactIds>
+ <scope>provided</scope>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-version</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources/scripts</directory>
+ <includes>
+ <include>install-feature.sh</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+</project>
diff --git a/aai-service/installer/src/assembly/assemble_installer_zip.xml b/aai-service/installer/src/assembly/assemble_installer_zip.xml
new file mode 100644
index 0000000..0ce9b1a
--- /dev/null
+++ b/aai-service/installer/src/assembly/assemble_installer_zip.xml
@@ -0,0 +1,58 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- we want "system" and related files right at the root level
+ as this file is suppose to be unzip on top of a karaf
+ distro. -->
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target/stage/</directory>
+ <outputDirectory>${application.name}</outputDirectory>
+ <fileMode>755</fileMode>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>target/stage/</directory>
+ <outputDirectory>${application.name}</outputDirectory>
+ <fileMode>644</fileMode>
+ <excludes>
+ <exclude>*.sh</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+
+
+
+</assembly>
diff --git a/aai-service/installer/src/assembly/assemble_mvnrepo_zip.xml b/aai-service/installer/src/assembly/assemble_mvnrepo_zip.xml
new file mode 100644
index 0000000..ba21dda
--- /dev/null
+++ b/aai-service/installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -0,0 +1,48 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- we want "system" and related files right at the root level
+ as this file is suppose to be unzip on top of a karaf
+ distro. -->
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target/assembly/</directory>
+ <outputDirectory>.</outputDirectory>
+ <excludes>
+ </excludes>
+ </fileSet>
+ </fileSets>
+
+
+
+</assembly>
diff --git a/aai-service/installer/src/main/resources/scripts/install-feature.sh b/aai-service/installer/src/main/resources/scripts/install-feature.sh
new file mode 100644
index 0000000..33e9b03
--- /dev/null
+++ b/aai-service/installer/src/main/resources/scripts/install-feature.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
+ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"}
+INSTALLERDIR=$(dirname $0)
+
+REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
+
+if [ -f ${REPOZIP} ]
+then
+ unzip -d ${ODL_HOME} ${REPOZIP}
+else
+ echo "ERROR : repo zip ($REPOZIP) not found"
+ exit 1
+fi
+
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}
diff --git a/aai-service/pom.xml b/aai-service/pom.xml
new file mode 100755
index 0000000..e6cec69
--- /dev/null
+++ b/aai-service/pom.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sdnc-adaptors</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>aai-service</artifactId>
+
+
+ <name>AAI Interface Service</name>
+ <description>The AAI Interface service exposes an interface to AAI as an OSGi service</description>
+
+ <version>1.0.0</version>
+ <dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>aai-service-features</artifactId>
+ <classifier>features</classifier>
+ <version>${project.version}</version>
+ <type>xml</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>aai-service-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>provider</module>
+ <module>features</module>
+ <module>installer</module>
+ </modules>
+</project>
diff --git a/aai-service/provider/pom.xml b/aai-service/provider/pom.xml
new file mode 100755
index 0000000..0653f61
--- /dev/null
+++ b/aai-service/provider/pom.xml
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>aai-service</artifactId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>aai-service-provider</artifactId>
+ <packaging>bundle</packaging>
+ <name>AAI Interface Service - Provider</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <version>${mockito.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>sli-common</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>sli-provider</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>equinoxSDK381</groupId>
+ <artifactId>org.eclipse.osgi</artifactId>
+ <version>${equinox.osgi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-client</artifactId>
+ <version>${jersey.client.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ <version>${jersey.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpcore-osgi</artifactId>
+ <version>${apache.httpcomponents.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient-osgi</artifactId>
+ <version>${apache.httpcomponents.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <!-- <type>bundle</type> -->
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.module</groupId>
+ <artifactId>jackson-module-jaxb-annotations</artifactId>
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ <!-- <type>bundle</type> -->
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <!-- <type>bundle</type> -->
+ <version>${jackson.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>${commons.lang.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jvnet.jaxb2_commons</groupId>
+ <artifactId>jaxb2-basics-runtime</artifactId>
+ <version>0.6.4</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>${bundle.plugin.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>org.openecomp.sdnc.sli.aai</Bundle-SymbolicName>
+ <Bundle-Activator>org.openecomp.sdnc.sli.aai.AAIServiceActivator</Bundle-Activator>
+ <Export-Package>org.openecomp.sdnc.sli.aai.*,inventory.aai.sdnc.openecomp.org.v8.*</Export-Package>
+ <Import-Package>org.openecomp.sdnc.sli.*,org.osgi.framework.*,org.slf4j.*,org.apache.commons.lang3.*,javax.xml.bind.annotation.*,javax.ws.rs.*,javax.ws.rs.core.*,com.fasterxml.jackson.module.jaxb.*,com.sun.jersey.client.urlconnection.*,com.sun.jersey.api.client.config.*,com.fasterxml.jackson.databind.type.*,com.fasterxml.jackson.module.jaxb.*,com.fasterxml.jackson.databind.introspect.*,com.fasterxml.jackson.annotation.*,com.fasterxml.jackson.databind.*</Import-Package>
+ <!-- <Import-Package>org.openecomp.sdnc.sli.*,org.osgi.framework.*,org.slf4j.*</Import-Package> -->
+ <!-- <Embed-Dependency>*;scope=compile|runtime;artifactId=!sli-common|org.eclipse.osgi|slf4j-api|jcl-over-slf4j|mysql-connector-java|xml-apis</Embed-Dependency> -->
+ <Import-Package>*</Import-Package>
+ <Embed-Transitive>true</Embed-Transitive>
+ </instructions>
+
+
+ </configuration>
+
+ </plugin>
+
+ <plugin>
+ <groupId>org.jvnet.jaxb2.maven2</groupId>
+ <artifactId>maven-jaxb2-plugin</artifactId>
+ <version>0.13.1</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <schemaIncludes>
+ <value>aai_schema_v8.xsd</value>
+ </schemaIncludes>
+ <bindingIncludes>
+ <include>aai-schema-bindings.xjb</include>
+ </bindingIncludes>
+ <schemaDirectory>${project.basedir}/src/main/resources</schemaDirectory>
+ <generateDirectory>${project.basedir}/src/main/java</generateDirectory>
+ <generatePackage>org.openecomp.aai.inventory.v8</generatePackage>
+ <extension>true</extension>
+ <args>
+ <arg>-Xannotate</arg>
+ </args>
+ <plugins>
+ <plugin>
+ <groupId>org.jvnet.jaxb2_commons</groupId>
+ <artifactId>jaxb2-basics-annotate</artifactId>
+ <version>0.6.4</version>
+ </plugin>
+ </plugins>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings
+ only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ com.brocade.developer
+ </groupId>
+ <artifactId>
+ providermodule-plugin
+ </artifactId>
+ <versionRange>
+ [1.2.0.100-SNAPSHOT,)
+ </versionRange>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
diff --git a/aai-service/provider/src/main/java/META-INF/sun-jaxb.episode b/aai-service/provider/src/main/java/META-INF/sun-jaxb.episode
new file mode 100755
index 0000000..b3df81c
--- /dev/null
+++ b/aai-service/provider/src/main/java/META-INF/sun-jaxb.episode
@@ -0,0 +1,376 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<bindings xmlns="http://java.sun.com/xml/ns/jaxb" if-exists="true" version="2.1">
+ <!--
+
+This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+Any modifications to this file will be lost upon recompilation of the source schema.
+Generated on: 2017.02.14 at 01:05:25 PM EST
+
+ -->
+ <bindings xmlns:tns="http://org.openecomp.aai.inventory/v8" if-exists="true" scd="x-schema::tns">
+ <schemaBindings map="false">
+ <package name="org.openecomp.aai.inventory.v8"/>
+ </schemaBindings>
+ <bindings if-exists="true" scd="tns:model-element">
+ <class ref="org.openecomp.aai.inventory.v8.ModelElement"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:named-query">
+ <class ref="org.openecomp.aai.inventory.v8.NamedQuery"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:result-data">
+ <class ref="org.openecomp.aai.inventory.v8.ResultData"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:search-results">
+ <class ref="org.openecomp.aai.inventory.v8.SearchResults"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:search">
+ <class ref="org.openecomp.aai.inventory.v8.Search"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:update-node-key">
+ <class ref="org.openecomp.aai.inventory.v8.UpdateNodeKey"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:action-data">
+ <class ref="org.openecomp.aai.inventory.v8.ActionData"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:action">
+ <class ref="org.openecomp.aai.inventory.v8.Action"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:update">
+ <class ref="org.openecomp.aai.inventory.v8.Update"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:key-data">
+ <class ref="org.openecomp.aai.inventory.v8.KeyData"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:notify">
+ <class ref="org.openecomp.aai.inventory.v8.Notify"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:actions">
+ <class ref="org.openecomp.aai.inventory.v8.Actions"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:relationship-data">
+ <class ref="org.openecomp.aai.inventory.v8.RelationshipData"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:related-to-property">
+ <class ref="org.openecomp.aai.inventory.v8.RelatedToProperty"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:relationship">
+ <class ref="org.openecomp.aai.inventory.v8.Relationship"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:relationship-list">
+ <class ref="org.openecomp.aai.inventory.v8.RelationshipList"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:volume-group">
+ <class ref="org.openecomp.aai.inventory.v8.VolumeGroup"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:volume-groups">
+ <class ref="org.openecomp.aai.inventory.v8.VolumeGroups"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:volume">
+ <class ref="org.openecomp.aai.inventory.v8.Volume"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:volumes">
+ <class ref="org.openecomp.aai.inventory.v8.Volumes"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:l3-interface-ipv4-address-list">
+ <class ref="org.openecomp.aai.inventory.v8.L3InterfaceIpv4AddressList"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:l3-interface-ipv6-address-list">
+ <class ref="org.openecomp.aai.inventory.v8.L3InterfaceIpv6AddressList"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:vlan">
+ <class ref="org.openecomp.aai.inventory.v8.Vlan"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:vlans">
+ <class ref="org.openecomp.aai.inventory.v8.Vlans"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:l-interface">
+ <class ref="org.openecomp.aai.inventory.v8.LInterface"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:l-interfaces">
+ <class ref="org.openecomp.aai.inventory.v8.LInterfaces"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:vserver">
+ <class ref="org.openecomp.aai.inventory.v8.Vserver"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:vservers">
+ <class ref="org.openecomp.aai.inventory.v8.Vservers"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:tenant">
+ <class ref="org.openecomp.aai.inventory.v8.Tenant"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:tenants">
+ <class ref="org.openecomp.aai.inventory.v8.Tenants"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:flavor">
+ <class ref="org.openecomp.aai.inventory.v8.Flavor"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:flavors">
+ <class ref="org.openecomp.aai.inventory.v8.Flavors"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:group-assignment">
+ <class ref="org.openecomp.aai.inventory.v8.GroupAssignment"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:group-assignments">
+ <class ref="org.openecomp.aai.inventory.v8.GroupAssignments"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:snapshot">
+ <class ref="org.openecomp.aai.inventory.v8.Snapshot"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:snapshots">
+ <class ref="org.openecomp.aai.inventory.v8.Snapshots"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:metadatum">
+ <class ref="org.openecomp.aai.inventory.v8.Metadatum"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:metadata">
+ <class ref="org.openecomp.aai.inventory.v8.Metadata"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:image">
+ <class ref="org.openecomp.aai.inventory.v8.Image"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:images">
+ <class ref="org.openecomp.aai.inventory.v8.Images"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:availability-zone">
+ <class ref="org.openecomp.aai.inventory.v8.AvailabilityZone"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:availability-zones">
+ <class ref="org.openecomp.aai.inventory.v8.AvailabilityZones"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:cloud-region">
+ <class ref="org.openecomp.aai.inventory.v8.CloudRegion"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:cloud-regions">
+ <class ref="org.openecomp.aai.inventory.v8.CloudRegions"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:p-interface">
+ <class ref="org.openecomp.aai.inventory.v8.PInterface"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:p-interfaces">
+ <class ref="org.openecomp.aai.inventory.v8.PInterfaces"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:lag-interface">
+ <class ref="org.openecomp.aai.inventory.v8.LagInterface"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:lag-interfaces">
+ <class ref="org.openecomp.aai.inventory.v8.LagInterfaces"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:pserver">
+ <class ref="org.openecomp.aai.inventory.v8.Pserver"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:pservers">
+ <class ref="org.openecomp.aai.inventory.v8.Pservers"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:cloud-infrastructure">
+ <class ref="org.openecomp.aai.inventory.v8.CloudInfrastructure"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:service-instance">
+ <class ref="org.openecomp.aai.inventory.v8.ServiceInstance"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:service-instances">
+ <class ref="org.openecomp.aai.inventory.v8.ServiceInstances"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:service-subscription">
+ <class ref="org.openecomp.aai.inventory.v8.ServiceSubscription"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:service-subscriptions">
+ <class ref="org.openecomp.aai.inventory.v8.ServiceSubscriptions"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:customer">
+ <class ref="org.openecomp.aai.inventory.v8.Customer"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:customers">
+ <class ref="org.openecomp.aai.inventory.v8.Customers"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:business">
+ <class ref="org.openecomp.aai.inventory.v8.Business"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:service">
+ <class ref="org.openecomp.aai.inventory.v8.Service"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:services">
+ <class ref="org.openecomp.aai.inventory.v8.Services"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:element-choice-set">
+ <class ref="org.openecomp.aai.inventory.v8.ElementChoiceSet"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:model-elements">
+ <class ref="org.openecomp.aai.inventory.v8.ModelElements"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:model-constraints">
+ <class ref="org.openecomp.aai.inventory.v8.ModelConstraints"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:model-constraint">
+ <class ref="org.openecomp.aai.inventory.v8.ModelConstraint"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:constrained-element-sets">
+ <class ref="org.openecomp.aai.inventory.v8.ConstrainedElementSets"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:constrained-element-set">
+ <class ref="org.openecomp.aai.inventory.v8.ConstrainedElementSet"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:element-choice-sets">
+ <class ref="org.openecomp.aai.inventory.v8.ElementChoiceSets"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:model">
+ <class ref="org.openecomp.aai.inventory.v8.Model"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:models">
+ <class ref="org.openecomp.aai.inventory.v8.Models"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:related-lookup">
+ <class ref="org.openecomp.aai.inventory.v8.RelatedLookup"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:related-lookups">
+ <class ref="org.openecomp.aai.inventory.v8.RelatedLookups"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:property-constraint">
+ <class ref="org.openecomp.aai.inventory.v8.PropertyConstraint"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:property-constraints">
+ <class ref="org.openecomp.aai.inventory.v8.PropertyConstraints"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:named-query-element">
+ <class ref="org.openecomp.aai.inventory.v8.NamedQueryElement"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:named-query-elements">
+ <class ref="org.openecomp.aai.inventory.v8.NamedQueryElements"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:named-queries">
+ <class ref="org.openecomp.aai.inventory.v8.NamedQueries"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:service-design-and-creation">
+ <class ref="org.openecomp.aai.inventory.v8.ServiceDesignAndCreation"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:logical-link">
+ <class ref="org.openecomp.aai.inventory.v8.LogicalLink"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:logical-links">
+ <class ref="org.openecomp.aai.inventory.v8.LogicalLinks"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:vnfc">
+ <class ref="org.openecomp.aai.inventory.v8.Vnfc"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:vnfcs">
+ <class ref="org.openecomp.aai.inventory.v8.Vnfcs"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:subnet">
+ <class ref="org.openecomp.aai.inventory.v8.Subnet"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:subnets">
+ <class ref="org.openecomp.aai.inventory.v8.Subnets"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:ctag-assignment">
+ <class ref="org.openecomp.aai.inventory.v8.CtagAssignment"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:ctag-assignments">
+ <class ref="org.openecomp.aai.inventory.v8.CtagAssignments"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:segmentation-assignment">
+ <class ref="org.openecomp.aai.inventory.v8.SegmentationAssignment"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:segmentation-assignments">
+ <class ref="org.openecomp.aai.inventory.v8.SegmentationAssignments"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:l3-network">
+ <class ref="org.openecomp.aai.inventory.v8.L3Network"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:l3-networks">
+ <class ref="org.openecomp.aai.inventory.v8.L3Networks"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:vf-module">
+ <class ref="org.openecomp.aai.inventory.v8.VfModule"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:vf-modules">
+ <class ref="org.openecomp.aai.inventory.v8.VfModules"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:generic-vnf">
+ <class ref="org.openecomp.aai.inventory.v8.GenericVnf"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:generic-vnfs">
+ <class ref="org.openecomp.aai.inventory.v8.GenericVnfs"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:pnf">
+ <class ref="org.openecomp.aai.inventory.v8.Pnf"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:pnfs">
+ <class ref="org.openecomp.aai.inventory.v8.Pnfs"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:physical-link">
+ <class ref="org.openecomp.aai.inventory.v8.PhysicalLink"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:physical-links">
+ <class ref="org.openecomp.aai.inventory.v8.PhysicalLinks"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:network">
+ <class ref="org.openecomp.aai.inventory.v8.Network"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:reserved-prop-names">
+ <class ref="org.openecomp.aai.inventory.v8.ReservedPropNames"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:edge-prop-names">
+ <class ref="org.openecomp.aai.inventory.v8.EdgePropNames"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:aai-internal">
+ <class ref="org.openecomp.aai.inventory.v8.AaiInternal"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:inventory">
+ <class ref="org.openecomp.aai.inventory.v8.Inventory"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:inventory-item-data">
+ <class ref="org.openecomp.aai.inventory.v8.InventoryItemData"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:inventory-item">
+ <class ref="org.openecomp.aai.inventory.v8.InventoryItem"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:tagged-inventory-item-list">
+ <class ref="org.openecomp.aai.inventory.v8.TaggedInventoryItemList"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:start-node-filter">
+ <class ref="org.openecomp.aai.inventory.v8.StartNodeFilter"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:include-node-filter">
+ <class ref="org.openecomp.aai.inventory.v8.IncludeNodeFilter"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:secondary-filter">
+ <class ref="org.openecomp.aai.inventory.v8.SecondaryFilter"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:notification-event-header">
+ <class ref="org.openecomp.aai.inventory.v8.NotificationEventHeader"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:notification-event">
+ <class ref="org.openecomp.aai.inventory.v8.NotificationEvent"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:query-parameters">
+ <class ref="org.openecomp.aai.inventory.v8.QueryParameters"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:instance-filter">
+ <class ref="org.openecomp.aai.inventory.v8.InstanceFilter"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:instance-filters">
+ <class ref="org.openecomp.aai.inventory.v8.InstanceFilters"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:model-and-named-query-search">
+ <class ref="org.openecomp.aai.inventory.v8.ModelAndNamedQuerySearch"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:properties">
+ <class ref="org.openecomp.aai.inventory.v8.Properties"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:extra-properties">
+ <class ref="org.openecomp.aai.inventory.v8.ExtraProperties"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:inventory-response-item">
+ <class ref="org.openecomp.aai.inventory.v8.InventoryResponseItem"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:inventory-response-items">
+ <class ref="org.openecomp.aai.inventory.v8.InventoryResponseItems"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:response-list">
+ <class ref="org.openecomp.aai.inventory.v8.ResponseList"/>
+ </bindings>
+ <bindings if-exists="true" scd="tns:extra-property">
+ <class ref="org.openecomp.aai.inventory.v8.ExtraProperty"/>
+ </bindings>
+ </bindings>
+</bindings>
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AaiInternal.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AaiInternal.java
new file mode 100644
index 0000000..5d6bd59
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AaiInternal.java
@@ -0,0 +1,114 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}reserved-prop-names" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}edge-prop-names" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "reservedPropNames",
+ "edgePropNames"
+})
+@XmlRootElement(name = "aai-internal")
+public class AaiInternal
+ implements AAIDatum
+{
+
+ @XmlElement(name = "reserved-prop-names")
+ protected List<ReservedPropNames> reservedPropNames;
+ @XmlElement(name = "edge-prop-names")
+ protected List<EdgePropNames> edgePropNames;
+
+ /**
+ * Gets the value of the reservedPropNames property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the reservedPropNames property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getReservedPropNames().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ReservedPropNames }
+ *
+ *
+ */
+ public List<ReservedPropNames> getReservedPropNames() {
+ if (reservedPropNames == null) {
+ reservedPropNames = new ArrayList<ReservedPropNames>();
+ }
+ return this.reservedPropNames;
+ }
+
+ /**
+ * Gets the value of the edgePropNames property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the edgePropNames property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getEdgePropNames().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link EdgePropNames }
+ *
+ *
+ */
+ public List<EdgePropNames> getEdgePropNames() {
+ if (edgePropNames == null) {
+ edgePropNames = new ArrayList<EdgePropNames>();
+ }
+ return this.edgePropNames;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Action.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Action.java
new file mode 100644
index 0000000..95aa6ed
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Action.java
@@ -0,0 +1,109 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="action-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}action-data" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "actionType",
+ "actionData"
+})
+@XmlRootElement(name = "action")
+public class Action
+ implements AAIDatum
+{
+
+ @XmlElement(name = "action-type")
+ protected String actionType;
+ @XmlElement(name = "action-data")
+ protected List<ActionData> actionData;
+
+ /**
+ * Gets the value of the actionType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getActionType() {
+ return actionType;
+ }
+
+ /**
+ * Sets the value of the actionType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setActionType(String value) {
+ this.actionType = value;
+ }
+
+ /**
+ * Gets the value of the actionData property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the actionData property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getActionData().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ActionData }
+ *
+ *
+ */
+ public List<ActionData> getActionData() {
+ if (actionData == null) {
+ actionData = new ArrayList<ActionData>();
+ }
+ return this.actionData;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ActionData.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ActionData.java
new file mode 100644
index 0000000..7aa7a05
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ActionData.java
@@ -0,0 +1,102 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="property-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="property-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "propertyName",
+ "propertyValue"
+})
+@XmlRootElement(name = "action-data")
+public class ActionData
+ implements AAIDatum
+{
+
+ @XmlElement(name = "property-name")
+ protected String propertyName;
+ @XmlElement(name = "property-value")
+ protected String propertyValue;
+
+ /**
+ * Gets the value of the propertyName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ /**
+ * Sets the value of the propertyName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyName(String value) {
+ this.propertyName = value;
+ }
+
+ /**
+ * Gets the value of the propertyValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyValue() {
+ return propertyValue;
+ }
+
+ /**
+ * Sets the value of the propertyValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyValue(String value) {
+ this.propertyValue = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Actions.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Actions.java
new file mode 100644
index 0000000..e7bb49a
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Actions.java
@@ -0,0 +1,99 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}update" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}notify" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "update",
+ "notify"
+})
+@XmlRootElement(name = "actions")
+public class Actions
+ implements AAIDatum
+{
+
+ protected Update update;
+ protected Notify notify;
+
+ /**
+ * Gets the value of the update property.
+ *
+ * @return
+ * possible object is
+ * {@link Update }
+ *
+ */
+ public Update getUpdate() {
+ return update;
+ }
+
+ /**
+ * Sets the value of the update property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Update }
+ *
+ */
+ public void setUpdate(Update value) {
+ this.update = value;
+ }
+
+ /**
+ * Gets the value of the notify property.
+ *
+ * @return
+ * possible object is
+ * {@link Notify }
+ *
+ */
+ public Notify getNotify() {
+ return notify;
+ }
+
+ /**
+ * Sets the value of the notify property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Notify }
+ *
+ */
+ public void setNotify(Notify value) {
+ this.notify = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AvailabilityZone.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AvailabilityZone.java
new file mode 100644
index 0000000..0cd65dc
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AvailabilityZone.java
@@ -0,0 +1,186 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="availability-zone-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="hypervisor-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="operational-state" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "availabilityZoneName",
+ "hypervisorType",
+ "operationalState",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "availability-zone")
+public class AvailabilityZone
+ implements AAIDatum
+{
+
+ @XmlElement(name = "availability-zone-name", required = true)
+ protected String availabilityZoneName;
+ @XmlElement(name = "hypervisor-type", required = true)
+ protected String hypervisorType;
+ @XmlElement(name = "operational-state")
+ protected String operationalState;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the availabilityZoneName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getAvailabilityZoneName() {
+ return availabilityZoneName;
+ }
+
+ /**
+ * Sets the value of the availabilityZoneName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setAvailabilityZoneName(String value) {
+ this.availabilityZoneName = value;
+ }
+
+ /**
+ * Gets the value of the hypervisorType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getHypervisorType() {
+ return hypervisorType;
+ }
+
+ /**
+ * Sets the value of the hypervisorType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setHypervisorType(String value) {
+ this.hypervisorType = value;
+ }
+
+ /**
+ * Gets the value of the operationalState property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOperationalState() {
+ return operationalState;
+ }
+
+ /**
+ * Sets the value of the operationalState property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOperationalState(String value) {
+ this.operationalState = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AvailabilityZones.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AvailabilityZones.java
new file mode 100644
index 0000000..98e0082
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/AvailabilityZones.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}availability-zone" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "availabilityZone"
+})
+@XmlRootElement(name = "availability-zones")
+public class AvailabilityZones
+ implements AAIDatum
+{
+
+ @XmlElement(name = "availability-zone")
+ protected List<AvailabilityZone> availabilityZone;
+
+ /**
+ * Gets the value of the availabilityZone property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the availabilityZone property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAvailabilityZone().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link AvailabilityZone }
+ *
+ *
+ */
+ public List<AvailabilityZone> getAvailabilityZone() {
+ if (availabilityZone == null) {
+ availabilityZone = new ArrayList<AvailabilityZone>();
+ }
+ return this.availabilityZone;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Business.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Business.java
new file mode 100644
index 0000000..7ac356b
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Business.java
@@ -0,0 +1,72 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}customers" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "customers"
+})
+@XmlRootElement(name = "business")
+public class Business
+ implements AAIDatum
+{
+
+ protected Customers customers;
+
+ /**
+ * Gets the value of the customers property.
+ *
+ * @return
+ * possible object is
+ * {@link Customers }
+ *
+ */
+ public Customers getCustomers() {
+ return customers;
+ }
+
+ /**
+ * Sets the value of the customers property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Customers }
+ *
+ */
+ public void setCustomers(Customers value) {
+ this.customers = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudInfrastructure.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudInfrastructure.java
new file mode 100644
index 0000000..d3fa79a
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudInfrastructure.java
@@ -0,0 +1,101 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}cloud-regions" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}pservers" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "cloudRegions",
+ "pservers"
+})
+@XmlRootElement(name = "cloud-infrastructure")
+public class CloudInfrastructure
+ implements AAIDatum
+{
+
+ @XmlElement(name = "cloud-regions")
+ protected CloudRegions cloudRegions;
+ protected Pservers pservers;
+
+ /**
+ * Gets the value of the cloudRegions property.
+ *
+ * @return
+ * possible object is
+ * {@link CloudRegions }
+ *
+ */
+ public CloudRegions getCloudRegions() {
+ return cloudRegions;
+ }
+
+ /**
+ * Sets the value of the cloudRegions property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CloudRegions }
+ *
+ */
+ public void setCloudRegions(CloudRegions value) {
+ this.cloudRegions = value;
+ }
+
+ /**
+ * Gets the value of the pservers property.
+ *
+ * @return
+ * possible object is
+ * {@link Pservers }
+ *
+ */
+ public Pservers getPservers() {
+ return pservers;
+ }
+
+ /**
+ * Sets the value of the pservers property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Pservers }
+ *
+ */
+ public void setPservers(Pservers value) {
+ this.pservers = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudRegion.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudRegion.java
new file mode 100644
index 0000000..bd79a24
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudRegion.java
@@ -0,0 +1,518 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="cloud-owner" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="cloud-region-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="cloud-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="owner-defined-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="cloud-region-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="identity-url" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="cloud-zone" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="complex-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}volume-groups" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}tenants" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}flavors" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}group-assignments" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}snapshots" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}images" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}availability-zones" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "cloudOwner",
+ "cloudRegionId",
+ "cloudType",
+ "ownerDefinedType",
+ "cloudRegionVersion",
+ "identityUrl",
+ "cloudZone",
+ "complexName",
+ "resourceVersion",
+ "volumeGroups",
+ "tenants",
+ "flavors",
+ "groupAssignments",
+ "snapshots",
+ "images",
+ "availabilityZones",
+ "relationshipList"
+})
+@XmlRootElement(name = "cloud-region")
+public class CloudRegion
+ implements AAIDatum
+{
+
+ @XmlElement(name = "cloud-owner", required = true)
+ protected String cloudOwner;
+ @XmlElement(name = "cloud-region-id", required = true)
+ protected String cloudRegionId;
+ @XmlElement(name = "cloud-type")
+ protected String cloudType;
+ @XmlElement(name = "owner-defined-type")
+ protected String ownerDefinedType;
+ @XmlElement(name = "cloud-region-version")
+ protected String cloudRegionVersion;
+ @XmlElement(name = "identity-url")
+ protected String identityUrl;
+ @XmlElement(name = "cloud-zone")
+ protected String cloudZone;
+ @XmlElement(name = "complex-name")
+ protected String complexName;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "volume-groups")
+ protected VolumeGroups volumeGroups;
+ protected Tenants tenants;
+ protected Flavors flavors;
+ @XmlElement(name = "group-assignments")
+ protected GroupAssignments groupAssignments;
+ protected Snapshots snapshots;
+ protected Images images;
+ @XmlElement(name = "availability-zones")
+ protected AvailabilityZones availabilityZones;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the cloudOwner property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCloudOwner() {
+ return cloudOwner;
+ }
+
+ /**
+ * Sets the value of the cloudOwner property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCloudOwner(String value) {
+ this.cloudOwner = value;
+ }
+
+ /**
+ * Gets the value of the cloudRegionId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCloudRegionId() {
+ return cloudRegionId;
+ }
+
+ /**
+ * Sets the value of the cloudRegionId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCloudRegionId(String value) {
+ this.cloudRegionId = value;
+ }
+
+ /**
+ * Gets the value of the cloudType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCloudType() {
+ return cloudType;
+ }
+
+ /**
+ * Sets the value of the cloudType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCloudType(String value) {
+ this.cloudType = value;
+ }
+
+ /**
+ * Gets the value of the ownerDefinedType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOwnerDefinedType() {
+ return ownerDefinedType;
+ }
+
+ /**
+ * Sets the value of the ownerDefinedType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOwnerDefinedType(String value) {
+ this.ownerDefinedType = value;
+ }
+
+ /**
+ * Gets the value of the cloudRegionVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCloudRegionVersion() {
+ return cloudRegionVersion;
+ }
+
+ /**
+ * Sets the value of the cloudRegionVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCloudRegionVersion(String value) {
+ this.cloudRegionVersion = value;
+ }
+
+ /**
+ * Gets the value of the identityUrl property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getIdentityUrl() {
+ return identityUrl;
+ }
+
+ /**
+ * Sets the value of the identityUrl property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setIdentityUrl(String value) {
+ this.identityUrl = value;
+ }
+
+ /**
+ * Gets the value of the cloudZone property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCloudZone() {
+ return cloudZone;
+ }
+
+ /**
+ * Sets the value of the cloudZone property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCloudZone(String value) {
+ this.cloudZone = value;
+ }
+
+ /**
+ * Gets the value of the complexName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getComplexName() {
+ return complexName;
+ }
+
+ /**
+ * Sets the value of the complexName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setComplexName(String value) {
+ this.complexName = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the volumeGroups property.
+ *
+ * @return
+ * possible object is
+ * {@link VolumeGroups }
+ *
+ */
+ public VolumeGroups getVolumeGroups() {
+ return volumeGroups;
+ }
+
+ /**
+ * Sets the value of the volumeGroups property.
+ *
+ * @param value
+ * allowed object is
+ * {@link VolumeGroups }
+ *
+ */
+ public void setVolumeGroups(VolumeGroups value) {
+ this.volumeGroups = value;
+ }
+
+ /**
+ * Gets the value of the tenants property.
+ *
+ * @return
+ * possible object is
+ * {@link Tenants }
+ *
+ */
+ public Tenants getTenants() {
+ return tenants;
+ }
+
+ /**
+ * Sets the value of the tenants property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Tenants }
+ *
+ */
+ public void setTenants(Tenants value) {
+ this.tenants = value;
+ }
+
+ /**
+ * Gets the value of the flavors property.
+ *
+ * @return
+ * possible object is
+ * {@link Flavors }
+ *
+ */
+ public Flavors getFlavors() {
+ return flavors;
+ }
+
+ /**
+ * Sets the value of the flavors property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Flavors }
+ *
+ */
+ public void setFlavors(Flavors value) {
+ this.flavors = value;
+ }
+
+ /**
+ * Gets the value of the groupAssignments property.
+ *
+ * @return
+ * possible object is
+ * {@link GroupAssignments }
+ *
+ */
+ public GroupAssignments getGroupAssignments() {
+ return groupAssignments;
+ }
+
+ /**
+ * Sets the value of the groupAssignments property.
+ *
+ * @param value
+ * allowed object is
+ * {@link GroupAssignments }
+ *
+ */
+ public void setGroupAssignments(GroupAssignments value) {
+ this.groupAssignments = value;
+ }
+
+ /**
+ * Gets the value of the snapshots property.
+ *
+ * @return
+ * possible object is
+ * {@link Snapshots }
+ *
+ */
+ public Snapshots getSnapshots() {
+ return snapshots;
+ }
+
+ /**
+ * Sets the value of the snapshots property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Snapshots }
+ *
+ */
+ public void setSnapshots(Snapshots value) {
+ this.snapshots = value;
+ }
+
+ /**
+ * Gets the value of the images property.
+ *
+ * @return
+ * possible object is
+ * {@link Images }
+ *
+ */
+ public Images getImages() {
+ return images;
+ }
+
+ /**
+ * Sets the value of the images property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Images }
+ *
+ */
+ public void setImages(Images value) {
+ this.images = value;
+ }
+
+ /**
+ * Gets the value of the availabilityZones property.
+ *
+ * @return
+ * possible object is
+ * {@link AvailabilityZones }
+ *
+ */
+ public AvailabilityZones getAvailabilityZones() {
+ return availabilityZones;
+ }
+
+ /**
+ * Sets the value of the availabilityZones property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AvailabilityZones }
+ *
+ */
+ public void setAvailabilityZones(AvailabilityZones value) {
+ this.availabilityZones = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudRegions.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudRegions.java
new file mode 100644
index 0000000..0d24631
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CloudRegions.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}cloud-region" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "cloudRegion"
+})
+@XmlRootElement(name = "cloud-regions")
+public class CloudRegions
+ implements AAIDatum
+{
+
+ @XmlElement(name = "cloud-region")
+ protected List<CloudRegion> cloudRegion;
+
+ /**
+ * Gets the value of the cloudRegion property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the cloudRegion property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getCloudRegion().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link CloudRegion }
+ *
+ *
+ */
+ public List<CloudRegion> getCloudRegion() {
+ if (cloudRegion == null) {
+ cloudRegion = new ArrayList<CloudRegion>();
+ }
+ return this.cloudRegion;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ConstrainedElementSet.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ConstrainedElementSet.java
new file mode 100644
index 0000000..04e7737
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ConstrainedElementSet.java
@@ -0,0 +1,214 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="constrained-element-set-uuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="constraint-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="check-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}element-choice-sets" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "constrainedElementSetUuid",
+ "constraintType",
+ "checkType",
+ "resourceVersion",
+ "elementChoiceSets",
+ "relationshipList"
+})
+@XmlRootElement(name = "constrained-element-set")
+public class ConstrainedElementSet
+ implements AAIDatum
+{
+
+ @XmlElement(name = "constrained-element-set-uuid", required = true)
+ protected String constrainedElementSetUuid;
+ @XmlElement(name = "constraint-type", required = true)
+ protected String constraintType;
+ @XmlElement(name = "check-type", required = true)
+ protected String checkType;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "element-choice-sets")
+ protected ElementChoiceSets elementChoiceSets;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the constrainedElementSetUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getConstrainedElementSetUuid() {
+ return constrainedElementSetUuid;
+ }
+
+ /**
+ * Sets the value of the constrainedElementSetUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setConstrainedElementSetUuid(String value) {
+ this.constrainedElementSetUuid = value;
+ }
+
+ /**
+ * Gets the value of the constraintType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getConstraintType() {
+ return constraintType;
+ }
+
+ /**
+ * Sets the value of the constraintType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setConstraintType(String value) {
+ this.constraintType = value;
+ }
+
+ /**
+ * Gets the value of the checkType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCheckType() {
+ return checkType;
+ }
+
+ /**
+ * Sets the value of the checkType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCheckType(String value) {
+ this.checkType = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the elementChoiceSets property.
+ *
+ * @return
+ * possible object is
+ * {@link ElementChoiceSets }
+ *
+ */
+ public ElementChoiceSets getElementChoiceSets() {
+ return elementChoiceSets;
+ }
+
+ /**
+ * Sets the value of the elementChoiceSets property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ElementChoiceSets }
+ *
+ */
+ public void setElementChoiceSets(ElementChoiceSets value) {
+ this.elementChoiceSets = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ConstrainedElementSets.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ConstrainedElementSets.java
new file mode 100644
index 0000000..96a3b24
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ConstrainedElementSets.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}constrained-element-set" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "constrainedElementSet"
+})
+@XmlRootElement(name = "constrained-element-sets")
+public class ConstrainedElementSets
+ implements AAIDatum
+{
+
+ @XmlElement(name = "constrained-element-set")
+ protected List<ConstrainedElementSet> constrainedElementSet;
+
+ /**
+ * Gets the value of the constrainedElementSet property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the constrainedElementSet property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getConstrainedElementSet().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ConstrainedElementSet }
+ *
+ *
+ */
+ public List<ConstrainedElementSet> getConstrainedElementSet() {
+ if (constrainedElementSet == null) {
+ constrainedElementSet = new ArrayList<ConstrainedElementSet>();
+ }
+ return this.constrainedElementSet;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CtagAssignment.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CtagAssignment.java
new file mode 100644
index 0000000..37c0313
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CtagAssignment.java
@@ -0,0 +1,124 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="vlan-id-inner" type="{http://www.w3.org/2001/XMLSchema}unsignedInt"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "vlanIdInner",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "ctag-assignment")
+public class CtagAssignment
+ implements AAIDatum
+{
+
+ @XmlElement(name = "vlan-id-inner")
+ @XmlSchemaType(name = "unsignedInt")
+ protected long vlanIdInner;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the vlanIdInner property.
+ *
+ */
+ public long getVlanIdInner() {
+ return vlanIdInner;
+ }
+
+ /**
+ * Sets the value of the vlanIdInner property.
+ *
+ */
+ public void setVlanIdInner(long value) {
+ this.vlanIdInner = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CtagAssignments.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CtagAssignments.java
new file mode 100644
index 0000000..5fb250d
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/CtagAssignments.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}ctag-assignment" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "ctagAssignment"
+})
+@XmlRootElement(name = "ctag-assignments")
+public class CtagAssignments
+ implements AAIDatum
+{
+
+ @XmlElement(name = "ctag-assignment")
+ protected List<CtagAssignment> ctagAssignment;
+
+ /**
+ * Gets the value of the ctagAssignment property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the ctagAssignment property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getCtagAssignment().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link CtagAssignment }
+ *
+ *
+ */
+ public List<CtagAssignment> getCtagAssignment() {
+ if (ctagAssignment == null) {
+ ctagAssignment = new ArrayList<CtagAssignment>();
+ }
+ return this.ctagAssignment;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Customer.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Customer.java
new file mode 100644
index 0000000..858d7f5
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Customer.java
@@ -0,0 +1,214 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="global-customer-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="subscriber-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="subscriber-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}service-subscriptions" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "globalCustomerId",
+ "subscriberName",
+ "subscriberType",
+ "resourceVersion",
+ "serviceSubscriptions",
+ "relationshipList"
+})
+@XmlRootElement(name = "customer")
+public class Customer
+ implements AAIDatum
+{
+
+ @XmlElement(name = "global-customer-id", required = true)
+ protected String globalCustomerId;
+ @XmlElement(name = "subscriber-name", required = true)
+ protected String subscriberName;
+ @XmlElement(name = "subscriber-type", required = true)
+ protected String subscriberType;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "service-subscriptions")
+ protected ServiceSubscriptions serviceSubscriptions;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the globalCustomerId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getGlobalCustomerId() {
+ return globalCustomerId;
+ }
+
+ /**
+ * Sets the value of the globalCustomerId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setGlobalCustomerId(String value) {
+ this.globalCustomerId = value;
+ }
+
+ /**
+ * Gets the value of the subscriberName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSubscriberName() {
+ return subscriberName;
+ }
+
+ /**
+ * Sets the value of the subscriberName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSubscriberName(String value) {
+ this.subscriberName = value;
+ }
+
+ /**
+ * Gets the value of the subscriberType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSubscriberType() {
+ return subscriberType;
+ }
+
+ /**
+ * Sets the value of the subscriberType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSubscriberType(String value) {
+ this.subscriberType = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the serviceSubscriptions property.
+ *
+ * @return
+ * possible object is
+ * {@link ServiceSubscriptions }
+ *
+ */
+ public ServiceSubscriptions getServiceSubscriptions() {
+ return serviceSubscriptions;
+ }
+
+ /**
+ * Sets the value of the serviceSubscriptions property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ServiceSubscriptions }
+ *
+ */
+ public void setServiceSubscriptions(ServiceSubscriptions value) {
+ this.serviceSubscriptions = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Customers.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Customers.java
new file mode 100644
index 0000000..f974427
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Customers.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}customer" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "customer"
+})
+@XmlRootElement(name = "customers")
+public class Customers
+ implements AAIDatum
+{
+
+ protected List<Customer> customer;
+
+ /**
+ * Gets the value of the customer property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the customer property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getCustomer().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Customer }
+ *
+ *
+ */
+ public List<Customer> getCustomer() {
+ if (customer == null) {
+ customer = new ArrayList<Customer>();
+ }
+ return this.customer;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/EdgePropNames.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/EdgePropNames.java
new file mode 100644
index 0000000..b26cc08
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/EdgePropNames.java
@@ -0,0 +1,264 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="edgeLabel" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="direction" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="multiplicityRule" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="isParent" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
+ * &lt;element name="usesResource" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
+ * &lt;element name="hasDelTarget" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
+ * &lt;element name="SVC-INFRA" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="SVC-INFRA-REV" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "edgeLabel",
+ "direction",
+ "multiplicityRule",
+ "isParent",
+ "usesResource",
+ "hasDelTarget",
+ "svcinfra",
+ "svcinfrarev"
+})
+@XmlRootElement(name = "edge-prop-names")
+public class EdgePropNames
+ implements AAIDatum
+{
+
+ protected String edgeLabel;
+ protected String direction;
+ protected String multiplicityRule;
+ protected Boolean isParent;
+ protected Boolean usesResource;
+ protected Boolean hasDelTarget;
+ @XmlElement(name = "SVC-INFRA")
+ protected String svcinfra;
+ @XmlElement(name = "SVC-INFRA-REV")
+ protected String svcinfrarev;
+
+ /**
+ * Gets the value of the edgeLabel property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEdgeLabel() {
+ return edgeLabel;
+ }
+
+ /**
+ * Sets the value of the edgeLabel property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEdgeLabel(String value) {
+ this.edgeLabel = value;
+ }
+
+ /**
+ * Gets the value of the direction property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDirection() {
+ return direction;
+ }
+
+ /**
+ * Sets the value of the direction property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDirection(String value) {
+ this.direction = value;
+ }
+
+ /**
+ * Gets the value of the multiplicityRule property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMultiplicityRule() {
+ return multiplicityRule;
+ }
+
+ /**
+ * Sets the value of the multiplicityRule property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMultiplicityRule(String value) {
+ this.multiplicityRule = value;
+ }
+
+ /**
+ * Gets the value of the isParent property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isIsParent() {
+ return isParent;
+ }
+
+ /**
+ * Sets the value of the isParent property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setIsParent(Boolean value) {
+ this.isParent = value;
+ }
+
+ /**
+ * Gets the value of the usesResource property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isUsesResource() {
+ return usesResource;
+ }
+
+ /**
+ * Sets the value of the usesResource property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setUsesResource(Boolean value) {
+ this.usesResource = value;
+ }
+
+ /**
+ * Gets the value of the hasDelTarget property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isHasDelTarget() {
+ return hasDelTarget;
+ }
+
+ /**
+ * Sets the value of the hasDelTarget property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setHasDelTarget(Boolean value) {
+ this.hasDelTarget = value;
+ }
+
+ /**
+ * Gets the value of the svcinfra property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSVCINFRA() {
+ return svcinfra;
+ }
+
+ /**
+ * Sets the value of the svcinfra property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSVCINFRA(String value) {
+ this.svcinfra = value;
+ }
+
+ /**
+ * Gets the value of the svcinfrarev property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSVCINFRAREV() {
+ return svcinfrarev;
+ }
+
+ /**
+ * Sets the value of the svcinfrarev property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSVCINFRAREV(String value) {
+ this.svcinfrarev = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ElementChoiceSet.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ElementChoiceSet.java
new file mode 100644
index 0000000..9deca1d
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ElementChoiceSet.java
@@ -0,0 +1,213 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="element-choice-set-uuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="element-choice-set-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="cardinality" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}model-elements" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "elementChoiceSetUuid",
+ "elementChoiceSetName",
+ "cardinality",
+ "resourceVersion",
+ "modelElements",
+ "relationshipList"
+})
+@XmlRootElement(name = "element-choice-set")
+public class ElementChoiceSet
+ implements AAIDatum
+{
+
+ @XmlElement(name = "element-choice-set-uuid", required = true)
+ protected String elementChoiceSetUuid;
+ @XmlElement(name = "element-choice-set-name", required = true)
+ protected String elementChoiceSetName;
+ protected String cardinality;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "model-elements")
+ protected ModelElements modelElements;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the elementChoiceSetUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getElementChoiceSetUuid() {
+ return elementChoiceSetUuid;
+ }
+
+ /**
+ * Sets the value of the elementChoiceSetUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setElementChoiceSetUuid(String value) {
+ this.elementChoiceSetUuid = value;
+ }
+
+ /**
+ * Gets the value of the elementChoiceSetName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getElementChoiceSetName() {
+ return elementChoiceSetName;
+ }
+
+ /**
+ * Sets the value of the elementChoiceSetName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setElementChoiceSetName(String value) {
+ this.elementChoiceSetName = value;
+ }
+
+ /**
+ * Gets the value of the cardinality property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCardinality() {
+ return cardinality;
+ }
+
+ /**
+ * Sets the value of the cardinality property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCardinality(String value) {
+ this.cardinality = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the modelElements property.
+ *
+ * @return
+ * possible object is
+ * {@link ModelElements }
+ *
+ */
+ public ModelElements getModelElements() {
+ return modelElements;
+ }
+
+ /**
+ * Sets the value of the modelElements property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ModelElements }
+ *
+ */
+ public void setModelElements(ModelElements value) {
+ this.modelElements = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ElementChoiceSets.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ElementChoiceSets.java
new file mode 100644
index 0000000..0d91543
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ElementChoiceSets.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}element-choice-set" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "elementChoiceSet"
+})
+@XmlRootElement(name = "element-choice-sets")
+public class ElementChoiceSets
+ implements AAIDatum
+{
+
+ @XmlElement(name = "element-choice-set")
+ protected List<ElementChoiceSet> elementChoiceSet;
+
+ /**
+ * Gets the value of the elementChoiceSet property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the elementChoiceSet property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getElementChoiceSet().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ElementChoiceSet }
+ *
+ *
+ */
+ public List<ElementChoiceSet> getElementChoiceSet() {
+ if (elementChoiceSet == null) {
+ elementChoiceSet = new ArrayList<ElementChoiceSet>();
+ }
+ return this.elementChoiceSet;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ExtraProperties.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ExtraProperties.java
new file mode 100644
index 0000000..c21582d
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ExtraProperties.java
@@ -0,0 +1,44 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "")
+@XmlRootElement(name = "extra-properties")
+public class ExtraProperties
+ implements AAIDatum
+{
+
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ExtraProperty.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ExtraProperty.java
new file mode 100644
index 0000000..520cbea
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ExtraProperty.java
@@ -0,0 +1,74 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="property-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "propertyName"
+})
+@XmlRootElement(name = "extra-property")
+public class ExtraProperty
+ implements AAIDatum
+{
+
+ @XmlElement(name = "property-name")
+ protected String propertyName;
+
+ /**
+ * Gets the value of the propertyName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ /**
+ * Sets the value of the propertyName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyName(String value) {
+ this.propertyName = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Flavor.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Flavor.java
new file mode 100644
index 0000000..a616564
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Flavor.java
@@ -0,0 +1,382 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="flavor-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="flavor-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="flavor-vcpus" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/&gt;
+ * &lt;element name="flavor-ram" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/&gt;
+ * &lt;element name="flavor-disk" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/&gt;
+ * &lt;element name="flavor-ephemeral" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/&gt;
+ * &lt;element name="flavor-swap" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="flavor-is-public" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
+ * &lt;element name="flavor-selflink" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="flavor-disabled" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "flavorId",
+ "flavorName",
+ "flavorVcpus",
+ "flavorRam",
+ "flavorDisk",
+ "flavorEphemeral",
+ "flavorSwap",
+ "flavorIsPublic",
+ "flavorSelflink",
+ "flavorDisabled",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "flavor")
+public class Flavor
+ implements AAIDatum
+{
+
+ @XmlElement(name = "flavor-id", required = true)
+ protected String flavorId;
+ @XmlElement(name = "flavor-name", required = true)
+ protected String flavorName;
+ @XmlElement(name = "flavor-vcpus")
+ protected Integer flavorVcpus;
+ @XmlElement(name = "flavor-ram")
+ protected Integer flavorRam;
+ @XmlElement(name = "flavor-disk")
+ protected Integer flavorDisk;
+ @XmlElement(name = "flavor-ephemeral")
+ protected Integer flavorEphemeral;
+ @XmlElement(name = "flavor-swap")
+ protected String flavorSwap;
+ @XmlElement(name = "flavor-is-public")
+ protected Boolean flavorIsPublic;
+ @XmlElement(name = "flavor-selflink", required = true)
+ protected String flavorSelflink;
+ @XmlElement(name = "flavor-disabled")
+ protected Boolean flavorDisabled;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the flavorId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFlavorId() {
+ return flavorId;
+ }
+
+ /**
+ * Sets the value of the flavorId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFlavorId(String value) {
+ this.flavorId = value;
+ }
+
+ /**
+ * Gets the value of the flavorName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFlavorName() {
+ return flavorName;
+ }
+
+ /**
+ * Sets the value of the flavorName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFlavorName(String value) {
+ this.flavorName = value;
+ }
+
+ /**
+ * Gets the value of the flavorVcpus property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getFlavorVcpus() {
+ return flavorVcpus;
+ }
+
+ /**
+ * Sets the value of the flavorVcpus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setFlavorVcpus(Integer value) {
+ this.flavorVcpus = value;
+ }
+
+ /**
+ * Gets the value of the flavorRam property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getFlavorRam() {
+ return flavorRam;
+ }
+
+ /**
+ * Sets the value of the flavorRam property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setFlavorRam(Integer value) {
+ this.flavorRam = value;
+ }
+
+ /**
+ * Gets the value of the flavorDisk property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getFlavorDisk() {
+ return flavorDisk;
+ }
+
+ /**
+ * Sets the value of the flavorDisk property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setFlavorDisk(Integer value) {
+ this.flavorDisk = value;
+ }
+
+ /**
+ * Gets the value of the flavorEphemeral property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getFlavorEphemeral() {
+ return flavorEphemeral;
+ }
+
+ /**
+ * Sets the value of the flavorEphemeral property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setFlavorEphemeral(Integer value) {
+ this.flavorEphemeral = value;
+ }
+
+ /**
+ * Gets the value of the flavorSwap property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFlavorSwap() {
+ return flavorSwap;
+ }
+
+ /**
+ * Sets the value of the flavorSwap property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFlavorSwap(String value) {
+ this.flavorSwap = value;
+ }
+
+ /**
+ * Gets the value of the flavorIsPublic property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isFlavorIsPublic() {
+ return flavorIsPublic;
+ }
+
+ /**
+ * Sets the value of the flavorIsPublic property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setFlavorIsPublic(Boolean value) {
+ this.flavorIsPublic = value;
+ }
+
+ /**
+ * Gets the value of the flavorSelflink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFlavorSelflink() {
+ return flavorSelflink;
+ }
+
+ /**
+ * Sets the value of the flavorSelflink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFlavorSelflink(String value) {
+ this.flavorSelflink = value;
+ }
+
+ /**
+ * Gets the value of the flavorDisabled property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isFlavorDisabled() {
+ return flavorDisabled;
+ }
+
+ /**
+ * Sets the value of the flavorDisabled property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setFlavorDisabled(Boolean value) {
+ this.flavorDisabled = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Flavors.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Flavors.java
new file mode 100644
index 0000000..2fa8d55
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Flavors.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}flavor" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "flavor"
+})
+@XmlRootElement(name = "flavors")
+public class Flavors
+ implements AAIDatum
+{
+
+ protected List<Flavor> flavor;
+
+ /**
+ * Gets the value of the flavor property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the flavor property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getFlavor().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Flavor }
+ *
+ *
+ */
+ public List<Flavor> getFlavor() {
+ if (flavor == null) {
+ flavor = new ArrayList<Flavor>();
+ }
+ return this.flavor;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GenericVnf.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GenericVnf.java
new file mode 100644
index 0000000..9c4364e
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GenericVnf.java
@@ -0,0 +1,1263 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="vnf-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="vnf-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="vnf-name2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="vnf-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="service-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="regional-resource-zone" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="prov-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="operational-state" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="license-key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="equipment-role" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="orchestration-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="heat-stack-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="mso-catalog-key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="management-option" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="ipv4-oam-address" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="ipv4-loopback0-address" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="nm-lan-v6-address" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="management-v6-address" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="vcpu" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="vcpu-units" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="vmemory" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="vmemory-units" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="vdisk" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="vdisk-units" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="in-maint" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="is-closed-loop-disabled" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="summary-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="encrypted-access-flag" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
+ * &lt;element name="entitlement-assignment-group-uuid" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="entitlement-resource-uuid" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="license-assignment-group-uuid" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="license-key-uuid" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="persona-model-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="persona-model-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="persona-model-customization-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="widget-model-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="widget-model-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="as-number" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="regional-resource-subzone" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}l-interfaces" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}lag-interfaces" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}vf-modules" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "vnfId",
+ "vnfName",
+ "vnfName2",
+ "vnfType",
+ "serviceId",
+ "regionalResourceZone",
+ "provStatus",
+ "operationalState",
+ "licenseKey",
+ "equipmentRole",
+ "orchestrationStatus",
+ "heatStackId",
+ "msoCatalogKey",
+ "managementOption",
+ "ipv4OamAddress",
+ "ipv4Loopback0Address",
+ "nmLanV6Address",
+ "managementV6Address",
+ "vcpu",
+ "vcpuUnits",
+ "vmemory",
+ "vmemoryUnits",
+ "vdisk",
+ "vdiskUnits",
+ "inMaint",
+ "isClosedLoopDisabled",
+ "resourceVersion",
+ "summaryStatus",
+ "encryptedAccessFlag",
+ "entitlementAssignmentGroupUuid",
+ "entitlementResourceUuid",
+ "licenseAssignmentGroupUuid",
+ "licenseKeyUuid",
+ "personaModelId",
+ "personaModelVersion",
+ "personaModelCustomizationId",
+ "widgetModelId",
+ "widgetModelVersion",
+ "asNumber",
+ "regionalResourceSubzone",
+ "relationshipList",
+ "lInterfaces",
+ "lagInterfaces",
+ "vfModules"
+})
+@XmlRootElement(name = "generic-vnf")
+public class GenericVnf
+ implements AAIDatum
+{
+
+ @XmlElement(name = "vnf-id", required = true)
+ protected String vnfId;
+ @XmlElement(name = "vnf-name", required = true)
+ protected String vnfName;
+ @XmlElement(name = "vnf-name2")
+ protected String vnfName2;
+ @XmlElement(name = "vnf-type", required = true)
+ protected String vnfType;
+ @XmlElement(name = "service-id")
+ protected String serviceId;
+ @XmlElement(name = "regional-resource-zone")
+ protected String regionalResourceZone;
+ @XmlElement(name = "prov-status")
+ protected String provStatus;
+ @XmlElement(name = "operational-state")
+ protected String operationalState;
+ @XmlElement(name = "license-key")
+ protected String licenseKey;
+ @XmlElement(name = "equipment-role")
+ protected String equipmentRole;
+ @XmlElement(name = "orchestration-status")
+ protected String orchestrationStatus;
+ @XmlElement(name = "heat-stack-id")
+ protected String heatStackId;
+ @XmlElement(name = "mso-catalog-key")
+ protected String msoCatalogKey;
+ @XmlElement(name = "management-option")
+ protected String managementOption;
+ @XmlElement(name = "ipv4-oam-address")
+ protected String ipv4OamAddress;
+ @XmlElement(name = "ipv4-loopback0-address")
+ protected String ipv4Loopback0Address;
+ @XmlElement(name = "nm-lan-v6-address")
+ protected String nmLanV6Address;
+ @XmlElement(name = "management-v6-address")
+ protected String managementV6Address;
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long vcpu;
+ @XmlElement(name = "vcpu-units")
+ protected String vcpuUnits;
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long vmemory;
+ @XmlElement(name = "vmemory-units")
+ protected String vmemoryUnits;
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long vdisk;
+ @XmlElement(name = "vdisk-units")
+ protected String vdiskUnits;
+ @XmlElement(name = "in-maint")
+ protected boolean inMaint;
+ @XmlElement(name = "is-closed-loop-disabled")
+ protected boolean isClosedLoopDisabled;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "summary-status")
+ protected String summaryStatus;
+ @XmlElement(name = "encrypted-access-flag")
+ protected Boolean encryptedAccessFlag;
+ @XmlElement(name = "entitlement-assignment-group-uuid")
+ protected String entitlementAssignmentGroupUuid;
+ @XmlElement(name = "entitlement-resource-uuid")
+ protected String entitlementResourceUuid;
+ @XmlElement(name = "license-assignment-group-uuid")
+ protected String licenseAssignmentGroupUuid;
+ @XmlElement(name = "license-key-uuid")
+ protected String licenseKeyUuid;
+ @XmlElement(name = "persona-model-id")
+ protected String personaModelId;
+ @XmlElement(name = "persona-model-version")
+ protected String personaModelVersion;
+ @XmlElement(name = "persona-model-customization-id")
+ protected String personaModelCustomizationId;
+ @XmlElement(name = "widget-model-id")
+ protected String widgetModelId;
+ @XmlElement(name = "widget-model-version")
+ protected String widgetModelVersion;
+ @XmlElement(name = "as-number")
+ protected String asNumber;
+ @XmlElement(name = "regional-resource-subzone")
+ protected String regionalResourceSubzone;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+ @XmlElement(name = "l-interfaces")
+ protected LInterfaces lInterfaces;
+ @XmlElement(name = "lag-interfaces")
+ protected LagInterfaces lagInterfaces;
+ @XmlElement(name = "vf-modules")
+ protected VfModules vfModules;
+
+ /**
+ * Gets the value of the vnfId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVnfId() {
+ return vnfId;
+ }
+
+ /**
+ * Sets the value of the vnfId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVnfId(String value) {
+ this.vnfId = value;
+ }
+
+ /**
+ * Gets the value of the vnfName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVnfName() {
+ return vnfName;
+ }
+
+ /**
+ * Sets the value of the vnfName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVnfName(String value) {
+ this.vnfName = value;
+ }
+
+ /**
+ * Gets the value of the vnfName2 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVnfName2() {
+ return vnfName2;
+ }
+
+ /**
+ * Sets the value of the vnfName2 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVnfName2(String value) {
+ this.vnfName2 = value;
+ }
+
+ /**
+ * Gets the value of the vnfType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVnfType() {
+ return vnfType;
+ }
+
+ /**
+ * Sets the value of the vnfType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVnfType(String value) {
+ this.vnfType = value;
+ }
+
+ /**
+ * Gets the value of the serviceId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ /**
+ * Sets the value of the serviceId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceId(String value) {
+ this.serviceId = value;
+ }
+
+ /**
+ * Gets the value of the regionalResourceZone property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRegionalResourceZone() {
+ return regionalResourceZone;
+ }
+
+ /**
+ * Sets the value of the regionalResourceZone property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRegionalResourceZone(String value) {
+ this.regionalResourceZone = value;
+ }
+
+ /**
+ * Gets the value of the provStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getProvStatus() {
+ return provStatus;
+ }
+
+ /**
+ * Sets the value of the provStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setProvStatus(String value) {
+ this.provStatus = value;
+ }
+
+ /**
+ * Gets the value of the operationalState property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOperationalState() {
+ return operationalState;
+ }
+
+ /**
+ * Sets the value of the operationalState property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOperationalState(String value) {
+ this.operationalState = value;
+ }
+
+ /**
+ * Gets the value of the licenseKey property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLicenseKey() {
+ return licenseKey;
+ }
+
+ /**
+ * Sets the value of the licenseKey property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLicenseKey(String value) {
+ this.licenseKey = value;
+ }
+
+ /**
+ * Gets the value of the equipmentRole property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEquipmentRole() {
+ return equipmentRole;
+ }
+
+ /**
+ * Sets the value of the equipmentRole property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEquipmentRole(String value) {
+ this.equipmentRole = value;
+ }
+
+ /**
+ * Gets the value of the orchestrationStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOrchestrationStatus() {
+ return orchestrationStatus;
+ }
+
+ /**
+ * Sets the value of the orchestrationStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOrchestrationStatus(String value) {
+ this.orchestrationStatus = value;
+ }
+
+ /**
+ * Gets the value of the heatStackId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getHeatStackId() {
+ return heatStackId;
+ }
+
+ /**
+ * Sets the value of the heatStackId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setHeatStackId(String value) {
+ this.heatStackId = value;
+ }
+
+ /**
+ * Gets the value of the msoCatalogKey property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMsoCatalogKey() {
+ return msoCatalogKey;
+ }
+
+ /**
+ * Sets the value of the msoCatalogKey property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMsoCatalogKey(String value) {
+ this.msoCatalogKey = value;
+ }
+
+ /**
+ * Gets the value of the managementOption property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getManagementOption() {
+ return managementOption;
+ }
+
+ /**
+ * Sets the value of the managementOption property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setManagementOption(String value) {
+ this.managementOption = value;
+ }
+
+ /**
+ * Gets the value of the ipv4OamAddress property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getIpv4OamAddress() {
+ return ipv4OamAddress;
+ }
+
+ /**
+ * Sets the value of the ipv4OamAddress property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setIpv4OamAddress(String value) {
+ this.ipv4OamAddress = value;
+ }
+
+ /**
+ * Gets the value of the ipv4Loopback0Address property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getIpv4Loopback0Address() {
+ return ipv4Loopback0Address;
+ }
+
+ /**
+ * Sets the value of the ipv4Loopback0Address property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setIpv4Loopback0Address(String value) {
+ this.ipv4Loopback0Address = value;
+ }
+
+ /**
+ * Gets the value of the nmLanV6Address property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNmLanV6Address() {
+ return nmLanV6Address;
+ }
+
+ /**
+ * Sets the value of the nmLanV6Address property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNmLanV6Address(String value) {
+ this.nmLanV6Address = value;
+ }
+
+ /**
+ * Gets the value of the managementV6Address property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getManagementV6Address() {
+ return managementV6Address;
+ }
+
+ /**
+ * Sets the value of the managementV6Address property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setManagementV6Address(String value) {
+ this.managementV6Address = value;
+ }
+
+ /**
+ * Gets the value of the vcpu property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getVcpu() {
+ return vcpu;
+ }
+
+ /**
+ * Sets the value of the vcpu property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setVcpu(Long value) {
+ this.vcpu = value;
+ }
+
+ /**
+ * Gets the value of the vcpuUnits property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVcpuUnits() {
+ return vcpuUnits;
+ }
+
+ /**
+ * Sets the value of the vcpuUnits property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVcpuUnits(String value) {
+ this.vcpuUnits = value;
+ }
+
+ /**
+ * Gets the value of the vmemory property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getVmemory() {
+ return vmemory;
+ }
+
+ /**
+ * Sets the value of the vmemory property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setVmemory(Long value) {
+ this.vmemory = value;
+ }
+
+ /**
+ * Gets the value of the vmemoryUnits property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVmemoryUnits() {
+ return vmemoryUnits;
+ }
+
+ /**
+ * Sets the value of the vmemoryUnits property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVmemoryUnits(String value) {
+ this.vmemoryUnits = value;
+ }
+
+ /**
+ * Gets the value of the vdisk property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getVdisk() {
+ return vdisk;
+ }
+
+ /**
+ * Sets the value of the vdisk property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setVdisk(Long value) {
+ this.vdisk = value;
+ }
+
+ /**
+ * Gets the value of the vdiskUnits property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVdiskUnits() {
+ return vdiskUnits;
+ }
+
+ /**
+ * Sets the value of the vdiskUnits property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVdiskUnits(String value) {
+ this.vdiskUnits = value;
+ }
+
+ /**
+ * Gets the value of the inMaint property.
+ *
+ */
+ public boolean isInMaint() {
+ return inMaint;
+ }
+
+ /**
+ * Sets the value of the inMaint property.
+ *
+ */
+ public void setInMaint(boolean value) {
+ this.inMaint = value;
+ }
+
+ /**
+ * Gets the value of the isClosedLoopDisabled property.
+ *
+ */
+ public boolean isIsClosedLoopDisabled() {
+ return isClosedLoopDisabled;
+ }
+
+ /**
+ * Sets the value of the isClosedLoopDisabled property.
+ *
+ */
+ public void setIsClosedLoopDisabled(boolean value) {
+ this.isClosedLoopDisabled = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the summaryStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSummaryStatus() {
+ return summaryStatus;
+ }
+
+ /**
+ * Sets the value of the summaryStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSummaryStatus(String value) {
+ this.summaryStatus = value;
+ }
+
+ /**
+ * Gets the value of the encryptedAccessFlag property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isEncryptedAccessFlag() {
+ return encryptedAccessFlag;
+ }
+
+ /**
+ * Sets the value of the encryptedAccessFlag property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setEncryptedAccessFlag(Boolean value) {
+ this.encryptedAccessFlag = value;
+ }
+
+ /**
+ * Gets the value of the entitlementAssignmentGroupUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEntitlementAssignmentGroupUuid() {
+ return entitlementAssignmentGroupUuid;
+ }
+
+ /**
+ * Sets the value of the entitlementAssignmentGroupUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEntitlementAssignmentGroupUuid(String value) {
+ this.entitlementAssignmentGroupUuid = value;
+ }
+
+ /**
+ * Gets the value of the entitlementResourceUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEntitlementResourceUuid() {
+ return entitlementResourceUuid;
+ }
+
+ /**
+ * Sets the value of the entitlementResourceUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEntitlementResourceUuid(String value) {
+ this.entitlementResourceUuid = value;
+ }
+
+ /**
+ * Gets the value of the licenseAssignmentGroupUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLicenseAssignmentGroupUuid() {
+ return licenseAssignmentGroupUuid;
+ }
+
+ /**
+ * Sets the value of the licenseAssignmentGroupUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLicenseAssignmentGroupUuid(String value) {
+ this.licenseAssignmentGroupUuid = value;
+ }
+
+ /**
+ * Gets the value of the licenseKeyUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLicenseKeyUuid() {
+ return licenseKeyUuid;
+ }
+
+ /**
+ * Sets the value of the licenseKeyUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLicenseKeyUuid(String value) {
+ this.licenseKeyUuid = value;
+ }
+
+ /**
+ * Gets the value of the personaModelId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonaModelId() {
+ return personaModelId;
+ }
+
+ /**
+ * Sets the value of the personaModelId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonaModelId(String value) {
+ this.personaModelId = value;
+ }
+
+ /**
+ * Gets the value of the personaModelVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonaModelVersion() {
+ return personaModelVersion;
+ }
+
+ /**
+ * Sets the value of the personaModelVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonaModelVersion(String value) {
+ this.personaModelVersion = value;
+ }
+
+ /**
+ * Gets the value of the personaModelCustomizationId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonaModelCustomizationId() {
+ return personaModelCustomizationId;
+ }
+
+ /**
+ * Sets the value of the personaModelCustomizationId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonaModelCustomizationId(String value) {
+ this.personaModelCustomizationId = value;
+ }
+
+ /**
+ * Gets the value of the widgetModelId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getWidgetModelId() {
+ return widgetModelId;
+ }
+
+ /**
+ * Sets the value of the widgetModelId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setWidgetModelId(String value) {
+ this.widgetModelId = value;
+ }
+
+ /**
+ * Gets the value of the widgetModelVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getWidgetModelVersion() {
+ return widgetModelVersion;
+ }
+
+ /**
+ * Sets the value of the widgetModelVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setWidgetModelVersion(String value) {
+ this.widgetModelVersion = value;
+ }
+
+ /**
+ * Gets the value of the asNumber property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getAsNumber() {
+ return asNumber;
+ }
+
+ /**
+ * Sets the value of the asNumber property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setAsNumber(String value) {
+ this.asNumber = value;
+ }
+
+ /**
+ * Gets the value of the regionalResourceSubzone property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRegionalResourceSubzone() {
+ return regionalResourceSubzone;
+ }
+
+ /**
+ * Sets the value of the regionalResourceSubzone property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRegionalResourceSubzone(String value) {
+ this.regionalResourceSubzone = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+ /**
+ * Gets the value of the lInterfaces property.
+ *
+ * @return
+ * possible object is
+ * {@link LInterfaces }
+ *
+ */
+ public LInterfaces getLInterfaces() {
+ return lInterfaces;
+ }
+
+ /**
+ * Sets the value of the lInterfaces property.
+ *
+ * @param value
+ * allowed object is
+ * {@link LInterfaces }
+ *
+ */
+ public void setLInterfaces(LInterfaces value) {
+ this.lInterfaces = value;
+ }
+
+ /**
+ * Gets the value of the lagInterfaces property.
+ *
+ * @return
+ * possible object is
+ * {@link LagInterfaces }
+ *
+ */
+ public LagInterfaces getLagInterfaces() {
+ return lagInterfaces;
+ }
+
+ /**
+ * Sets the value of the lagInterfaces property.
+ *
+ * @param value
+ * allowed object is
+ * {@link LagInterfaces }
+ *
+ */
+ public void setLagInterfaces(LagInterfaces value) {
+ this.lagInterfaces = value;
+ }
+
+ /**
+ * Gets the value of the vfModules property.
+ *
+ * @return
+ * possible object is
+ * {@link VfModules }
+ *
+ */
+ public VfModules getVfModules() {
+ return vfModules;
+ }
+
+ /**
+ * Sets the value of the vfModules property.
+ *
+ * @param value
+ * allowed object is
+ * {@link VfModules }
+ *
+ */
+ public void setVfModules(VfModules value) {
+ this.vfModules = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GenericVnfs.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GenericVnfs.java
new file mode 100644
index 0000000..b9f681c
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GenericVnfs.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}generic-vnf" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "genericVnf"
+})
+@XmlRootElement(name = "generic-vnfs")
+public class GenericVnfs
+ implements AAIDatum
+{
+
+ @XmlElement(name = "generic-vnf")
+ protected List<GenericVnf> genericVnf;
+
+ /**
+ * Gets the value of the genericVnf property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the genericVnf property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getGenericVnf().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link GenericVnf }
+ *
+ *
+ */
+ public List<GenericVnf> getGenericVnf() {
+ if (genericVnf == null) {
+ genericVnf = new ArrayList<GenericVnf>();
+ }
+ return this.genericVnf;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GroupAssignment.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GroupAssignment.java
new file mode 100644
index 0000000..16d3e60
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GroupAssignment.java
@@ -0,0 +1,214 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="group-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="group-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="group-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="group-description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "groupId",
+ "groupType",
+ "groupName",
+ "groupDescription",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "group-assignment")
+public class GroupAssignment
+ implements AAIDatum
+{
+
+ @XmlElement(name = "group-id", required = true)
+ protected String groupId;
+ @XmlElement(name = "group-type", required = true)
+ protected String groupType;
+ @XmlElement(name = "group-name", required = true)
+ protected String groupName;
+ @XmlElement(name = "group-description")
+ protected String groupDescription;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the groupId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getGroupId() {
+ return groupId;
+ }
+
+ /**
+ * Sets the value of the groupId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setGroupId(String value) {
+ this.groupId = value;
+ }
+
+ /**
+ * Gets the value of the groupType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getGroupType() {
+ return groupType;
+ }
+
+ /**
+ * Sets the value of the groupType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setGroupType(String value) {
+ this.groupType = value;
+ }
+
+ /**
+ * Gets the value of the groupName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getGroupName() {
+ return groupName;
+ }
+
+ /**
+ * Sets the value of the groupName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setGroupName(String value) {
+ this.groupName = value;
+ }
+
+ /**
+ * Gets the value of the groupDescription property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getGroupDescription() {
+ return groupDescription;
+ }
+
+ /**
+ * Sets the value of the groupDescription property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setGroupDescription(String value) {
+ this.groupDescription = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GroupAssignments.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GroupAssignments.java
new file mode 100644
index 0000000..93c4522
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/GroupAssignments.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}group-assignment" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "groupAssignment"
+})
+@XmlRootElement(name = "group-assignments")
+public class GroupAssignments
+ implements AAIDatum
+{
+
+ @XmlElement(name = "group-assignment")
+ protected List<GroupAssignment> groupAssignment;
+
+ /**
+ * Gets the value of the groupAssignment property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the groupAssignment property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getGroupAssignment().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link GroupAssignment }
+ *
+ *
+ */
+ public List<GroupAssignment> getGroupAssignment() {
+ if (groupAssignment == null) {
+ groupAssignment = new ArrayList<GroupAssignment>();
+ }
+ return this.groupAssignment;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Image.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Image.java
new file mode 100644
index 0000000..23573df
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Image.java
@@ -0,0 +1,380 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="image-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="image-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="image-architecture" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="image-os-distro" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="image-os-version" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="application" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="application-vendor" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="application-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="image-selflink" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}metadata" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "imageId",
+ "imageName",
+ "imageArchitecture",
+ "imageOsDistro",
+ "imageOsVersion",
+ "application",
+ "applicationVendor",
+ "applicationVersion",
+ "imageSelflink",
+ "resourceVersion",
+ "relationshipList",
+ "metadata"
+})
+@XmlRootElement(name = "image")
+public class Image
+ implements AAIDatum
+{
+
+ @XmlElement(name = "image-id", required = true)
+ protected String imageId;
+ @XmlElement(name = "image-name", required = true)
+ protected String imageName;
+ @XmlElement(name = "image-architecture")
+ protected String imageArchitecture;
+ @XmlElement(name = "image-os-distro", required = true)
+ protected String imageOsDistro;
+ @XmlElement(name = "image-os-version", required = true)
+ protected String imageOsVersion;
+ protected String application;
+ @XmlElement(name = "application-vendor")
+ protected String applicationVendor;
+ @XmlElement(name = "application-version")
+ protected String applicationVersion;
+ @XmlElement(name = "image-selflink", required = true)
+ protected String imageSelflink;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+ protected Metadata metadata;
+
+ /**
+ * Gets the value of the imageId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getImageId() {
+ return imageId;
+ }
+
+ /**
+ * Sets the value of the imageId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setImageId(String value) {
+ this.imageId = value;
+ }
+
+ /**
+ * Gets the value of the imageName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getImageName() {
+ return imageName;
+ }
+
+ /**
+ * Sets the value of the imageName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setImageName(String value) {
+ this.imageName = value;
+ }
+
+ /**
+ * Gets the value of the imageArchitecture property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getImageArchitecture() {
+ return imageArchitecture;
+ }
+
+ /**
+ * Sets the value of the imageArchitecture property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setImageArchitecture(String value) {
+ this.imageArchitecture = value;
+ }
+
+ /**
+ * Gets the value of the imageOsDistro property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getImageOsDistro() {
+ return imageOsDistro;
+ }
+
+ /**
+ * Sets the value of the imageOsDistro property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setImageOsDistro(String value) {
+ this.imageOsDistro = value;
+ }
+
+ /**
+ * Gets the value of the imageOsVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getImageOsVersion() {
+ return imageOsVersion;
+ }
+
+ /**
+ * Sets the value of the imageOsVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setImageOsVersion(String value) {
+ this.imageOsVersion = value;
+ }
+
+ /**
+ * Gets the value of the application property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getApplication() {
+ return application;
+ }
+
+ /**
+ * Sets the value of the application property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setApplication(String value) {
+ this.application = value;
+ }
+
+ /**
+ * Gets the value of the applicationVendor property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getApplicationVendor() {
+ return applicationVendor;
+ }
+
+ /**
+ * Sets the value of the applicationVendor property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setApplicationVendor(String value) {
+ this.applicationVendor = value;
+ }
+
+ /**
+ * Gets the value of the applicationVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getApplicationVersion() {
+ return applicationVersion;
+ }
+
+ /**
+ * Sets the value of the applicationVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setApplicationVersion(String value) {
+ this.applicationVersion = value;
+ }
+
+ /**
+ * Gets the value of the imageSelflink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getImageSelflink() {
+ return imageSelflink;
+ }
+
+ /**
+ * Sets the value of the imageSelflink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setImageSelflink(String value) {
+ this.imageSelflink = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+ /**
+ * Gets the value of the metadata property.
+ *
+ * @return
+ * possible object is
+ * {@link Metadata }
+ *
+ */
+ public Metadata getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the value of the metadata property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Metadata }
+ *
+ */
+ public void setMetadata(Metadata value) {
+ this.metadata = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Images.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Images.java
new file mode 100644
index 0000000..c7c6ef9
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Images.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}image" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "image"
+})
+@XmlRootElement(name = "images")
+public class Images
+ implements AAIDatum
+{
+
+ protected List<Image> image;
+
+ /**
+ * Gets the value of the image property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the image property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getImage().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Image }
+ *
+ *
+ */
+ public List<Image> getImage() {
+ if (image == null) {
+ image = new ArrayList<Image>();
+ }
+ return this.image;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/IncludeNodeFilter.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/IncludeNodeFilter.java
new file mode 100644
index 0000000..aaf5197
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/IncludeNodeFilter.java
@@ -0,0 +1,74 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="include-node-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "includeNodeType"
+})
+@XmlRootElement(name = "include-node-filter")
+public class IncludeNodeFilter
+ implements AAIDatum
+{
+
+ @XmlElement(name = "include-node-type")
+ protected String includeNodeType;
+
+ /**
+ * Gets the value of the includeNodeType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getIncludeNodeType() {
+ return includeNodeType;
+ }
+
+ /**
+ * Sets the value of the includeNodeType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setIncludeNodeType(String value) {
+ this.includeNodeType = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InstanceFilter.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InstanceFilter.java
new file mode 100644
index 0000000..0f9cd9b
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InstanceFilter.java
@@ -0,0 +1,44 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "")
+@XmlRootElement(name = "instance-filter")
+public class InstanceFilter
+ implements AAIDatum
+{
+
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InstanceFilters.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InstanceFilters.java
new file mode 100644
index 0000000..6a363fc
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InstanceFilters.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}instance-filter" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "instanceFilter"
+})
+@XmlRootElement(name = "instance-filters")
+public class InstanceFilters
+ implements AAIDatum
+{
+
+ @XmlElement(name = "instance-filter")
+ protected List<InstanceFilter> instanceFilter;
+
+ /**
+ * Gets the value of the instanceFilter property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the instanceFilter property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getInstanceFilter().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link InstanceFilter }
+ *
+ *
+ */
+ public List<InstanceFilter> getInstanceFilter() {
+ if (instanceFilter == null) {
+ instanceFilter = new ArrayList<InstanceFilter>();
+ }
+ return this.instanceFilter;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Inventory.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Inventory.java
new file mode 100644
index 0000000..3137b23
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Inventory.java
@@ -0,0 +1,238 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}search" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}actions" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}cloud-infrastructure" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}business" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}service-design-and-creation" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}network" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}aai-internal" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "search",
+ "actions",
+ "cloudInfrastructure",
+ "business",
+ "serviceDesignAndCreation",
+ "network",
+ "aaiInternal"
+})
+@XmlRootElement(name = "inventory")
+public class Inventory
+ implements AAIDatum
+{
+
+ protected Search search;
+ protected Actions actions;
+ @XmlElement(name = "cloud-infrastructure")
+ protected CloudInfrastructure cloudInfrastructure;
+ protected Business business;
+ @XmlElement(name = "service-design-and-creation")
+ protected ServiceDesignAndCreation serviceDesignAndCreation;
+ protected Network network;
+ @XmlElement(name = "aai-internal")
+ protected AaiInternal aaiInternal;
+
+ /**
+ * Gets the value of the search property.
+ *
+ * @return
+ * possible object is
+ * {@link Search }
+ *
+ */
+ public Search getSearch() {
+ return search;
+ }
+
+ /**
+ * Sets the value of the search property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Search }
+ *
+ */
+ public void setSearch(Search value) {
+ this.search = value;
+ }
+
+ /**
+ * Gets the value of the actions property.
+ *
+ * @return
+ * possible object is
+ * {@link Actions }
+ *
+ */
+ public Actions getActions() {
+ return actions;
+ }
+
+ /**
+ * Sets the value of the actions property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Actions }
+ *
+ */
+ public void setActions(Actions value) {
+ this.actions = value;
+ }
+
+ /**
+ * Gets the value of the cloudInfrastructure property.
+ *
+ * @return
+ * possible object is
+ * {@link CloudInfrastructure }
+ *
+ */
+ public CloudInfrastructure getCloudInfrastructure() {
+ return cloudInfrastructure;
+ }
+
+ /**
+ * Sets the value of the cloudInfrastructure property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CloudInfrastructure }
+ *
+ */
+ public void setCloudInfrastructure(CloudInfrastructure value) {
+ this.cloudInfrastructure = value;
+ }
+
+ /**
+ * Gets the value of the business property.
+ *
+ * @return
+ * possible object is
+ * {@link Business }
+ *
+ */
+ public Business getBusiness() {
+ return business;
+ }
+
+ /**
+ * Sets the value of the business property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Business }
+ *
+ */
+ public void setBusiness(Business value) {
+ this.business = value;
+ }
+
+ /**
+ * Gets the value of the serviceDesignAndCreation property.
+ *
+ * @return
+ * possible object is
+ * {@link ServiceDesignAndCreation }
+ *
+ */
+ public ServiceDesignAndCreation getServiceDesignAndCreation() {
+ return serviceDesignAndCreation;
+ }
+
+ /**
+ * Sets the value of the serviceDesignAndCreation property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ServiceDesignAndCreation }
+ *
+ */
+ public void setServiceDesignAndCreation(ServiceDesignAndCreation value) {
+ this.serviceDesignAndCreation = value;
+ }
+
+ /**
+ * Gets the value of the network property.
+ *
+ * @return
+ * possible object is
+ * {@link Network }
+ *
+ */
+ public Network getNetwork() {
+ return network;
+ }
+
+ /**
+ * Sets the value of the network property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Network }
+ *
+ */
+ public void setNetwork(Network value) {
+ this.network = value;
+ }
+
+ /**
+ * Gets the value of the aaiInternal property.
+ *
+ * @return
+ * possible object is
+ * {@link AaiInternal }
+ *
+ */
+ public AaiInternal getAaiInternal() {
+ return aaiInternal;
+ }
+
+ /**
+ * Sets the value of the aaiInternal property.
+ *
+ * @param value
+ * allowed object is
+ * {@link AaiInternal }
+ *
+ */
+ public void setAaiInternal(AaiInternal value) {
+ this.aaiInternal = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryItem.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryItem.java
new file mode 100644
index 0000000..2a040eb
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryItem.java
@@ -0,0 +1,170 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="inventory-item-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="inventory-item-link" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}inventory-item-data" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}tagged-inventory-item-list" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "inventoryItemType",
+ "inventoryItemLink",
+ "inventoryItemData",
+ "taggedInventoryItemList"
+})
+@XmlRootElement(name = "inventory-item")
+public class InventoryItem
+ implements AAIDatum
+{
+
+ @XmlElement(name = "inventory-item-type")
+ protected String inventoryItemType;
+ @XmlElement(name = "inventory-item-link")
+ protected String inventoryItemLink;
+ @XmlElement(name = "inventory-item-data")
+ protected List<InventoryItemData> inventoryItemData;
+ @XmlElement(name = "tagged-inventory-item-list")
+ protected List<TaggedInventoryItemList> taggedInventoryItemList;
+
+ /**
+ * Gets the value of the inventoryItemType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInventoryItemType() {
+ return inventoryItemType;
+ }
+
+ /**
+ * Sets the value of the inventoryItemType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInventoryItemType(String value) {
+ this.inventoryItemType = value;
+ }
+
+ /**
+ * Gets the value of the inventoryItemLink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInventoryItemLink() {
+ return inventoryItemLink;
+ }
+
+ /**
+ * Sets the value of the inventoryItemLink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInventoryItemLink(String value) {
+ this.inventoryItemLink = value;
+ }
+
+ /**
+ * Gets the value of the inventoryItemData property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the inventoryItemData property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getInventoryItemData().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link InventoryItemData }
+ *
+ *
+ */
+ public List<InventoryItemData> getInventoryItemData() {
+ if (inventoryItemData == null) {
+ inventoryItemData = new ArrayList<InventoryItemData>();
+ }
+ return this.inventoryItemData;
+ }
+
+ /**
+ * Gets the value of the taggedInventoryItemList property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the taggedInventoryItemList property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getTaggedInventoryItemList().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link TaggedInventoryItemList }
+ *
+ *
+ */
+ public List<TaggedInventoryItemList> getTaggedInventoryItemList() {
+ if (taggedInventoryItemList == null) {
+ taggedInventoryItemList = new ArrayList<TaggedInventoryItemList>();
+ }
+ return this.taggedInventoryItemList;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryItemData.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryItemData.java
new file mode 100644
index 0000000..6f394da
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryItemData.java
@@ -0,0 +1,102 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="property-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="property-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "propertyName",
+ "propertyValue"
+})
+@XmlRootElement(name = "inventory-item-data")
+public class InventoryItemData
+ implements AAIDatum
+{
+
+ @XmlElement(name = "property-name")
+ protected String propertyName;
+ @XmlElement(name = "property-value")
+ protected String propertyValue;
+
+ /**
+ * Gets the value of the propertyName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ /**
+ * Sets the value of the propertyName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyName(String value) {
+ this.propertyName = value;
+ }
+
+ /**
+ * Gets the value of the propertyValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyValue() {
+ return propertyValue;
+ }
+
+ /**
+ * Sets the value of the propertyValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyValue(String value) {
+ this.propertyValue = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryResponseItem.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryResponseItem.java
new file mode 100644
index 0000000..03a12cd
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryResponseItem.java
@@ -0,0 +1,130 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="model-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}extra-properties" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}inventory-response-items" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "modelName",
+ "extraProperties",
+ "inventoryResponseItems"
+})
+@XmlRootElement(name = "inventory-response-item")
+public class InventoryResponseItem
+ implements AAIDatum
+{
+
+ @XmlElement(name = "model-name")
+ protected String modelName;
+ @XmlElement(name = "extra-properties")
+ protected ExtraProperties extraProperties;
+ @XmlElement(name = "inventory-response-items")
+ protected InventoryResponseItems inventoryResponseItems;
+
+ /**
+ * Gets the value of the modelName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getModelName() {
+ return modelName;
+ }
+
+ /**
+ * Sets the value of the modelName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setModelName(String value) {
+ this.modelName = value;
+ }
+
+ /**
+ * Gets the value of the extraProperties property.
+ *
+ * @return
+ * possible object is
+ * {@link ExtraProperties }
+ *
+ */
+ public ExtraProperties getExtraProperties() {
+ return extraProperties;
+ }
+
+ /**
+ * Sets the value of the extraProperties property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ExtraProperties }
+ *
+ */
+ public void setExtraProperties(ExtraProperties value) {
+ this.extraProperties = value;
+ }
+
+ /**
+ * Gets the value of the inventoryResponseItems property.
+ *
+ * @return
+ * possible object is
+ * {@link InventoryResponseItems }
+ *
+ */
+ public InventoryResponseItems getInventoryResponseItems() {
+ return inventoryResponseItems;
+ }
+
+ /**
+ * Sets the value of the inventoryResponseItems property.
+ *
+ * @param value
+ * allowed object is
+ * {@link InventoryResponseItems }
+ *
+ */
+ public void setInventoryResponseItems(InventoryResponseItems value) {
+ this.inventoryResponseItems = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryResponseItems.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryResponseItems.java
new file mode 100644
index 0000000..8db30cf
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/InventoryResponseItems.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}inventory-response-item" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "inventoryResponseItem"
+})
+@XmlRootElement(name = "inventory-response-items")
+public class InventoryResponseItems
+ implements AAIDatum
+{
+
+ @XmlElement(name = "inventory-response-item")
+ protected List<InventoryResponseItem> inventoryResponseItem;
+
+ /**
+ * Gets the value of the inventoryResponseItem property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the inventoryResponseItem property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getInventoryResponseItem().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link InventoryResponseItem }
+ *
+ *
+ */
+ public List<InventoryResponseItem> getInventoryResponseItem() {
+ if (inventoryResponseItem == null) {
+ inventoryResponseItem = new ArrayList<InventoryResponseItem>();
+ }
+ return this.inventoryResponseItem;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/KeyData.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/KeyData.java
new file mode 100644
index 0000000..c6baab4
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/KeyData.java
@@ -0,0 +1,102 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="key-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="key-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "keyName",
+ "keyValue"
+})
+@XmlRootElement(name = "key-data")
+public class KeyData
+ implements AAIDatum
+{
+
+ @XmlElement(name = "key-name")
+ protected String keyName;
+ @XmlElement(name = "key-value")
+ protected String keyValue;
+
+ /**
+ * Gets the value of the keyName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getKeyName() {
+ return keyName;
+ }
+
+ /**
+ * Sets the value of the keyName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setKeyName(String value) {
+ this.keyName = value;
+ }
+
+ /**
+ * Gets the value of the keyValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getKeyValue() {
+ return keyValue;
+ }
+
+ /**
+ * Sets the value of the keyValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setKeyValue(String value) {
+ this.keyValue = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3InterfaceIpv4AddressList.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3InterfaceIpv4AddressList.java
new file mode 100644
index 0000000..5d18106
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3InterfaceIpv4AddressList.java
@@ -0,0 +1,302 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="l3-interface-ipv4-address" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="l3-interface-ipv4-prefix-length" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="vlan-id-inner" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="vlan-id-outer" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="is-floating" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="neutron-network-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="neutron-subnet-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "l3InterfaceIpv4Address",
+ "l3InterfaceIpv4PrefixLength",
+ "vlanIdInner",
+ "vlanIdOuter",
+ "isFloating",
+ "resourceVersion",
+ "neutronNetworkId",
+ "neutronSubnetId",
+ "relationshipList"
+})
+@XmlRootElement(name = "l3-interface-ipv4-address-list")
+public class L3InterfaceIpv4AddressList
+ implements AAIDatum
+{
+
+ @XmlElement(name = "l3-interface-ipv4-address", required = true)
+ protected String l3InterfaceIpv4Address;
+ @XmlElement(name = "l3-interface-ipv4-prefix-length")
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long l3InterfaceIpv4PrefixLength;
+ @XmlElement(name = "vlan-id-inner")
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long vlanIdInner;
+ @XmlElement(name = "vlan-id-outer")
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long vlanIdOuter;
+ @XmlElement(name = "is-floating")
+ protected Boolean isFloating;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "neutron-network-id")
+ protected String neutronNetworkId;
+ @XmlElement(name = "neutron-subnet-id")
+ protected String neutronSubnetId;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the l3InterfaceIpv4Address property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getL3InterfaceIpv4Address() {
+ return l3InterfaceIpv4Address;
+ }
+
+ /**
+ * Sets the value of the l3InterfaceIpv4Address property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setL3InterfaceIpv4Address(String value) {
+ this.l3InterfaceIpv4Address = value;
+ }
+
+ /**
+ * Gets the value of the l3InterfaceIpv4PrefixLength property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getL3InterfaceIpv4PrefixLength() {
+ return l3InterfaceIpv4PrefixLength;
+ }
+
+ /**
+ * Sets the value of the l3InterfaceIpv4PrefixLength property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setL3InterfaceIpv4PrefixLength(Long value) {
+ this.l3InterfaceIpv4PrefixLength = value;
+ }
+
+ /**
+ * Gets the value of the vlanIdInner property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getVlanIdInner() {
+ return vlanIdInner;
+ }
+
+ /**
+ * Sets the value of the vlanIdInner property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setVlanIdInner(Long value) {
+ this.vlanIdInner = value;
+ }
+
+ /**
+ * Gets the value of the vlanIdOuter property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getVlanIdOuter() {
+ return vlanIdOuter;
+ }
+
+ /**
+ * Sets the value of the vlanIdOuter property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setVlanIdOuter(Long value) {
+ this.vlanIdOuter = value;
+ }
+
+ /**
+ * Gets the value of the isFloating property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isIsFloating() {
+ return isFloating;
+ }
+
+ /**
+ * Sets the value of the isFloating property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setIsFloating(Boolean value) {
+ this.isFloating = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the neutronNetworkId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNeutronNetworkId() {
+ return neutronNetworkId;
+ }
+
+ /**
+ * Sets the value of the neutronNetworkId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNeutronNetworkId(String value) {
+ this.neutronNetworkId = value;
+ }
+
+ /**
+ * Gets the value of the neutronSubnetId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNeutronSubnetId() {
+ return neutronSubnetId;
+ }
+
+ /**
+ * Sets the value of the neutronSubnetId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNeutronSubnetId(String value) {
+ this.neutronSubnetId = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3InterfaceIpv6AddressList.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3InterfaceIpv6AddressList.java
new file mode 100644
index 0000000..aba9574
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3InterfaceIpv6AddressList.java
@@ -0,0 +1,302 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="l3-interface-ipv6-address" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="l3-interface-ipv6-prefix-length" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="vlan-id-inner" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="vlan-id-outer" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="is-floating" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="neutron-network-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="neutron-subnet-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "l3InterfaceIpv6Address",
+ "l3InterfaceIpv6PrefixLength",
+ "vlanIdInner",
+ "vlanIdOuter",
+ "isFloating",
+ "resourceVersion",
+ "neutronNetworkId",
+ "neutronSubnetId",
+ "relationshipList"
+})
+@XmlRootElement(name = "l3-interface-ipv6-address-list")
+public class L3InterfaceIpv6AddressList
+ implements AAIDatum
+{
+
+ @XmlElement(name = "l3-interface-ipv6-address", required = true)
+ protected String l3InterfaceIpv6Address;
+ @XmlElement(name = "l3-interface-ipv6-prefix-length")
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long l3InterfaceIpv6PrefixLength;
+ @XmlElement(name = "vlan-id-inner")
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long vlanIdInner;
+ @XmlElement(name = "vlan-id-outer")
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long vlanIdOuter;
+ @XmlElement(name = "is-floating")
+ protected Boolean isFloating;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "neutron-network-id")
+ protected String neutronNetworkId;
+ @XmlElement(name = "neutron-subnet-id")
+ protected String neutronSubnetId;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the l3InterfaceIpv6Address property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getL3InterfaceIpv6Address() {
+ return l3InterfaceIpv6Address;
+ }
+
+ /**
+ * Sets the value of the l3InterfaceIpv6Address property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setL3InterfaceIpv6Address(String value) {
+ this.l3InterfaceIpv6Address = value;
+ }
+
+ /**
+ * Gets the value of the l3InterfaceIpv6PrefixLength property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getL3InterfaceIpv6PrefixLength() {
+ return l3InterfaceIpv6PrefixLength;
+ }
+
+ /**
+ * Sets the value of the l3InterfaceIpv6PrefixLength property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setL3InterfaceIpv6PrefixLength(Long value) {
+ this.l3InterfaceIpv6PrefixLength = value;
+ }
+
+ /**
+ * Gets the value of the vlanIdInner property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getVlanIdInner() {
+ return vlanIdInner;
+ }
+
+ /**
+ * Sets the value of the vlanIdInner property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setVlanIdInner(Long value) {
+ this.vlanIdInner = value;
+ }
+
+ /**
+ * Gets the value of the vlanIdOuter property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getVlanIdOuter() {
+ return vlanIdOuter;
+ }
+
+ /**
+ * Sets the value of the vlanIdOuter property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setVlanIdOuter(Long value) {
+ this.vlanIdOuter = value;
+ }
+
+ /**
+ * Gets the value of the isFloating property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isIsFloating() {
+ return isFloating;
+ }
+
+ /**
+ * Sets the value of the isFloating property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setIsFloating(Boolean value) {
+ this.isFloating = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the neutronNetworkId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNeutronNetworkId() {
+ return neutronNetworkId;
+ }
+
+ /**
+ * Sets the value of the neutronNetworkId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNeutronNetworkId(String value) {
+ this.neutronNetworkId = value;
+ }
+
+ /**
+ * Gets the value of the neutronSubnetId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNeutronSubnetId() {
+ return neutronSubnetId;
+ }
+
+ /**
+ * Sets the value of the neutronSubnetId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNeutronSubnetId(String value) {
+ this.neutronSubnetId = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3Network.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3Network.java
new file mode 100644
index 0000000..45c11fa
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3Network.java
@@ -0,0 +1,743 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="network-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="network-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="network-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="network-role" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="network-technology" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="neutron-network-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="is-bound-to-vpn" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="service-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="network-role-instance" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="orchestration-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="heat-stack-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="mso-catalog-key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="contrail-network-fqdn" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="persona-model-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="persona-model-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="widget-model-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="widget-model-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="physical-network-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="is-provider-network" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="is-shared-network" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="is-external-network" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}subnets" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}ctag-assignments" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}segmentation-assignments" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "networkId",
+ "networkName",
+ "networkType",
+ "networkRole",
+ "networkTechnology",
+ "neutronNetworkId",
+ "isBoundToVpn",
+ "serviceId",
+ "networkRoleInstance",
+ "resourceVersion",
+ "orchestrationStatus",
+ "heatStackId",
+ "msoCatalogKey",
+ "contrailNetworkFqdn",
+ "personaModelId",
+ "personaModelVersion",
+ "widgetModelId",
+ "widgetModelVersion",
+ "physicalNetworkName",
+ "isProviderNetwork",
+ "isSharedNetwork",
+ "isExternalNetwork",
+ "subnets",
+ "ctagAssignments",
+ "segmentationAssignments",
+ "relationshipList"
+})
+@XmlRootElement(name = "l3-network")
+public class L3Network
+ implements AAIDatum
+{
+
+ @XmlElement(name = "network-id", required = true)
+ protected String networkId;
+ @XmlElement(name = "network-name", required = true)
+ protected String networkName;
+ @XmlElement(name = "network-type")
+ protected String networkType;
+ @XmlElement(name = "network-role")
+ protected String networkRole;
+ @XmlElement(name = "network-technology")
+ protected String networkTechnology;
+ @XmlElement(name = "neutron-network-id")
+ protected String neutronNetworkId;
+ @XmlElement(name = "is-bound-to-vpn")
+ protected boolean isBoundToVpn;
+ @XmlElement(name = "service-id")
+ protected String serviceId;
+ @XmlElement(name = "network-role-instance")
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long networkRoleInstance;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "orchestration-status")
+ protected String orchestrationStatus;
+ @XmlElement(name = "heat-stack-id")
+ protected String heatStackId;
+ @XmlElement(name = "mso-catalog-key")
+ protected String msoCatalogKey;
+ @XmlElement(name = "contrail-network-fqdn")
+ protected String contrailNetworkFqdn;
+ @XmlElement(name = "persona-model-id")
+ protected String personaModelId;
+ @XmlElement(name = "persona-model-version")
+ protected String personaModelVersion;
+ @XmlElement(name = "widget-model-id")
+ protected String widgetModelId;
+ @XmlElement(name = "widget-model-version")
+ protected String widgetModelVersion;
+ @XmlElement(name = "physical-network-name")
+ protected String physicalNetworkName;
+ @XmlElement(name = "is-provider-network")
+ protected boolean isProviderNetwork;
+ @XmlElement(name = "is-shared-network")
+ protected boolean isSharedNetwork;
+ @XmlElement(name = "is-external-network")
+ protected boolean isExternalNetwork;
+ protected Subnets subnets;
+ @XmlElement(name = "ctag-assignments")
+ protected CtagAssignments ctagAssignments;
+ @XmlElement(name = "segmentation-assignments")
+ protected SegmentationAssignments segmentationAssignments;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the networkId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNetworkId() {
+ return networkId;
+ }
+
+ /**
+ * Sets the value of the networkId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNetworkId(String value) {
+ this.networkId = value;
+ }
+
+ /**
+ * Gets the value of the networkName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNetworkName() {
+ return networkName;
+ }
+
+ /**
+ * Sets the value of the networkName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNetworkName(String value) {
+ this.networkName = value;
+ }
+
+ /**
+ * Gets the value of the networkType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNetworkType() {
+ return networkType;
+ }
+
+ /**
+ * Sets the value of the networkType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNetworkType(String value) {
+ this.networkType = value;
+ }
+
+ /**
+ * Gets the value of the networkRole property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNetworkRole() {
+ return networkRole;
+ }
+
+ /**
+ * Sets the value of the networkRole property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNetworkRole(String value) {
+ this.networkRole = value;
+ }
+
+ /**
+ * Gets the value of the networkTechnology property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNetworkTechnology() {
+ return networkTechnology;
+ }
+
+ /**
+ * Sets the value of the networkTechnology property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNetworkTechnology(String value) {
+ this.networkTechnology = value;
+ }
+
+ /**
+ * Gets the value of the neutronNetworkId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNeutronNetworkId() {
+ return neutronNetworkId;
+ }
+
+ /**
+ * Sets the value of the neutronNetworkId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNeutronNetworkId(String value) {
+ this.neutronNetworkId = value;
+ }
+
+ /**
+ * Gets the value of the isBoundToVpn property.
+ *
+ */
+ public boolean isIsBoundToVpn() {
+ return isBoundToVpn;
+ }
+
+ /**
+ * Sets the value of the isBoundToVpn property.
+ *
+ */
+ public void setIsBoundToVpn(boolean value) {
+ this.isBoundToVpn = value;
+ }
+
+ /**
+ * Gets the value of the serviceId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ /**
+ * Sets the value of the serviceId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceId(String value) {
+ this.serviceId = value;
+ }
+
+ /**
+ * Gets the value of the networkRoleInstance property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getNetworkRoleInstance() {
+ return networkRoleInstance;
+ }
+
+ /**
+ * Sets the value of the networkRoleInstance property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setNetworkRoleInstance(Long value) {
+ this.networkRoleInstance = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the orchestrationStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOrchestrationStatus() {
+ return orchestrationStatus;
+ }
+
+ /**
+ * Sets the value of the orchestrationStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOrchestrationStatus(String value) {
+ this.orchestrationStatus = value;
+ }
+
+ /**
+ * Gets the value of the heatStackId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getHeatStackId() {
+ return heatStackId;
+ }
+
+ /**
+ * Sets the value of the heatStackId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setHeatStackId(String value) {
+ this.heatStackId = value;
+ }
+
+ /**
+ * Gets the value of the msoCatalogKey property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMsoCatalogKey() {
+ return msoCatalogKey;
+ }
+
+ /**
+ * Sets the value of the msoCatalogKey property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMsoCatalogKey(String value) {
+ this.msoCatalogKey = value;
+ }
+
+ /**
+ * Gets the value of the contrailNetworkFqdn property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getContrailNetworkFqdn() {
+ return contrailNetworkFqdn;
+ }
+
+ /**
+ * Sets the value of the contrailNetworkFqdn property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setContrailNetworkFqdn(String value) {
+ this.contrailNetworkFqdn = value;
+ }
+
+ /**
+ * Gets the value of the personaModelId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonaModelId() {
+ return personaModelId;
+ }
+
+ /**
+ * Sets the value of the personaModelId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonaModelId(String value) {
+ this.personaModelId = value;
+ }
+
+ /**
+ * Gets the value of the personaModelVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonaModelVersion() {
+ return personaModelVersion;
+ }
+
+ /**
+ * Sets the value of the personaModelVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonaModelVersion(String value) {
+ this.personaModelVersion = value;
+ }
+
+ /**
+ * Gets the value of the widgetModelId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getWidgetModelId() {
+ return widgetModelId;
+ }
+
+ /**
+ * Sets the value of the widgetModelId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setWidgetModelId(String value) {
+ this.widgetModelId = value;
+ }
+
+ /**
+ * Gets the value of the widgetModelVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getWidgetModelVersion() {
+ return widgetModelVersion;
+ }
+
+ /**
+ * Sets the value of the widgetModelVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setWidgetModelVersion(String value) {
+ this.widgetModelVersion = value;
+ }
+
+ /**
+ * Gets the value of the physicalNetworkName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPhysicalNetworkName() {
+ return physicalNetworkName;
+ }
+
+ /**
+ * Sets the value of the physicalNetworkName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPhysicalNetworkName(String value) {
+ this.physicalNetworkName = value;
+ }
+
+ /**
+ * Gets the value of the isProviderNetwork property.
+ *
+ */
+ public boolean isIsProviderNetwork() {
+ return isProviderNetwork;
+ }
+
+ /**
+ * Sets the value of the isProviderNetwork property.
+ *
+ */
+ public void setIsProviderNetwork(boolean value) {
+ this.isProviderNetwork = value;
+ }
+
+ /**
+ * Gets the value of the isSharedNetwork property.
+ *
+ */
+ public boolean isIsSharedNetwork() {
+ return isSharedNetwork;
+ }
+
+ /**
+ * Sets the value of the isSharedNetwork property.
+ *
+ */
+ public void setIsSharedNetwork(boolean value) {
+ this.isSharedNetwork = value;
+ }
+
+ /**
+ * Gets the value of the isExternalNetwork property.
+ *
+ */
+ public boolean isIsExternalNetwork() {
+ return isExternalNetwork;
+ }
+
+ /**
+ * Sets the value of the isExternalNetwork property.
+ *
+ */
+ public void setIsExternalNetwork(boolean value) {
+ this.isExternalNetwork = value;
+ }
+
+ /**
+ * Gets the value of the subnets property.
+ *
+ * @return
+ * possible object is
+ * {@link Subnets }
+ *
+ */
+ public Subnets getSubnets() {
+ return subnets;
+ }
+
+ /**
+ * Sets the value of the subnets property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Subnets }
+ *
+ */
+ public void setSubnets(Subnets value) {
+ this.subnets = value;
+ }
+
+ /**
+ * Gets the value of the ctagAssignments property.
+ *
+ * @return
+ * possible object is
+ * {@link CtagAssignments }
+ *
+ */
+ public CtagAssignments getCtagAssignments() {
+ return ctagAssignments;
+ }
+
+ /**
+ * Sets the value of the ctagAssignments property.
+ *
+ * @param value
+ * allowed object is
+ * {@link CtagAssignments }
+ *
+ */
+ public void setCtagAssignments(CtagAssignments value) {
+ this.ctagAssignments = value;
+ }
+
+ /**
+ * Gets the value of the segmentationAssignments property.
+ *
+ * @return
+ * possible object is
+ * {@link SegmentationAssignments }
+ *
+ */
+ public SegmentationAssignments getSegmentationAssignments() {
+ return segmentationAssignments;
+ }
+
+ /**
+ * Sets the value of the segmentationAssignments property.
+ *
+ * @param value
+ * allowed object is
+ * {@link SegmentationAssignments }
+ *
+ */
+ public void setSegmentationAssignments(SegmentationAssignments value) {
+ this.segmentationAssignments = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3Networks.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3Networks.java
new file mode 100644
index 0000000..a9eee6a
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/L3Networks.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}l3-network" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "l3Network"
+})
+@XmlRootElement(name = "l3-networks")
+public class L3Networks
+ implements AAIDatum
+{
+
+ @XmlElement(name = "l3-network")
+ protected List<L3Network> l3Network;
+
+ /**
+ * Gets the value of the l3Network property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the l3Network property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getL3Network().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link L3Network }
+ *
+ *
+ */
+ public List<L3Network> getL3Network() {
+ if (l3Network == null) {
+ l3Network = new ArrayList<L3Network>();
+ }
+ return this.l3Network;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LInterface.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LInterface.java
new file mode 100644
index 0000000..4ecd350
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LInterface.java
@@ -0,0 +1,419 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="interface-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="interface-role" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="v6-wan-link-ip" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="selflink" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="interface-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="macaddr" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="network-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="management-option" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}vlans" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}l3-interface-ipv4-address-list" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}l3-interface-ipv6-address-list" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "interfaceName",
+ "interfaceRole",
+ "v6WanLinkIp",
+ "selflink",
+ "interfaceId",
+ "macaddr",
+ "networkName",
+ "managementOption",
+ "resourceVersion",
+ "vlans",
+ "relationshipList",
+ "l3InterfaceIpv4AddressList",
+ "l3InterfaceIpv6AddressList"
+})
+@XmlRootElement(name = "l-interface")
+public class LInterface
+ implements AAIDatum
+{
+
+ @XmlElement(name = "interface-name", required = true)
+ protected String interfaceName;
+ @XmlElement(name = "interface-role")
+ protected String interfaceRole;
+ @XmlElement(name = "v6-wan-link-ip")
+ protected String v6WanLinkIp;
+ protected String selflink;
+ @XmlElement(name = "interface-id")
+ protected String interfaceId;
+ protected String macaddr;
+ @XmlElement(name = "network-name")
+ protected String networkName;
+ @XmlElement(name = "management-option")
+ protected String managementOption;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ protected Vlans vlans;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+ @XmlElement(name = "l3-interface-ipv4-address-list")
+ protected List<L3InterfaceIpv4AddressList> l3InterfaceIpv4AddressList;
+ @XmlElement(name = "l3-interface-ipv6-address-list")
+ protected List<L3InterfaceIpv6AddressList> l3InterfaceIpv6AddressList;
+
+ /**
+ * Gets the value of the interfaceName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInterfaceName() {
+ return interfaceName;
+ }
+
+ /**
+ * Sets the value of the interfaceName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInterfaceName(String value) {
+ this.interfaceName = value;
+ }
+
+ /**
+ * Gets the value of the interfaceRole property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInterfaceRole() {
+ return interfaceRole;
+ }
+
+ /**
+ * Sets the value of the interfaceRole property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInterfaceRole(String value) {
+ this.interfaceRole = value;
+ }
+
+ /**
+ * Gets the value of the v6WanLinkIp property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getV6WanLinkIp() {
+ return v6WanLinkIp;
+ }
+
+ /**
+ * Sets the value of the v6WanLinkIp property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setV6WanLinkIp(String value) {
+ this.v6WanLinkIp = value;
+ }
+
+ /**
+ * Gets the value of the selflink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSelflink() {
+ return selflink;
+ }
+
+ /**
+ * Sets the value of the selflink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSelflink(String value) {
+ this.selflink = value;
+ }
+
+ /**
+ * Gets the value of the interfaceId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInterfaceId() {
+ return interfaceId;
+ }
+
+ /**
+ * Sets the value of the interfaceId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInterfaceId(String value) {
+ this.interfaceId = value;
+ }
+
+ /**
+ * Gets the value of the macaddr property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMacaddr() {
+ return macaddr;
+ }
+
+ /**
+ * Sets the value of the macaddr property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMacaddr(String value) {
+ this.macaddr = value;
+ }
+
+ /**
+ * Gets the value of the networkName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNetworkName() {
+ return networkName;
+ }
+
+ /**
+ * Sets the value of the networkName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNetworkName(String value) {
+ this.networkName = value;
+ }
+
+ /**
+ * Gets the value of the managementOption property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getManagementOption() {
+ return managementOption;
+ }
+
+ /**
+ * Sets the value of the managementOption property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setManagementOption(String value) {
+ this.managementOption = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the vlans property.
+ *
+ * @return
+ * possible object is
+ * {@link Vlans }
+ *
+ */
+ public Vlans getVlans() {
+ return vlans;
+ }
+
+ /**
+ * Sets the value of the vlans property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Vlans }
+ *
+ */
+ public void setVlans(Vlans value) {
+ this.vlans = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+ /**
+ * Gets the value of the l3InterfaceIpv4AddressList property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the l3InterfaceIpv4AddressList property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getL3InterfaceIpv4AddressList().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link L3InterfaceIpv4AddressList }
+ *
+ *
+ */
+ public List<L3InterfaceIpv4AddressList> getL3InterfaceIpv4AddressList() {
+ if (l3InterfaceIpv4AddressList == null) {
+ l3InterfaceIpv4AddressList = new ArrayList<L3InterfaceIpv4AddressList>();
+ }
+ return this.l3InterfaceIpv4AddressList;
+ }
+
+ /**
+ * Gets the value of the l3InterfaceIpv6AddressList property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the l3InterfaceIpv6AddressList property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getL3InterfaceIpv6AddressList().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link L3InterfaceIpv6AddressList }
+ *
+ *
+ */
+ public List<L3InterfaceIpv6AddressList> getL3InterfaceIpv6AddressList() {
+ if (l3InterfaceIpv6AddressList == null) {
+ l3InterfaceIpv6AddressList = new ArrayList<L3InterfaceIpv6AddressList>();
+ }
+ return this.l3InterfaceIpv6AddressList;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LInterfaces.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LInterfaces.java
new file mode 100644
index 0000000..1c9c5ce
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LInterfaces.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}l-interface" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "lInterface"
+})
+@XmlRootElement(name = "l-interfaces")
+public class LInterfaces
+ implements AAIDatum
+{
+
+ @XmlElement(name = "l-interface")
+ protected List<LInterface> lInterface;
+
+ /**
+ * Gets the value of the lInterface property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the lInterface property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getLInterface().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link LInterface }
+ *
+ *
+ */
+ public List<LInterface> getLInterface() {
+ if (lInterface == null) {
+ lInterface = new ArrayList<LInterface>();
+ }
+ return this.lInterface;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LagInterface.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LagInterface.java
new file mode 100644
index 0000000..9e935df
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LagInterface.java
@@ -0,0 +1,214 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="interface-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="speed-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="speed-units" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}l-interfaces" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "interfaceName",
+ "resourceVersion",
+ "speedValue",
+ "speedUnits",
+ "relationshipList",
+ "lInterfaces"
+})
+@XmlRootElement(name = "lag-interface")
+public class LagInterface
+ implements AAIDatum
+{
+
+ @XmlElement(name = "interface-name", required = true)
+ protected String interfaceName;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "speed-value")
+ protected String speedValue;
+ @XmlElement(name = "speed-units")
+ protected String speedUnits;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+ @XmlElement(name = "l-interfaces")
+ protected LInterfaces lInterfaces;
+
+ /**
+ * Gets the value of the interfaceName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInterfaceName() {
+ return interfaceName;
+ }
+
+ /**
+ * Sets the value of the interfaceName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInterfaceName(String value) {
+ this.interfaceName = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the speedValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSpeedValue() {
+ return speedValue;
+ }
+
+ /**
+ * Sets the value of the speedValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSpeedValue(String value) {
+ this.speedValue = value;
+ }
+
+ /**
+ * Gets the value of the speedUnits property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSpeedUnits() {
+ return speedUnits;
+ }
+
+ /**
+ * Sets the value of the speedUnits property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSpeedUnits(String value) {
+ this.speedUnits = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+ /**
+ * Gets the value of the lInterfaces property.
+ *
+ * @return
+ * possible object is
+ * {@link LInterfaces }
+ *
+ */
+ public LInterfaces getLInterfaces() {
+ return lInterfaces;
+ }
+
+ /**
+ * Sets the value of the lInterfaces property.
+ *
+ * @param value
+ * allowed object is
+ * {@link LInterfaces }
+ *
+ */
+ public void setLInterfaces(LInterfaces value) {
+ this.lInterfaces = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LagInterfaces.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LagInterfaces.java
new file mode 100644
index 0000000..d21b330
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LagInterfaces.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}lag-interface" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "lagInterface"
+})
+@XmlRootElement(name = "lag-interfaces")
+public class LagInterfaces
+ implements AAIDatum
+{
+
+ @XmlElement(name = "lag-interface")
+ protected List<LagInterface> lagInterface;
+
+ /**
+ * Gets the value of the lagInterface property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the lagInterface property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getLagInterface().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link LagInterface }
+ *
+ *
+ */
+ public List<LagInterface> getLagInterface() {
+ if (lagInterface == null) {
+ lagInterface = new ArrayList<LagInterface>();
+ }
+ return this.lagInterface;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LogicalLink.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LogicalLink.java
new file mode 100644
index 0000000..25465da
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LogicalLink.java
@@ -0,0 +1,494 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="link-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="link-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="speed-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="speed-units" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="ip-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="routing-protocol" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="persona-model-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="persona-model-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="widget-model-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="widget-model-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="operational-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="link-role" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="link-name2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="link-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "linkName",
+ "linkType",
+ "speedValue",
+ "speedUnits",
+ "ipVersion",
+ "routingProtocol",
+ "resourceVersion",
+ "personaModelId",
+ "personaModelVersion",
+ "widgetModelId",
+ "widgetModelVersion",
+ "operationalStatus",
+ "linkRole",
+ "linkName2",
+ "linkId",
+ "relationshipList"
+})
+@XmlRootElement(name = "logical-link")
+public class LogicalLink
+ implements AAIDatum
+{
+
+ @XmlElement(name = "link-name", required = true)
+ protected String linkName;
+ @XmlElement(name = "link-type", required = true)
+ protected String linkType;
+ @XmlElement(name = "speed-value")
+ protected String speedValue;
+ @XmlElement(name = "speed-units")
+ protected String speedUnits;
+ @XmlElement(name = "ip-version")
+ protected String ipVersion;
+ @XmlElement(name = "routing-protocol")
+ protected String routingProtocol;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "persona-model-id")
+ protected String personaModelId;
+ @XmlElement(name = "persona-model-version")
+ protected String personaModelVersion;
+ @XmlElement(name = "widget-model-id")
+ protected String widgetModelId;
+ @XmlElement(name = "widget-model-version")
+ protected String widgetModelVersion;
+ @XmlElement(name = "operational-status")
+ protected String operationalStatus;
+ @XmlElement(name = "link-role")
+ protected String linkRole;
+ @XmlElement(name = "link-name2")
+ protected String linkName2;
+ @XmlElement(name = "link-id")
+ protected String linkId;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the linkName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLinkName() {
+ return linkName;
+ }
+
+ /**
+ * Sets the value of the linkName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLinkName(String value) {
+ this.linkName = value;
+ }
+
+ /**
+ * Gets the value of the linkType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLinkType() {
+ return linkType;
+ }
+
+ /**
+ * Sets the value of the linkType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLinkType(String value) {
+ this.linkType = value;
+ }
+
+ /**
+ * Gets the value of the speedValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSpeedValue() {
+ return speedValue;
+ }
+
+ /**
+ * Sets the value of the speedValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSpeedValue(String value) {
+ this.speedValue = value;
+ }
+
+ /**
+ * Gets the value of the speedUnits property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSpeedUnits() {
+ return speedUnits;
+ }
+
+ /**
+ * Sets the value of the speedUnits property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSpeedUnits(String value) {
+ this.speedUnits = value;
+ }
+
+ /**
+ * Gets the value of the ipVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getIpVersion() {
+ return ipVersion;
+ }
+
+ /**
+ * Sets the value of the ipVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setIpVersion(String value) {
+ this.ipVersion = value;
+ }
+
+ /**
+ * Gets the value of the routingProtocol property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRoutingProtocol() {
+ return routingProtocol;
+ }
+
+ /**
+ * Sets the value of the routingProtocol property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRoutingProtocol(String value) {
+ this.routingProtocol = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the personaModelId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonaModelId() {
+ return personaModelId;
+ }
+
+ /**
+ * Sets the value of the personaModelId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonaModelId(String value) {
+ this.personaModelId = value;
+ }
+
+ /**
+ * Gets the value of the personaModelVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonaModelVersion() {
+ return personaModelVersion;
+ }
+
+ /**
+ * Sets the value of the personaModelVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonaModelVersion(String value) {
+ this.personaModelVersion = value;
+ }
+
+ /**
+ * Gets the value of the widgetModelId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getWidgetModelId() {
+ return widgetModelId;
+ }
+
+ /**
+ * Sets the value of the widgetModelId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setWidgetModelId(String value) {
+ this.widgetModelId = value;
+ }
+
+ /**
+ * Gets the value of the widgetModelVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getWidgetModelVersion() {
+ return widgetModelVersion;
+ }
+
+ /**
+ * Sets the value of the widgetModelVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setWidgetModelVersion(String value) {
+ this.widgetModelVersion = value;
+ }
+
+ /**
+ * Gets the value of the operationalStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOperationalStatus() {
+ return operationalStatus;
+ }
+
+ /**
+ * Sets the value of the operationalStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOperationalStatus(String value) {
+ this.operationalStatus = value;
+ }
+
+ /**
+ * Gets the value of the linkRole property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLinkRole() {
+ return linkRole;
+ }
+
+ /**
+ * Sets the value of the linkRole property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLinkRole(String value) {
+ this.linkRole = value;
+ }
+
+ /**
+ * Gets the value of the linkName2 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLinkName2() {
+ return linkName2;
+ }
+
+ /**
+ * Sets the value of the linkName2 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLinkName2(String value) {
+ this.linkName2 = value;
+ }
+
+ /**
+ * Gets the value of the linkId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLinkId() {
+ return linkId;
+ }
+
+ /**
+ * Sets the value of the linkId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLinkId(String value) {
+ this.linkId = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LogicalLinks.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LogicalLinks.java
new file mode 100644
index 0000000..1742d09
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/LogicalLinks.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}logical-link" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "logicalLink"
+})
+@XmlRootElement(name = "logical-links")
+public class LogicalLinks
+ implements AAIDatum
+{
+
+ @XmlElement(name = "logical-link")
+ protected List<LogicalLink> logicalLink;
+
+ /**
+ * Gets the value of the logicalLink property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the logicalLink property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getLogicalLink().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link LogicalLink }
+ *
+ *
+ */
+ public List<LogicalLink> getLogicalLink() {
+ if (logicalLink == null) {
+ logicalLink = new ArrayList<LogicalLink>();
+ }
+ return this.logicalLink;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Metadata.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Metadata.java
new file mode 100644
index 0000000..09ad240
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Metadata.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}metadatum" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "metadatum"
+})
+@XmlRootElement(name = "metadata")
+public class Metadata
+ implements AAIDatum
+{
+
+ protected List<Metadatum> metadatum;
+
+ /**
+ * Gets the value of the metadatum property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the metadatum property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getMetadatum().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Metadatum }
+ *
+ *
+ */
+ public List<Metadatum> getMetadatum() {
+ if (metadatum == null) {
+ metadatum = new ArrayList<Metadatum>();
+ }
+ return this.metadatum;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Metadatum.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Metadatum.java
new file mode 100644
index 0000000..4ff0335
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Metadatum.java
@@ -0,0 +1,130 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="metaname" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="metaval" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "metaname",
+ "metaval",
+ "resourceVersion"
+})
+@XmlRootElement(name = "metadatum")
+public class Metadatum
+ implements AAIDatum
+{
+
+ @XmlElement(required = true)
+ protected String metaname;
+ @XmlElement(required = true)
+ protected String metaval;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+
+ /**
+ * Gets the value of the metaname property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMetaname() {
+ return metaname;
+ }
+
+ /**
+ * Sets the value of the metaname property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMetaname(String value) {
+ this.metaname = value;
+ }
+
+ /**
+ * Gets the value of the metaval property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMetaval() {
+ return metaval;
+ }
+
+ /**
+ * Sets the value of the metaval property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMetaval(String value) {
+ this.metaval = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Model.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Model.java
new file mode 100644
index 0000000..5919ca5
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Model.java
@@ -0,0 +1,325 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="model-name-version-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="model-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="model-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="model-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="model-version" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="model-description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}model-elements" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}metadata" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "modelNameVersionId",
+ "modelType",
+ "modelName",
+ "modelId",
+ "modelVersion",
+ "modelDescription",
+ "resourceVersion",
+ "modelElements",
+ "metadata",
+ "relationshipList"
+})
+@XmlRootElement(name = "model")
+public class Model
+ implements AAIDatum
+{
+
+ @XmlElement(name = "model-name-version-id", required = true)
+ protected String modelNameVersionId;
+ @XmlElement(name = "model-type", required = true)
+ protected String modelType;
+ @XmlElement(name = "model-name", required = true)
+ protected String modelName;
+ @XmlElement(name = "model-id", required = true)
+ protected String modelId;
+ @XmlElement(name = "model-version", required = true)
+ protected String modelVersion;
+ @XmlElement(name = "model-description")
+ protected String modelDescription;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "model-elements")
+ protected ModelElements modelElements;
+ protected Metadata metadata;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the modelNameVersionId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getModelNameVersionId() {
+ return modelNameVersionId;
+ }
+
+ /**
+ * Sets the value of the modelNameVersionId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setModelNameVersionId(String value) {
+ this.modelNameVersionId = value;
+ }
+
+ /**
+ * Gets the value of the modelType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getModelType() {
+ return modelType;
+ }
+
+ /**
+ * Sets the value of the modelType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setModelType(String value) {
+ this.modelType = value;
+ }
+
+ /**
+ * Gets the value of the modelName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getModelName() {
+ return modelName;
+ }
+
+ /**
+ * Sets the value of the modelName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setModelName(String value) {
+ this.modelName = value;
+ }
+
+ /**
+ * Gets the value of the modelId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getModelId() {
+ return modelId;
+ }
+
+ /**
+ * Sets the value of the modelId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setModelId(String value) {
+ this.modelId = value;
+ }
+
+ /**
+ * Gets the value of the modelVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getModelVersion() {
+ return modelVersion;
+ }
+
+ /**
+ * Sets the value of the modelVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setModelVersion(String value) {
+ this.modelVersion = value;
+ }
+
+ /**
+ * Gets the value of the modelDescription property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getModelDescription() {
+ return modelDescription;
+ }
+
+ /**
+ * Sets the value of the modelDescription property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setModelDescription(String value) {
+ this.modelDescription = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the modelElements property.
+ *
+ * @return
+ * possible object is
+ * {@link ModelElements }
+ *
+ */
+ public ModelElements getModelElements() {
+ return modelElements;
+ }
+
+ /**
+ * Sets the value of the modelElements property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ModelElements }
+ *
+ */
+ public void setModelElements(ModelElements value) {
+ this.modelElements = value;
+ }
+
+ /**
+ * Gets the value of the metadata property.
+ *
+ * @return
+ * possible object is
+ * {@link Metadata }
+ *
+ */
+ public Metadata getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the value of the metadata property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Metadata }
+ *
+ */
+ public void setMetadata(Metadata value) {
+ this.metadata = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelAndNamedQuerySearch.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelAndNamedQuerySearch.java
new file mode 100644
index 0000000..9c51b73
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelAndNamedQuerySearch.java
@@ -0,0 +1,130 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}query-parameters" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}instance-filters" minOccurs="0"/&gt;
+ * &lt;element name="top-node-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "queryParameters",
+ "instanceFilters",
+ "topNodeType"
+})
+@XmlRootElement(name = "model-and-named-query-search")
+public class ModelAndNamedQuerySearch
+ implements AAIDatum
+{
+
+ @XmlElement(name = "query-parameters")
+ protected QueryParameters queryParameters;
+ @XmlElement(name = "instance-filters")
+ protected InstanceFilters instanceFilters;
+ @XmlElement(name = "top-node-type")
+ protected String topNodeType;
+
+ /**
+ * Gets the value of the queryParameters property.
+ *
+ * @return
+ * possible object is
+ * {@link QueryParameters }
+ *
+ */
+ public QueryParameters getQueryParameters() {
+ return queryParameters;
+ }
+
+ /**
+ * Sets the value of the queryParameters property.
+ *
+ * @param value
+ * allowed object is
+ * {@link QueryParameters }
+ *
+ */
+ public void setQueryParameters(QueryParameters value) {
+ this.queryParameters = value;
+ }
+
+ /**
+ * Gets the value of the instanceFilters property.
+ *
+ * @return
+ * possible object is
+ * {@link InstanceFilters }
+ *
+ */
+ public InstanceFilters getInstanceFilters() {
+ return instanceFilters;
+ }
+
+ /**
+ * Sets the value of the instanceFilters property.
+ *
+ * @param value
+ * allowed object is
+ * {@link InstanceFilters }
+ *
+ */
+ public void setInstanceFilters(InstanceFilters value) {
+ this.instanceFilters = value;
+ }
+
+ /**
+ * Gets the value of the topNodeType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTopNodeType() {
+ return topNodeType;
+ }
+
+ /**
+ * Sets the value of the topNodeType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTopNodeType(String value) {
+ this.topNodeType = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelConstraint.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelConstraint.java
new file mode 100644
index 0000000..24bd0f5
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelConstraint.java
@@ -0,0 +1,130 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="model-constraint-uuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="constrained-element-set-uuid-to-replace" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}constrained-element-sets" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "modelConstraintUuid",
+ "constrainedElementSetUuidToReplace",
+ "constrainedElementSets"
+})
+@XmlRootElement(name = "model-constraint")
+public class ModelConstraint
+ implements AAIDatum
+{
+
+ @XmlElement(name = "model-constraint-uuid", required = true)
+ protected String modelConstraintUuid;
+ @XmlElement(name = "constrained-element-set-uuid-to-replace", required = true)
+ protected String constrainedElementSetUuidToReplace;
+ @XmlElement(name = "constrained-element-sets")
+ protected ConstrainedElementSets constrainedElementSets;
+
+ /**
+ * Gets the value of the modelConstraintUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getModelConstraintUuid() {
+ return modelConstraintUuid;
+ }
+
+ /**
+ * Sets the value of the modelConstraintUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setModelConstraintUuid(String value) {
+ this.modelConstraintUuid = value;
+ }
+
+ /**
+ * Gets the value of the constrainedElementSetUuidToReplace property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getConstrainedElementSetUuidToReplace() {
+ return constrainedElementSetUuidToReplace;
+ }
+
+ /**
+ * Sets the value of the constrainedElementSetUuidToReplace property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setConstrainedElementSetUuidToReplace(String value) {
+ this.constrainedElementSetUuidToReplace = value;
+ }
+
+ /**
+ * Gets the value of the constrainedElementSets property.
+ *
+ * @return
+ * possible object is
+ * {@link ConstrainedElementSets }
+ *
+ */
+ public ConstrainedElementSets getConstrainedElementSets() {
+ return constrainedElementSets;
+ }
+
+ /**
+ * Sets the value of the constrainedElementSets property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ConstrainedElementSets }
+ *
+ */
+ public void setConstrainedElementSets(ConstrainedElementSets value) {
+ this.constrainedElementSets = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelConstraints.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelConstraints.java
new file mode 100644
index 0000000..0b59cb6
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelConstraints.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}model-constraint" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "modelConstraint"
+})
+@XmlRootElement(name = "model-constraints")
+public class ModelConstraints
+ implements AAIDatum
+{
+
+ @XmlElement(name = "model-constraint")
+ protected List<ModelConstraint> modelConstraint;
+
+ /**
+ * Gets the value of the modelConstraint property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the modelConstraint property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getModelConstraint().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ModelConstraint }
+ *
+ *
+ */
+ public List<ModelConstraint> getModelConstraint() {
+ if (modelConstraint == null) {
+ modelConstraint = new ArrayList<ModelConstraint>();
+ }
+ return this.modelConstraint;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelElement.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelElement.java
new file mode 100644
index 0000000..76c14c8
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelElement.java
@@ -0,0 +1,344 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="model-element-uuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="new-data-del-flag" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="cardinality" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="linkage-points" minOccurs="0"&gt;
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="linkage-point" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * &lt;/element&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}model-elements" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}model-constraints" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "modelElementUuid",
+ "newDataDelFlag",
+ "cardinality",
+ "linkagePoints",
+ "resourceVersion",
+ "modelElements",
+ "modelConstraints",
+ "relationshipList"
+})
+@XmlRootElement(name = "model-element")
+public class ModelElement
+ implements AAIDatum
+{
+
+ @XmlElement(name = "model-element-uuid", required = true)
+ protected String modelElementUuid;
+ @XmlElement(name = "new-data-del-flag", required = true)
+ protected String newDataDelFlag;
+ @XmlElement(required = true)
+ protected String cardinality;
+ @XmlElement(name = "linkage-points")
+ protected ModelElement.LinkagePoints linkagePoints;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "model-elements")
+ protected ModelElements modelElements;
+ @XmlElement(name = "model-constraints")
+ protected ModelConstraints modelConstraints;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the modelElementUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getModelElementUuid() {
+ return modelElementUuid;
+ }
+
+ /**
+ * Sets the value of the modelElementUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setModelElementUuid(String value) {
+ this.modelElementUuid = value;
+ }
+
+ /**
+ * Gets the value of the newDataDelFlag property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNewDataDelFlag() {
+ return newDataDelFlag;
+ }
+
+ /**
+ * Sets the value of the newDataDelFlag property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNewDataDelFlag(String value) {
+ this.newDataDelFlag = value;
+ }
+
+ /**
+ * Gets the value of the cardinality property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCardinality() {
+ return cardinality;
+ }
+
+ /**
+ * Sets the value of the cardinality property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCardinality(String value) {
+ this.cardinality = value;
+ }
+
+ /**
+ * Gets the value of the linkagePoints property.
+ *
+ * @return
+ * possible object is
+ * {@link ModelElement.LinkagePoints }
+ *
+ */
+ public ModelElement.LinkagePoints getLinkagePoints() {
+ return linkagePoints;
+ }
+
+ /**
+ * Sets the value of the linkagePoints property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ModelElement.LinkagePoints }
+ *
+ */
+ public void setLinkagePoints(ModelElement.LinkagePoints value) {
+ this.linkagePoints = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the modelElements property.
+ *
+ * @return
+ * possible object is
+ * {@link ModelElements }
+ *
+ */
+ public ModelElements getModelElements() {
+ return modelElements;
+ }
+
+ /**
+ * Sets the value of the modelElements property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ModelElements }
+ *
+ */
+ public void setModelElements(ModelElements value) {
+ this.modelElements = value;
+ }
+
+ /**
+ * Gets the value of the modelConstraints property.
+ *
+ * @return
+ * possible object is
+ * {@link ModelConstraints }
+ *
+ */
+ public ModelConstraints getModelConstraints() {
+ return modelConstraints;
+ }
+
+ /**
+ * Sets the value of the modelConstraints property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ModelConstraints }
+ *
+ */
+ public void setModelConstraints(ModelConstraints value) {
+ this.modelConstraints = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+
+ /**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="linkage-point" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "linkagePoint"
+ })
+ public static class LinkagePoints
+ implements AAIDatum
+ {
+
+ @XmlElement(name = "linkage-point")
+ protected List<String> linkagePoint;
+
+ /**
+ * Gets the value of the linkagePoint property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the linkagePoint property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getLinkagePoint().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List<String> getLinkagePoint() {
+ if (linkagePoint == null) {
+ linkagePoint = new ArrayList<String>();
+ }
+ return this.linkagePoint;
+ }
+
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelElements.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelElements.java
new file mode 100644
index 0000000..3f59b69
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ModelElements.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}model-element" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "modelElement"
+})
+@XmlRootElement(name = "model-elements")
+public class ModelElements
+ implements AAIDatum
+{
+
+ @XmlElement(name = "model-element")
+ protected List<ModelElement> modelElement;
+
+ /**
+ * Gets the value of the modelElement property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the modelElement property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getModelElement().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ModelElement }
+ *
+ *
+ */
+ public List<ModelElement> getModelElement() {
+ if (modelElement == null) {
+ modelElement = new ArrayList<ModelElement>();
+ }
+ return this.modelElement;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Models.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Models.java
new file mode 100644
index 0000000..2e8b80a
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Models.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}model" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "model"
+})
+@XmlRootElement(name = "models")
+public class Models
+ implements AAIDatum
+{
+
+ protected List<Model> model;
+
+ /**
+ * Gets the value of the model property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the model property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getModel().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Model }
+ *
+ *
+ */
+ public List<Model> getModel() {
+ if (model == null) {
+ model = new ArrayList<Model>();
+ }
+ return this.model;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueries.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueries.java
new file mode 100644
index 0000000..4b313e0
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueries.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}named-query" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "namedQuery"
+})
+@XmlRootElement(name = "named-queries")
+public class NamedQueries
+ implements AAIDatum
+{
+
+ @XmlElement(name = "named-query")
+ protected List<NamedQuery> namedQuery;
+
+ /**
+ * Gets the value of the namedQuery property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the namedQuery property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getNamedQuery().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link NamedQuery }
+ *
+ *
+ */
+ public List<NamedQuery> getNamedQuery() {
+ if (namedQuery == null) {
+ namedQuery = new ArrayList<NamedQuery>();
+ }
+ return this.namedQuery;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQuery.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQuery.java
new file mode 100644
index 0000000..00f2f97
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQuery.java
@@ -0,0 +1,343 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="named-query-uuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="named-query-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="named-query-version" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="required-input-params" minOccurs="0"&gt;
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="required-input-param" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * &lt;/element&gt;
+ * &lt;element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}named-query-elements" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "namedQueryUuid",
+ "namedQueryName",
+ "namedQueryVersion",
+ "requiredInputParams",
+ "description",
+ "resourceVersion",
+ "namedQueryElements",
+ "relationshipList"
+})
+@XmlRootElement(name = "named-query")
+public class NamedQuery
+ implements AAIDatum
+{
+
+ @XmlElement(name = "named-query-uuid", required = true)
+ protected String namedQueryUuid;
+ @XmlElement(name = "named-query-name", required = true)
+ protected String namedQueryName;
+ @XmlElement(name = "named-query-version", required = true)
+ protected String namedQueryVersion;
+ @XmlElement(name = "required-input-params")
+ protected NamedQuery.RequiredInputParams requiredInputParams;
+ protected String description;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "named-query-elements")
+ protected NamedQueryElements namedQueryElements;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the namedQueryUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNamedQueryUuid() {
+ return namedQueryUuid;
+ }
+
+ /**
+ * Sets the value of the namedQueryUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNamedQueryUuid(String value) {
+ this.namedQueryUuid = value;
+ }
+
+ /**
+ * Gets the value of the namedQueryName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNamedQueryName() {
+ return namedQueryName;
+ }
+
+ /**
+ * Sets the value of the namedQueryName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNamedQueryName(String value) {
+ this.namedQueryName = value;
+ }
+
+ /**
+ * Gets the value of the namedQueryVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNamedQueryVersion() {
+ return namedQueryVersion;
+ }
+
+ /**
+ * Sets the value of the namedQueryVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNamedQueryVersion(String value) {
+ this.namedQueryVersion = value;
+ }
+
+ /**
+ * Gets the value of the requiredInputParams property.
+ *
+ * @return
+ * possible object is
+ * {@link NamedQuery.RequiredInputParams }
+ *
+ */
+ public NamedQuery.RequiredInputParams getRequiredInputParams() {
+ return requiredInputParams;
+ }
+
+ /**
+ * Sets the value of the requiredInputParams property.
+ *
+ * @param value
+ * allowed object is
+ * {@link NamedQuery.RequiredInputParams }
+ *
+ */
+ public void setRequiredInputParams(NamedQuery.RequiredInputParams value) {
+ this.requiredInputParams = value;
+ }
+
+ /**
+ * Gets the value of the description property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Sets the value of the description property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDescription(String value) {
+ this.description = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the namedQueryElements property.
+ *
+ * @return
+ * possible object is
+ * {@link NamedQueryElements }
+ *
+ */
+ public NamedQueryElements getNamedQueryElements() {
+ return namedQueryElements;
+ }
+
+ /**
+ * Sets the value of the namedQueryElements property.
+ *
+ * @param value
+ * allowed object is
+ * {@link NamedQueryElements }
+ *
+ */
+ public void setNamedQueryElements(NamedQueryElements value) {
+ this.namedQueryElements = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+
+ /**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="required-input-param" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+ @XmlAccessorType(XmlAccessType.FIELD)
+ @XmlType(name = "", propOrder = {
+ "requiredInputParam"
+ })
+ public static class RequiredInputParams
+ implements AAIDatum
+ {
+
+ @XmlElement(name = "required-input-param")
+ protected List<String> requiredInputParam;
+
+ /**
+ * Gets the value of the requiredInputParam property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the requiredInputParam property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getRequiredInputParam().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List<String> getRequiredInputParam() {
+ if (requiredInputParam == null) {
+ requiredInputParam = new ArrayList<String>();
+ }
+ return this.requiredInputParam;
+ }
+
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueryElement.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueryElement.java
new file mode 100644
index 0000000..af93d89
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueryElement.java
@@ -0,0 +1,305 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="named-query-element-uuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="property-collect-list" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="property-limit-desc" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="do-not-output" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}named-query-elements" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}related-lookups" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}property-constraints" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "namedQueryElementUuid",
+ "propertyCollectList",
+ "resourceVersion",
+ "propertyLimitDesc",
+ "doNotOutput",
+ "namedQueryElements",
+ "relatedLookups",
+ "propertyConstraints",
+ "relationshipList"
+})
+@XmlRootElement(name = "named-query-element")
+public class NamedQueryElement
+ implements AAIDatum
+{
+
+ @XmlElement(name = "named-query-element-uuid", required = true)
+ protected String namedQueryElementUuid;
+ @XmlElement(name = "property-collect-list")
+ protected List<String> propertyCollectList;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "property-limit-desc")
+ protected String propertyLimitDesc;
+ @XmlElement(name = "do-not-output")
+ protected String doNotOutput;
+ @XmlElement(name = "named-query-elements")
+ protected NamedQueryElements namedQueryElements;
+ @XmlElement(name = "related-lookups")
+ protected RelatedLookups relatedLookups;
+ @XmlElement(name = "property-constraints")
+ protected PropertyConstraints propertyConstraints;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the namedQueryElementUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNamedQueryElementUuid() {
+ return namedQueryElementUuid;
+ }
+
+ /**
+ * Sets the value of the namedQueryElementUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNamedQueryElementUuid(String value) {
+ this.namedQueryElementUuid = value;
+ }
+
+ /**
+ * Gets the value of the propertyCollectList property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the propertyCollectList property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getPropertyCollectList().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List<String> getPropertyCollectList() {
+ if (propertyCollectList == null) {
+ propertyCollectList = new ArrayList<String>();
+ }
+ return this.propertyCollectList;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the propertyLimitDesc property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyLimitDesc() {
+ return propertyLimitDesc;
+ }
+
+ /**
+ * Sets the value of the propertyLimitDesc property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyLimitDesc(String value) {
+ this.propertyLimitDesc = value;
+ }
+
+ /**
+ * Gets the value of the doNotOutput property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDoNotOutput() {
+ return doNotOutput;
+ }
+
+ /**
+ * Sets the value of the doNotOutput property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDoNotOutput(String value) {
+ this.doNotOutput = value;
+ }
+
+ /**
+ * Gets the value of the namedQueryElements property.
+ *
+ * @return
+ * possible object is
+ * {@link NamedQueryElements }
+ *
+ */
+ public NamedQueryElements getNamedQueryElements() {
+ return namedQueryElements;
+ }
+
+ /**
+ * Sets the value of the namedQueryElements property.
+ *
+ * @param value
+ * allowed object is
+ * {@link NamedQueryElements }
+ *
+ */
+ public void setNamedQueryElements(NamedQueryElements value) {
+ this.namedQueryElements = value;
+ }
+
+ /**
+ * Gets the value of the relatedLookups property.
+ *
+ * @return
+ * possible object is
+ * {@link RelatedLookups }
+ *
+ */
+ public RelatedLookups getRelatedLookups() {
+ return relatedLookups;
+ }
+
+ /**
+ * Sets the value of the relatedLookups property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelatedLookups }
+ *
+ */
+ public void setRelatedLookups(RelatedLookups value) {
+ this.relatedLookups = value;
+ }
+
+ /**
+ * Gets the value of the propertyConstraints property.
+ *
+ * @return
+ * possible object is
+ * {@link PropertyConstraints }
+ *
+ */
+ public PropertyConstraints getPropertyConstraints() {
+ return propertyConstraints;
+ }
+
+ /**
+ * Sets the value of the propertyConstraints property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PropertyConstraints }
+ *
+ */
+ public void setPropertyConstraints(PropertyConstraints value) {
+ this.propertyConstraints = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueryElements.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueryElements.java
new file mode 100644
index 0000000..91a1a6e
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NamedQueryElements.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}named-query-element" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "namedQueryElement"
+})
+@XmlRootElement(name = "named-query-elements")
+public class NamedQueryElements
+ implements AAIDatum
+{
+
+ @XmlElement(name = "named-query-element")
+ protected List<NamedQueryElement> namedQueryElement;
+
+ /**
+ * Gets the value of the namedQueryElement property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the namedQueryElement property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getNamedQueryElement().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link NamedQueryElement }
+ *
+ *
+ */
+ public List<NamedQueryElement> getNamedQueryElement() {
+ if (namedQueryElement == null) {
+ namedQueryElement = new ArrayList<NamedQueryElement>();
+ }
+ return this.namedQueryElement;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Network.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Network.java
new file mode 100644
index 0000000..e329ba9
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Network.java
@@ -0,0 +1,212 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}logical-links" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}vnfcs" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}l3-networks" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}generic-vnfs" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}pnfs" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}physical-links" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "logicalLinks",
+ "vnfcs",
+ "l3Networks",
+ "genericVnfs",
+ "pnfs",
+ "physicalLinks"
+})
+@XmlRootElement(name = "network")
+public class Network
+ implements AAIDatum
+{
+
+ @XmlElement(name = "logical-links")
+ protected LogicalLinks logicalLinks;
+ protected Vnfcs vnfcs;
+ @XmlElement(name = "l3-networks")
+ protected L3Networks l3Networks;
+ @XmlElement(name = "generic-vnfs")
+ protected GenericVnfs genericVnfs;
+ protected Pnfs pnfs;
+ @XmlElement(name = "physical-links")
+ protected PhysicalLinks physicalLinks;
+
+ /**
+ * Gets the value of the logicalLinks property.
+ *
+ * @return
+ * possible object is
+ * {@link LogicalLinks }
+ *
+ */
+ public LogicalLinks getLogicalLinks() {
+ return logicalLinks;
+ }
+
+ /**
+ * Sets the value of the logicalLinks property.
+ *
+ * @param value
+ * allowed object is
+ * {@link LogicalLinks }
+ *
+ */
+ public void setLogicalLinks(LogicalLinks value) {
+ this.logicalLinks = value;
+ }
+
+ /**
+ * Gets the value of the vnfcs property.
+ *
+ * @return
+ * possible object is
+ * {@link Vnfcs }
+ *
+ */
+ public Vnfcs getVnfcs() {
+ return vnfcs;
+ }
+
+ /**
+ * Sets the value of the vnfcs property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Vnfcs }
+ *
+ */
+ public void setVnfcs(Vnfcs value) {
+ this.vnfcs = value;
+ }
+
+ /**
+ * Gets the value of the l3Networks property.
+ *
+ * @return
+ * possible object is
+ * {@link L3Networks }
+ *
+ */
+ public L3Networks getL3Networks() {
+ return l3Networks;
+ }
+
+ /**
+ * Sets the value of the l3Networks property.
+ *
+ * @param value
+ * allowed object is
+ * {@link L3Networks }
+ *
+ */
+ public void setL3Networks(L3Networks value) {
+ this.l3Networks = value;
+ }
+
+ /**
+ * Gets the value of the genericVnfs property.
+ *
+ * @return
+ * possible object is
+ * {@link GenericVnfs }
+ *
+ */
+ public GenericVnfs getGenericVnfs() {
+ return genericVnfs;
+ }
+
+ /**
+ * Sets the value of the genericVnfs property.
+ *
+ * @param value
+ * allowed object is
+ * {@link GenericVnfs }
+ *
+ */
+ public void setGenericVnfs(GenericVnfs value) {
+ this.genericVnfs = value;
+ }
+
+ /**
+ * Gets the value of the pnfs property.
+ *
+ * @return
+ * possible object is
+ * {@link Pnfs }
+ *
+ */
+ public Pnfs getPnfs() {
+ return pnfs;
+ }
+
+ /**
+ * Sets the value of the pnfs property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Pnfs }
+ *
+ */
+ public void setPnfs(Pnfs value) {
+ this.pnfs = value;
+ }
+
+ /**
+ * Gets the value of the physicalLinks property.
+ *
+ * @return
+ * possible object is
+ * {@link PhysicalLinks }
+ *
+ */
+ public PhysicalLinks getPhysicalLinks() {
+ return physicalLinks;
+ }
+
+ /**
+ * Sets the value of the physicalLinks property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PhysicalLinks }
+ *
+ */
+ public void setPhysicalLinks(PhysicalLinks value) {
+ this.physicalLinks = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NotificationEvent.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NotificationEvent.java
new file mode 100644
index 0000000..b1f512a
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NotificationEvent.java
@@ -0,0 +1,102 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="cambria.partition" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}notification-event-header" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "cambriaPartition",
+ "notificationEventHeader"
+})
+@XmlRootElement(name = "notification-event")
+public class NotificationEvent
+ implements AAIDatum
+{
+
+ @XmlElement(name = "cambria.partition")
+ protected String cambriaPartition;
+ @XmlElement(name = "notification-event-header")
+ protected NotificationEventHeader notificationEventHeader;
+
+ /**
+ * Gets the value of the cambriaPartition property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCambriaPartition() {
+ return cambriaPartition;
+ }
+
+ /**
+ * Sets the value of the cambriaPartition property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCambriaPartition(String value) {
+ this.cambriaPartition = value;
+ }
+
+ /**
+ * Gets the value of the notificationEventHeader property.
+ *
+ * @return
+ * possible object is
+ * {@link NotificationEventHeader }
+ *
+ */
+ public NotificationEventHeader getNotificationEventHeader() {
+ return notificationEventHeader;
+ }
+
+ /**
+ * Sets the value of the notificationEventHeader property.
+ *
+ * @param value
+ * allowed object is
+ * {@link NotificationEventHeader }
+ *
+ */
+ public void setNotificationEventHeader(NotificationEventHeader value) {
+ this.notificationEventHeader = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NotificationEventHeader.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NotificationEventHeader.java
new file mode 100644
index 0000000..86e51f6
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/NotificationEventHeader.java
@@ -0,0 +1,403 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="timestamp" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="source-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="domain" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="sequence-number" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="severity" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="event-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="action" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="entity-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="top-entity-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="entity-link" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "id",
+ "timestamp",
+ "sourceName",
+ "domain",
+ "sequenceNumber",
+ "severity",
+ "eventType",
+ "version",
+ "action",
+ "entityType",
+ "topEntityType",
+ "entityLink",
+ "status"
+})
+@XmlRootElement(name = "notification-event-header")
+public class NotificationEventHeader
+ implements AAIDatum
+{
+
+ protected String id;
+ protected String timestamp;
+ @XmlElement(name = "source-name")
+ protected String sourceName;
+ protected String domain;
+ @XmlElement(name = "sequence-number")
+ protected String sequenceNumber;
+ protected String severity;
+ @XmlElement(name = "event-type")
+ protected String eventType;
+ protected String version;
+ protected String action;
+ @XmlElement(name = "entity-type")
+ protected String entityType;
+ @XmlElement(name = "top-entity-type")
+ protected String topEntityType;
+ @XmlElement(name = "entity-link")
+ protected String entityLink;
+ protected String status;
+
+ /**
+ * Gets the value of the id property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Sets the value of the id property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setId(String value) {
+ this.id = value;
+ }
+
+ /**
+ * Gets the value of the timestamp property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTimestamp() {
+ return timestamp;
+ }
+
+ /**
+ * Sets the value of the timestamp property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTimestamp(String value) {
+ this.timestamp = value;
+ }
+
+ /**
+ * Gets the value of the sourceName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSourceName() {
+ return sourceName;
+ }
+
+ /**
+ * Sets the value of the sourceName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSourceName(String value) {
+ this.sourceName = value;
+ }
+
+ /**
+ * Gets the value of the domain property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDomain() {
+ return domain;
+ }
+
+ /**
+ * Sets the value of the domain property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDomain(String value) {
+ this.domain = value;
+ }
+
+ /**
+ * Gets the value of the sequenceNumber property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSequenceNumber() {
+ return sequenceNumber;
+ }
+
+ /**
+ * Sets the value of the sequenceNumber property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSequenceNumber(String value) {
+ this.sequenceNumber = value;
+ }
+
+ /**
+ * Gets the value of the severity property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSeverity() {
+ return severity;
+ }
+
+ /**
+ * Sets the value of the severity property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSeverity(String value) {
+ this.severity = value;
+ }
+
+ /**
+ * Gets the value of the eventType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEventType() {
+ return eventType;
+ }
+
+ /**
+ * Sets the value of the eventType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEventType(String value) {
+ this.eventType = value;
+ }
+
+ /**
+ * Gets the value of the version property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ * Sets the value of the version property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVersion(String value) {
+ this.version = value;
+ }
+
+ /**
+ * Gets the value of the action property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getAction() {
+ return action;
+ }
+
+ /**
+ * Sets the value of the action property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setAction(String value) {
+ this.action = value;
+ }
+
+ /**
+ * Gets the value of the entityType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEntityType() {
+ return entityType;
+ }
+
+ /**
+ * Sets the value of the entityType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEntityType(String value) {
+ this.entityType = value;
+ }
+
+ /**
+ * Gets the value of the topEntityType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTopEntityType() {
+ return topEntityType;
+ }
+
+ /**
+ * Sets the value of the topEntityType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTopEntityType(String value) {
+ this.topEntityType = value;
+ }
+
+ /**
+ * Gets the value of the entityLink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEntityLink() {
+ return entityLink;
+ }
+
+ /**
+ * Sets the value of the entityLink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEntityLink(String value) {
+ this.entityLink = value;
+ }
+
+ /**
+ * Gets the value of the status property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getStatus() {
+ return status;
+ }
+
+ /**
+ * Sets the value of the status property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setStatus(String value) {
+ this.status = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Notify.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Notify.java
new file mode 100644
index 0000000..d55a389
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Notify.java
@@ -0,0 +1,192 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="event-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="node-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="event-trigger" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}key-data" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;element name="selflink" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "eventId",
+ "nodeType",
+ "eventTrigger",
+ "keyData",
+ "selflink"
+})
+@XmlRootElement(name = "notify")
+public class Notify
+ implements AAIDatum
+{
+
+ @XmlElement(name = "event-id", required = true)
+ protected String eventId;
+ @XmlElement(name = "node-type")
+ protected String nodeType;
+ @XmlElement(name = "event-trigger")
+ protected String eventTrigger;
+ @XmlElement(name = "key-data")
+ protected List<KeyData> keyData;
+ protected String selflink;
+
+ /**
+ * Gets the value of the eventId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEventId() {
+ return eventId;
+ }
+
+ /**
+ * Sets the value of the eventId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEventId(String value) {
+ this.eventId = value;
+ }
+
+ /**
+ * Gets the value of the nodeType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNodeType() {
+ return nodeType;
+ }
+
+ /**
+ * Sets the value of the nodeType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNodeType(String value) {
+ this.nodeType = value;
+ }
+
+ /**
+ * Gets the value of the eventTrigger property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEventTrigger() {
+ return eventTrigger;
+ }
+
+ /**
+ * Sets the value of the eventTrigger property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEventTrigger(String value) {
+ this.eventTrigger = value;
+ }
+
+ /**
+ * Gets the value of the keyData property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the keyData property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getKeyData().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link KeyData }
+ *
+ *
+ */
+ public List<KeyData> getKeyData() {
+ if (keyData == null) {
+ keyData = new ArrayList<KeyData>();
+ }
+ return this.keyData;
+ }
+
+ /**
+ * Gets the value of the selflink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSelflink() {
+ return selflink;
+ }
+
+ /**
+ * Sets the value of the selflink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSelflink(String value) {
+ this.selflink = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ObjectFactory.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ObjectFactory.java
new file mode 100644
index 0000000..21111b7
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ObjectFactory.java
@@ -0,0 +1,1015 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.openecomp.aai.inventory.v8 package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+@XmlRegistry
+public class ObjectFactory {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.openecomp.aai.inventory.v8
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link ModelElement }
+ *
+ */
+ public ModelElement createModelElement() {
+ return new ModelElement();
+ }
+
+ /**
+ * Create an instance of {@link NamedQuery }
+ *
+ */
+ public NamedQuery createNamedQuery() {
+ return new NamedQuery();
+ }
+
+ /**
+ * Create an instance of {@link ResultData }
+ *
+ */
+ public ResultData createResultData() {
+ return new ResultData();
+ }
+
+ /**
+ * Create an instance of {@link SearchResults }
+ *
+ */
+ public SearchResults createSearchResults() {
+ return new SearchResults();
+ }
+
+ /**
+ * Create an instance of {@link Search }
+ *
+ */
+ public Search createSearch() {
+ return new Search();
+ }
+
+ /**
+ * Create an instance of {@link UpdateNodeKey }
+ *
+ */
+ public UpdateNodeKey createUpdateNodeKey() {
+ return new UpdateNodeKey();
+ }
+
+ /**
+ * Create an instance of {@link ActionData }
+ *
+ */
+ public ActionData createActionData() {
+ return new ActionData();
+ }
+
+ /**
+ * Create an instance of {@link Action }
+ *
+ */
+ public Action createAction() {
+ return new Action();
+ }
+
+ /**
+ * Create an instance of {@link Update }
+ *
+ */
+ public Update createUpdate() {
+ return new Update();
+ }
+
+ /**
+ * Create an instance of {@link KeyData }
+ *
+ */
+ public KeyData createKeyData() {
+ return new KeyData();
+ }
+
+ /**
+ * Create an instance of {@link Notify }
+ *
+ */
+ public Notify createNotify() {
+ return new Notify();
+ }
+
+ /**
+ * Create an instance of {@link Actions }
+ *
+ */
+ public Actions createActions() {
+ return new Actions();
+ }
+
+ /**
+ * Create an instance of {@link RelationshipData }
+ *
+ */
+ public RelationshipData createRelationshipData() {
+ return new RelationshipData();
+ }
+
+ /**
+ * Create an instance of {@link RelatedToProperty }
+ *
+ */
+ public RelatedToProperty createRelatedToProperty() {
+ return new RelatedToProperty();
+ }
+
+ /**
+ * Create an instance of {@link Relationship }
+ *
+ */
+ public Relationship createRelationship() {
+ return new Relationship();
+ }
+
+ /**
+ * Create an instance of {@link RelationshipList }
+ *
+ */
+ public RelationshipList createRelationshipList() {
+ return new RelationshipList();
+ }
+
+ /**
+ * Create an instance of {@link VolumeGroup }
+ *
+ */
+ public VolumeGroup createVolumeGroup() {
+ return new VolumeGroup();
+ }
+
+ /**
+ * Create an instance of {@link VolumeGroups }
+ *
+ */
+ public VolumeGroups createVolumeGroups() {
+ return new VolumeGroups();
+ }
+
+ /**
+ * Create an instance of {@link Volume }
+ *
+ */
+ public Volume createVolume() {
+ return new Volume();
+ }
+
+ /**
+ * Create an instance of {@link Volumes }
+ *
+ */
+ public Volumes createVolumes() {
+ return new Volumes();
+ }
+
+ /**
+ * Create an instance of {@link L3InterfaceIpv4AddressList }
+ *
+ */
+ public L3InterfaceIpv4AddressList createL3InterfaceIpv4AddressList() {
+ return new L3InterfaceIpv4AddressList();
+ }
+
+ /**
+ * Create an instance of {@link L3InterfaceIpv6AddressList }
+ *
+ */
+ public L3InterfaceIpv6AddressList createL3InterfaceIpv6AddressList() {
+ return new L3InterfaceIpv6AddressList();
+ }
+
+ /**
+ * Create an instance of {@link Vlan }
+ *
+ */
+ public Vlan createVlan() {
+ return new Vlan();
+ }
+
+ /**
+ * Create an instance of {@link Vlans }
+ *
+ */
+ public Vlans createVlans() {
+ return new Vlans();
+ }
+
+ /**
+ * Create an instance of {@link LInterface }
+ *
+ */
+ public LInterface createLInterface() {
+ return new LInterface();
+ }
+
+ /**
+ * Create an instance of {@link LInterfaces }
+ *
+ */
+ public LInterfaces createLInterfaces() {
+ return new LInterfaces();
+ }
+
+ /**
+ * Create an instance of {@link Vserver }
+ *
+ */
+ public Vserver createVserver() {
+ return new Vserver();
+ }
+
+ /**
+ * Create an instance of {@link Vservers }
+ *
+ */
+ public Vservers createVservers() {
+ return new Vservers();
+ }
+
+ /**
+ * Create an instance of {@link Tenant }
+ *
+ */
+ public Tenant createTenant() {
+ return new Tenant();
+ }
+
+ /**
+ * Create an instance of {@link Tenants }
+ *
+ */
+ public Tenants createTenants() {
+ return new Tenants();
+ }
+
+ /**
+ * Create an instance of {@link Flavor }
+ *
+ */
+ public Flavor createFlavor() {
+ return new Flavor();
+ }
+
+ /**
+ * Create an instance of {@link Flavors }
+ *
+ */
+ public Flavors createFlavors() {
+ return new Flavors();
+ }
+
+ /**
+ * Create an instance of {@link GroupAssignment }
+ *
+ */
+ public GroupAssignment createGroupAssignment() {
+ return new GroupAssignment();
+ }
+
+ /**
+ * Create an instance of {@link GroupAssignments }
+ *
+ */
+ public GroupAssignments createGroupAssignments() {
+ return new GroupAssignments();
+ }
+
+ /**
+ * Create an instance of {@link Snapshot }
+ *
+ */
+ public Snapshot createSnapshot() {
+ return new Snapshot();
+ }
+
+ /**
+ * Create an instance of {@link Snapshots }
+ *
+ */
+ public Snapshots createSnapshots() {
+ return new Snapshots();
+ }
+
+ /**
+ * Create an instance of {@link Metadatum }
+ *
+ */
+ public Metadatum createMetadatum() {
+ return new Metadatum();
+ }
+
+ /**
+ * Create an instance of {@link Metadata }
+ *
+ */
+ public Metadata createMetadata() {
+ return new Metadata();
+ }
+
+ /**
+ * Create an instance of {@link Image }
+ *
+ */
+ public Image createImage() {
+ return new Image();
+ }
+
+ /**
+ * Create an instance of {@link Images }
+ *
+ */
+ public Images createImages() {
+ return new Images();
+ }
+
+ /**
+ * Create an instance of {@link AvailabilityZone }
+ *
+ */
+ public AvailabilityZone createAvailabilityZone() {
+ return new AvailabilityZone();
+ }
+
+ /**
+ * Create an instance of {@link AvailabilityZones }
+ *
+ */
+ public AvailabilityZones createAvailabilityZones() {
+ return new AvailabilityZones();
+ }
+
+ /**
+ * Create an instance of {@link CloudRegion }
+ *
+ */
+ public CloudRegion createCloudRegion() {
+ return new CloudRegion();
+ }
+
+ /**
+ * Create an instance of {@link CloudRegions }
+ *
+ */
+ public CloudRegions createCloudRegions() {
+ return new CloudRegions();
+ }
+
+ /**
+ * Create an instance of {@link PInterface }
+ *
+ */
+ public PInterface createPInterface() {
+ return new PInterface();
+ }
+
+ /**
+ * Create an instance of {@link PInterfaces }
+ *
+ */
+ public PInterfaces createPInterfaces() {
+ return new PInterfaces();
+ }
+
+ /**
+ * Create an instance of {@link LagInterface }
+ *
+ */
+ public LagInterface createLagInterface() {
+ return new LagInterface();
+ }
+
+ /**
+ * Create an instance of {@link LagInterfaces }
+ *
+ */
+ public LagInterfaces createLagInterfaces() {
+ return new LagInterfaces();
+ }
+
+ /**
+ * Create an instance of {@link Pserver }
+ *
+ */
+ public Pserver createPserver() {
+ return new Pserver();
+ }
+
+ /**
+ * Create an instance of {@link Pservers }
+ *
+ */
+ public Pservers createPservers() {
+ return new Pservers();
+ }
+
+ /**
+ * Create an instance of {@link CloudInfrastructure }
+ *
+ */
+ public CloudInfrastructure createCloudInfrastructure() {
+ return new CloudInfrastructure();
+ }
+
+ /**
+ * Create an instance of {@link ServiceInstance }
+ *
+ */
+ public ServiceInstance createServiceInstance() {
+ return new ServiceInstance();
+ }
+
+ /**
+ * Create an instance of {@link ServiceInstances }
+ *
+ */
+ public ServiceInstances createServiceInstances() {
+ return new ServiceInstances();
+ }
+
+ /**
+ * Create an instance of {@link ServiceSubscription }
+ *
+ */
+ public ServiceSubscription createServiceSubscription() {
+ return new ServiceSubscription();
+ }
+
+ /**
+ * Create an instance of {@link ServiceSubscriptions }
+ *
+ */
+ public ServiceSubscriptions createServiceSubscriptions() {
+ return new ServiceSubscriptions();
+ }
+
+ /**
+ * Create an instance of {@link Customer }
+ *
+ */
+ public Customer createCustomer() {
+ return new Customer();
+ }
+
+ /**
+ * Create an instance of {@link Customers }
+ *
+ */
+ public Customers createCustomers() {
+ return new Customers();
+ }
+
+ /**
+ * Create an instance of {@link Business }
+ *
+ */
+ public Business createBusiness() {
+ return new Business();
+ }
+
+ /**
+ * Create an instance of {@link Service }
+ *
+ */
+ public Service createService() {
+ return new Service();
+ }
+
+ /**
+ * Create an instance of {@link Services }
+ *
+ */
+ public Services createServices() {
+ return new Services();
+ }
+
+ /**
+ * Create an instance of {@link ElementChoiceSet }
+ *
+ */
+ public ElementChoiceSet createElementChoiceSet() {
+ return new ElementChoiceSet();
+ }
+
+ /**
+ * Create an instance of {@link ModelElements }
+ *
+ */
+ public ModelElements createModelElements() {
+ return new ModelElements();
+ }
+
+ /**
+ * Create an instance of {@link ModelElement.LinkagePoints }
+ *
+ */
+ public ModelElement.LinkagePoints createModelElementLinkagePoints() {
+ return new ModelElement.LinkagePoints();
+ }
+
+ /**
+ * Create an instance of {@link ModelConstraints }
+ *
+ */
+ public ModelConstraints createModelConstraints() {
+ return new ModelConstraints();
+ }
+
+ /**
+ * Create an instance of {@link ModelConstraint }
+ *
+ */
+ public ModelConstraint createModelConstraint() {
+ return new ModelConstraint();
+ }
+
+ /**
+ * Create an instance of {@link ConstrainedElementSets }
+ *
+ */
+ public ConstrainedElementSets createConstrainedElementSets() {
+ return new ConstrainedElementSets();
+ }
+
+ /**
+ * Create an instance of {@link ConstrainedElementSet }
+ *
+ */
+ public ConstrainedElementSet createConstrainedElementSet() {
+ return new ConstrainedElementSet();
+ }
+
+ /**
+ * Create an instance of {@link ElementChoiceSets }
+ *
+ */
+ public ElementChoiceSets createElementChoiceSets() {
+ return new ElementChoiceSets();
+ }
+
+ /**
+ * Create an instance of {@link Model }
+ *
+ */
+ public Model createModel() {
+ return new Model();
+ }
+
+ /**
+ * Create an instance of {@link Models }
+ *
+ */
+ public Models createModels() {
+ return new Models();
+ }
+
+ /**
+ * Create an instance of {@link RelatedLookup }
+ *
+ */
+ public RelatedLookup createRelatedLookup() {
+ return new RelatedLookup();
+ }
+
+ /**
+ * Create an instance of {@link RelatedLookups }
+ *
+ */
+ public RelatedLookups createRelatedLookups() {
+ return new RelatedLookups();
+ }
+
+ /**
+ * Create an instance of {@link PropertyConstraint }
+ *
+ */
+ public PropertyConstraint createPropertyConstraint() {
+ return new PropertyConstraint();
+ }
+
+ /**
+ * Create an instance of {@link PropertyConstraints }
+ *
+ */
+ public PropertyConstraints createPropertyConstraints() {
+ return new PropertyConstraints();
+ }
+
+ /**
+ * Create an instance of {@link NamedQueryElement }
+ *
+ */
+ public NamedQueryElement createNamedQueryElement() {
+ return new NamedQueryElement();
+ }
+
+ /**
+ * Create an instance of {@link NamedQueryElements }
+ *
+ */
+ public NamedQueryElements createNamedQueryElements() {
+ return new NamedQueryElements();
+ }
+
+ /**
+ * Create an instance of {@link NamedQuery.RequiredInputParams }
+ *
+ */
+ public NamedQuery.RequiredInputParams createNamedQueryRequiredInputParams() {
+ return new NamedQuery.RequiredInputParams();
+ }
+
+ /**
+ * Create an instance of {@link NamedQueries }
+ *
+ */
+ public NamedQueries createNamedQueries() {
+ return new NamedQueries();
+ }
+
+ /**
+ * Create an instance of {@link ServiceDesignAndCreation }
+ *
+ */
+ public ServiceDesignAndCreation createServiceDesignAndCreation() {
+ return new ServiceDesignAndCreation();
+ }
+
+ /**
+ * Create an instance of {@link LogicalLink }
+ *
+ */
+ public LogicalLink createLogicalLink() {
+ return new LogicalLink();
+ }
+
+ /**
+ * Create an instance of {@link LogicalLinks }
+ *
+ */
+ public LogicalLinks createLogicalLinks() {
+ return new LogicalLinks();
+ }
+
+ /**
+ * Create an instance of {@link Vnfc }
+ *
+ */
+ public Vnfc createVnfc() {
+ return new Vnfc();
+ }
+
+ /**
+ * Create an instance of {@link Vnfcs }
+ *
+ */
+ public Vnfcs createVnfcs() {
+ return new Vnfcs();
+ }
+
+ /**
+ * Create an instance of {@link Subnet }
+ *
+ */
+ public Subnet createSubnet() {
+ return new Subnet();
+ }
+
+ /**
+ * Create an instance of {@link Subnets }
+ *
+ */
+ public Subnets createSubnets() {
+ return new Subnets();
+ }
+
+ /**
+ * Create an instance of {@link CtagAssignment }
+ *
+ */
+ public CtagAssignment createCtagAssignment() {
+ return new CtagAssignment();
+ }
+
+ /**
+ * Create an instance of {@link CtagAssignments }
+ *
+ */
+ public CtagAssignments createCtagAssignments() {
+ return new CtagAssignments();
+ }
+
+ /**
+ * Create an instance of {@link SegmentationAssignment }
+ *
+ */
+ public SegmentationAssignment createSegmentationAssignment() {
+ return new SegmentationAssignment();
+ }
+
+ /**
+ * Create an instance of {@link SegmentationAssignments }
+ *
+ */
+ public SegmentationAssignments createSegmentationAssignments() {
+ return new SegmentationAssignments();
+ }
+
+ /**
+ * Create an instance of {@link L3Network }
+ *
+ */
+ public L3Network createL3Network() {
+ return new L3Network();
+ }
+
+ /**
+ * Create an instance of {@link L3Networks }
+ *
+ */
+ public L3Networks createL3Networks() {
+ return new L3Networks();
+ }
+
+ /**
+ * Create an instance of {@link VfModule }
+ *
+ */
+ public VfModule createVfModule() {
+ return new VfModule();
+ }
+
+ /**
+ * Create an instance of {@link VfModules }
+ *
+ */
+ public VfModules createVfModules() {
+ return new VfModules();
+ }
+
+ /**
+ * Create an instance of {@link GenericVnf }
+ *
+ */
+ public GenericVnf createGenericVnf() {
+ return new GenericVnf();
+ }
+
+ /**
+ * Create an instance of {@link GenericVnfs }
+ *
+ */
+ public GenericVnfs createGenericVnfs() {
+ return new GenericVnfs();
+ }
+
+ /**
+ * Create an instance of {@link Pnf }
+ *
+ */
+ public Pnf createPnf() {
+ return new Pnf();
+ }
+
+ /**
+ * Create an instance of {@link Pnfs }
+ *
+ */
+ public Pnfs createPnfs() {
+ return new Pnfs();
+ }
+
+ /**
+ * Create an instance of {@link PhysicalLink }
+ *
+ */
+ public PhysicalLink createPhysicalLink() {
+ return new PhysicalLink();
+ }
+
+ /**
+ * Create an instance of {@link PhysicalLinks }
+ *
+ */
+ public PhysicalLinks createPhysicalLinks() {
+ return new PhysicalLinks();
+ }
+
+ /**
+ * Create an instance of {@link Network }
+ *
+ */
+ public Network createNetwork() {
+ return new Network();
+ }
+
+ /**
+ * Create an instance of {@link ReservedPropNames }
+ *
+ */
+ public ReservedPropNames createReservedPropNames() {
+ return new ReservedPropNames();
+ }
+
+ /**
+ * Create an instance of {@link EdgePropNames }
+ *
+ */
+ public EdgePropNames createEdgePropNames() {
+ return new EdgePropNames();
+ }
+
+ /**
+ * Create an instance of {@link AaiInternal }
+ *
+ */
+ public AaiInternal createAaiInternal() {
+ return new AaiInternal();
+ }
+
+ /**
+ * Create an instance of {@link Inventory }
+ *
+ */
+ public Inventory createInventory() {
+ return new Inventory();
+ }
+
+ /**
+ * Create an instance of {@link InventoryItemData }
+ *
+ */
+ public InventoryItemData createInventoryItemData() {
+ return new InventoryItemData();
+ }
+
+ /**
+ * Create an instance of {@link InventoryItem }
+ *
+ */
+ public InventoryItem createInventoryItem() {
+ return new InventoryItem();
+ }
+
+ /**
+ * Create an instance of {@link TaggedInventoryItemList }
+ *
+ */
+ public TaggedInventoryItemList createTaggedInventoryItemList() {
+ return new TaggedInventoryItemList();
+ }
+
+ /**
+ * Create an instance of {@link StartNodeFilter }
+ *
+ */
+ public StartNodeFilter createStartNodeFilter() {
+ return new StartNodeFilter();
+ }
+
+ /**
+ * Create an instance of {@link IncludeNodeFilter }
+ *
+ */
+ public IncludeNodeFilter createIncludeNodeFilter() {
+ return new IncludeNodeFilter();
+ }
+
+ /**
+ * Create an instance of {@link SecondaryFilter }
+ *
+ */
+ public SecondaryFilter createSecondaryFilter() {
+ return new SecondaryFilter();
+ }
+
+ /**
+ * Create an instance of {@link NotificationEventHeader }
+ *
+ */
+ public NotificationEventHeader createNotificationEventHeader() {
+ return new NotificationEventHeader();
+ }
+
+ /**
+ * Create an instance of {@link NotificationEvent }
+ *
+ */
+ public NotificationEvent createNotificationEvent() {
+ return new NotificationEvent();
+ }
+
+ /**
+ * Create an instance of {@link QueryParameters }
+ *
+ */
+ public QueryParameters createQueryParameters() {
+ return new QueryParameters();
+ }
+
+ /**
+ * Create an instance of {@link InstanceFilter }
+ *
+ */
+ public InstanceFilter createInstanceFilter() {
+ return new InstanceFilter();
+ }
+
+ /**
+ * Create an instance of {@link InstanceFilters }
+ *
+ */
+ public InstanceFilters createInstanceFilters() {
+ return new InstanceFilters();
+ }
+
+ /**
+ * Create an instance of {@link ModelAndNamedQuerySearch }
+ *
+ */
+ public ModelAndNamedQuerySearch createModelAndNamedQuerySearch() {
+ return new ModelAndNamedQuerySearch();
+ }
+
+ /**
+ * Create an instance of {@link Properties }
+ *
+ */
+ public Properties createProperties() {
+ return new Properties();
+ }
+
+ /**
+ * Create an instance of {@link ExtraProperties }
+ *
+ */
+ public ExtraProperties createExtraProperties() {
+ return new ExtraProperties();
+ }
+
+ /**
+ * Create an instance of {@link InventoryResponseItem }
+ *
+ */
+ public InventoryResponseItem createInventoryResponseItem() {
+ return new InventoryResponseItem();
+ }
+
+ /**
+ * Create an instance of {@link InventoryResponseItems }
+ *
+ */
+ public InventoryResponseItems createInventoryResponseItems() {
+ return new InventoryResponseItems();
+ }
+
+ /**
+ * Create an instance of {@link ResponseList }
+ *
+ */
+ public ResponseList createResponseList() {
+ return new ResponseList();
+ }
+
+ /**
+ * Create an instance of {@link ExtraProperty }
+ *
+ */
+ public ExtraProperty createExtraProperty() {
+ return new ExtraProperty();
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PInterface.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PInterface.java
new file mode 100644
index 0000000..ddfbba4
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PInterface.java
@@ -0,0 +1,326 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="interface-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="speed-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="speed-units" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="port-description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="equipment-identifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="interface-role" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="interface-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}l-interfaces" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "interfaceName",
+ "speedValue",
+ "speedUnits",
+ "portDescription",
+ "equipmentIdentifier",
+ "interfaceRole",
+ "interfaceType",
+ "resourceVersion",
+ "relationshipList",
+ "lInterfaces"
+})
+@XmlRootElement(name = "p-interface")
+public class PInterface
+ implements AAIDatum
+{
+
+ @XmlElement(name = "interface-name", required = true)
+ protected String interfaceName;
+ @XmlElement(name = "speed-value")
+ protected String speedValue;
+ @XmlElement(name = "speed-units")
+ protected String speedUnits;
+ @XmlElement(name = "port-description")
+ protected String portDescription;
+ @XmlElement(name = "equipment-identifier")
+ protected String equipmentIdentifier;
+ @XmlElement(name = "interface-role")
+ protected String interfaceRole;
+ @XmlElement(name = "interface-type")
+ protected String interfaceType;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+ @XmlElement(name = "l-interfaces")
+ protected LInterfaces lInterfaces;
+
+ /**
+ * Gets the value of the interfaceName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInterfaceName() {
+ return interfaceName;
+ }
+
+ /**
+ * Sets the value of the interfaceName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInterfaceName(String value) {
+ this.interfaceName = value;
+ }
+
+ /**
+ * Gets the value of the speedValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSpeedValue() {
+ return speedValue;
+ }
+
+ /**
+ * Sets the value of the speedValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSpeedValue(String value) {
+ this.speedValue = value;
+ }
+
+ /**
+ * Gets the value of the speedUnits property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSpeedUnits() {
+ return speedUnits;
+ }
+
+ /**
+ * Sets the value of the speedUnits property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSpeedUnits(String value) {
+ this.speedUnits = value;
+ }
+
+ /**
+ * Gets the value of the portDescription property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPortDescription() {
+ return portDescription;
+ }
+
+ /**
+ * Sets the value of the portDescription property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPortDescription(String value) {
+ this.portDescription = value;
+ }
+
+ /**
+ * Gets the value of the equipmentIdentifier property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEquipmentIdentifier() {
+ return equipmentIdentifier;
+ }
+
+ /**
+ * Sets the value of the equipmentIdentifier property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEquipmentIdentifier(String value) {
+ this.equipmentIdentifier = value;
+ }
+
+ /**
+ * Gets the value of the interfaceRole property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInterfaceRole() {
+ return interfaceRole;
+ }
+
+ /**
+ * Sets the value of the interfaceRole property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInterfaceRole(String value) {
+ this.interfaceRole = value;
+ }
+
+ /**
+ * Gets the value of the interfaceType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInterfaceType() {
+ return interfaceType;
+ }
+
+ /**
+ * Sets the value of the interfaceType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInterfaceType(String value) {
+ this.interfaceType = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+ /**
+ * Gets the value of the lInterfaces property.
+ *
+ * @return
+ * possible object is
+ * {@link LInterfaces }
+ *
+ */
+ public LInterfaces getLInterfaces() {
+ return lInterfaces;
+ }
+
+ /**
+ * Sets the value of the lInterfaces property.
+ *
+ * @param value
+ * allowed object is
+ * {@link LInterfaces }
+ *
+ */
+ public void setLInterfaces(LInterfaces value) {
+ this.lInterfaces = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PInterfaces.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PInterfaces.java
new file mode 100644
index 0000000..7a07c08
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PInterfaces.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}p-interface" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "pInterface"
+})
+@XmlRootElement(name = "p-interfaces")
+public class PInterfaces
+ implements AAIDatum
+{
+
+ @XmlElement(name = "p-interface")
+ protected List<PInterface> pInterface;
+
+ /**
+ * Gets the value of the pInterface property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the pInterface property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getPInterface().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link PInterface }
+ *
+ *
+ */
+ public List<PInterface> getPInterface() {
+ if (pInterface == null) {
+ pInterface = new ArrayList<PInterface>();
+ }
+ return this.pInterface;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PhysicalLink.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PhysicalLink.java
new file mode 100644
index 0000000..ed80bfe
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PhysicalLink.java
@@ -0,0 +1,298 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="link-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="speed-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="speed-units" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="circuit-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="dual-mode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="management-option" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="service-provider-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "linkName",
+ "speedValue",
+ "speedUnits",
+ "circuitId",
+ "dualMode",
+ "managementOption",
+ "serviceProviderName",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "physical-link")
+public class PhysicalLink
+ implements AAIDatum
+{
+
+ @XmlElement(name = "link-name", required = true)
+ protected String linkName;
+ @XmlElement(name = "speed-value")
+ protected String speedValue;
+ @XmlElement(name = "speed-units")
+ protected String speedUnits;
+ @XmlElement(name = "circuit-id")
+ protected String circuitId;
+ @XmlElement(name = "dual-mode")
+ protected String dualMode;
+ @XmlElement(name = "management-option")
+ protected String managementOption;
+ @XmlElement(name = "service-provider-name")
+ protected String serviceProviderName;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the linkName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLinkName() {
+ return linkName;
+ }
+
+ /**
+ * Sets the value of the linkName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLinkName(String value) {
+ this.linkName = value;
+ }
+
+ /**
+ * Gets the value of the speedValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSpeedValue() {
+ return speedValue;
+ }
+
+ /**
+ * Sets the value of the speedValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSpeedValue(String value) {
+ this.speedValue = value;
+ }
+
+ /**
+ * Gets the value of the speedUnits property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSpeedUnits() {
+ return speedUnits;
+ }
+
+ /**
+ * Sets the value of the speedUnits property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSpeedUnits(String value) {
+ this.speedUnits = value;
+ }
+
+ /**
+ * Gets the value of the circuitId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCircuitId() {
+ return circuitId;
+ }
+
+ /**
+ * Sets the value of the circuitId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCircuitId(String value) {
+ this.circuitId = value;
+ }
+
+ /**
+ * Gets the value of the dualMode property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDualMode() {
+ return dualMode;
+ }
+
+ /**
+ * Sets the value of the dualMode property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDualMode(String value) {
+ this.dualMode = value;
+ }
+
+ /**
+ * Gets the value of the managementOption property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getManagementOption() {
+ return managementOption;
+ }
+
+ /**
+ * Sets the value of the managementOption property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setManagementOption(String value) {
+ this.managementOption = value;
+ }
+
+ /**
+ * Gets the value of the serviceProviderName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceProviderName() {
+ return serviceProviderName;
+ }
+
+ /**
+ * Sets the value of the serviceProviderName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceProviderName(String value) {
+ this.serviceProviderName = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PhysicalLinks.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PhysicalLinks.java
new file mode 100644
index 0000000..b7423b4
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PhysicalLinks.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}physical-link" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "physicalLink"
+})
+@XmlRootElement(name = "physical-links")
+public class PhysicalLinks
+ implements AAIDatum
+{
+
+ @XmlElement(name = "physical-link")
+ protected List<PhysicalLink> physicalLink;
+
+ /**
+ * Gets the value of the physicalLink property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the physicalLink property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getPhysicalLink().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link PhysicalLink }
+ *
+ *
+ */
+ public List<PhysicalLink> getPhysicalLink() {
+ if (physicalLink == null) {
+ physicalLink = new ArrayList<PhysicalLink>();
+ }
+ return this.physicalLink;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pnf.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pnf.java
new file mode 100644
index 0000000..ff6f067
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pnf.java
@@ -0,0 +1,514 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="pnf-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="pnf-name2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="pnf-name2-source" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="pnf-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="equip-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="equip-vendor" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="equip-model" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="management-option" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="ipaddress-v4-oam" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="sw-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="orchestration-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="in-maint" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="frame-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}p-interfaces" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}lag-interfaces" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "pnfName",
+ "pnfName2",
+ "pnfName2Source",
+ "pnfId",
+ "equipType",
+ "equipVendor",
+ "equipModel",
+ "managementOption",
+ "ipaddressV4Oam",
+ "swVersion",
+ "orchestrationStatus",
+ "inMaint",
+ "frameId",
+ "resourceVersion",
+ "relationshipList",
+ "pInterfaces",
+ "lagInterfaces"
+})
+@XmlRootElement(name = "pnf")
+public class Pnf
+ implements AAIDatum
+{
+
+ @XmlElement(name = "pnf-name", required = true)
+ protected String pnfName;
+ @XmlElement(name = "pnf-name2")
+ protected String pnfName2;
+ @XmlElement(name = "pnf-name2-source")
+ protected String pnfName2Source;
+ @XmlElement(name = "pnf-id")
+ protected String pnfId;
+ @XmlElement(name = "equip-type")
+ protected String equipType;
+ @XmlElement(name = "equip-vendor")
+ protected String equipVendor;
+ @XmlElement(name = "equip-model")
+ protected String equipModel;
+ @XmlElement(name = "management-option")
+ protected String managementOption;
+ @XmlElement(name = "ipaddress-v4-oam")
+ protected String ipaddressV4Oam;
+ @XmlElement(name = "sw-version")
+ protected String swVersion;
+ @XmlElement(name = "orchestration-status")
+ protected String orchestrationStatus;
+ @XmlElement(name = "in-maint")
+ protected boolean inMaint;
+ @XmlElement(name = "frame-id")
+ protected String frameId;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+ @XmlElement(name = "p-interfaces")
+ protected PInterfaces pInterfaces;
+ @XmlElement(name = "lag-interfaces")
+ protected LagInterfaces lagInterfaces;
+
+ /**
+ * Gets the value of the pnfName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPnfName() {
+ return pnfName;
+ }
+
+ /**
+ * Sets the value of the pnfName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPnfName(String value) {
+ this.pnfName = value;
+ }
+
+ /**
+ * Gets the value of the pnfName2 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPnfName2() {
+ return pnfName2;
+ }
+
+ /**
+ * Sets the value of the pnfName2 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPnfName2(String value) {
+ this.pnfName2 = value;
+ }
+
+ /**
+ * Gets the value of the pnfName2Source property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPnfName2Source() {
+ return pnfName2Source;
+ }
+
+ /**
+ * Sets the value of the pnfName2Source property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPnfName2Source(String value) {
+ this.pnfName2Source = value;
+ }
+
+ /**
+ * Gets the value of the pnfId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPnfId() {
+ return pnfId;
+ }
+
+ /**
+ * Sets the value of the pnfId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPnfId(String value) {
+ this.pnfId = value;
+ }
+
+ /**
+ * Gets the value of the equipType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEquipType() {
+ return equipType;
+ }
+
+ /**
+ * Sets the value of the equipType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEquipType(String value) {
+ this.equipType = value;
+ }
+
+ /**
+ * Gets the value of the equipVendor property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEquipVendor() {
+ return equipVendor;
+ }
+
+ /**
+ * Sets the value of the equipVendor property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEquipVendor(String value) {
+ this.equipVendor = value;
+ }
+
+ /**
+ * Gets the value of the equipModel property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEquipModel() {
+ return equipModel;
+ }
+
+ /**
+ * Sets the value of the equipModel property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEquipModel(String value) {
+ this.equipModel = value;
+ }
+
+ /**
+ * Gets the value of the managementOption property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getManagementOption() {
+ return managementOption;
+ }
+
+ /**
+ * Sets the value of the managementOption property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setManagementOption(String value) {
+ this.managementOption = value;
+ }
+
+ /**
+ * Gets the value of the ipaddressV4Oam property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getIpaddressV4Oam() {
+ return ipaddressV4Oam;
+ }
+
+ /**
+ * Sets the value of the ipaddressV4Oam property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setIpaddressV4Oam(String value) {
+ this.ipaddressV4Oam = value;
+ }
+
+ /**
+ * Gets the value of the swVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSwVersion() {
+ return swVersion;
+ }
+
+ /**
+ * Sets the value of the swVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSwVersion(String value) {
+ this.swVersion = value;
+ }
+
+ /**
+ * Gets the value of the orchestrationStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOrchestrationStatus() {
+ return orchestrationStatus;
+ }
+
+ /**
+ * Sets the value of the orchestrationStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOrchestrationStatus(String value) {
+ this.orchestrationStatus = value;
+ }
+
+ /**
+ * Gets the value of the inMaint property.
+ *
+ */
+ public boolean isInMaint() {
+ return inMaint;
+ }
+
+ /**
+ * Sets the value of the inMaint property.
+ *
+ */
+ public void setInMaint(boolean value) {
+ this.inMaint = value;
+ }
+
+ /**
+ * Gets the value of the frameId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFrameId() {
+ return frameId;
+ }
+
+ /**
+ * Sets the value of the frameId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFrameId(String value) {
+ this.frameId = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+ /**
+ * Gets the value of the pInterfaces property.
+ *
+ * @return
+ * possible object is
+ * {@link PInterfaces }
+ *
+ */
+ public PInterfaces getPInterfaces() {
+ return pInterfaces;
+ }
+
+ /**
+ * Sets the value of the pInterfaces property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PInterfaces }
+ *
+ */
+ public void setPInterfaces(PInterfaces value) {
+ this.pInterfaces = value;
+ }
+
+ /**
+ * Gets the value of the lagInterfaces property.
+ *
+ * @return
+ * possible object is
+ * {@link LagInterfaces }
+ *
+ */
+ public LagInterfaces getLagInterfaces() {
+ return lagInterfaces;
+ }
+
+ /**
+ * Sets the value of the lagInterfaces property.
+ *
+ * @param value
+ * allowed object is
+ * {@link LagInterfaces }
+ *
+ */
+ public void setLagInterfaces(LagInterfaces value) {
+ this.lagInterfaces = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pnfs.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pnfs.java
new file mode 100644
index 0000000..0a78c59
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pnfs.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}pnf" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "pnf"
+})
+@XmlRootElement(name = "pnfs")
+public class Pnfs
+ implements AAIDatum
+{
+
+ protected List<Pnf> pnf;
+
+ /**
+ * Gets the value of the pnf property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the pnf property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getPnf().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Pnf }
+ *
+ *
+ */
+ public List<Pnf> getPnf() {
+ if (pnf == null) {
+ pnf = new ArrayList<Pnf>();
+ }
+ return this.pnf;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Properties.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Properties.java
new file mode 100644
index 0000000..211bff0
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Properties.java
@@ -0,0 +1,102 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="property-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="property-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "propertyName",
+ "propertyValue"
+})
+@XmlRootElement(name = "properties")
+public class Properties
+ implements AAIDatum
+{
+
+ @XmlElement(name = "property-name")
+ protected String propertyName;
+ @XmlElement(name = "property-value")
+ protected String propertyValue;
+
+ /**
+ * Gets the value of the propertyName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ /**
+ * Sets the value of the propertyName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyName(String value) {
+ this.propertyName = value;
+ }
+
+ /**
+ * Gets the value of the propertyValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyValue() {
+ return propertyValue;
+ }
+
+ /**
+ * Sets the value of the propertyValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyValue(String value) {
+ this.propertyValue = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PropertyConstraint.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PropertyConstraint.java
new file mode 100644
index 0000000..2222831
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PropertyConstraint.java
@@ -0,0 +1,186 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="property-constraint-uuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="constraint-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="property-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="property-value" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "propertyConstraintUuid",
+ "constraintType",
+ "propertyName",
+ "propertyValue",
+ "resourceVersion"
+})
+@XmlRootElement(name = "property-constraint")
+public class PropertyConstraint
+ implements AAIDatum
+{
+
+ @XmlElement(name = "property-constraint-uuid", required = true)
+ protected String propertyConstraintUuid;
+ @XmlElement(name = "constraint-type", required = true)
+ protected String constraintType;
+ @XmlElement(name = "property-name", required = true)
+ protected String propertyName;
+ @XmlElement(name = "property-value", required = true)
+ protected String propertyValue;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+
+ /**
+ * Gets the value of the propertyConstraintUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyConstraintUuid() {
+ return propertyConstraintUuid;
+ }
+
+ /**
+ * Sets the value of the propertyConstraintUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyConstraintUuid(String value) {
+ this.propertyConstraintUuid = value;
+ }
+
+ /**
+ * Gets the value of the constraintType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getConstraintType() {
+ return constraintType;
+ }
+
+ /**
+ * Sets the value of the constraintType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setConstraintType(String value) {
+ this.constraintType = value;
+ }
+
+ /**
+ * Gets the value of the propertyName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ /**
+ * Sets the value of the propertyName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyName(String value) {
+ this.propertyName = value;
+ }
+
+ /**
+ * Gets the value of the propertyValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyValue() {
+ return propertyValue;
+ }
+
+ /**
+ * Sets the value of the propertyValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyValue(String value) {
+ this.propertyValue = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PropertyConstraints.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PropertyConstraints.java
new file mode 100644
index 0000000..fc56cd2
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/PropertyConstraints.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}property-constraint" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "propertyConstraint"
+})
+@XmlRootElement(name = "property-constraints")
+public class PropertyConstraints
+ implements AAIDatum
+{
+
+ @XmlElement(name = "property-constraint")
+ protected List<PropertyConstraint> propertyConstraint;
+
+ /**
+ * Gets the value of the propertyConstraint property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the propertyConstraint property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getPropertyConstraint().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link PropertyConstraint }
+ *
+ *
+ */
+ public List<PropertyConstraint> getPropertyConstraint() {
+ if (propertyConstraint == null) {
+ propertyConstraint = new ArrayList<PropertyConstraint>();
+ }
+ return this.propertyConstraint;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pserver.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pserver.java
new file mode 100644
index 0000000..2501929
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pserver.java
@@ -0,0 +1,624 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="hostname" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="ptnii-equip-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="number-of-cpus" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/&gt;
+ * &lt;element name="disk-in-gigabytes" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/&gt;
+ * &lt;element name="ram-in-megabytes" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/&gt;
+ * &lt;element name="equip-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="equip-vendor" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="equip-model" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="fqdn" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="pserver-selflink" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="ipv4-oam-address" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="serial-number" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="pserver-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="internet-topology" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="in-maint" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="pserver-name2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="purpose" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}p-interfaces" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}lag-interfaces" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "hostname",
+ "ptniiEquipName",
+ "numberOfCpus",
+ "diskInGigabytes",
+ "ramInMegabytes",
+ "equipType",
+ "equipVendor",
+ "equipModel",
+ "fqdn",
+ "pserverSelflink",
+ "ipv4OamAddress",
+ "serialNumber",
+ "pserverId",
+ "internetTopology",
+ "inMaint",
+ "resourceVersion",
+ "pserverName2",
+ "purpose",
+ "relationshipList",
+ "pInterfaces",
+ "lagInterfaces"
+})
+@XmlRootElement(name = "pserver")
+public class Pserver
+ implements AAIDatum
+{
+
+ @XmlElement(required = true)
+ protected String hostname;
+ @XmlElement(name = "ptnii-equip-name")
+ protected String ptniiEquipName;
+ @XmlElement(name = "number-of-cpus")
+ protected Integer numberOfCpus;
+ @XmlElement(name = "disk-in-gigabytes")
+ protected Integer diskInGigabytes;
+ @XmlElement(name = "ram-in-megabytes")
+ protected Integer ramInMegabytes;
+ @XmlElement(name = "equip-type")
+ protected String equipType;
+ @XmlElement(name = "equip-vendor")
+ protected String equipVendor;
+ @XmlElement(name = "equip-model")
+ protected String equipModel;
+ protected String fqdn;
+ @XmlElement(name = "pserver-selflink")
+ protected String pserverSelflink;
+ @XmlElement(name = "ipv4-oam-address")
+ protected String ipv4OamAddress;
+ @XmlElement(name = "serial-number")
+ protected String serialNumber;
+ @XmlElement(name = "pserver-id")
+ protected String pserverId;
+ @XmlElement(name = "internet-topology")
+ protected String internetTopology;
+ @XmlElement(name = "in-maint")
+ protected boolean inMaint;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "pserver-name2")
+ protected String pserverName2;
+ protected String purpose;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+ @XmlElement(name = "p-interfaces")
+ protected PInterfaces pInterfaces;
+ @XmlElement(name = "lag-interfaces")
+ protected LagInterfaces lagInterfaces;
+
+ /**
+ * Gets the value of the hostname property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getHostname() {
+ return hostname;
+ }
+
+ /**
+ * Sets the value of the hostname property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setHostname(String value) {
+ this.hostname = value;
+ }
+
+ /**
+ * Gets the value of the ptniiEquipName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPtniiEquipName() {
+ return ptniiEquipName;
+ }
+
+ /**
+ * Sets the value of the ptniiEquipName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPtniiEquipName(String value) {
+ this.ptniiEquipName = value;
+ }
+
+ /**
+ * Gets the value of the numberOfCpus property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getNumberOfCpus() {
+ return numberOfCpus;
+ }
+
+ /**
+ * Sets the value of the numberOfCpus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setNumberOfCpus(Integer value) {
+ this.numberOfCpus = value;
+ }
+
+ /**
+ * Gets the value of the diskInGigabytes property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getDiskInGigabytes() {
+ return diskInGigabytes;
+ }
+
+ /**
+ * Sets the value of the diskInGigabytes property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setDiskInGigabytes(Integer value) {
+ this.diskInGigabytes = value;
+ }
+
+ /**
+ * Gets the value of the ramInMegabytes property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getRamInMegabytes() {
+ return ramInMegabytes;
+ }
+
+ /**
+ * Sets the value of the ramInMegabytes property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setRamInMegabytes(Integer value) {
+ this.ramInMegabytes = value;
+ }
+
+ /**
+ * Gets the value of the equipType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEquipType() {
+ return equipType;
+ }
+
+ /**
+ * Sets the value of the equipType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEquipType(String value) {
+ this.equipType = value;
+ }
+
+ /**
+ * Gets the value of the equipVendor property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEquipVendor() {
+ return equipVendor;
+ }
+
+ /**
+ * Sets the value of the equipVendor property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEquipVendor(String value) {
+ this.equipVendor = value;
+ }
+
+ /**
+ * Gets the value of the equipModel property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEquipModel() {
+ return equipModel;
+ }
+
+ /**
+ * Sets the value of the equipModel property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEquipModel(String value) {
+ this.equipModel = value;
+ }
+
+ /**
+ * Gets the value of the fqdn property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFqdn() {
+ return fqdn;
+ }
+
+ /**
+ * Sets the value of the fqdn property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFqdn(String value) {
+ this.fqdn = value;
+ }
+
+ /**
+ * Gets the value of the pserverSelflink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPserverSelflink() {
+ return pserverSelflink;
+ }
+
+ /**
+ * Sets the value of the pserverSelflink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPserverSelflink(String value) {
+ this.pserverSelflink = value;
+ }
+
+ /**
+ * Gets the value of the ipv4OamAddress property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getIpv4OamAddress() {
+ return ipv4OamAddress;
+ }
+
+ /**
+ * Sets the value of the ipv4OamAddress property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setIpv4OamAddress(String value) {
+ this.ipv4OamAddress = value;
+ }
+
+ /**
+ * Gets the value of the serialNumber property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSerialNumber() {
+ return serialNumber;
+ }
+
+ /**
+ * Sets the value of the serialNumber property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSerialNumber(String value) {
+ this.serialNumber = value;
+ }
+
+ /**
+ * Gets the value of the pserverId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPserverId() {
+ return pserverId;
+ }
+
+ /**
+ * Sets the value of the pserverId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPserverId(String value) {
+ this.pserverId = value;
+ }
+
+ /**
+ * Gets the value of the internetTopology property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInternetTopology() {
+ return internetTopology;
+ }
+
+ /**
+ * Sets the value of the internetTopology property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInternetTopology(String value) {
+ this.internetTopology = value;
+ }
+
+ /**
+ * Gets the value of the inMaint property.
+ *
+ */
+ public boolean isInMaint() {
+ return inMaint;
+ }
+
+ /**
+ * Sets the value of the inMaint property.
+ *
+ */
+ public void setInMaint(boolean value) {
+ this.inMaint = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the pserverName2 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPserverName2() {
+ return pserverName2;
+ }
+
+ /**
+ * Sets the value of the pserverName2 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPserverName2(String value) {
+ this.pserverName2 = value;
+ }
+
+ /**
+ * Gets the value of the purpose property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPurpose() {
+ return purpose;
+ }
+
+ /**
+ * Sets the value of the purpose property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPurpose(String value) {
+ this.purpose = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+ /**
+ * Gets the value of the pInterfaces property.
+ *
+ * @return
+ * possible object is
+ * {@link PInterfaces }
+ *
+ */
+ public PInterfaces getPInterfaces() {
+ return pInterfaces;
+ }
+
+ /**
+ * Sets the value of the pInterfaces property.
+ *
+ * @param value
+ * allowed object is
+ * {@link PInterfaces }
+ *
+ */
+ public void setPInterfaces(PInterfaces value) {
+ this.pInterfaces = value;
+ }
+
+ /**
+ * Gets the value of the lagInterfaces property.
+ *
+ * @return
+ * possible object is
+ * {@link LagInterfaces }
+ *
+ */
+ public LagInterfaces getLagInterfaces() {
+ return lagInterfaces;
+ }
+
+ /**
+ * Sets the value of the lagInterfaces property.
+ *
+ * @param value
+ * allowed object is
+ * {@link LagInterfaces }
+ *
+ */
+ public void setLagInterfaces(LagInterfaces value) {
+ this.lagInterfaces = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pservers.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pservers.java
new file mode 100644
index 0000000..acc0ee2
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Pservers.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}pserver" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "pserver"
+})
+@XmlRootElement(name = "pservers")
+public class Pservers
+ implements AAIDatum
+{
+
+ protected List<Pserver> pserver;
+
+ /**
+ * Gets the value of the pserver property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the pserver property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getPserver().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Pserver }
+ *
+ *
+ */
+ public List<Pserver> getPserver() {
+ if (pserver == null) {
+ pserver = new ArrayList<Pserver>();
+ }
+ return this.pserver;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/QueryParameters.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/QueryParameters.java
new file mode 100644
index 0000000..5413f05
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/QueryParameters.java
@@ -0,0 +1,101 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}named-query" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}model" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "namedQuery",
+ "model"
+})
+@XmlRootElement(name = "query-parameters")
+public class QueryParameters
+ implements AAIDatum
+{
+
+ @XmlElement(name = "named-query")
+ protected NamedQuery namedQuery;
+ protected Model model;
+
+ /**
+ * Gets the value of the namedQuery property.
+ *
+ * @return
+ * possible object is
+ * {@link NamedQuery }
+ *
+ */
+ public NamedQuery getNamedQuery() {
+ return namedQuery;
+ }
+
+ /**
+ * Sets the value of the namedQuery property.
+ *
+ * @param value
+ * allowed object is
+ * {@link NamedQuery }
+ *
+ */
+ public void setNamedQuery(NamedQuery value) {
+ this.namedQuery = value;
+ }
+
+ /**
+ * Gets the value of the model property.
+ *
+ * @return
+ * possible object is
+ * {@link Model }
+ *
+ */
+ public Model getModel() {
+ return model;
+ }
+
+ /**
+ * Sets the value of the model property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Model }
+ *
+ */
+ public void setModel(Model value) {
+ this.model = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedLookup.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedLookup.java
new file mode 100644
index 0000000..28765d1
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedLookup.java
@@ -0,0 +1,277 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="related-lookup-uuid" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="source-node-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="source-node-property" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="target-node-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="target-node-property" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="property-collect-list" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "relatedLookupUuid",
+ "sourceNodeType",
+ "sourceNodeProperty",
+ "targetNodeType",
+ "targetNodeProperty",
+ "propertyCollectList",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "related-lookup")
+public class RelatedLookup
+ implements AAIDatum
+{
+
+ @XmlElement(name = "related-lookup-uuid", required = true)
+ protected String relatedLookupUuid;
+ @XmlElement(name = "source-node-type", required = true)
+ protected String sourceNodeType;
+ @XmlElement(name = "source-node-property", required = true)
+ protected String sourceNodeProperty;
+ @XmlElement(name = "target-node-type", required = true)
+ protected String targetNodeType;
+ @XmlElement(name = "target-node-property", required = true)
+ protected String targetNodeProperty;
+ @XmlElement(name = "property-collect-list")
+ protected List<String> propertyCollectList;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the relatedLookupUuid property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRelatedLookupUuid() {
+ return relatedLookupUuid;
+ }
+
+ /**
+ * Sets the value of the relatedLookupUuid property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRelatedLookupUuid(String value) {
+ this.relatedLookupUuid = value;
+ }
+
+ /**
+ * Gets the value of the sourceNodeType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSourceNodeType() {
+ return sourceNodeType;
+ }
+
+ /**
+ * Sets the value of the sourceNodeType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSourceNodeType(String value) {
+ this.sourceNodeType = value;
+ }
+
+ /**
+ * Gets the value of the sourceNodeProperty property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSourceNodeProperty() {
+ return sourceNodeProperty;
+ }
+
+ /**
+ * Sets the value of the sourceNodeProperty property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSourceNodeProperty(String value) {
+ this.sourceNodeProperty = value;
+ }
+
+ /**
+ * Gets the value of the targetNodeType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTargetNodeType() {
+ return targetNodeType;
+ }
+
+ /**
+ * Sets the value of the targetNodeType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTargetNodeType(String value) {
+ this.targetNodeType = value;
+ }
+
+ /**
+ * Gets the value of the targetNodeProperty property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTargetNodeProperty() {
+ return targetNodeProperty;
+ }
+
+ /**
+ * Sets the value of the targetNodeProperty property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTargetNodeProperty(String value) {
+ this.targetNodeProperty = value;
+ }
+
+ /**
+ * Gets the value of the propertyCollectList property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the propertyCollectList property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getPropertyCollectList().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link String }
+ *
+ *
+ */
+ public List<String> getPropertyCollectList() {
+ if (propertyCollectList == null) {
+ propertyCollectList = new ArrayList<String>();
+ }
+ return this.propertyCollectList;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedLookups.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedLookups.java
new file mode 100644
index 0000000..124c11c
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedLookups.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}related-lookup" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "relatedLookup"
+})
+@XmlRootElement(name = "related-lookups")
+public class RelatedLookups
+ implements AAIDatum
+{
+
+ @XmlElement(name = "related-lookup")
+ protected List<RelatedLookup> relatedLookup;
+
+ /**
+ * Gets the value of the relatedLookup property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the relatedLookup property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getRelatedLookup().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link RelatedLookup }
+ *
+ *
+ */
+ public List<RelatedLookup> getRelatedLookup() {
+ if (relatedLookup == null) {
+ relatedLookup = new ArrayList<RelatedLookup>();
+ }
+ return this.relatedLookup;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedToProperty.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedToProperty.java
new file mode 100644
index 0000000..b1192b1
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelatedToProperty.java
@@ -0,0 +1,102 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="property-key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="property-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "propertyKey",
+ "propertyValue"
+})
+@XmlRootElement(name = "related-to-property")
+public class RelatedToProperty
+ implements AAIDatum
+{
+
+ @XmlElement(name = "property-key")
+ protected String propertyKey;
+ @XmlElement(name = "property-value")
+ protected String propertyValue;
+
+ /**
+ * Gets the value of the propertyKey property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyKey() {
+ return propertyKey;
+ }
+
+ /**
+ * Sets the value of the propertyKey property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyKey(String value) {
+ this.propertyKey = value;
+ }
+
+ /**
+ * Gets the value of the propertyValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyValue() {
+ return propertyValue;
+ }
+
+ /**
+ * Sets the value of the propertyValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyValue(String value) {
+ this.propertyValue = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Relationship.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Relationship.java
new file mode 100644
index 0000000..1aedc42
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Relationship.java
@@ -0,0 +1,170 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="related-to" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="related-link" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-data" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}related-to-property" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "relatedTo",
+ "relatedLink",
+ "relationshipData",
+ "relatedToProperty"
+})
+@XmlRootElement(name = "relationship")
+public class Relationship
+ implements AAIDatum
+{
+
+ @XmlElement(name = "related-to")
+ protected String relatedTo;
+ @XmlElement(name = "related-link")
+ protected String relatedLink;
+ @XmlElement(name = "relationship-data")
+ protected List<RelationshipData> relationshipData;
+ @XmlElement(name = "related-to-property")
+ protected List<RelatedToProperty> relatedToProperty;
+
+ /**
+ * Gets the value of the relatedTo property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRelatedTo() {
+ return relatedTo;
+ }
+
+ /**
+ * Sets the value of the relatedTo property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRelatedTo(String value) {
+ this.relatedTo = value;
+ }
+
+ /**
+ * Gets the value of the relatedLink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRelatedLink() {
+ return relatedLink;
+ }
+
+ /**
+ * Sets the value of the relatedLink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRelatedLink(String value) {
+ this.relatedLink = value;
+ }
+
+ /**
+ * Gets the value of the relationshipData property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the relationshipData property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getRelationshipData().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link RelationshipData }
+ *
+ *
+ */
+ public List<RelationshipData> getRelationshipData() {
+ if (relationshipData == null) {
+ relationshipData = new ArrayList<RelationshipData>();
+ }
+ return this.relationshipData;
+ }
+
+ /**
+ * Gets the value of the relatedToProperty property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the relatedToProperty property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getRelatedToProperty().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link RelatedToProperty }
+ *
+ *
+ */
+ public List<RelatedToProperty> getRelatedToProperty() {
+ if (relatedToProperty == null) {
+ relatedToProperty = new ArrayList<RelatedToProperty>();
+ }
+ return this.relatedToProperty;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelationshipData.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelationshipData.java
new file mode 100644
index 0000000..af7dfb3
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelationshipData.java
@@ -0,0 +1,102 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="relationship-key" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="relationship-value" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "relationshipKey",
+ "relationshipValue"
+})
+@XmlRootElement(name = "relationship-data")
+public class RelationshipData
+ implements AAIDatum
+{
+
+ @XmlElement(name = "relationship-key", required = true)
+ protected String relationshipKey;
+ @XmlElement(name = "relationship-value", required = true)
+ protected String relationshipValue;
+
+ /**
+ * Gets the value of the relationshipKey property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRelationshipKey() {
+ return relationshipKey;
+ }
+
+ /**
+ * Sets the value of the relationshipKey property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRelationshipKey(String value) {
+ this.relationshipKey = value;
+ }
+
+ /**
+ * Gets the value of the relationshipValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getRelationshipValue() {
+ return relationshipValue;
+ }
+
+ /**
+ * Sets the value of the relationshipValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setRelationshipValue(String value) {
+ this.relationshipValue = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelationshipList.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelationshipList.java
new file mode 100644
index 0000000..3639668
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/RelationshipList.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "relationship"
+})
+@XmlRootElement(name = "relationship-list")
+public class RelationshipList
+ implements AAIDatum
+{
+
+ protected List<Relationship> relationship;
+
+ /**
+ * Gets the value of the relationship property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the relationship property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getRelationship().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Relationship }
+ *
+ *
+ */
+ public List<Relationship> getRelationship() {
+ if (relationship == null) {
+ relationship = new ArrayList<Relationship>();
+ }
+ return this.relationship;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ReservedPropNames.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ReservedPropNames.java
new file mode 100644
index 0000000..d1fb3dc
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ReservedPropNames.java
@@ -0,0 +1,217 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="last-mod-source-of-truth" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="aai-node-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="aai-created-ts" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="aai-unique-key" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="aai-last-mod-ts" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="source-of-truth" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "lastModSourceOfTruth",
+ "aaiNodeType",
+ "aaiCreatedTs",
+ "aaiUniqueKey",
+ "aaiLastModTs",
+ "sourceOfTruth"
+})
+@XmlRootElement(name = "reserved-prop-names")
+public class ReservedPropNames
+ implements AAIDatum
+{
+
+ @XmlElement(name = "last-mod-source-of-truth")
+ protected String lastModSourceOfTruth;
+ @XmlElement(name = "aai-node-type")
+ protected String aaiNodeType;
+ @XmlElement(name = "aai-created-ts")
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long aaiCreatedTs;
+ @XmlElement(name = "aai-unique-key")
+ protected String aaiUniqueKey;
+ @XmlElement(name = "aai-last-mod-ts")
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long aaiLastModTs;
+ @XmlElement(name = "source-of-truth")
+ protected String sourceOfTruth;
+
+ /**
+ * Gets the value of the lastModSourceOfTruth property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLastModSourceOfTruth() {
+ return lastModSourceOfTruth;
+ }
+
+ /**
+ * Sets the value of the lastModSourceOfTruth property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLastModSourceOfTruth(String value) {
+ this.lastModSourceOfTruth = value;
+ }
+
+ /**
+ * Gets the value of the aaiNodeType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getAaiNodeType() {
+ return aaiNodeType;
+ }
+
+ /**
+ * Sets the value of the aaiNodeType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setAaiNodeType(String value) {
+ this.aaiNodeType = value;
+ }
+
+ /**
+ * Gets the value of the aaiCreatedTs property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getAaiCreatedTs() {
+ return aaiCreatedTs;
+ }
+
+ /**
+ * Sets the value of the aaiCreatedTs property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setAaiCreatedTs(Long value) {
+ this.aaiCreatedTs = value;
+ }
+
+ /**
+ * Gets the value of the aaiUniqueKey property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getAaiUniqueKey() {
+ return aaiUniqueKey;
+ }
+
+ /**
+ * Sets the value of the aaiUniqueKey property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setAaiUniqueKey(String value) {
+ this.aaiUniqueKey = value;
+ }
+
+ /**
+ * Gets the value of the aaiLastModTs property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getAaiLastModTs() {
+ return aaiLastModTs;
+ }
+
+ /**
+ * Sets the value of the aaiLastModTs property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setAaiLastModTs(Long value) {
+ this.aaiLastModTs = value;
+ }
+
+ /**
+ * Gets the value of the sourceOfTruth property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSourceOfTruth() {
+ return sourceOfTruth;
+ }
+
+ /**
+ * Sets the value of the sourceOfTruth property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSourceOfTruth(String value) {
+ this.sourceOfTruth = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ResponseList.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ResponseList.java
new file mode 100644
index 0000000..447adf4
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ResponseList.java
@@ -0,0 +1,74 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}inventory-response-items" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "inventoryResponseItems"
+})
+@XmlRootElement(name = "response-list")
+public class ResponseList
+ implements AAIDatum
+{
+
+ @XmlElement(name = "inventory-response-items")
+ protected InventoryResponseItems inventoryResponseItems;
+
+ /**
+ * Gets the value of the inventoryResponseItems property.
+ *
+ * @return
+ * possible object is
+ * {@link InventoryResponseItems }
+ *
+ */
+ public InventoryResponseItems getInventoryResponseItems() {
+ return inventoryResponseItems;
+ }
+
+ /**
+ * Sets the value of the inventoryResponseItems property.
+ *
+ * @param value
+ * allowed object is
+ * {@link InventoryResponseItems }
+ *
+ */
+ public void setInventoryResponseItems(InventoryResponseItems value) {
+ this.inventoryResponseItems = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ResultData.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ResultData.java
new file mode 100644
index 0000000..554660b
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ResultData.java
@@ -0,0 +1,102 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="resource-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-link" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "resourceType",
+ "resourceLink"
+})
+@XmlRootElement(name = "result-data")
+public class ResultData
+ implements AAIDatum
+{
+
+ @XmlElement(name = "resource-type")
+ protected String resourceType;
+ @XmlElement(name = "resource-link")
+ protected String resourceLink;
+
+ /**
+ * Gets the value of the resourceType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceType() {
+ return resourceType;
+ }
+
+ /**
+ * Sets the value of the resourceType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceType(String value) {
+ this.resourceType = value;
+ }
+
+ /**
+ * Gets the value of the resourceLink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceLink() {
+ return resourceLink;
+ }
+
+ /**
+ * Sets the value of the resourceLink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceLink(String value) {
+ this.resourceLink = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Search.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Search.java
new file mode 100644
index 0000000..a47f8db
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Search.java
@@ -0,0 +1,74 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}search-results" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "searchResults"
+})
+@XmlRootElement(name = "search")
+public class Search
+ implements AAIDatum
+{
+
+ @XmlElement(name = "search-results")
+ protected SearchResults searchResults;
+
+ /**
+ * Gets the value of the searchResults property.
+ *
+ * @return
+ * possible object is
+ * {@link SearchResults }
+ *
+ */
+ public SearchResults getSearchResults() {
+ return searchResults;
+ }
+
+ /**
+ * Sets the value of the searchResults property.
+ *
+ * @param value
+ * allowed object is
+ * {@link SearchResults }
+ *
+ */
+ public void setSearchResults(SearchResults value) {
+ this.searchResults = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SearchResults.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SearchResults.java
new file mode 100644
index 0000000..fdfbbf4
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SearchResults.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}result-data" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "resultData"
+})
+@XmlRootElement(name = "search-results")
+public class SearchResults
+ implements AAIDatum
+{
+
+ @XmlElement(name = "result-data")
+ protected List<ResultData> resultData;
+
+ /**
+ * Gets the value of the resultData property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the resultData property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getResultData().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ResultData }
+ *
+ *
+ */
+ public List<ResultData> getResultData() {
+ if (resultData == null) {
+ resultData = new ArrayList<ResultData>();
+ }
+ return this.resultData;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SecondaryFilter.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SecondaryFilter.java
new file mode 100644
index 0000000..6f8a503
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SecondaryFilter.java
@@ -0,0 +1,130 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="property-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="filter-type" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="property-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "propertyName",
+ "filterType",
+ "propertyValue"
+})
+@XmlRootElement(name = "secondary-filter")
+public class SecondaryFilter
+ implements AAIDatum
+{
+
+ @XmlElement(name = "property-name")
+ protected String propertyName;
+ @XmlElement(name = "filter-type")
+ protected String filterType;
+ @XmlElement(name = "property-value")
+ protected String propertyValue;
+
+ /**
+ * Gets the value of the propertyName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ /**
+ * Sets the value of the propertyName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyName(String value) {
+ this.propertyName = value;
+ }
+
+ /**
+ * Gets the value of the filterType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getFilterType() {
+ return filterType;
+ }
+
+ /**
+ * Sets the value of the filterType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setFilterType(String value) {
+ this.filterType = value;
+ }
+
+ /**
+ * Gets the value of the propertyValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyValue() {
+ return propertyValue;
+ }
+
+ /**
+ * Sets the value of the propertyValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyValue(String value) {
+ this.propertyValue = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SegmentationAssignment.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SegmentationAssignment.java
new file mode 100644
index 0000000..25618e0
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SegmentationAssignment.java
@@ -0,0 +1,130 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="segmentation-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "segmentationId",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "segmentation-assignment")
+public class SegmentationAssignment
+ implements AAIDatum
+{
+
+ @XmlElement(name = "segmentation-id", required = true)
+ protected String segmentationId;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the segmentationId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSegmentationId() {
+ return segmentationId;
+ }
+
+ /**
+ * Sets the value of the segmentationId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSegmentationId(String value) {
+ this.segmentationId = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SegmentationAssignments.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SegmentationAssignments.java
new file mode 100644
index 0000000..03b0758
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/SegmentationAssignments.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}segmentation-assignment" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "segmentationAssignment"
+})
+@XmlRootElement(name = "segmentation-assignments")
+public class SegmentationAssignments
+ implements AAIDatum
+{
+
+ @XmlElement(name = "segmentation-assignment")
+ protected List<SegmentationAssignment> segmentationAssignment;
+
+ /**
+ * Gets the value of the segmentationAssignment property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the segmentationAssignment property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getSegmentationAssignment().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link SegmentationAssignment }
+ *
+ *
+ */
+ public List<SegmentationAssignment> getSegmentationAssignment() {
+ if (segmentationAssignment == null) {
+ segmentationAssignment = new ArrayList<SegmentationAssignment>();
+ }
+ return this.segmentationAssignment;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Service.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Service.java
new file mode 100644
index 0000000..24022fc
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Service.java
@@ -0,0 +1,214 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="service-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="service-description" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="service-selflink" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="service-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "serviceId",
+ "serviceDescription",
+ "serviceSelflink",
+ "resourceVersion",
+ "serviceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "service")
+public class Service
+ implements AAIDatum
+{
+
+ @XmlElement(name = "service-id", required = true)
+ protected String serviceId;
+ @XmlElement(name = "service-description", required = true)
+ protected String serviceDescription;
+ @XmlElement(name = "service-selflink")
+ protected String serviceSelflink;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "service-version")
+ protected String serviceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the serviceId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceId() {
+ return serviceId;
+ }
+
+ /**
+ * Sets the value of the serviceId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceId(String value) {
+ this.serviceId = value;
+ }
+
+ /**
+ * Gets the value of the serviceDescription property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceDescription() {
+ return serviceDescription;
+ }
+
+ /**
+ * Sets the value of the serviceDescription property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceDescription(String value) {
+ this.serviceDescription = value;
+ }
+
+ /**
+ * Gets the value of the serviceSelflink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceSelflink() {
+ return serviceSelflink;
+ }
+
+ /**
+ * Sets the value of the serviceSelflink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceSelflink(String value) {
+ this.serviceSelflink = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the serviceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceVersion() {
+ return serviceVersion;
+ }
+
+ /**
+ * Sets the value of the serviceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceVersion(String value) {
+ this.serviceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceDesignAndCreation.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceDesignAndCreation.java
new file mode 100644
index 0000000..98b9b62
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceDesignAndCreation.java
@@ -0,0 +1,128 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}services" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}models" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}named-queries" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "services",
+ "models",
+ "namedQueries"
+})
+@XmlRootElement(name = "service-design-and-creation")
+public class ServiceDesignAndCreation
+ implements AAIDatum
+{
+
+ protected Services services;
+ protected Models models;
+ @XmlElement(name = "named-queries")
+ protected NamedQueries namedQueries;
+
+ /**
+ * Gets the value of the services property.
+ *
+ * @return
+ * possible object is
+ * {@link Services }
+ *
+ */
+ public Services getServices() {
+ return services;
+ }
+
+ /**
+ * Sets the value of the services property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Services }
+ *
+ */
+ public void setServices(Services value) {
+ this.services = value;
+ }
+
+ /**
+ * Gets the value of the models property.
+ *
+ * @return
+ * possible object is
+ * {@link Models }
+ *
+ */
+ public Models getModels() {
+ return models;
+ }
+
+ /**
+ * Sets the value of the models property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Models }
+ *
+ */
+ public void setModels(Models value) {
+ this.models = value;
+ }
+
+ /**
+ * Gets the value of the namedQueries property.
+ *
+ * @return
+ * possible object is
+ * {@link NamedQueries }
+ *
+ */
+ public NamedQueries getNamedQueries() {
+ return namedQueries;
+ }
+
+ /**
+ * Sets the value of the namedQueries property.
+ *
+ * @param value
+ * allowed object is
+ * {@link NamedQueries }
+ *
+ */
+ public void setNamedQueries(NamedQueries value) {
+ this.namedQueries = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceInstance.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceInstance.java
new file mode 100644
index 0000000..f8369c9
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceInstance.java
@@ -0,0 +1,521 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="service-instance-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="service-instance-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="persona-model-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="persona-model-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="widget-model-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="widget-model-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="bandwidth-total" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="bandwidth-up-wan1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="bandwidth-down-wan1" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="bandwidth-up-wan2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="bandwidth-down-wan2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="vhn-portal-url" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="operational-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="service-instance-location-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}metadata" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "serviceInstanceId",
+ "serviceInstanceName",
+ "personaModelId",
+ "personaModelVersion",
+ "widgetModelId",
+ "widgetModelVersion",
+ "bandwidthTotal",
+ "bandwidthUpWan1",
+ "bandwidthDownWan1",
+ "bandwidthUpWan2",
+ "bandwidthDownWan2",
+ "vhnPortalUrl",
+ "operationalStatus",
+ "serviceInstanceLocationId",
+ "resourceVersion",
+ "relationshipList",
+ "metadata"
+})
+@XmlRootElement(name = "service-instance")
+public class ServiceInstance
+ implements AAIDatum
+{
+
+ @XmlElement(name = "service-instance-id", required = true)
+ protected String serviceInstanceId;
+ @XmlElement(name = "service-instance-name")
+ protected String serviceInstanceName;
+ @XmlElement(name = "persona-model-id")
+ protected String personaModelId;
+ @XmlElement(name = "persona-model-version")
+ protected String personaModelVersion;
+ @XmlElement(name = "widget-model-id")
+ protected String widgetModelId;
+ @XmlElement(name = "widget-model-version")
+ protected String widgetModelVersion;
+ @XmlElement(name = "bandwidth-total")
+ protected String bandwidthTotal;
+ @XmlElement(name = "bandwidth-up-wan1")
+ protected String bandwidthUpWan1;
+ @XmlElement(name = "bandwidth-down-wan1")
+ protected String bandwidthDownWan1;
+ @XmlElement(name = "bandwidth-up-wan2")
+ protected String bandwidthUpWan2;
+ @XmlElement(name = "bandwidth-down-wan2")
+ protected String bandwidthDownWan2;
+ @XmlElement(name = "vhn-portal-url")
+ protected String vhnPortalUrl;
+ @XmlElement(name = "operational-status")
+ protected String operationalStatus;
+ @XmlElement(name = "service-instance-location-id")
+ protected String serviceInstanceLocationId;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+ protected Metadata metadata;
+
+ /**
+ * Gets the value of the serviceInstanceId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceInstanceId() {
+ return serviceInstanceId;
+ }
+
+ /**
+ * Sets the value of the serviceInstanceId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceInstanceId(String value) {
+ this.serviceInstanceId = value;
+ }
+
+ /**
+ * Gets the value of the serviceInstanceName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceInstanceName() {
+ return serviceInstanceName;
+ }
+
+ /**
+ * Sets the value of the serviceInstanceName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceInstanceName(String value) {
+ this.serviceInstanceName = value;
+ }
+
+ /**
+ * Gets the value of the personaModelId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonaModelId() {
+ return personaModelId;
+ }
+
+ /**
+ * Sets the value of the personaModelId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonaModelId(String value) {
+ this.personaModelId = value;
+ }
+
+ /**
+ * Gets the value of the personaModelVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonaModelVersion() {
+ return personaModelVersion;
+ }
+
+ /**
+ * Sets the value of the personaModelVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonaModelVersion(String value) {
+ this.personaModelVersion = value;
+ }
+
+ /**
+ * Gets the value of the widgetModelId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getWidgetModelId() {
+ return widgetModelId;
+ }
+
+ /**
+ * Sets the value of the widgetModelId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setWidgetModelId(String value) {
+ this.widgetModelId = value;
+ }
+
+ /**
+ * Gets the value of the widgetModelVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getWidgetModelVersion() {
+ return widgetModelVersion;
+ }
+
+ /**
+ * Sets the value of the widgetModelVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setWidgetModelVersion(String value) {
+ this.widgetModelVersion = value;
+ }
+
+ /**
+ * Gets the value of the bandwidthTotal property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getBandwidthTotal() {
+ return bandwidthTotal;
+ }
+
+ /**
+ * Sets the value of the bandwidthTotal property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setBandwidthTotal(String value) {
+ this.bandwidthTotal = value;
+ }
+
+ /**
+ * Gets the value of the bandwidthUpWan1 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getBandwidthUpWan1() {
+ return bandwidthUpWan1;
+ }
+
+ /**
+ * Sets the value of the bandwidthUpWan1 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setBandwidthUpWan1(String value) {
+ this.bandwidthUpWan1 = value;
+ }
+
+ /**
+ * Gets the value of the bandwidthDownWan1 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getBandwidthDownWan1() {
+ return bandwidthDownWan1;
+ }
+
+ /**
+ * Sets the value of the bandwidthDownWan1 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setBandwidthDownWan1(String value) {
+ this.bandwidthDownWan1 = value;
+ }
+
+ /**
+ * Gets the value of the bandwidthUpWan2 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getBandwidthUpWan2() {
+ return bandwidthUpWan2;
+ }
+
+ /**
+ * Sets the value of the bandwidthUpWan2 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setBandwidthUpWan2(String value) {
+ this.bandwidthUpWan2 = value;
+ }
+
+ /**
+ * Gets the value of the bandwidthDownWan2 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getBandwidthDownWan2() {
+ return bandwidthDownWan2;
+ }
+
+ /**
+ * Sets the value of the bandwidthDownWan2 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setBandwidthDownWan2(String value) {
+ this.bandwidthDownWan2 = value;
+ }
+
+ /**
+ * Gets the value of the vhnPortalUrl property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVhnPortalUrl() {
+ return vhnPortalUrl;
+ }
+
+ /**
+ * Sets the value of the vhnPortalUrl property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVhnPortalUrl(String value) {
+ this.vhnPortalUrl = value;
+ }
+
+ /**
+ * Gets the value of the operationalStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOperationalStatus() {
+ return operationalStatus;
+ }
+
+ /**
+ * Sets the value of the operationalStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOperationalStatus(String value) {
+ this.operationalStatus = value;
+ }
+
+ /**
+ * Gets the value of the serviceInstanceLocationId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceInstanceLocationId() {
+ return serviceInstanceLocationId;
+ }
+
+ /**
+ * Sets the value of the serviceInstanceLocationId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceInstanceLocationId(String value) {
+ this.serviceInstanceLocationId = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+ /**
+ * Gets the value of the metadata property.
+ *
+ * @return
+ * possible object is
+ * {@link Metadata }
+ *
+ */
+ public Metadata getMetadata() {
+ return metadata;
+ }
+
+ /**
+ * Sets the value of the metadata property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Metadata }
+ *
+ */
+ public void setMetadata(Metadata value) {
+ this.metadata = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceInstances.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceInstances.java
new file mode 100644
index 0000000..f11eb61
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceInstances.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}service-instance" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "serviceInstance"
+})
+@XmlRootElement(name = "service-instances")
+public class ServiceInstances
+ implements AAIDatum
+{
+
+ @XmlElement(name = "service-instance")
+ protected List<ServiceInstance> serviceInstance;
+
+ /**
+ * Gets the value of the serviceInstance property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the serviceInstance property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getServiceInstance().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ServiceInstance }
+ *
+ *
+ */
+ public List<ServiceInstance> getServiceInstance() {
+ if (serviceInstance == null) {
+ serviceInstance = new ArrayList<ServiceInstance>();
+ }
+ return this.serviceInstance;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceSubscription.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceSubscription.java
new file mode 100644
index 0000000..981f916
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceSubscription.java
@@ -0,0 +1,186 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="service-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="temp-ub-sub-account-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}service-instances" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "serviceType",
+ "tempUbSubAccountId",
+ "resourceVersion",
+ "serviceInstances",
+ "relationshipList"
+})
+@XmlRootElement(name = "service-subscription")
+public class ServiceSubscription
+ implements AAIDatum
+{
+
+ @XmlElement(name = "service-type", required = true)
+ protected String serviceType;
+ @XmlElement(name = "temp-ub-sub-account-id")
+ protected String tempUbSubAccountId;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "service-instances")
+ protected ServiceInstances serviceInstances;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the serviceType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getServiceType() {
+ return serviceType;
+ }
+
+ /**
+ * Sets the value of the serviceType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setServiceType(String value) {
+ this.serviceType = value;
+ }
+
+ /**
+ * Gets the value of the tempUbSubAccountId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTempUbSubAccountId() {
+ return tempUbSubAccountId;
+ }
+
+ /**
+ * Sets the value of the tempUbSubAccountId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTempUbSubAccountId(String value) {
+ this.tempUbSubAccountId = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the serviceInstances property.
+ *
+ * @return
+ * possible object is
+ * {@link ServiceInstances }
+ *
+ */
+ public ServiceInstances getServiceInstances() {
+ return serviceInstances;
+ }
+
+ /**
+ * Sets the value of the serviceInstances property.
+ *
+ * @param value
+ * allowed object is
+ * {@link ServiceInstances }
+ *
+ */
+ public void setServiceInstances(ServiceInstances value) {
+ this.serviceInstances = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceSubscriptions.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceSubscriptions.java
new file mode 100644
index 0000000..d8f2711
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/ServiceSubscriptions.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}service-subscription" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "serviceSubscription"
+})
+@XmlRootElement(name = "service-subscriptions")
+public class ServiceSubscriptions
+ implements AAIDatum
+{
+
+ @XmlElement(name = "service-subscription")
+ protected List<ServiceSubscription> serviceSubscription;
+
+ /**
+ * Gets the value of the serviceSubscription property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the serviceSubscription property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getServiceSubscription().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link ServiceSubscription }
+ *
+ *
+ */
+ public List<ServiceSubscription> getServiceSubscription() {
+ if (serviceSubscription == null) {
+ serviceSubscription = new ArrayList<ServiceSubscription>();
+ }
+ return this.serviceSubscription;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Services.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Services.java
new file mode 100644
index 0000000..7a00462
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Services.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}service" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "service"
+})
+@XmlRootElement(name = "services")
+public class Services
+ implements AAIDatum
+{
+
+ protected List<Service> service;
+
+ /**
+ * Gets the value of the service property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the service property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getService().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Service }
+ *
+ *
+ */
+ public List<Service> getService() {
+ if (service == null) {
+ service = new ArrayList<Service>();
+ }
+ return this.service;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Snapshot.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Snapshot.java
new file mode 100644
index 0000000..3cf1b9d
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Snapshot.java
@@ -0,0 +1,381 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="snapshot-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="snapshot-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="snapshot-architecture" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="snapshot-os-distro" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="snapshot-os-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="application" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="application-vendor" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="application-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="snapshot-selflink" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="prev-snapshot-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "snapshotId",
+ "snapshotName",
+ "snapshotArchitecture",
+ "snapshotOsDistro",
+ "snapshotOsVersion",
+ "application",
+ "applicationVendor",
+ "applicationVersion",
+ "snapshotSelflink",
+ "prevSnapshotId",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "snapshot")
+public class Snapshot
+ implements AAIDatum
+{
+
+ @XmlElement(name = "snapshot-id", required = true)
+ protected String snapshotId;
+ @XmlElement(name = "snapshot-name")
+ protected String snapshotName;
+ @XmlElement(name = "snapshot-architecture")
+ protected String snapshotArchitecture;
+ @XmlElement(name = "snapshot-os-distro")
+ protected String snapshotOsDistro;
+ @XmlElement(name = "snapshot-os-version")
+ protected String snapshotOsVersion;
+ protected String application;
+ @XmlElement(name = "application-vendor")
+ protected String applicationVendor;
+ @XmlElement(name = "application-version")
+ protected String applicationVersion;
+ @XmlElement(name = "snapshot-selflink")
+ protected String snapshotSelflink;
+ @XmlElement(name = "prev-snapshot-id")
+ protected String prevSnapshotId;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the snapshotId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSnapshotId() {
+ return snapshotId;
+ }
+
+ /**
+ * Sets the value of the snapshotId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSnapshotId(String value) {
+ this.snapshotId = value;
+ }
+
+ /**
+ * Gets the value of the snapshotName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSnapshotName() {
+ return snapshotName;
+ }
+
+ /**
+ * Sets the value of the snapshotName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSnapshotName(String value) {
+ this.snapshotName = value;
+ }
+
+ /**
+ * Gets the value of the snapshotArchitecture property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSnapshotArchitecture() {
+ return snapshotArchitecture;
+ }
+
+ /**
+ * Sets the value of the snapshotArchitecture property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSnapshotArchitecture(String value) {
+ this.snapshotArchitecture = value;
+ }
+
+ /**
+ * Gets the value of the snapshotOsDistro property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSnapshotOsDistro() {
+ return snapshotOsDistro;
+ }
+
+ /**
+ * Sets the value of the snapshotOsDistro property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSnapshotOsDistro(String value) {
+ this.snapshotOsDistro = value;
+ }
+
+ /**
+ * Gets the value of the snapshotOsVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSnapshotOsVersion() {
+ return snapshotOsVersion;
+ }
+
+ /**
+ * Sets the value of the snapshotOsVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSnapshotOsVersion(String value) {
+ this.snapshotOsVersion = value;
+ }
+
+ /**
+ * Gets the value of the application property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getApplication() {
+ return application;
+ }
+
+ /**
+ * Sets the value of the application property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setApplication(String value) {
+ this.application = value;
+ }
+
+ /**
+ * Gets the value of the applicationVendor property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getApplicationVendor() {
+ return applicationVendor;
+ }
+
+ /**
+ * Sets the value of the applicationVendor property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setApplicationVendor(String value) {
+ this.applicationVendor = value;
+ }
+
+ /**
+ * Gets the value of the applicationVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getApplicationVersion() {
+ return applicationVersion;
+ }
+
+ /**
+ * Sets the value of the applicationVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setApplicationVersion(String value) {
+ this.applicationVersion = value;
+ }
+
+ /**
+ * Gets the value of the snapshotSelflink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSnapshotSelflink() {
+ return snapshotSelflink;
+ }
+
+ /**
+ * Sets the value of the snapshotSelflink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSnapshotSelflink(String value) {
+ this.snapshotSelflink = value;
+ }
+
+ /**
+ * Gets the value of the prevSnapshotId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPrevSnapshotId() {
+ return prevSnapshotId;
+ }
+
+ /**
+ * Sets the value of the prevSnapshotId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPrevSnapshotId(String value) {
+ this.prevSnapshotId = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Snapshots.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Snapshots.java
new file mode 100644
index 0000000..be9e85b
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Snapshots.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}snapshot" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "snapshot"
+})
+@XmlRootElement(name = "snapshots")
+public class Snapshots
+ implements AAIDatum
+{
+
+ protected List<Snapshot> snapshot;
+
+ /**
+ * Gets the value of the snapshot property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the snapshot property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getSnapshot().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Snapshot }
+ *
+ *
+ */
+ public List<Snapshot> getSnapshot() {
+ if (snapshot == null) {
+ snapshot = new ArrayList<Snapshot>();
+ }
+ return this.snapshot;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/StartNodeFilter.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/StartNodeFilter.java
new file mode 100644
index 0000000..f04a9a0
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/StartNodeFilter.java
@@ -0,0 +1,102 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="property-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="property-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "propertyName",
+ "propertyValue"
+})
+@XmlRootElement(name = "start-node-filter")
+public class StartNodeFilter
+ implements AAIDatum
+{
+
+ @XmlElement(name = "property-name")
+ protected String propertyName;
+ @XmlElement(name = "property-value")
+ protected String propertyValue;
+
+ /**
+ * Gets the value of the propertyName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ /**
+ * Sets the value of the propertyName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyName(String value) {
+ this.propertyName = value;
+ }
+
+ /**
+ * Gets the value of the propertyValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPropertyValue() {
+ return propertyValue;
+ }
+
+ /**
+ * Sets the value of the propertyValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPropertyValue(String value) {
+ this.propertyValue = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Subnet.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Subnet.java
new file mode 100644
index 0000000..691cccd
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Subnet.java
@@ -0,0 +1,402 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="subnet-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="subnet-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="neutron-subnet-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="gateway-address" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="network-start-address" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="cidr-mask" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="ip-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="orchestration-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="dhcp-enabled" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="dhcp-start" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="dhcp-end" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "subnetId",
+ "subnetName",
+ "neutronSubnetId",
+ "gatewayAddress",
+ "networkStartAddress",
+ "cidrMask",
+ "ipVersion",
+ "orchestrationStatus",
+ "dhcpEnabled",
+ "dhcpStart",
+ "dhcpEnd",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "subnet")
+public class Subnet
+ implements AAIDatum
+{
+
+ @XmlElement(name = "subnet-id", required = true)
+ protected String subnetId;
+ @XmlElement(name = "subnet-name")
+ protected String subnetName;
+ @XmlElement(name = "neutron-subnet-id")
+ protected String neutronSubnetId;
+ @XmlElement(name = "gateway-address")
+ protected String gatewayAddress;
+ @XmlElement(name = "network-start-address")
+ protected String networkStartAddress;
+ @XmlElement(name = "cidr-mask")
+ protected String cidrMask;
+ @XmlElement(name = "ip-version")
+ protected String ipVersion;
+ @XmlElement(name = "orchestration-status")
+ protected String orchestrationStatus;
+ @XmlElement(name = "dhcp-enabled")
+ protected boolean dhcpEnabled;
+ @XmlElement(name = "dhcp-start")
+ protected String dhcpStart;
+ @XmlElement(name = "dhcp-end")
+ protected String dhcpEnd;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the subnetId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSubnetId() {
+ return subnetId;
+ }
+
+ /**
+ * Sets the value of the subnetId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSubnetId(String value) {
+ this.subnetId = value;
+ }
+
+ /**
+ * Gets the value of the subnetName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSubnetName() {
+ return subnetName;
+ }
+
+ /**
+ * Sets the value of the subnetName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSubnetName(String value) {
+ this.subnetName = value;
+ }
+
+ /**
+ * Gets the value of the neutronSubnetId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNeutronSubnetId() {
+ return neutronSubnetId;
+ }
+
+ /**
+ * Sets the value of the neutronSubnetId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNeutronSubnetId(String value) {
+ this.neutronSubnetId = value;
+ }
+
+ /**
+ * Gets the value of the gatewayAddress property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getGatewayAddress() {
+ return gatewayAddress;
+ }
+
+ /**
+ * Sets the value of the gatewayAddress property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setGatewayAddress(String value) {
+ this.gatewayAddress = value;
+ }
+
+ /**
+ * Gets the value of the networkStartAddress property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getNetworkStartAddress() {
+ return networkStartAddress;
+ }
+
+ /**
+ * Sets the value of the networkStartAddress property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setNetworkStartAddress(String value) {
+ this.networkStartAddress = value;
+ }
+
+ /**
+ * Gets the value of the cidrMask property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getCidrMask() {
+ return cidrMask;
+ }
+
+ /**
+ * Sets the value of the cidrMask property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setCidrMask(String value) {
+ this.cidrMask = value;
+ }
+
+ /**
+ * Gets the value of the ipVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getIpVersion() {
+ return ipVersion;
+ }
+
+ /**
+ * Sets the value of the ipVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setIpVersion(String value) {
+ this.ipVersion = value;
+ }
+
+ /**
+ * Gets the value of the orchestrationStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOrchestrationStatus() {
+ return orchestrationStatus;
+ }
+
+ /**
+ * Sets the value of the orchestrationStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOrchestrationStatus(String value) {
+ this.orchestrationStatus = value;
+ }
+
+ /**
+ * Gets the value of the dhcpEnabled property.
+ *
+ */
+ public boolean isDhcpEnabled() {
+ return dhcpEnabled;
+ }
+
+ /**
+ * Sets the value of the dhcpEnabled property.
+ *
+ */
+ public void setDhcpEnabled(boolean value) {
+ this.dhcpEnabled = value;
+ }
+
+ /**
+ * Gets the value of the dhcpStart property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDhcpStart() {
+ return dhcpStart;
+ }
+
+ /**
+ * Sets the value of the dhcpStart property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDhcpStart(String value) {
+ this.dhcpStart = value;
+ }
+
+ /**
+ * Gets the value of the dhcpEnd property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getDhcpEnd() {
+ return dhcpEnd;
+ }
+
+ /**
+ * Sets the value of the dhcpEnd property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setDhcpEnd(String value) {
+ this.dhcpEnd = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Subnets.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Subnets.java
new file mode 100644
index 0000000..b26dc34
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Subnets.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}subnet" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "subnet"
+})
+@XmlRootElement(name = "subnets")
+public class Subnets
+ implements AAIDatum
+{
+
+ protected List<Subnet> subnet;
+
+ /**
+ * Gets the value of the subnet property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the subnet property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getSubnet().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Subnet }
+ *
+ *
+ */
+ public List<Subnet> getSubnet() {
+ if (subnet == null) {
+ subnet = new ArrayList<Subnet>();
+ }
+ return this.subnet;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/TaggedInventoryItemList.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/TaggedInventoryItemList.java
new file mode 100644
index 0000000..8adcf9a
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/TaggedInventoryItemList.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}inventory-item" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "inventoryItem"
+})
+@XmlRootElement(name = "tagged-inventory-item-list")
+public class TaggedInventoryItemList
+ implements AAIDatum
+{
+
+ @XmlElement(name = "inventory-item")
+ protected List<InventoryItem> inventoryItem;
+
+ /**
+ * Gets the value of the inventoryItem property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the inventoryItem property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getInventoryItem().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link InventoryItem }
+ *
+ *
+ */
+ public List<InventoryItem> getInventoryItem() {
+ if (inventoryItem == null) {
+ inventoryItem = new ArrayList<InventoryItem>();
+ }
+ return this.inventoryItem;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Tenant.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Tenant.java
new file mode 100644
index 0000000..4e5eb1e
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Tenant.java
@@ -0,0 +1,185 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="tenant-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="tenant-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}vservers" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "tenantId",
+ "tenantName",
+ "resourceVersion",
+ "vservers",
+ "relationshipList"
+})
+@XmlRootElement(name = "tenant")
+public class Tenant
+ implements AAIDatum
+{
+
+ @XmlElement(name = "tenant-id", required = true)
+ protected String tenantId;
+ @XmlElement(name = "tenant-name", required = true)
+ protected String tenantName;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ protected Vservers vservers;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the tenantId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTenantId() {
+ return tenantId;
+ }
+
+ /**
+ * Sets the value of the tenantId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTenantId(String value) {
+ this.tenantId = value;
+ }
+
+ /**
+ * Gets the value of the tenantName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getTenantName() {
+ return tenantName;
+ }
+
+ /**
+ * Sets the value of the tenantName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setTenantName(String value) {
+ this.tenantName = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the vservers property.
+ *
+ * @return
+ * possible object is
+ * {@link Vservers }
+ *
+ */
+ public Vservers getVservers() {
+ return vservers;
+ }
+
+ /**
+ * Sets the value of the vservers property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Vservers }
+ *
+ */
+ public void setVservers(Vservers value) {
+ this.vservers = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Tenants.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Tenants.java
new file mode 100644
index 0000000..dfafbf3
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Tenants.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}tenant" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "tenant"
+})
+@XmlRootElement(name = "tenants")
+public class Tenants
+ implements AAIDatum
+{
+
+ protected List<Tenant> tenant;
+
+ /**
+ * Gets the value of the tenant property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the tenant property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getTenant().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Tenant }
+ *
+ *
+ */
+ public List<Tenant> getTenant() {
+ if (tenant == null) {
+ tenant = new ArrayList<Tenant>();
+ }
+ return this.tenant;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Update.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Update.java
new file mode 100644
index 0000000..fec7741
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Update.java
@@ -0,0 +1,169 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="update-node-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}update-node-key" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;element name="update-node-uri" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}action" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "updateNodeType",
+ "updateNodeKey",
+ "updateNodeUri",
+ "action"
+})
+@XmlRootElement(name = "update")
+public class Update
+ implements AAIDatum
+{
+
+ @XmlElement(name = "update-node-type", required = true)
+ protected String updateNodeType;
+ @XmlElement(name = "update-node-key")
+ protected List<UpdateNodeKey> updateNodeKey;
+ @XmlElement(name = "update-node-uri")
+ protected String updateNodeUri;
+ protected List<Action> action;
+
+ /**
+ * Gets the value of the updateNodeType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getUpdateNodeType() {
+ return updateNodeType;
+ }
+
+ /**
+ * Sets the value of the updateNodeType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setUpdateNodeType(String value) {
+ this.updateNodeType = value;
+ }
+
+ /**
+ * Gets the value of the updateNodeKey property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the updateNodeKey property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getUpdateNodeKey().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link UpdateNodeKey }
+ *
+ *
+ */
+ public List<UpdateNodeKey> getUpdateNodeKey() {
+ if (updateNodeKey == null) {
+ updateNodeKey = new ArrayList<UpdateNodeKey>();
+ }
+ return this.updateNodeKey;
+ }
+
+ /**
+ * Gets the value of the updateNodeUri property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getUpdateNodeUri() {
+ return updateNodeUri;
+ }
+
+ /**
+ * Sets the value of the updateNodeUri property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setUpdateNodeUri(String value) {
+ this.updateNodeUri = value;
+ }
+
+ /**
+ * Gets the value of the action property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the action property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getAction().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Action }
+ *
+ *
+ */
+ public List<Action> getAction() {
+ if (action == null) {
+ action = new ArrayList<Action>();
+ }
+ return this.action;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/UpdateNodeKey.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/UpdateNodeKey.java
new file mode 100644
index 0000000..3d80775
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/UpdateNodeKey.java
@@ -0,0 +1,102 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="key-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="key-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "keyName",
+ "keyValue"
+})
+@XmlRootElement(name = "update-node-key")
+public class UpdateNodeKey
+ implements AAIDatum
+{
+
+ @XmlElement(name = "key-name")
+ protected String keyName;
+ @XmlElement(name = "key-value")
+ protected String keyValue;
+
+ /**
+ * Gets the value of the keyName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getKeyName() {
+ return keyName;
+ }
+
+ /**
+ * Sets the value of the keyName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setKeyName(String value) {
+ this.keyName = value;
+ }
+
+ /**
+ * Gets the value of the keyValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getKeyValue() {
+ return keyValue;
+ }
+
+ /**
+ * Sets the value of the keyValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setKeyValue(String value) {
+ this.keyValue = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VfModule.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VfModule.java
new file mode 100644
index 0000000..bf331f5
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VfModule.java
@@ -0,0 +1,374 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="vf-module-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="vf-module-name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="heat-stack-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="orchestration-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="is-base-vf-module" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="persona-model-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="persona-model-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="widget-model-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="widget-model-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="contrail-service-instance-fqdn" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "vfModuleId",
+ "vfModuleName",
+ "heatStackId",
+ "orchestrationStatus",
+ "isBaseVfModule",
+ "resourceVersion",
+ "personaModelId",
+ "personaModelVersion",
+ "widgetModelId",
+ "widgetModelVersion",
+ "contrailServiceInstanceFqdn",
+ "relationshipList"
+})
+@XmlRootElement(name = "vf-module")
+public class VfModule
+ implements AAIDatum
+{
+
+ @XmlElement(name = "vf-module-id", required = true)
+ protected String vfModuleId;
+ @XmlElement(name = "vf-module-name")
+ protected String vfModuleName;
+ @XmlElement(name = "heat-stack-id")
+ protected String heatStackId;
+ @XmlElement(name = "orchestration-status")
+ protected String orchestrationStatus;
+ @XmlElement(name = "is-base-vf-module")
+ protected boolean isBaseVfModule;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "persona-model-id")
+ protected String personaModelId;
+ @XmlElement(name = "persona-model-version")
+ protected String personaModelVersion;
+ @XmlElement(name = "widget-model-id")
+ protected String widgetModelId;
+ @XmlElement(name = "widget-model-version")
+ protected String widgetModelVersion;
+ @XmlElement(name = "contrail-service-instance-fqdn")
+ protected String contrailServiceInstanceFqdn;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the vfModuleId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVfModuleId() {
+ return vfModuleId;
+ }
+
+ /**
+ * Sets the value of the vfModuleId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVfModuleId(String value) {
+ this.vfModuleId = value;
+ }
+
+ /**
+ * Gets the value of the vfModuleName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVfModuleName() {
+ return vfModuleName;
+ }
+
+ /**
+ * Sets the value of the vfModuleName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVfModuleName(String value) {
+ this.vfModuleName = value;
+ }
+
+ /**
+ * Gets the value of the heatStackId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getHeatStackId() {
+ return heatStackId;
+ }
+
+ /**
+ * Sets the value of the heatStackId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setHeatStackId(String value) {
+ this.heatStackId = value;
+ }
+
+ /**
+ * Gets the value of the orchestrationStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOrchestrationStatus() {
+ return orchestrationStatus;
+ }
+
+ /**
+ * Sets the value of the orchestrationStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOrchestrationStatus(String value) {
+ this.orchestrationStatus = value;
+ }
+
+ /**
+ * Gets the value of the isBaseVfModule property.
+ *
+ */
+ public boolean isIsBaseVfModule() {
+ return isBaseVfModule;
+ }
+
+ /**
+ * Sets the value of the isBaseVfModule property.
+ *
+ */
+ public void setIsBaseVfModule(boolean value) {
+ this.isBaseVfModule = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the personaModelId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonaModelId() {
+ return personaModelId;
+ }
+
+ /**
+ * Sets the value of the personaModelId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonaModelId(String value) {
+ this.personaModelId = value;
+ }
+
+ /**
+ * Gets the value of the personaModelVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPersonaModelVersion() {
+ return personaModelVersion;
+ }
+
+ /**
+ * Sets the value of the personaModelVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPersonaModelVersion(String value) {
+ this.personaModelVersion = value;
+ }
+
+ /**
+ * Gets the value of the widgetModelId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getWidgetModelId() {
+ return widgetModelId;
+ }
+
+ /**
+ * Sets the value of the widgetModelId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setWidgetModelId(String value) {
+ this.widgetModelId = value;
+ }
+
+ /**
+ * Gets the value of the widgetModelVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getWidgetModelVersion() {
+ return widgetModelVersion;
+ }
+
+ /**
+ * Sets the value of the widgetModelVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setWidgetModelVersion(String value) {
+ this.widgetModelVersion = value;
+ }
+
+ /**
+ * Gets the value of the contrailServiceInstanceFqdn property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getContrailServiceInstanceFqdn() {
+ return contrailServiceInstanceFqdn;
+ }
+
+ /**
+ * Sets the value of the contrailServiceInstanceFqdn property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setContrailServiceInstanceFqdn(String value) {
+ this.contrailServiceInstanceFqdn = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VfModules.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VfModules.java
new file mode 100644
index 0000000..8e13c9e
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VfModules.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}vf-module" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "vfModule"
+})
+@XmlRootElement(name = "vf-modules")
+public class VfModules
+ implements AAIDatum
+{
+
+ @XmlElement(name = "vf-module")
+ protected List<VfModule> vfModule;
+
+ /**
+ * Gets the value of the vfModule property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the vfModule property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getVfModule().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link VfModule }
+ *
+ *
+ */
+ public List<VfModule> getVfModule() {
+ if (vfModule == null) {
+ vfModule = new ArrayList<VfModule>();
+ }
+ return this.vfModule;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vlan.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vlan.java
new file mode 100644
index 0000000..d7da63c
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vlan.java
@@ -0,0 +1,397 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlSchemaType;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="vlan-interface" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="vlan-id-inner" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="vlan-id-outer" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="speed-value" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="speed-units" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="vlan-description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="backdoor-connection" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="vpn-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}l3-interface-ipv4-address-list" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}l3-interface-ipv6-address-list" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "vlanInterface",
+ "vlanIdInner",
+ "vlanIdOuter",
+ "resourceVersion",
+ "speedValue",
+ "speedUnits",
+ "vlanDescription",
+ "backdoorConnection",
+ "vpnId",
+ "relationshipList",
+ "l3InterfaceIpv4AddressList",
+ "l3InterfaceIpv6AddressList"
+})
+@XmlRootElement(name = "vlan")
+public class Vlan
+ implements AAIDatum
+{
+
+ @XmlElement(name = "vlan-interface", required = true)
+ protected String vlanInterface;
+ @XmlElement(name = "vlan-id-inner")
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long vlanIdInner;
+ @XmlElement(name = "vlan-id-outer")
+ @XmlSchemaType(name = "unsignedInt")
+ protected Long vlanIdOuter;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "speed-value")
+ protected String speedValue;
+ @XmlElement(name = "speed-units")
+ protected String speedUnits;
+ @XmlElement(name = "vlan-description")
+ protected String vlanDescription;
+ @XmlElement(name = "backdoor-connection")
+ protected String backdoorConnection;
+ @XmlElement(name = "vpn-id")
+ protected String vpnId;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+ @XmlElement(name = "l3-interface-ipv4-address-list")
+ protected List<L3InterfaceIpv4AddressList> l3InterfaceIpv4AddressList;
+ @XmlElement(name = "l3-interface-ipv6-address-list")
+ protected List<L3InterfaceIpv6AddressList> l3InterfaceIpv6AddressList;
+
+ /**
+ * Gets the value of the vlanInterface property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVlanInterface() {
+ return vlanInterface;
+ }
+
+ /**
+ * Sets the value of the vlanInterface property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVlanInterface(String value) {
+ this.vlanInterface = value;
+ }
+
+ /**
+ * Gets the value of the vlanIdInner property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getVlanIdInner() {
+ return vlanIdInner;
+ }
+
+ /**
+ * Sets the value of the vlanIdInner property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setVlanIdInner(Long value) {
+ this.vlanIdInner = value;
+ }
+
+ /**
+ * Gets the value of the vlanIdOuter property.
+ *
+ * @return
+ * possible object is
+ * {@link Long }
+ *
+ */
+ public Long getVlanIdOuter() {
+ return vlanIdOuter;
+ }
+
+ /**
+ * Sets the value of the vlanIdOuter property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Long }
+ *
+ */
+ public void setVlanIdOuter(Long value) {
+ this.vlanIdOuter = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the speedValue property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSpeedValue() {
+ return speedValue;
+ }
+
+ /**
+ * Sets the value of the speedValue property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSpeedValue(String value) {
+ this.speedValue = value;
+ }
+
+ /**
+ * Gets the value of the speedUnits property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getSpeedUnits() {
+ return speedUnits;
+ }
+
+ /**
+ * Sets the value of the speedUnits property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setSpeedUnits(String value) {
+ this.speedUnits = value;
+ }
+
+ /**
+ * Gets the value of the vlanDescription property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVlanDescription() {
+ return vlanDescription;
+ }
+
+ /**
+ * Sets the value of the vlanDescription property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVlanDescription(String value) {
+ this.vlanDescription = value;
+ }
+
+ /**
+ * Gets the value of the backdoorConnection property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getBackdoorConnection() {
+ return backdoorConnection;
+ }
+
+ /**
+ * Sets the value of the backdoorConnection property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setBackdoorConnection(String value) {
+ this.backdoorConnection = value;
+ }
+
+ /**
+ * Gets the value of the vpnId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVpnId() {
+ return vpnId;
+ }
+
+ /**
+ * Sets the value of the vpnId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVpnId(String value) {
+ this.vpnId = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+ /**
+ * Gets the value of the l3InterfaceIpv4AddressList property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the l3InterfaceIpv4AddressList property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getL3InterfaceIpv4AddressList().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link L3InterfaceIpv4AddressList }
+ *
+ *
+ */
+ public List<L3InterfaceIpv4AddressList> getL3InterfaceIpv4AddressList() {
+ if (l3InterfaceIpv4AddressList == null) {
+ l3InterfaceIpv4AddressList = new ArrayList<L3InterfaceIpv4AddressList>();
+ }
+ return this.l3InterfaceIpv4AddressList;
+ }
+
+ /**
+ * Gets the value of the l3InterfaceIpv6AddressList property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the l3InterfaceIpv6AddressList property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getL3InterfaceIpv6AddressList().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link L3InterfaceIpv6AddressList }
+ *
+ *
+ */
+ public List<L3InterfaceIpv6AddressList> getL3InterfaceIpv6AddressList() {
+ if (l3InterfaceIpv6AddressList == null) {
+ l3InterfaceIpv6AddressList = new ArrayList<L3InterfaceIpv6AddressList>();
+ }
+ return this.l3InterfaceIpv6AddressList;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vlans.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vlans.java
new file mode 100644
index 0000000..3e02f71
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vlans.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}vlan" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "vlan"
+})
+@XmlRootElement(name = "vlans")
+public class Vlans
+ implements AAIDatum
+{
+
+ protected List<Vlan> vlan;
+
+ /**
+ * Gets the value of the vlan property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the vlan property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getVlan().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Vlan }
+ *
+ *
+ */
+ public List<Vlan> getVlan() {
+ if (vlan == null) {
+ vlan = new ArrayList<Vlan>();
+ }
+ return this.vlan;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vnfc.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vnfc.java
new file mode 100644
index 0000000..c4f2dbb
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vnfc.java
@@ -0,0 +1,338 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="vnfc-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="vnfc-function-code" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="vnfc-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="prov-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="orchestration-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="ipaddress-v4-oam-vip" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="in-maint" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="is-closed-loop-disabled" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="group-notation" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "vnfcName",
+ "vnfcFunctionCode",
+ "vnfcType",
+ "provStatus",
+ "orchestrationStatus",
+ "ipaddressV4OamVip",
+ "inMaint",
+ "isClosedLoopDisabled",
+ "groupNotation",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "vnfc")
+public class Vnfc
+ implements AAIDatum
+{
+
+ @XmlElement(name = "vnfc-name", required = true)
+ protected String vnfcName;
+ @XmlElement(name = "vnfc-function-code", required = true)
+ protected String vnfcFunctionCode;
+ @XmlElement(name = "vnfc-type", required = true)
+ protected String vnfcType;
+ @XmlElement(name = "prov-status")
+ protected String provStatus;
+ @XmlElement(name = "orchestration-status")
+ protected String orchestrationStatus;
+ @XmlElement(name = "ipaddress-v4-oam-vip")
+ protected String ipaddressV4OamVip;
+ @XmlElement(name = "in-maint")
+ protected boolean inMaint;
+ @XmlElement(name = "is-closed-loop-disabled")
+ protected boolean isClosedLoopDisabled;
+ @XmlElement(name = "group-notation")
+ protected String groupNotation;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the vnfcName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVnfcName() {
+ return vnfcName;
+ }
+
+ /**
+ * Sets the value of the vnfcName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVnfcName(String value) {
+ this.vnfcName = value;
+ }
+
+ /**
+ * Gets the value of the vnfcFunctionCode property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVnfcFunctionCode() {
+ return vnfcFunctionCode;
+ }
+
+ /**
+ * Sets the value of the vnfcFunctionCode property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVnfcFunctionCode(String value) {
+ this.vnfcFunctionCode = value;
+ }
+
+ /**
+ * Gets the value of the vnfcType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVnfcType() {
+ return vnfcType;
+ }
+
+ /**
+ * Sets the value of the vnfcType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVnfcType(String value) {
+ this.vnfcType = value;
+ }
+
+ /**
+ * Gets the value of the provStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getProvStatus() {
+ return provStatus;
+ }
+
+ /**
+ * Sets the value of the provStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setProvStatus(String value) {
+ this.provStatus = value;
+ }
+
+ /**
+ * Gets the value of the orchestrationStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOrchestrationStatus() {
+ return orchestrationStatus;
+ }
+
+ /**
+ * Sets the value of the orchestrationStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOrchestrationStatus(String value) {
+ this.orchestrationStatus = value;
+ }
+
+ /**
+ * Gets the value of the ipaddressV4OamVip property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getIpaddressV4OamVip() {
+ return ipaddressV4OamVip;
+ }
+
+ /**
+ * Sets the value of the ipaddressV4OamVip property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setIpaddressV4OamVip(String value) {
+ this.ipaddressV4OamVip = value;
+ }
+
+ /**
+ * Gets the value of the inMaint property.
+ *
+ */
+ public boolean isInMaint() {
+ return inMaint;
+ }
+
+ /**
+ * Sets the value of the inMaint property.
+ *
+ */
+ public void setInMaint(boolean value) {
+ this.inMaint = value;
+ }
+
+ /**
+ * Gets the value of the isClosedLoopDisabled property.
+ *
+ */
+ public boolean isIsClosedLoopDisabled() {
+ return isClosedLoopDisabled;
+ }
+
+ /**
+ * Sets the value of the isClosedLoopDisabled property.
+ *
+ */
+ public void setIsClosedLoopDisabled(boolean value) {
+ this.isClosedLoopDisabled = value;
+ }
+
+ /**
+ * Gets the value of the groupNotation property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getGroupNotation() {
+ return groupNotation;
+ }
+
+ /**
+ * Sets the value of the groupNotation property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setGroupNotation(String value) {
+ this.groupNotation = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vnfcs.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vnfcs.java
new file mode 100644
index 0000000..467413b
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vnfcs.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}vnfc" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "vnfc"
+})
+@XmlRootElement(name = "vnfcs")
+public class Vnfcs
+ implements AAIDatum
+{
+
+ protected List<Vnfc> vnfc;
+
+ /**
+ * Gets the value of the vnfc property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the vnfc property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getVnfc().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Vnfc }
+ *
+ *
+ */
+ public List<Vnfc> getVnfc() {
+ if (vnfc == null) {
+ vnfc = new ArrayList<Vnfc>();
+ }
+ return this.vnfc;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Volume.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Volume.java
new file mode 100644
index 0000000..d98465b
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Volume.java
@@ -0,0 +1,158 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="volume-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="volume-selflink" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "volumeId",
+ "volumeSelflink",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "volume")
+public class Volume
+ implements AAIDatum
+{
+
+ @XmlElement(name = "volume-id", required = true)
+ protected String volumeId;
+ @XmlElement(name = "volume-selflink", required = true)
+ protected String volumeSelflink;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the volumeId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVolumeId() {
+ return volumeId;
+ }
+
+ /**
+ * Sets the value of the volumeId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVolumeId(String value) {
+ this.volumeId = value;
+ }
+
+ /**
+ * Gets the value of the volumeSelflink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVolumeSelflink() {
+ return volumeSelflink;
+ }
+
+ /**
+ * Sets the value of the volumeSelflink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVolumeSelflink(String value) {
+ this.volumeSelflink = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VolumeGroup.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VolumeGroup.java
new file mode 100644
index 0000000..a338946
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VolumeGroup.java
@@ -0,0 +1,242 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="volume-group-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="volume-group-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="heat-stack-id" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="vnf-type" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="orchestration-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "volumeGroupId",
+ "volumeGroupName",
+ "heatStackId",
+ "vnfType",
+ "orchestrationStatus",
+ "resourceVersion",
+ "relationshipList"
+})
+@XmlRootElement(name = "volume-group")
+public class VolumeGroup
+ implements AAIDatum
+{
+
+ @XmlElement(name = "volume-group-id", required = true)
+ protected String volumeGroupId;
+ @XmlElement(name = "volume-group-name", required = true)
+ protected String volumeGroupName;
+ @XmlElement(name = "heat-stack-id")
+ protected String heatStackId;
+ @XmlElement(name = "vnf-type", required = true)
+ protected String vnfType;
+ @XmlElement(name = "orchestration-status")
+ protected String orchestrationStatus;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+
+ /**
+ * Gets the value of the volumeGroupId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVolumeGroupId() {
+ return volumeGroupId;
+ }
+
+ /**
+ * Sets the value of the volumeGroupId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVolumeGroupId(String value) {
+ this.volumeGroupId = value;
+ }
+
+ /**
+ * Gets the value of the volumeGroupName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVolumeGroupName() {
+ return volumeGroupName;
+ }
+
+ /**
+ * Sets the value of the volumeGroupName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVolumeGroupName(String value) {
+ this.volumeGroupName = value;
+ }
+
+ /**
+ * Gets the value of the heatStackId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getHeatStackId() {
+ return heatStackId;
+ }
+
+ /**
+ * Sets the value of the heatStackId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setHeatStackId(String value) {
+ this.heatStackId = value;
+ }
+
+ /**
+ * Gets the value of the vnfType property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVnfType() {
+ return vnfType;
+ }
+
+ /**
+ * Sets the value of the vnfType property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVnfType(String value) {
+ this.vnfType = value;
+ }
+
+ /**
+ * Gets the value of the orchestrationStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getOrchestrationStatus() {
+ return orchestrationStatus;
+ }
+
+ /**
+ * Sets the value of the orchestrationStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setOrchestrationStatus(String value) {
+ this.orchestrationStatus = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VolumeGroups.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VolumeGroups.java
new file mode 100644
index 0000000..cf80b31
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/VolumeGroups.java
@@ -0,0 +1,81 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}volume-group" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "volumeGroup"
+})
+@XmlRootElement(name = "volume-groups")
+public class VolumeGroups
+ implements AAIDatum
+{
+
+ @XmlElement(name = "volume-group")
+ protected List<VolumeGroup> volumeGroup;
+
+ /**
+ * Gets the value of the volumeGroup property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the volumeGroup property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getVolumeGroup().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link VolumeGroup }
+ *
+ *
+ */
+ public List<VolumeGroup> getVolumeGroup() {
+ if (volumeGroup == null) {
+ volumeGroup = new ArrayList<VolumeGroup>();
+ }
+ return this.volumeGroup;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Volumes.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Volumes.java
new file mode 100644
index 0000000..f429a2e
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Volumes.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}volume" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "volume"
+})
+@XmlRootElement(name = "volumes")
+public class Volumes
+ implements AAIDatum
+{
+
+ protected List<Volume> volume;
+
+ /**
+ * Gets the value of the volume property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the volume property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getVolume().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Volume }
+ *
+ *
+ */
+ public List<Volume> getVolume() {
+ if (volume == null) {
+ volume = new ArrayList<Volume>();
+ }
+ return this.volume;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vserver.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vserver.java
new file mode 100644
index 0000000..f011042
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vserver.java
@@ -0,0 +1,337 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element name="vserver-id" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="vserver-name" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="vserver-name2" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="prov-status" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element name="vserver-selflink" type="{http://www.w3.org/2001/XMLSchema}string"/&gt;
+ * &lt;element name="in-maint" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="is-closed-loop-disabled" type="{http://www.w3.org/2001/XMLSchema}boolean"/&gt;
+ * &lt;element name="resource-version" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}volumes" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}relationship-list" minOccurs="0"/&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}l-interfaces" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "vserverId",
+ "vserverName",
+ "vserverName2",
+ "provStatus",
+ "vserverSelflink",
+ "inMaint",
+ "isClosedLoopDisabled",
+ "resourceVersion",
+ "volumes",
+ "relationshipList",
+ "lInterfaces"
+})
+@XmlRootElement(name = "vserver")
+public class Vserver
+ implements AAIDatum
+{
+
+ @XmlElement(name = "vserver-id", required = true)
+ protected String vserverId;
+ @XmlElement(name = "vserver-name", required = true)
+ protected String vserverName;
+ @XmlElement(name = "vserver-name2")
+ protected String vserverName2;
+ @XmlElement(name = "prov-status")
+ protected String provStatus;
+ @XmlElement(name = "vserver-selflink", required = true)
+ protected String vserverSelflink;
+ @XmlElement(name = "in-maint")
+ protected boolean inMaint;
+ @XmlElement(name = "is-closed-loop-disabled")
+ protected boolean isClosedLoopDisabled;
+ @XmlElement(name = "resource-version")
+ protected String resourceVersion;
+ protected Volumes volumes;
+ @XmlElement(name = "relationship-list")
+ protected RelationshipList relationshipList;
+ @XmlElement(name = "l-interfaces")
+ protected LInterfaces lInterfaces;
+
+ /**
+ * Gets the value of the vserverId property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVserverId() {
+ return vserverId;
+ }
+
+ /**
+ * Sets the value of the vserverId property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVserverId(String value) {
+ this.vserverId = value;
+ }
+
+ /**
+ * Gets the value of the vserverName property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVserverName() {
+ return vserverName;
+ }
+
+ /**
+ * Sets the value of the vserverName property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVserverName(String value) {
+ this.vserverName = value;
+ }
+
+ /**
+ * Gets the value of the vserverName2 property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVserverName2() {
+ return vserverName2;
+ }
+
+ /**
+ * Sets the value of the vserverName2 property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVserverName2(String value) {
+ this.vserverName2 = value;
+ }
+
+ /**
+ * Gets the value of the provStatus property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getProvStatus() {
+ return provStatus;
+ }
+
+ /**
+ * Sets the value of the provStatus property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setProvStatus(String value) {
+ this.provStatus = value;
+ }
+
+ /**
+ * Gets the value of the vserverSelflink property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getVserverSelflink() {
+ return vserverSelflink;
+ }
+
+ /**
+ * Sets the value of the vserverSelflink property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setVserverSelflink(String value) {
+ this.vserverSelflink = value;
+ }
+
+ /**
+ * Gets the value of the inMaint property.
+ *
+ */
+ public boolean isInMaint() {
+ return inMaint;
+ }
+
+ /**
+ * Sets the value of the inMaint property.
+ *
+ */
+ public void setInMaint(boolean value) {
+ this.inMaint = value;
+ }
+
+ /**
+ * Gets the value of the isClosedLoopDisabled property.
+ *
+ */
+ public boolean isIsClosedLoopDisabled() {
+ return isClosedLoopDisabled;
+ }
+
+ /**
+ * Sets the value of the isClosedLoopDisabled property.
+ *
+ */
+ public void setIsClosedLoopDisabled(boolean value) {
+ this.isClosedLoopDisabled = value;
+ }
+
+ /**
+ * Gets the value of the resourceVersion property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ * Sets the value of the resourceVersion property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setResourceVersion(String value) {
+ this.resourceVersion = value;
+ }
+
+ /**
+ * Gets the value of the volumes property.
+ *
+ * @return
+ * possible object is
+ * {@link Volumes }
+ *
+ */
+ public Volumes getVolumes() {
+ return volumes;
+ }
+
+ /**
+ * Sets the value of the volumes property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Volumes }
+ *
+ */
+ public void setVolumes(Volumes value) {
+ this.volumes = value;
+ }
+
+ /**
+ * Gets the value of the relationshipList property.
+ *
+ * @return
+ * possible object is
+ * {@link RelationshipList }
+ *
+ */
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ * Sets the value of the relationshipList property.
+ *
+ * @param value
+ * allowed object is
+ * {@link RelationshipList }
+ *
+ */
+ public void setRelationshipList(RelationshipList value) {
+ this.relationshipList = value;
+ }
+
+ /**
+ * Gets the value of the lInterfaces property.
+ *
+ * @return
+ * possible object is
+ * {@link LInterfaces }
+ *
+ */
+ public LInterfaces getLInterfaces() {
+ return lInterfaces;
+ }
+
+ /**
+ * Sets the value of the lInterfaces property.
+ *
+ * @param value
+ * allowed object is
+ * {@link LInterfaces }
+ *
+ */
+ public void setLInterfaces(LInterfaces value) {
+ this.lInterfaces = value;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vservers.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vservers.java
new file mode 100644
index 0000000..a56b8af
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/Vservers.java
@@ -0,0 +1,79 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+
+package org.openecomp.aai.inventory.v8;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+
+/**
+ * <p>Java class for anonymous complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType&gt;
+ * &lt;complexContent&gt;
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"&gt;
+ * &lt;sequence&gt;
+ * &lt;element ref="{http://org.openecomp.aai.inventory/v8}vserver" maxOccurs="unbounded" minOccurs="0"/&gt;
+ * &lt;/sequence&gt;
+ * &lt;/restriction&gt;
+ * &lt;/complexContent&gt;
+ * &lt;/complexType&gt;
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "", propOrder = {
+ "vserver"
+})
+@XmlRootElement(name = "vservers")
+public class Vservers
+ implements AAIDatum
+{
+
+ protected List<Vserver> vserver;
+
+ /**
+ * Gets the value of the vserver property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the vserver property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getVserver().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Vserver }
+ *
+ *
+ */
+ public List<Vserver> getVserver() {
+ if (vserver == null) {
+ vserver = new ArrayList<Vserver>();
+ }
+ return this.vserver;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/package-info.java b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/package-info.java
new file mode 100644
index 0000000..3876eed
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/aai/inventory/v8/package-info.java
@@ -0,0 +1,9 @@
+//
+// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11
+// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
+// Any modifications to this file will be lost upon recompilation of the source schema.
+// Generated on: 2017.02.14 at 01:05:25 PM EST
+//
+
+@javax.xml.bind.annotation.XmlSchema(namespace = "http://org.openecomp.aai.inventory/v8", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
+package org.openecomp.aai.inventory.v8;
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIClient.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIClient.java
new file mode 100644
index 0000000..3217139
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIClient.java
@@ -0,0 +1,150 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.net.URL;
+import java.util.Map;
+
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicJavaPlugin;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.openecomp.sdnc.sli.aai.data.notify.NotifyEvent;
+import org.openecomp.sdnc.sli.aai.data.v1507.VServer;
+import org.openecomp.sdnc.sli.aai.update.Update;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.AvailabilityZone;
+import org.openecomp.aai.inventory.v8.GenericVnf;
+import org.openecomp.aai.inventory.v8.L3Network;
+import org.openecomp.aai.inventory.v8.PInterface;
+import org.openecomp.aai.inventory.v8.PhysicalLink;
+import org.openecomp.aai.inventory.v8.Pserver;
+import org.openecomp.aai.inventory.v8.SearchResults;
+import org.openecomp.aai.inventory.v8.Service;
+import org.openecomp.aai.inventory.v8.ServiceInstance;
+import org.openecomp.aai.inventory.v8.Tenant;
+import org.openecomp.aai.inventory.v8.Vserver;
+
+public interface AAIClient extends SvcLogicResource, SvcLogicJavaPlugin {
+
+ // Service Inteface
+ public ServiceInstance requestServiceInterfaceData(String svc_instance_id) throws AAIServiceException;
+ public ServiceInstance requestServiceInterfaceData(String customer_id, String service_type, String svc_instance_id) throws AAIServiceException;
+ public boolean postServiceInterfaceData(String customer_id, String service_type, String svc_instance_id, ServiceInstance request) throws AAIServiceException;
+ public SearchResults requestServiceInstanceURL(String svc_instance_id) throws AAIServiceException;
+
+ // VServers
+ public Vserver requestVServerData(String tenant_id, String vserver_id, String cloudOwner, String cloudRegionId) throws AAIServiceException;
+ public boolean postVServerData(String tenantId, String vserverId, String cloudOwner, String cloudRegionId, Vserver request) throws AAIServiceException;
+ public boolean deleteVServerData(String tenant_id, String vserver_id, String cloudOwner, String cloudRegionId, String resourceVersion) throws AAIServiceException;
+
+ public URL requestVserverURLNodeQuery(String vserver_name) throws AAIServiceException;
+ public String getTenantIdFromVserverUrl(URL url);
+ public String getCloudOwnerFromVserverUrl(URL url);
+ public String getCloudRegionFromVserverUrl(URL url);
+ public String getVServerIdFromVserverUrl(URL url, String tennantId);
+ public Vserver requestVServerDataByURL(URL url) throws AAIServiceException;
+
+ // --------------------------------- 1507 ---------------------------
+ // Data Change
+ public VServer dataChangeRequestVServerData(URL url) throws AAIServiceException;
+
+ public Pserver dataChangeRequestPServerData(URL url) throws AAIServiceException;
+
+ //Availability-Zone:
+ public AvailabilityZone dataChangeRequestAvailabilityZoneData(URL url) throws AAIServiceException;
+
+ /* DELETE */
+ public boolean dataChangeDeleteVServerData(URL url) throws AAIServiceException;
+
+ public boolean dataChangeDeleteCtagPoolData(URL url) throws AAIServiceException;
+
+ public boolean dataChangeDeleteVplsPeData(URL url) throws AAIServiceException;
+
+ public boolean dataChangeDeleteVpeData(URL url) throws AAIServiceException;
+
+ public boolean dataChangeDeleteDvsSwitchData(URL url) throws AAIServiceException;
+ //OAM-Network:
+ public boolean dataChangeDeleteOAMNetworkData(URL url) throws AAIServiceException;
+ //Availability-Zone:
+ public boolean dataChangeDeleteAvailabilityZoneData(URL url) throws AAIServiceException;
+ //Complex:
+ public boolean dataChangeDeleteComplexData(URL url) throws AAIServiceException;
+
+ // ----------------- Release 1510 ----------------------
+ // // GenericVNF
+ public GenericVnf requestGenericVnfData(String vnf_id) throws AAIServiceException;
+ public boolean postGenericVnfData(String vnf_id, GenericVnf request) throws AAIServiceException;
+ public boolean deleteGenericVnfData(String vnf_id, String resourceVersion) throws AAIServiceException;
+
+ // PInterface
+ public PInterface requestPInterfaceData(String hostname, String interfaceName) throws AAIServiceException;
+ public boolean postPInterfaceData(String hostname, String interfaceName, PInterface request) throws AAIServiceException;
+ public boolean deletePInterfaceData(String hostname, String interfaceName, String resourceVersion) throws AAIServiceException;
+
+ // Physical Link
+ public PhysicalLink requestPhysicalLinkData(String vnf_id) throws AAIServiceException;
+ public boolean postPhysicalLinkData(String vnf_id, PhysicalLink request) throws AAIServiceException;
+ public boolean deletePhysicalLinkData(String vnf_id, String resourceVersion) throws AAIServiceException;
+
+ // PServers
+ public Pserver requestPServerData(String hostname) throws AAIServiceException;
+ public boolean postPServerData(String hostname, Pserver server) throws AAIServiceException;
+ public boolean deletePServerData(String hostname, String resourceVersion) throws AAIServiceException;
+
+ // L3Networks
+ public L3Network requestL3NetworkData(String networkId) throws AAIServiceException;
+ public L3Network requestL3NetworkQueryByName(String networkId) throws AAIServiceException;
+ public boolean postL3NetworkData(String networkId, L3Network request) throws AAIServiceException;
+ public boolean deleteL3NetworkData(String networkId, String resourceVersion) throws AAIServiceException;
+
+ // UBB Notify
+ public boolean sendNotify(NotifyEvent event, String serviceInstanceId, String pathCode) throws AAIServiceException;
+
+ // Services
+ public Service requestServiceData(String serviceId) throws AAIServiceException;
+ public boolean postServiceData(String serviceId, Service request) throws AAIServiceException;
+ public boolean deleteServiceData(String serviceId, String resourceVersion) throws AAIServiceException;
+
+ // Node Query - 1602
+ public SearchResults requestNodeQuery(String type, String entityIdentifier, String entityName) throws AAIServiceException;
+ public String requestDataByURL(URL url) throws AAIServiceException;
+// public Object requestDataInstanceNodeQuery(String type, String vnf_name) throws AAIServiceException;
+ public GenericVnf requestGenericVnfeNodeQuery(String vnf_name) throws AAIServiceException;
+
+ // // tenant
+ public Tenant requestTenantData(String tenant_id, String cloudOwner, String cloudRegionId) throws AAIServiceException;
+ public Tenant requestTenantDataByName(String tenant_name, String cloudOwner, String cloudRegionId) throws AAIServiceException;
+ public boolean postTenantData(String tenant_id, String cloudOwner, String cloudRegionId, Tenant request) throws AAIServiceException;
+// public boolean deleteGenericVnfData(String vnf_id, String resourceVersion) throws AAIServiceException;
+
+ public boolean updateAnAIEntry(Update entity) throws AAIServiceException;
+
+ public QueryStatus backup(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException;
+ public QueryStatus restore(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException;
+
+ public void logKeyError(String keys);
+ ObjectMapper getObjectMapper();
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIDeclarations.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIDeclarations.java
new file mode 100644
index 0000000..b21ad57
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIDeclarations.java
@@ -0,0 +1,1946 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.aai.AAIService.AAIRequestExecutor;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+import org.openecomp.sdnc.sli.aai.query.InstanceFilter;
+import org.openecomp.sdnc.sli.aai.query.InstanceFilters;
+import org.openecomp.sdnc.sli.aai.query.NamedQuery;
+import org.openecomp.sdnc.sli.aai.query.NamedQueryData;
+import org.openecomp.sdnc.sli.aai.query.QueryParameters;
+import org.openecomp.sdnc.sli.aai.update.Action;
+import org.openecomp.sdnc.sli.aai.update.ActionDatum;
+import org.openecomp.sdnc.sli.aai.update.Update;
+import org.openecomp.sdnc.sli.aai.update.UpdateNodeKey;
+import org.slf4j.Logger;
+
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.GenericVnf;
+import org.openecomp.aai.inventory.v8.InventoryResponseItem;
+import org.openecomp.aai.inventory.v8.InventoryResponseItems;
+import org.openecomp.aai.inventory.v8.LogicalLink;
+import org.openecomp.aai.inventory.v8.Metadata;
+import org.openecomp.aai.inventory.v8.Metadatum;
+import org.openecomp.aai.inventory.v8.Pnf;
+import org.openecomp.aai.inventory.v8.Relationship;
+import org.openecomp.aai.inventory.v8.RelationshipData;
+import org.openecomp.aai.inventory.v8.RelationshipList;
+import org.openecomp.aai.inventory.v8.ResultData;
+import org.openecomp.aai.inventory.v8.SearchResults;
+import org.openecomp.aai.inventory.v8.Vlan;
+import org.openecomp.aai.inventory.v8.Vlans;
+import org.openecomp.aai.inventory.v8.Vserver;
+
+
+public abstract class AAIDeclarations implements AAIClient {
+
+ public static final String TRUSTSTORE_PATH = "org.openecomp.sdnc.sli.aai.ssl.trust";
+ public static final String TRUSTSTORE_PSSWD = "org.openecomp.sdnc.sli.aai.ssl.trust.psswd";
+ public static final String KEYSTORE_PATH = "org.openecomp.sdnc.sli.aai.ssl.key";
+ public static final String KEYSTORE_PSSWD = "org.openecomp.sdnc.sli.aai.ssl.key.psswd";
+
+ public static final String CLIENT_NAME = "org.openecomp.sdnc.sli.aai.client.name";
+ public static final String CLIENT_PWWD = "org.openecomp.sdnc.sli.aai.client.psswd";
+
+ public static final String APPLICATION_ID = "org.openecomp.sdnc.sli.aai.application";
+
+ public static final String CONNECTION_TIMEOUT = "connection.timeout";
+ public static final String READ_TIMEOUT = "read.timeout";
+
+ public static final String TARGET_URI = "org.openecomp.sdnc.sli.aai.uri";
+
+ // Availability zones query
+ public static final String QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.query";
+
+ // Update
+ public static final String UPDATE_PATH = "org.openecomp.sdnc.sli.aai.update";
+
+ // VCE
+ public static final String NETWORK_VCE_PATH = "org.openecomp.sdnc.sli.aai.path.vce";
+
+ // VPE
+ public static final String NETWORK_VPE_PATH = "org.openecomp.sdnc.sli.aai.path.vpe";
+
+ // VPLS-PE
+ public static final String NETWORK_VPLS_PE_PATH = "org.openecomp.sdnc.sli.aai.path.vpls.pe";
+
+ // Service instance
+ public static final String SVC_INSTANCE_PATH = "org.openecomp.sdnc.sli.aai.path.svcinst";
+ public static final String SVC_INST_QRY_PATH = "org.openecomp.sdnc.sli.aai.path.svcinst.query";
+
+ // customer
+ public static final String CUSTOMER_PATH = "org.openecomp.sdnc.sli.aai.path.customer";
+
+ // Complexes
+ public static final String NETWORK_COMPLEX_PATH = "org.openecomp.sdnc.sli.aai.path.complex";
+
+ // PServer
+ public static final String NETWORK_PSERVER_PATH = "org.openecomp.sdnc.sli.aai.path.pserver";
+
+ // VServer
+ public static final String NETWORK_VSERVER_PATH = "org.openecomp.sdnc.sli.aai.path.vserver";
+
+ // DVS Seitch
+ public static final String NETWORK_DVSSWITCH_PATH = "org.openecomp.sdnc.sli.aai.path.dvsswitch";
+
+ // GENERIC VNF
+ public static final String GENERIC_VNF_PATH = "org.openecomp.sdnc.sli.aai.path.generic.vnf";
+
+ // CTAG Pool
+ public static final String CTAG_POOLS_PATH = "org.openecomp.sdnc.sli.aai.path.ctag.pools";
+ public static final String CTAG_POOL_PATH = "org.openecomp.sdnc.sli.aai.path.ctag.pool";
+
+ // L3 Network
+ public static final String L3_NETWORK_PATH = "org.openecomp.sdnc.sli.aai.path.l3network";
+ public static final String L3_NETWORK_PATH_QUERY_NAME = "org.openecomp.sdnc.sli.aai.path.l3network.query.name";
+
+ // VPN Bindings
+ public static final String VPN_BINDING_PATH = "org.openecomp.sdnc.sli.aai.path.vpn.binding";
+
+ public static final String VNF_IMAGE_PATH = "org.openecomp.sdnc.sli.aai.path.vnf.image";
+ public static final String VNF_IMAGE_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.vnf.image.query";
+
+ public static final String QUERY_FORMAT = "org.openecomp.sdnc.sli.aai.param.format";
+ public static final String PARAM_VNF_TYPE = "org.openecomp.sdnc.sli.aai.param.vnf_type";
+ public static final String PARAM_PHYS_LOC_ID = "org.openecomp.sdnc.sli.aai.param.physical.location.id";
+ public static final String PARAM_SERVICE_TYPE = "org.openecomp.sdnc.sli.aai.param.service.type";
+ public static final String CERTIFICATE_HOST_ERROR = "org.openecomp.sdnc.sli.aai.host.certificate.ignore";
+
+ // UBB Notify
+ public static final String UBB_NOTIFY_PATH = "org.openecomp.sdnc.sli.aai.path.notify";
+ public static final String SELFLINK_AVPN = "org.openecomp.sdnc.sli.aai.notify.selflink.avpn";
+ public static final String SELFLINK_FQDN = "org.openecomp.sdnc.sli.aai.notify.selflink.fqdn";
+
+ //Service
+ public static final String SERVICE_PATH = "org.openecomp.sdnc.sli.aai.path.service";
+
+ // P-Interfaces
+ public static final String P_INTERFACE_PATH = "org.openecomp.sdnc.sli.aai.path.pserver.pinterface";
+
+ // Physical Link
+ public static final String PHYSICAL_LINK_PATH = "org.openecomp.sdnc.sli.aai.path.physical.link";
+
+ // site-pair-sets
+ public static final String SITE_PAIR_SET_PATH = "org.openecomp.sdnc.sli.aai.path.site.pair.set";
+
+ // node query (1602)
+ public static final String QUERY_NODES_PATH = "org.openecomp.sdnc.sli.aai.query.nodes";
+
+
+ protected abstract Logger getLogger();
+ public abstract AAIRequestExecutor getExecutor();
+
+
+ @Override
+ public QueryStatus query(String resource, boolean localOnly, String select, String key, String prefix, String orderBy, SvcLogicContext ctx)
+ throws SvcLogicException {
+
+ getLogger().debug("AAIService.query \tresource = "+resource);
+
+ String vnfId = null;
+ String vnfName = null;
+ HashMap<String, String> nameValues = keyToHashMap(key, ctx);
+ getLogger().debug("key = "+ nameValues.toString());
+
+ // process data using new model
+ boolean useNewModelProcessing = true;
+ // process server query by name the old way
+ if(("vserver".equals(resource) || "vserver2".equals(resource))){
+ if(nameValues.containsKey("vserver_name") || nameValues.containsKey("vserver-name"))
+ useNewModelProcessing = false;
+ }
+ if("generic-vnf".equals(resource)){
+ if(nameValues.containsKey("vnf_name") || nameValues.containsKey("vnf-name"))
+ useNewModelProcessing = false;
+ }
+
+ // process data using new model
+ if(useNewModelProcessing && AAIRequest.createRequest(resource, nameValues) != null) {
+
+ try {
+ return newModelQuery(resource, localOnly, select, key, prefix, orderBy, ctx);
+ } catch (Exception exc) {
+ getLogger().warn("Failed query - returning FAILURE", exc);
+ return QueryStatus.FAILURE;
+ }
+ }
+
+ ObjectMapper mapper = getObjectMapper();
+ Map<String,Object> attributes = new HashMap<String,Object>();
+
+ String modifier = null;
+
+ if(resource.contains(":")) {
+ String[] tokens = resource.split(":");
+ resource = tokens[0];
+ if(tokens.length > 1) {
+ modifier = tokens[1];
+ }
+ }
+
+ resource = resource.toLowerCase().replace("-", "_");
+
+ try {
+
+ switch(resource) {
+ case "generic_vnf":
+ vnfId = nameValues.get("vnf_id");
+ vnfName = nameValues.get("vnf_name");
+ if(vnfId != null && !vnfId.isEmpty()) {
+ // at this point of the project this part should not be executed
+ vnfId = vnfId.trim().replace("'", "").replace("$", "").replace("'", "");
+ GenericVnf vnf = this.requestGenericVnfData(vnfId);
+ if(vnf == null) {
+ return QueryStatus.NOT_FOUND;
+ }
+
+ attributes = mapper.convertValue(vnf, attributes.getClass());
+ } else if(vnfName != null && !vnfName.isEmpty()) {
+ try {
+ vnfName = vnfName.trim().replace("'", "").replace("$", "").replace("'", "");
+ GenericVnf vnf = this.requestGenericVnfeNodeQuery(vnfName);
+ if(vnf == null) {
+ return QueryStatus.NOT_FOUND;
+ }
+ vnfId=vnf.getVnfId();
+ nameValues.put("vnf_id", vnfId);
+ attributes = mapper.convertValue(vnf, attributes.getClass());
+ } catch (AAIServiceException exc) {
+ int errorCode = exc.getReturnCode();
+ switch(errorCode) {
+ case 400:
+ case 404:
+ case 412:
+ break;
+ default:
+ getLogger().warn("Caught exception trying to refresh generic VNF", exc);
+ }
+ ctx.setAttribute(prefix + ".error.message", exc.getMessage());
+ if(errorCode >= 300) {
+ ctx.setAttribute(prefix + ".error.http.response-code", "" + exc.getReturnCode());
+ }
+ return QueryStatus.FAILURE;
+ }
+ } else {
+ getLogger().warn("No arguments are available to process generic VNF");
+ return QueryStatus.FAILURE;
+ }
+ break;
+ case "vserver":
+ case "vserver2":
+ String vserverName = nameValues.get("vserver_name");
+ String vserverId = nameValues.get("vserver_id");
+ String tenantId = nameValues.get("teannt_id");
+
+ if(vserverName != null) vserverName = vserverName.trim().replace("'", "").replace("$", "").replace("'", "");
+ if(vserverId != null) vserverId = vserverId.trim().replace("'", "").replace("$", "").replace("'", "");
+ if(tenantId != null) tenantId = tenantId.trim().replace("'", "").replace("$", "").replace("'", "");
+
+ if(vserverName != null) {
+ try {
+// add cloud region to return data
+ URL vserverUrl = this.requestVserverURLNodeQuery(vserverName);
+ if(vserverUrl == null) {
+ return QueryStatus.NOT_FOUND;
+ }
+
+ tenantId = getTenantIdFromVserverUrl(vserverUrl);
+ String cloudOwner = getCloudOwnerFromVserverUrl(vserverUrl);
+ String cloudRegionId = getCloudRegionFromVserverUrl(vserverUrl);
+
+ Vserver vserver = this.requestVServerDataByURL(vserverUrl);
+ if(vserver == null) {
+ return QueryStatus.NOT_FOUND;
+ }
+ attributes = mapper.convertValue(vserver, attributes.getClass());
+ if(!attributes.containsKey("tenant-id") && tenantId != null){
+ attributes.put("tenant-id", tenantId);
+ }
+ if(!attributes.containsKey("cloud-owner") && cloudOwner != null){
+ attributes.put("cloud-owner", cloudOwner);
+ }
+ if(!attributes.containsKey("cloud-region-id") && cloudRegionId != null){
+ attributes.put("cloud-region-id", cloudRegionId);
+ }
+ } catch (AAIServiceException e) {
+ getLogger().warn("Caught exception trying to refresh generic VNF", e);
+ }
+ } else if(vserverId != null && tenantId != null) {
+ Vserver vserver = this.requestVServerData(tenantId, vserverId, "att-aic", "AAIAIC25");
+ if(vserver == null) {
+ return QueryStatus.NOT_FOUND;
+ }
+ attributes = mapper.convertValue(vserver, attributes.getClass());
+ if(!attributes.containsKey("tenant-id") && tenantId != null){
+ attributes.put("tenant-id", tenantId);
+ }
+ } else {
+ return QueryStatus.FAILURE;
+ }
+ break;
+
+ default:
+ return QueryStatus.FAILURE;
+ }
+
+ QueryStatus retval = QueryStatus.SUCCESS;
+
+ if (attributes == null || attributes.isEmpty()) {
+ retval = QueryStatus.NOT_FOUND;
+ getLogger().debug("No data found");
+ } else {
+ if (ctx != null) {
+ if (prefix != null) {
+ ArrayList<String> keys = new ArrayList<String>(attributes.keySet());
+
+ int numCols = keys.size();
+
+ for (int i = 0; i < numCols; i++) {
+ String colValue = null;
+ String colName = keys.get(i);
+ Object object = attributes.get(colName);
+
+ if(object != null && object instanceof String) {
+ colValue = (String)object;
+
+ if (prefix != null) {
+ getLogger().debug("Setting "+prefix + "." + colName.replaceAll("_", "-")+" = "+ colValue);
+ ctx.setAttribute(prefix + "." + colName.replaceAll("_", "-"), colValue);
+ } else {
+ getLogger().debug("Setting " + colValue.replaceAll("_", "-")+" = "+colValue);
+ ctx.setAttribute(colValue.replaceAll("_", "-"), colValue);
+ }
+ } else if(object != null && object instanceof Map) {
+ if(colName.equals(modifier) || colName.equals("relationship-list")){
+ String localNodifier = modifier;
+ if(localNodifier == null)
+ localNodifier = "relationship-list";
+ Map<String, Object> properties = (Map<String, Object>)object;
+ writeMap(properties, prefix+"."+localNodifier, ctx);
+ }
+ }
+ }
+ }
+ }
+ }
+ getLogger().debug("Query - returning " + retval);
+ return (retval);
+
+ } catch (Exception exc) {
+ getLogger().warn("Failed query - returning FAILURE", exc);
+ return QueryStatus.FAILURE;
+ }
+
+// return QueryStatus.SUCCESS;
+ }
+
+ public void writeMap(Map<String, Object> properties, String prefix, SvcLogicContext ctx) {
+ Set<String> mapKeys = properties.keySet();
+
+ for(String mapKey : mapKeys) {
+ Object entity = properties.get(mapKey);
+ if(entity instanceof ArrayList) {
+ writeList((ArrayList<?>)entity, prefix + "." + mapKey, ctx);
+ } else
+ if(entity instanceof String) {
+ ctx.setAttribute(prefix + "." + mapKey, entity.toString());
+ getLogger().debug(prefix + "." + mapKey + " : " + entity.toString());
+ } else
+ if(entity instanceof Map) {
+ String localPrefix = prefix;
+ if(mapKey != null) {
+ localPrefix = String.format("%s.%s", prefix, mapKey);
+ }
+ writeMap( (Map<String, Object>)entity, localPrefix, ctx);
+ }
+ }
+ }
+
+ private void writeList(ArrayList<?> list, String prefix, SvcLogicContext ctx) {
+ for(int i = 0; i < list.size(); i++ ) {
+ Object entity = list.get(i);
+ if(entity instanceof Map) {
+ writeMap( (Map<String, Object>)entity, prefix + "[" + i + "]", ctx);
+ } else
+ if(entity instanceof String) {
+ ctx.setAttribute(prefix, entity.toString());
+ getLogger().debug(prefix + " : " + entity.toString());
+ }
+ }
+
+ if(list.size() > 0) {
+ ctx.setAttribute(prefix + "_length", Integer.toString(list.size()));
+ getLogger().debug(prefix + "_length" + " : " + Integer.toString(list.size()));
+ }
+ }
+
+ @Override
+ public QueryStatus save(String resource, boolean force, boolean localOnly, String key, Map<String, String> params, String prefix, SvcLogicContext ctx)
+ throws SvcLogicException {
+
+ getLogger().debug("AAIService.save\tresource="+resource);
+
+ if(resource == null || resource.isEmpty()) {
+ getLogger().warn("AAIService.save has unspecified resource");
+ return QueryStatus.FAILURE;
+ }
+ // keys passed
+ HashMap<String, String> nameValues = keyToHashMap(key, ctx);
+ getLogger().debug("key = "+ Arrays.toString(nameValues.entrySet().toArray()));
+
+ // process params
+ if(params.containsKey("prefix")) {
+ Map<String, String> tmpParams = ctxGetBeginsWith(ctx, params.get("prefix"));
+ if(!tmpParams.isEmpty()) {
+ params.putAll(tmpParams);
+// params.remove("prefix");
+ }
+ }
+ // params passed
+ getLogger().debug("parms = "+ Arrays.toString(params.entrySet().toArray()));
+
+
+ boolean useNewModelProcessing = true;
+ // process server query by name the old way
+ if(("vserver".equals(resource) || "vserver2".equals(resource))){
+ if(nameValues.containsKey("vserver-name")) {
+ useNewModelProcessing = false;
+ }
+
+ if(!params.containsKey("vserver-selflink")) {
+
+ AAIRequest request = AAIRequest.createRequest(resource, nameValues);
+ URL path = null;
+ try {
+ request.processRequestPathValues(nameValues);
+ path = request.getRequestUrl("GET", null);
+ params.put("vserver-selflink", path.toString());
+ } catch (UnsupportedEncodingException | MalformedURLException e) {
+ params.put("vserver-selflink", "/vserver");
+ }
+ }
+ }
+
+ // process data using new model
+ if(useNewModelProcessing && AAIRequest.createRequest(resource, nameValues) != null) {
+
+ try {
+ if(!resource.contains(":")){
+ return newModelSave(resource, force, key, params, prefix, ctx);
+ } else {
+ String[] tokens = resource.split(":");
+ String localResource = tokens[0];
+ String dependency = tokens[1];
+ // get the object
+ AAIDatum instance = newModelObjectRequest( localResource, nameValues, prefix, ctx);
+ if(instance == null) {
+ return QueryStatus.NOT_FOUND;
+ }
+
+ switch(dependency){
+ case "relationship-list":
+ newModelProcessRelationshipList(instance, params, prefix, ctx);
+ break;
+ }
+ // create a method to update relationship-list
+ AAIRequest request = AAIRequest.createRequest(localResource, nameValues);
+ request.setRequestObject(instance);
+ request.processRequestPathValues(nameValues);
+
+ if(getExecutor().post(request) == true) {
+ getLogger().debug("Save relationship list - returning SUCCESS");
+ return QueryStatus.SUCCESS;
+ } else {
+ getLogger().debug("Save relationship list - returning FAILURE");
+ return QueryStatus.FAILURE;
+ }
+ }
+ } catch (Exception exc) {
+ ctx.setAttribute(prefix + ".error.message", exc.getMessage());
+ if(exc instanceof AAIServiceException) {
+ AAIServiceException aaiexc = (AAIServiceException)exc;
+ if(aaiexc.getReturnCode() >= 300) {
+ ctx.setAttribute(prefix + ".error.http.response-code", "" + aaiexc.getReturnCode());
+ }
+
+ if(aaiexc.getReturnCode() == 404) {
+ return QueryStatus.NOT_FOUND;
+ }
+ }
+ getLogger().warn("Failed save() - returning FAILURE", exc);
+ return QueryStatus.FAILURE;
+ }
+ } else {
+ String reSource = resource.toLowerCase().replace("-", "_");
+ String vnfId = null;
+
+ try {
+ switch(reSource) {
+ case "generic_vnf":
+ case "generic-vnf":
+ vnfId = nameValues.get("vnf_id");
+ if(vnfId == null) {
+ getLogger().debug("Save(generic-vnf) with no vnf-id specified. Returning FAILURE");
+ return QueryStatus.FAILURE;
+ }
+ vnfId = vnfId.trim().replace("'", "").replace("$", "").replace("'", "");
+ GenericVnf vnf = this.requestGenericVnfData(vnfId);
+ String status = params.get("prov-status");
+ boolean updated = false;
+ if(status != null && !status.isEmpty()) {
+ vnf.setProvStatus(status);
+ }
+ if(updated) {
+ this.postGenericVnfData(vnfId, vnf);
+ }
+ break;
+ case "vpe":
+ return update( resource, key, params, prefix, ctx) ;
+
+ default:
+ getLogger().debug("Save() executing default path - returning FAILURE");
+ return QueryStatus.FAILURE;
+ }
+ } catch (Exception exc) {
+ getLogger().warn("Failed save - returning FAILURE", exc);
+ ctx.setAttribute(prefix + ".error.message", exc.getMessage());
+ return QueryStatus.FAILURE;
+ }
+ }
+
+ getLogger().debug("Save - returning SUCCESS");
+ return QueryStatus.SUCCESS;
+ }
+
+ @Override
+ public QueryStatus update(String resource, String key, Map<String, String> parms, String prefix, SvcLogicContext ctx) throws SvcLogicException {
+
+ resource = resource.toLowerCase();
+ HashMap<String, String> nameValues = keyToHashMap(key, ctx);
+ getLogger().debug("key = "+ Arrays.toString(nameValues.entrySet().toArray()));
+ getLogger().debug("parms = "+ Arrays.toString(parms.entrySet().toArray()));
+
+ AAIRequest request = AAIRequest.createRequest(resource, nameValues);
+ if(request == null) {
+ if("generic-vnf".equals(resource)) {
+ request = new GenericVnfRequest();
+ }
+ }
+
+ String resourceType = resource;
+ if(request != null) {
+ resourceType = request.getPrimaryResourceName(resource);
+ }
+
+ try {
+ Update update = new Update();
+ update.setUpdateNodeType(resourceType);
+
+ List<UpdateNodeKey> updateNodeKeyList = update.getUpdateNodeKey();
+ if(updateNodeKeyList == null) {
+ updateNodeKeyList = new ArrayList<UpdateNodeKey>();
+ }
+
+ Set<String>keys = nameValues.keySet();
+
+ for(String argument: keys) {
+ if(nameValues.containsKey(argument)){
+ String value = nameValues.get(argument);
+ if(value != null && !value.isEmpty()) {
+ argument = argument.replaceAll("_", "-");
+ value = value.trim().replaceAll("'", "").replace("$", "").replace("'", "");
+ // set node key
+ UpdateNodeKey updateNodeKey = new UpdateNodeKey();
+ if(request != null)
+ updateNodeKey.setKeyName( request.formatKey(argument));
+ else
+ updateNodeKey.setKeyName(argument);
+ updateNodeKey.setKeyValue(value);
+
+ updateNodeKeyList.add(updateNodeKey);
+ }
+ }
+ }
+
+
+ // set actions
+ List<Action> actionList = update.getAction();
+ if(actionList == null) {
+ actionList = new ArrayList<Action>();
+ }
+ Action action = new Action();
+ action.setActionType("replace");
+
+ List<ActionDatum> actionData = action.getActionData();
+ if(actionData == null) {
+ actionData = new ArrayList<ActionDatum>();
+ }
+
+ keys = parms.keySet();
+
+ for(String name : keys) {
+ ActionDatum actionDatum = new ActionDatum();
+ actionDatum.setPropertyName(name);
+ String value = parms.get(name);
+ actionDatum.setPropertyValue(value);
+
+ actionData.add(actionDatum);
+ }
+
+ actionList.add(action);
+
+ this.updateAnAIEntry(update);
+ } catch(AAIServiceException aaiexc) {
+ if(aaiexc.getReturnCode() == 404)
+ return QueryStatus.NOT_FOUND;
+ else
+ return QueryStatus.FAILURE;
+ } catch (Exception exc) {
+ getLogger().warn("Failed update - returning FAILURE", exc);
+ return QueryStatus.FAILURE;
+ }
+
+ getLogger().debug("Update - returning SUCCESS");
+ return QueryStatus.SUCCESS;
+ }
+
+ @Override
+ public QueryStatus delete(String resource, String key, SvcLogicContext ctx) throws SvcLogicException {
+ HashMap<String, String> nameValues = keyToHashMap(key, ctx);
+ getLogger().debug("key = "+ Arrays.toString(nameValues.entrySet().toArray()));
+
+ if(AAIRequest.createRequest(resource, nameValues) != null) {
+ if(resource.contains(":")) {
+ return processDeleteRelationshipList(resource, key, ctx, nameValues);
+ }
+
+
+ try {
+ QueryStatus retval = QueryStatus.SUCCESS;
+
+ retval = newModelQuery(resource, false, null, key, "tmpDelete", null, ctx);
+
+ if(retval == null || retval != QueryStatus.SUCCESS) {
+ return retval;
+ }
+
+ String resourceVersion = ctx.getAttribute("tmpDelete.resource-version");
+ if(resourceVersion == null) {
+ return QueryStatus.NOT_FOUND;
+ }
+
+ try {
+ AAIRequest request = AAIRequest.createRequest(resource, nameValues);
+ if(request == null) {
+ return QueryStatus.FAILURE;
+ }
+
+ request.processRequestPathValues(nameValues);
+
+ if(getExecutor().delete(request, resourceVersion)) {
+ return QueryStatus.SUCCESS;
+ }
+ } catch(AAIServiceException aaiexc) {
+ if(aaiexc.getReturnCode() == 404)
+ return QueryStatus.NOT_FOUND;
+ else
+ return QueryStatus.FAILURE;
+
+ } catch (Exception exc) {
+ getLogger().warn("requestGenericVnfData", exc);
+ return QueryStatus.FAILURE;
+ }
+
+ } catch (Exception exc) {
+ getLogger().warn("Failed delete - returning FAILURE", exc);
+ return QueryStatus.FAILURE;
+ }
+ } else {
+ String resoourceName = resource;
+ String identifier = null;
+
+ if(resoourceName == null)
+ return QueryStatus.FAILURE;
+
+ if(resoourceName.contains(":")) {
+ String[] tokens = resoourceName.split(":");
+ if(tokens != null && tokens.length > 0) {
+ resoourceName = tokens[0];
+ identifier = tokens[1];
+ }
+ }
+ if("relationship-list".equals(identifier) || "relationshipList".equals(identifier)) {
+// RelationshipRequest relationshipRequest = new RelationshipRequest();
+ if("generic-vnf".equals(resoourceName)){
+ String vnfId = nameValues.get("vnf_id");
+ String relatedTo = nameValues.get("related_to");
+ vnfId = vnfId.trim().replace("'", "").replace("$", "").replace("'", "");
+ relatedTo = relatedTo.trim().replace("'", "").replace("$", "").replace("'", "");
+
+ GenericVnf vnf;
+ try {
+ vnf = this.requestGenericVnfData(vnfId);
+ if(vnf == null)
+ return QueryStatus.NOT_FOUND;
+ } catch (AAIServiceException exc) {
+ getLogger().warn("Failed delete - returning NOT_FOUND", exc);
+ return QueryStatus.NOT_FOUND;
+ }
+ boolean itemRemoved = false;
+ RelationshipList relationshipList = vnf.getRelationshipList();
+ List<Relationship> relationships = relationshipList.getRelationship();
+ List<Relationship> iterableList = new LinkedList<Relationship>(relationships);
+ for(Relationship relationship : iterableList) {
+ if(relationship.getRelatedTo().equals(relatedTo)) {
+ relationships.remove(relationship);
+ itemRemoved = true;
+ }
+ }
+
+ if(!itemRemoved)
+ return QueryStatus.NOT_FOUND;
+
+ try {
+ this.postGenericVnfData(vnf.getVnfId(), vnf);
+ } catch (AAIServiceException exc) {
+ if(exc.getReturnCode() == 404){
+ return QueryStatus.NOT_FOUND;
+ } else {
+ getLogger().warn("Failed delete - returning FAILURE", exc);
+ return QueryStatus.FAILURE;
+ }
+ }
+ return QueryStatus.SUCCESS;
+ }
+ }
+ }
+ return QueryStatus.FAILURE;
+ }
+
+ @Override
+ public QueryStatus exists(String resource, String key, String prefix, SvcLogicContext ctx) throws SvcLogicException {
+ return query(resource, false, null, key, prefix, null, ctx);
+ }
+
+ @Override
+ public QueryStatus isAvailable(String arg0, String arg1, String arg2, SvcLogicContext arg3)
+ throws SvcLogicException {
+ // TODO Auto-generated method stub
+ throw new SvcLogicException("Method AAIService.isAvailable() has not been implemented yet");
+ }
+
+ @Override
+ public QueryStatus notify(String resource, String action, String key, SvcLogicContext ctx) throws SvcLogicException {
+ // TODO Auto-generated method stub
+ throw new SvcLogicException("Method AAIService.notify() has not been implemented yet");
+ }
+
+// @Override
+ public QueryStatus newModelQuery(String resource, boolean localOnly, String select, String key, String prefix, String orderBy, SvcLogicContext ctx) {
+
+ Object response = null;
+ QueryStatus retval = QueryStatus.SUCCESS;
+ String modifier = null;
+
+ HashMap<String, String> nameValues = keyToHashMap(key, ctx);
+ if(resource.contains(":")) {
+ modifier = resource.split(":")[1];
+ }
+
+ try {
+ AAIRequest request = AAIRequest.createRequest(resource, nameValues);
+ if(request == null) {
+ return QueryStatus.FAILURE;
+ }
+
+ Map<String, String> params = new HashMap<String, String>();
+ request.processRequestPathValues(nameValues);
+ if(nameValues.containsKey("prefix")){
+ Map<String, String> tmpParams = ctxGetBeginsWith(ctx, nameValues.get("prefix"));
+ if(!tmpParams.isEmpty()) {
+ params.putAll(tmpParams);
+ }
+ if("named-query".equals(resource))
+ request.setRequestObject(extractNamedQueryDataFromQueryPrefix(nameValues, params));
+ }
+ String rv = getExecutor().get(request);
+ if(rv == null) {
+ return QueryStatus.NOT_FOUND;
+ }
+
+ response = request.jsonStringToObject(rv);
+ if(response == null) {
+ return QueryStatus.NOT_FOUND;
+ }
+
+ if("generic-query".equals(resource)) {
+ SearchResults rd = SearchResults.class.cast(response);
+ List<ResultData> rdList = rd.getResultData();
+ if(rdList == null || rdList.isEmpty()) {
+ return QueryStatus.NOT_FOUND;
+ }
+ ResultData rDatum = rdList.get(0);
+ nameValues.put("selflink", rDatum.getResourceLink());
+ AAIRequest req2 = AAIRequest.createRequest(rDatum.getResourceType(), nameValues);
+ req2.processRequestPathValues(nameValues);
+ rv = getExecutor().get(req2);
+ if(rv == null) {
+ return QueryStatus.NOT_FOUND;
+ }
+
+ response = req2.jsonStringToObject(rv);
+ if(response == null) {
+ return QueryStatus.NOT_FOUND;
+ }
+ }
+
+ if("named-query".equals(resource)) {
+ InventoryResponseItems rd = InventoryResponseItems.class.cast(response);
+ List<InventoryResponseItem> iRIlist = rd.getInventoryResponseItem();
+ if(iRIlist == null || iRIlist.isEmpty()) {
+ return QueryStatus.NOT_FOUND;
+ }
+
+ ObjectMapper mapper = getObjectMapper();
+ Map<String, Object> subnetsList = mapper.convertValue(rd, Map.class);
+ writeMap(subnetsList, prefix, ctx);
+ return QueryStatus.SUCCESS;
+// writeList((ArrayList)iRIlist, String.format("%s.%s", prefix, "inventory-response-items"), ctx);
+ }
+
+ if("nodes-query".equals(resource)) {
+ SearchResults rd = SearchResults.class.cast(response);
+ List<ResultData> rdList = rd.getResultData();
+ if(rdList == null || rdList.isEmpty()) {
+ return QueryStatus.NOT_FOUND;
+ }
+ ResultData rDatum = rdList.get(0);
+ response = rDatum;
+// writeList((ArrayList)rdList, prefix, ctx);
+ }
+
+ String preFix = null;
+ if(prefix == null || prefix.isEmpty()) {
+ preFix = "";
+ } else {
+ preFix = prefix + ".";
+ }
+
+ Map<String,Object> props = objectToProperties(response);
+ Set<String> keys = props.keySet();
+ for(String theKey: keys) {
+ if(getLogger().isTraceEnabled())
+ getLogger().trace(theKey);
+
+ Object value = props.get(theKey);
+ if(value == null)
+ continue;
+ Object type = value.getClass();
+ if(value instanceof String) {
+ ctx.setAttribute(preFix + theKey, value.toString());
+ continue;
+ }
+ if(value instanceof Boolean) {
+ ctx.setAttribute(preFix + theKey, value.toString());
+ continue;
+ }
+ if(value instanceof Integer) {
+ ctx.setAttribute(preFix + theKey, value.toString());
+ continue;
+ }
+ if(value instanceof Long) {
+ ctx.setAttribute(preFix + theKey, value.toString());
+ continue;
+ }
+
+ if(value instanceof ArrayList) {
+ ArrayList array = ArrayList.class.cast(value);
+ for(int i = 0; i < array.size(); i++) {
+ ctx.setAttribute(String.format("%s%s[%d]", preFix, theKey, i), array.get(i).toString());
+ }
+ continue;
+ }
+
+ if("relationship-list".equals(theKey)){
+ Map<String, Object> relationshipList = (Map<String, Object>)value;
+ // we are interested in seeing just the selected relationship
+ if(theKey.equals(modifier)) {
+ List<?> relationships = (List<?>)relationshipList.get("relationship");
+ if(relationships != null && !relationships.isEmpty()) {
+
+ List newRelationships = new LinkedList();
+ newRelationships.addAll(relationships);
+
+ for(Object obj : newRelationships){
+ if(obj instanceof Map<?, ?>) {
+ Map<?, ?> relProperties = (Map<?, ?>)obj;
+ if(relProperties.containsKey("related-to")) {
+ Object relPropsRelatedTo = relProperties.get("related-to");
+
+ String relatedTo = nameValues.get("related_to");
+ if(relatedTo != null) {
+ relatedTo = relatedTo.trim().replace("'", "").replace("$", "").replace("'", "");
+ if(!relatedTo.equals(relPropsRelatedTo)) {
+ relationships.remove(relProperties);
+ }
+ continue;
+ } else {
+ continue;
+ }
+ }
+ }
+ }
+ }
+ }
+ writeMap(relationshipList, String.format("%s.%s", prefix, theKey), ctx);
+ continue;
+ }
+
+// if("subnets".equals(theKey)){
+// Map<String, Object> subnetsList = (Map<String, Object>)value;
+// writeMap(subnetsList, String.format("%s.%s", prefix, theKey), ctx);
+// }
+
+ if(value instanceof Map) {
+ Map<String, Object> subnetsList = (Map<String, Object>)value;
+ writeMap(subnetsList, String.format("%s.%s", prefix, theKey), ctx);
+ continue;
+ }
+
+ }
+ } catch(AAIServiceException aaiexc) {
+ int errorCode = aaiexc.getReturnCode();
+ ctx.setAttribute(prefix + ".error.message", aaiexc.getMessage());
+ if(errorCode >= 300) {
+ ctx.setAttribute(prefix + ".error.http.response-code", "" + aaiexc.getReturnCode());
+ }
+
+ if(aaiexc.getReturnCode() == 404)
+ return QueryStatus.NOT_FOUND;
+
+ return QueryStatus.FAILURE;
+ } catch (Exception exc) {
+ getLogger().warn("requestGenericVnfData", exc);
+ ctx.setAttribute(prefix + ".error.message", exc.getMessage());
+ return QueryStatus.FAILURE;
+ }
+
+ return retval;
+ }
+
+
+ public QueryStatus newModelBackupRequest(String resource, Map<String, String> params, String prefix, SvcLogicContext ctx) {
+
+ QueryStatus retval = QueryStatus.SUCCESS;
+ HashMap<String, String> nameValues = new HashMap<String, String>();
+
+ try {
+ AAIRequest request = AAIRequest.createRequest(resource, nameValues);
+ if(request == null) {
+ return QueryStatus.FAILURE;
+ }
+
+ boolean argsFound = false;
+ String[] arguments = request.getArgsList();
+ for(String name : arguments) {
+ String tmpName = name.replaceAll("-", "_");
+ String value = params.get(tmpName);
+ if(value != null && !value.isEmpty()) {
+ value = value.trim().replace("'", "").replace("$", "").replace("'", "");
+ request.addRequestProperty(name, value);
+ argsFound = true;
+ }
+ }
+ if(!argsFound) {
+ getLogger().warn("No arguments were found. Terminating backup request.");
+ return QueryStatus.FAILURE;
+ }
+
+ String rv = getExecutor().get(request);
+ ctx.setAttribute(prefix, rv);
+ } catch(AAIServiceException aaiexc) {
+ if(aaiexc.getReturnCode() == 404)
+ return QueryStatus.NOT_FOUND;
+
+ return QueryStatus.FAILURE;
+ } catch (Exception exc) {
+ getLogger().warn("newModelBackupRequest", exc);
+ return QueryStatus.FAILURE;
+ }
+
+ return retval;
+ }
+
+ public AAIDatum newModelObjectRequest(String resource, Map<String, String> params, String prefix, SvcLogicContext ctx)
+ throws AAIServiceException {
+
+ AAIDatum response = null;
+
+ try {
+ AAIRequest request = AAIRequest.createRequest(resource, params);
+ if(request == null) {
+ return null;
+ }
+ String[] arguments = request.getArgsList();
+ for(String name : arguments) {
+ String tmpName = name.replaceAll("-", "_");
+ String value = params.get(tmpName);
+ if(value != null && !value.isEmpty()) {
+ value = value.trim().replace("'", "").replace("$", "").replace("'", "");
+ request.addRequestProperty(name, value);
+ }
+ }
+ String rv = getExecutor().get(request);
+ response = request.jsonStringToObject(rv);
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ getLogger().warn("newModelBackupRequest", exc);
+ throw new AAIServiceException(exc);
+ }
+
+ return response;
+ }
+
+
+ @Override
+ public QueryStatus release(String arg0, String arg1, SvcLogicContext arg2) throws SvcLogicException {
+ // TODO Auto-generated method stub
+ throw new SvcLogicException("Method AAIService.release() has not been implemented yet");
+ }
+
+ @Override
+ public QueryStatus reserve(String arg0, String arg1, String arg2, String arg3, SvcLogicContext arg4)
+ throws SvcLogicException {
+ // TODO Auto-generated method stub
+ throw new SvcLogicException("Method AAIService.reserve() has not been implemented yet");
+ }
+
+ private QueryStatus newModelSave(String resource, boolean force, String key, Map<String, String> parms, String prefix, SvcLogicContext ctx) {
+ getLogger().debug("Executing newModelSave for resource : " + resource);
+ HashMap<String, String> nameValues = keyToHashMap(key, ctx);
+
+ try {
+ ArrayList<String> subResources = new ArrayList<String>();
+ Set<String> set = parms.keySet();
+ Map<String, Method> setters = new HashMap<String, Method>();
+ Map<String, Method> getters = new HashMap<String, Method>();
+
+ // 1. find class
+ AAIRequest request = AAIRequest.createRequest(resource, nameValues);
+ Class<? extends AAIDatum> resourceClass = request.getModelClass();
+ getLogger().debug(resourceClass.getName());
+ AAIDatum instance = resourceClass.newInstance();
+
+ {
+ Annotation[] annotations = resourceClass.getAnnotations();
+ for(Annotation annotation : annotations) {
+ Class<? extends Annotation> anotationType = annotation.annotationType();
+ String annotationName = anotationType.getName();
+// if("com.fasterxml.jackson.annotation.JsonPropertyOrder".equals(annotationName)){
+
+ // 2. find string property setters and getters for the lists
+ if("javax.xml.bind.annotation.XmlType".equals(annotationName)){
+ XmlType order = (XmlType)annotation;
+ String[] values = order.propOrder();
+ for(String value : values) {
+ String id = camelCaseToDashedString(value);
+ Field field = resourceClass.getDeclaredField(value);
+ Class<?> type = field.getType();
+ Method setter = null;
+ try {
+ setter = resourceClass.getMethod("set"+StringUtils.capitalize(value), type);
+ if(type.getName().startsWith("java.lang")) {
+ try {
+ setter.setAccessible(true);
+ Object arglist[] = new Object[1];
+ arglist[0] = parms.get(id);
+
+ if(arglist[0] != null) {
+ if(!type.getName().equals("java.lang.String")) {
+// getLogger().debug(String.format("Processing %s with parameter %s", types[0].getName(), value));
+ arglist[0] = valueOf(type, parms.get(id));
+ }
+ Object o = setter.invoke(instance, arglist);
+ }
+ set.remove(id);
+
+ } catch (Exception x) {
+ Throwable cause = x.getCause();
+ getLogger().warn("Failed process for " + resourceClass.getName(), x);
+ }
+ } else {
+ setters.put(id, setter);
+ }
+ } catch(Exception exc) {
+
+ }
+
+ Method getter = null;
+ try {
+ getter = resourceClass.getMethod("get"+StringUtils.capitalize(value));
+ if(!type.getName().equals("java.lang.String")) {
+ getters.put(id, getter);
+ }
+ } catch(Exception exc) {
+
+ }
+
+ }
+ subResources.addAll(Arrays.asList(values));
+ }
+ }
+ }
+
+ // remove getters that have matching setter
+ for(String setKey : setters.keySet()) {
+ if(getters.containsKey(setKey)) {
+ getters.remove(setKey);
+ }
+ }
+
+ Set<String> relationshipKeys = new TreeSet<String>();
+ Set<String> vlansKeys = new TreeSet<String>();
+ Set<String> metadataKeys = new TreeSet<String>();
+
+ for(String attribute : set) {
+ String value = parms.get(attribute);
+ if(attribute.startsWith("relationship-list")) {
+ relationshipKeys.add(attribute);
+ } else if(attribute.startsWith("vlans")) {
+ vlansKeys.add(attribute);
+ } else if(attribute.startsWith("metadata")) {
+ metadataKeys.add(attribute);
+ }
+ }
+ // 3. find list property getters
+ for(String attribute : set) {
+ String value = parms.get(attribute);
+ Method method = getters.get(attribute);
+ if(method != null) {
+ try {
+ method.setAccessible(true);
+ Object arglist[] = new Object[0];
+// arglist[0] = value;
+ Class<?>[] types = method.getParameterTypes();
+ if(types.length == 0){
+ Object o = method.invoke(instance, arglist);
+ if(o instanceof ArrayList) {
+ ArrayList<String> values = (ArrayList<String>)o;
+// getLogger().debug(String.format("Processing %s with parameter %s", types[0].getName(), value));
+ value = value.replace("[", "").replace("]", "");
+ List<String> items = Arrays.asList(value.split("\\s*,\\s*"));
+ for(String s : items) {
+ values.add(s.trim());
+ }
+ }
+ }
+ } catch (Exception x) {
+ Throwable cause = x.getCause();
+ getLogger().warn("Failed process for " + resourceClass.getName(), x);
+ }
+ }
+ }
+ // 4. Process Relationships
+ // add relationship list
+ if( (subResources.contains("relationship-list") || subResources.contains("relationshipList")) && !relationshipKeys.isEmpty()) {
+ RelationshipList relationshipList = null;
+ Object obj = null;
+ Method getRelationshipListMethod = resourceClass.getMethod("getRelationshipList");
+ if(getRelationshipListMethod != null){
+ try {
+ getRelationshipListMethod.setAccessible(true);
+ obj = getRelationshipListMethod.invoke(instance);
+ } catch (InvocationTargetException x) {
+ Throwable cause = x.getCause();
+ }
+ }
+ if(obj != null && obj instanceof RelationshipList){
+ relationshipList = (RelationshipList)obj;
+ } else {
+ relationshipList = new RelationshipList();
+ Method setRelationshipListMethod = resourceClass.getMethod("setRelationshipList", RelationshipList.class);
+ if(setRelationshipListMethod != null){
+ try {
+ setRelationshipListMethod.setAccessible(true);
+ Object arglist[] = new Object[1];
+ arglist[0] = relationshipList;
+
+ obj = setRelationshipListMethod.invoke(instance, arglist);
+ } catch (InvocationTargetException x) {
+ Throwable cause = x.getCause();
+ }
+ }
+ }
+
+ List<Relationship> relationships = relationshipList.getRelationship();
+
+ int i = 0;
+ while(true){
+ int j = 0;
+ String searchKey = "relationship-list.relationship[" + i + "].related-to";
+ if(!parms.containsKey(searchKey))
+ break;
+ Relationship relationship = new Relationship();
+ relationships.add(relationship);
+
+ String relatedTo = parms.get(searchKey);
+ relationship.setRelatedTo(relatedTo);
+
+ List<RelationshipData> relData = relationship.getRelationshipData();
+// if(relData == null) {
+// relData = new LinkedList<RelationshipData>();
+// relationship.setRelationshipData(relData);
+// }
+
+ while(true) {
+ String searchRelationshipKey = "relationship-list.relationship[" + i + "].relationship-data[" + j + "].relationship-key";
+ String searchRelationshipValue = "relationship-list.relationship[" + i + "].relationship-data[" + j + "].relationship-value";
+ if(!parms.containsKey(searchRelationshipKey))
+ break;
+
+ RelationshipData relDatum = new RelationshipData();
+ relDatum.setRelationshipKey(parms.get(searchRelationshipKey));
+ relDatum.setRelationshipValue(parms.get(searchRelationshipValue));
+ relData.add(relDatum);
+ j++;
+ }
+
+ i++;
+ }
+ }
+
+ // 4. vlans
+ if(subResources.contains("vlans") && !vlansKeys.isEmpty()) {
+ Object obj = null;
+ Vlans vlanList = null;
+ Method getVLansMethod = resourceClass.getMethod("getVlans");
+ if(getVLansMethod != null){
+ try {
+ getVLansMethod.setAccessible(true);
+ obj = getVLansMethod.invoke(instance);
+ } catch (InvocationTargetException x) {
+ Throwable cause = x.getCause();
+ }
+ }
+ if(obj != null && obj instanceof Vlans){
+ vlanList = (Vlans)obj;
+ } else {
+ vlanList = new Vlans();
+ Method setVlansMethod = resourceClass.getMethod("setVlans", Vlans.class);
+ if(setVlansMethod != null){
+ try {
+ setVlansMethod.setAccessible(true);
+ Object arglist[] = new Object[1];
+ arglist[0] = vlanList;
+
+ obj = setVlansMethod.invoke(instance, arglist);
+ } catch (InvocationTargetException x) {
+ Throwable cause = x.getCause();
+ }
+ }
+ }
+
+ int i = 0;
+ while(true){
+ String searchKey = "vlans.vlan[" + i + "].vlan-interface";
+ if(!parms.containsKey(searchKey))
+ break;
+
+ String vlanInterface = parms.get("vlans.vlan[" + i + "].vlan-interface");
+ String vlanIdInner = parms.get("vlans.vlan[" + i + "].vlan-id-inner");
+ String vlanIdOute = parms.get("vlans.vlan[" + i + "].vlan-id-outer");
+ String speedValue = parms.get("vlans.vlan[" + i + "].speed-value");
+ String speedUnits = parms.get("vlans.vlan[" + i + "].speed-units");
+
+ Vlan vlan = new Vlan();
+ vlan.setVlanInterface(vlanInterface);
+
+ if(vlanIdInner != null) {
+ Long iVlanIdInner = Long.parseLong(vlanIdInner);
+ vlan.setVlanIdInner(iVlanIdInner);
+ }
+
+ if(vlanIdOute != null) {
+ Long iVlanIdOuter = Long.parseLong(vlanIdOute);
+ vlan.setVlanIdOuter(iVlanIdOuter);
+ }
+
+ if(speedValue != null) {
+ vlan.setSpeedValue(speedValue);
+ vlan.setSpeedUnits(speedUnits);
+ }
+
+ vlanList.getVlan().add(vlan);
+ i++;
+ }
+ }
+
+ // 5. metadata
+ if(subResources.contains("metadata") && !metadataKeys.isEmpty()) {
+ Object obj = null;
+ Metadata metadataList = null;
+ Method getMetadataMethod = resourceClass.getMethod("getMetadata");
+ if(getMetadataMethod != null){
+ try {
+ getMetadataMethod.setAccessible(true);
+ obj = getMetadataMethod.invoke(instance);
+ } catch (InvocationTargetException x) {
+ Throwable cause = x.getCause();
+ }
+ }
+ if(obj != null && obj instanceof Metadata){
+ metadataList = (Metadata)obj;
+ } else {
+ metadataList = new Metadata();
+ Method setMetadataMethod = resourceClass.getMethod("setMetadata", Metadata.class);
+ if(setMetadataMethod != null){
+ try {
+ setMetadataMethod.setAccessible(true);
+ Object arglist[] = new Object[1];
+ arglist[0] = metadataList;
+
+ obj = setMetadataMethod.invoke(instance, arglist);
+ } catch (InvocationTargetException x) {
+ Throwable cause = x.getCause();
+ }
+ }
+ }
+
+ if(metadataList.getMetadatum() == null) {
+// metadataList.setMetadatum(new ArrayList<Metadatum>());
+ }
+
+ // process data
+ int i = 0;
+ while(true){
+ String metaKey = "metadata.metadatum[" + i + "].meta-key";
+ if(!parms.containsKey(metaKey))
+ break;
+
+ String metaValue = parms.get("metadata.metadatum[" + i + "].meta-value");
+
+ Metadatum vlan = new Metadatum();
+ vlan.setMetaname(metaKey);
+ vlan.setMetaval(metaValue);
+
+ metadataList.getMetadatum().add(vlan);
+ i++;
+ }
+
+ }
+
+
+ // 6. Prepare AAI request
+// HashMap<String, String> nameValues = keyToHashMap(key, ctx);
+ Set<String> keys = nameValues.keySet();
+ for(String haslo : keys) { getLogger().debug("Key = " + haslo + "\tValue = ->" + nameValues.get(haslo) + "<-"); }
+ String[] args = request.getArgsList();
+ for(String arg : args) {
+ String modifiedKey = arg.replaceAll("-", "_");
+ if(nameValues.containsKey(modifiedKey)) {
+ String argValue = nameValues.get(modifiedKey);
+ if(argValue != null) argValue = argValue.trim().replace("'", "").replace("$", "").replace("'", "");
+ request.addRequestProperty(arg, argValue);
+ }
+ }
+ request.setRequestObject(instance);
+ getExecutor().post(request);
+
+ } catch(AAIServiceException exc){
+ ctx.setAttribute(prefix + ".error.message", exc.getMessage());
+ int returnCode = exc.getReturnCode();
+ if(returnCode >= 300) {
+ ctx.setAttribute(prefix + ".error.http.response-code", "" + exc.getReturnCode());
+ }
+
+ if(returnCode == 400 || returnCode == 412)
+ return QueryStatus.FAILURE;
+ else if(returnCode == 404)
+ return QueryStatus.NOT_FOUND;
+ else {
+ getLogger().warn("Failed newModelSave - returning FAILURE", exc);
+ return QueryStatus.FAILURE;
+ }
+ } catch(Exception exc){
+ getLogger().warn("Failed newModelSave - returning FAILURE", exc);
+ ctx.setAttribute(prefix + ".error.message", exc.getMessage());
+ return QueryStatus.FAILURE;
+ }
+
+ getLogger().debug("newModelSave - returning SUCCESS");
+ return QueryStatus.SUCCESS;
+ }
+
+ private static final String regex = "([A-Z][a-z,0-9]+)";
+ private static final String replacement = "-$1";
+
+ private String camelCaseToDashedString(String propOrder) {
+ return propOrder.replaceAll(regex, replacement).toLowerCase();
+ }
+
+ private QueryStatus newModelProcessRelationshipList(Object instance, Map<String, String> params, String prefix, SvcLogicContext ctx) throws Exception {
+
+ Class resourceClass = instance.getClass();
+
+ Set<String> relationshipKeys = new TreeSet<String>();
+
+ Set<String> set = params.keySet();
+
+ for(String attribute : set) {
+ String value = params.get(attribute);
+
+ if(attribute.startsWith("relationship-list")) {
+ relationshipKeys.add(attribute);
+ }
+ }
+
+ // 3. Process Relationships
+ // add relationship list
+ if(!relationshipKeys.isEmpty()) {
+ RelationshipList relationshipList = null;
+ Object obj = null;
+ Method getRelationshipListMethod = resourceClass.getMethod("getRelationshipList");
+ if(getRelationshipListMethod != null){
+ try {
+ getRelationshipListMethod.setAccessible(true);
+ obj = getRelationshipListMethod.invoke(instance);
+ } catch (InvocationTargetException x) {
+ Throwable cause = x.getCause();
+ }
+ }
+ if(obj != null && obj instanceof RelationshipList){
+ relationshipList = (RelationshipList)obj;
+ } else {
+ relationshipList = new RelationshipList();
+ Method setRelationshipListMethod = resourceClass.getMethod("setRelationshipList", RelationshipList.class);
+ if(setRelationshipListMethod != null){
+ try {
+ setRelationshipListMethod.setAccessible(true);
+ Object arglist[] = new Object[1];
+ arglist[0] = relationshipList;
+
+ obj = setRelationshipListMethod.invoke(instance, arglist);
+ } catch (InvocationTargetException x) {
+ Throwable cause = x.getCause();
+ }
+ }
+ }
+
+ boolean createdNewRelationships = false;
+ List<Relationship> relationships = relationshipList.getRelationship();
+ if(relationships == null) {
+ relationships = new ArrayList<Relationship>();
+ createdNewRelationships = true;
+ }
+
+ int i = 0;
+ int j = 0;
+ while(true){
+ String searchKey = "relationship-list.relationship[" + i + "].related-to";
+ if(!params.containsKey(searchKey))
+ break;
+
+ j = 0;
+ String relatedTo = params.get(searchKey);
+
+ Relationship relationship = null; //findRelationship(relationships, relatedTo);
+ if(relationship == null) {
+ relationship = new Relationship();
+ relationships.add(relationship);
+ relationship.setRelatedTo(relatedTo);
+ }
+
+
+ List<RelationshipData> relData = relationship.getRelationshipData();
+// if(relData == null) {
+// relData = new LinkedList<RelationshipDatum>();
+// relationship.setRelationshipData(relData);
+// }
+
+ while(true) {
+ String searchRelationshipKey = "relationship-list.relationship[" + i + "].relationship-data[" + j + "].relationship-key";
+ String searchRelationshipValue = "relationship-list.relationship[" + i + "].relationship-data[" + j + "].relationship-value";
+ if(!params.containsKey(searchRelationshipKey))
+ break;
+
+ RelationshipData relDatum = new RelationshipData();
+ relDatum.setRelationshipKey(params.get(searchRelationshipKey));
+ relDatum.setRelationshipValue(params.get(searchRelationshipValue));
+ relData.add(relDatum);
+ j++;
+ }
+
+ i++;
+ }
+ }
+
+ return QueryStatus.SUCCESS;
+ }
+
+ private Relationship findRelationship(List<Relationship> relationships, String relatedTo) {
+ if(relatedTo == null)
+ return null;
+
+ for(Relationship relationship : relationships) {
+ if(relationship.getRelatedTo().equals(relatedTo)){
+ return relationship;
+ }
+ }
+ return null;
+ }
+
+ protected HashMap<String,String> keyToHashMap(String key, SvcLogicContext ctx) {
+ if (key == null) {
+ return (null);
+ }
+
+ getLogger().debug("Converting key [" + key + "] to where clause");
+
+ if (key.startsWith("'") && key.endsWith("'")) {
+ key = key.substring(1, key.length() - 1);
+
+ getLogger().debug("Stripped outer single quotes - key is now [" + key + "]");
+ }
+
+ String[] keyTerms = key.split("\\s+");
+
+ StringBuffer whereBuff = new StringBuffer();
+ String term1 = null;
+ String op = null;
+ String term2 = null;
+ HashMap<String, String> results = new HashMap<String, String>();
+
+ for (int i = 0; i < keyTerms.length; i++) {
+ if (term1 == null) {
+ if ("and".equalsIgnoreCase(keyTerms[i])
+ || "or".equalsIgnoreCase(keyTerms[i])) {
+ // Skip over ADD/OR
+ } else {
+ term1 = resolveTerm(keyTerms[i], ctx);
+ }
+ } else if (op == null) {
+ if ("==".equals(keyTerms[i])) {
+ op = "=";
+ } else {
+ op = keyTerms[i];
+ }
+ } else {
+ term2 = resolveTerm(keyTerms[i], ctx);
+ term2 = term2.trim().replace("'", "").replace("$", "").replace("'", "");
+ results.put(term1, term2);
+
+ term1 = null;
+ op = null;
+ term2 = null;
+ }
+ }
+
+ return (results);
+ }
+
+ private String resolveTerm(String term, SvcLogicContext ctx) {
+ if (term == null) {
+ return (null);
+ }
+
+ getLogger().debug("resolveTerm: term is " + term);
+
+ if (term.startsWith("$") && (ctx != null)) {
+ // Resolve any index variables.
+
+ return ("'" + resolveCtxVariable(term.substring(1), ctx) + "'");
+ } else if (term.startsWith("'") || term.startsWith("\"")) {
+ return (term);
+ } else {
+ return (term.replaceAll("-", "_"));
+
+ }
+
+ }
+
+ private String resolveCtxVariable(String ctxVarName, SvcLogicContext ctx) {
+
+ if (ctxVarName.indexOf('[') == -1) {
+ // Ctx variable contains no arrays
+ return (ctx.getAttribute(ctxVarName));
+ }
+
+ // Resolve any array references
+ StringBuffer sbuff = new StringBuffer();
+ String[] ctxVarParts = ctxVarName.split("\\[");
+ sbuff.append(ctxVarParts[0]);
+ for (int i = 1; i < ctxVarParts.length; i++) {
+ if (ctxVarParts[i].startsWith("$")) {
+ int endBracketLoc = ctxVarParts[i].indexOf("]");
+ if (endBracketLoc == -1) {
+ // Missing end bracket ... give up parsing
+ getLogger().warn("Variable reference " + ctxVarName
+ + " seems to be missing a ']'");
+ return (ctx.getAttribute(ctxVarName));
+ }
+
+ String idxVarName = ctxVarParts[i].substring(1, endBracketLoc);
+ String remainder = ctxVarParts[i].substring(endBracketLoc);
+
+ sbuff.append("[");
+ sbuff.append(ctx.getAttribute(idxVarName));
+ sbuff.append(remainder);
+
+ } else {
+ // Index is not a variable reference
+ sbuff.append("[");
+ sbuff.append(ctxVarParts[i]);
+ }
+ }
+
+ return (ctx.getAttribute(sbuff.toString()));
+ }
+
+
+ public QueryStatus backup(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException {
+ String resource = params.get("resource").toLowerCase();
+ String prefix = params.get("data-key");
+
+ HashMap<String, String> nameValues = new HashMap<String, String>();
+ if(AAIRequest.createRequest(resource, nameValues) != null) {
+
+ try {
+ return newModelBackupRequest(resource, params, prefix, ctx);
+ } catch (Exception exc) {
+ getLogger().warn("Failed backup - returning FAILURE", exc);
+ return QueryStatus.FAILURE;
+ }
+ }
+
+ return QueryStatus.NOT_FOUND;
+ }
+
+ @Override
+ public QueryStatus restore(Map<String, String> params, SvcLogicContext ctx) throws SvcLogicException {
+
+ QueryStatus retval = QueryStatus.SUCCESS;
+ String resource = params.get("resource").toLowerCase();
+ String prefix = params.get("data-key");
+
+ HashMap<String, String> nameValues = new HashMap<String, String>();
+ if(AAIRequest.createRequest(resource, nameValues) != null) {
+
+ try {
+ retval = newModelBackupRequest(resource, params, "tmpRestore", ctx);
+ if(retval == QueryStatus.SUCCESS) {
+ String current_json = ctx.getAttribute("tmpRestore");
+ ctx. setAttribute("tmpRestore", null);
+
+ String snapshot_json = ctx.getAttribute(prefix);
+ }
+ } catch (Exception exc) {
+ getLogger().warn("Failed restore - returning FAILURE", exc);
+ return QueryStatus.FAILURE;
+ }
+ }
+
+ return QueryStatus.NOT_FOUND;
+ }
+
+ private Map<String, Object> objectToProperties(Object object) {
+ ObjectMapper mapper = getObjectMapper();
+ return mapper.convertValue(object, Map.class);
+ }
+
+ static <T> T valueOf(Class<T> klazz, String arg) {
+ Exception cause = null;
+ T ret = null;
+ try {
+ ret = klazz.cast(
+ klazz.getDeclaredMethod("valueOf", String.class)
+ .invoke(null, arg)
+ );
+ } catch (NoSuchMethodException e) {
+ cause = e;
+ } catch (IllegalAccessException e) {
+ cause = e;
+ } catch (InvocationTargetException e) {
+ cause = e;
+ }
+ if (cause == null) {
+ return ret;
+ } else {
+ throw new IllegalArgumentException(cause);
+ }
+ }
+
+ private QueryStatus processDeleteRelationshipList(String resource, String key, SvcLogicContext ctx, HashMap<String, String> nameValues) {
+ try {
+ AAIRequest request = AAIRequest.createRequest(resource, nameValues);
+ if(request == null) {
+ return QueryStatus.FAILURE;
+ }
+
+ request.processRequestPathValues(nameValues);
+ URL url = request.getRequestUrl("GET", null);
+
+ Class resourceClass = request.getModelClass();
+ Object instance = getResource(url.toString(), resourceClass);
+
+ // get resource version
+ String resourceVersion = null;
+ Method getResourceVersionMethod = resourceClass.getMethod("getResourceVersion");
+ if(getResourceVersionMethod != null){
+ try {
+ getResourceVersionMethod.setAccessible(true);
+ Object object = getResourceVersionMethod.invoke(instance);
+ if(object != null)
+ resourceVersion = object.toString();
+ } catch (InvocationTargetException x) {
+ Throwable cause = x.getCause();
+ }
+ }
+
+ RelationshipList relationshipList = null;
+ Object obj = null;
+ Method getRelationshipListMethod = resourceClass.getMethod("getRelationshipList");
+ if(getRelationshipListMethod != null){
+ try {
+ getRelationshipListMethod.setAccessible(true);
+ obj = getRelationshipListMethod.invoke(instance);
+ } catch (InvocationTargetException x) {
+ Throwable cause = x.getCause();
+ }
+ }
+ if(obj != null && obj instanceof RelationshipList){
+ relationshipList = (RelationshipList)obj;
+ } else {
+ getLogger().debug("No relationships found to process.");
+ return QueryStatus.NOT_FOUND;
+ }
+
+ if(relationshipList.getRelationship() == null || relationshipList.getRelationship().isEmpty()) {
+ return QueryStatus.NOT_FOUND;
+ }
+ String relatedTo = nameValues.get("related_to");
+ if(relatedTo == null) {
+ return QueryStatus.FAILURE;
+ }
+
+ relatedTo = relatedTo.replaceAll("_", "-");
+
+ List<Relationship> relationships = relationshipList.getRelationship();
+ List<Relationship> relationshipsToDelete = new LinkedList<Relationship>();
+
+ for(Relationship relationship : relationships) {
+ getLogger().debug(String.format("Comparing existing relationship of '%s' to keyword '%s'", relationship.getRelatedTo(), relatedTo));
+ if(relatedTo.equals(relationship.getRelatedTo())) {
+ getLogger().debug("Found relationship");
+// targetRelationship = relationship;
+ relationshipsToDelete.add(relationship);
+ }
+ }
+ if(relationshipsToDelete == null || relationshipsToDelete.isEmpty()) {
+ getLogger().info(String.format("Relationship has not been found for %s", key));
+ return QueryStatus.NOT_FOUND;
+ }
+
+ String path = url.toString();
+ path = path + "/relationship-list/relationship";
+ URL deleteUrl = new URL(path);
+
+ ObjectMapper mapper = getObjectMapper();
+
+ boolean cumulativeResponse = true;
+
+ for(Relationship targetRelationship : relationshipsToDelete) {
+ String json_text = mapper.writeValueAsString(targetRelationship);
+ boolean response = deleteRelationshipList(deleteUrl, json_text);
+ if(!response)
+ cumulativeResponse = response;
+
+ }
+
+ if(!cumulativeResponse)
+ return QueryStatus.FAILURE;
+
+ return QueryStatus.SUCCESS;
+
+ } catch(Exception exc) {
+ getLogger().warn("processDelete", exc);
+ return QueryStatus.FAILURE;
+ }
+ }
+
+ public static final Map<String, String> ctxGetBeginsWith( SvcLogicContext ctx, String prefix ) {
+ Map<String, String> tmpPrefixMap = new HashMap<String, String>();
+
+ if(prefix == null || prefix.isEmpty()){
+ return tmpPrefixMap;
+ }
+
+ for( String key : ctx.getAttributeKeySet() ) {
+ if( key.startsWith(prefix) ) {
+ String tmpKey = key.substring(prefix.length() + 1);
+ tmpPrefixMap.put( tmpKey, ctx.getAttribute(key));
+ }
+ }
+
+ Map<String, String> prefixMap = new HashMap<String, String>();
+ Pattern p = Pattern.compile(".*\\[\\d\\]");
+
+ SortedSet<String> keys = new TreeSet(tmpPrefixMap.keySet () );
+ for(String key : keys) {
+ Matcher m = p.matcher(key);
+ if(m.matches()) {
+ continue;
+ } else if(key.endsWith("_length")) {
+ String listKey = key.substring(0, key.indexOf("_length"));
+ int max = Integer.parseInt(tmpPrefixMap.get(key));
+
+ ArrayList<String> data = new ArrayList<String>();
+ for(int x = 0; x < max; x++){
+ String tmpKey = String.format("%s[%d]", listKey, x);
+ String tmpValue = tmpPrefixMap.get(tmpKey);
+ if(tmpValue != null && !tmpValue.isEmpty()) {
+ data.add(tmpValue);
+ }
+ }
+ if(!data.isEmpty()) {
+ prefixMap.put(listKey, data.toString());
+ } else {
+ prefixMap.put(key, tmpPrefixMap.get(key));
+ }
+ } else {
+ prefixMap.put(key, tmpPrefixMap.get(key));
+ }
+ }
+
+ return prefixMap;
+ }
+
+ /**
+ */
+ private NamedQueryData extractNamedQueryDataFromQueryPrefix(HashMap<String, String> nameValues, Map<String, String> parms) {
+ if(parms.isEmpty()) {
+ return null;
+ }
+
+ NamedQueryData data = new NamedQueryData();
+
+ // query parameters
+ if(data.getQueryParameters() == null) {
+ data.setQueryParameters(new QueryParameters());
+ }
+ String namedQueryUuid = nameValues.get("named-query-uuid".replaceAll("-", "_"));
+ if(namedQueryUuid == null) {
+ namedQueryUuid = parms.get("query-parameters.named-query.named-query-uuid");
+ }
+ NamedQuery namedQuery = new NamedQuery();
+ namedQuery.setNamedQueryUuid(namedQueryUuid);
+ data.getQueryParameters().setNamedQuery(namedQuery);
+
+ // instance filters
+ if(data.getInstanceFilters() == null) {
+ data.setInstanceFilters(new InstanceFilters());
+ }
+
+
+ String quantity = parms.get("instance-filters.instance-filter_length");
+ if(quantity != null && StringUtils.isNumeric(quantity)) {
+ int max = Integer.parseInt(quantity);
+ for(int i = 0; i < max; i++) {
+ String keyPattern = String.format("instance-filters.instance-filter[%d].", i);
+ Set<String> keys = parms.keySet();
+ for(String key: keys) {
+ if(key.startsWith(keyPattern)){
+ String value = parms.get(key);
+ String remainder = key.substring(keyPattern.length());
+ String[] split = remainder.split("\\.");
+ getLogger().debug(String.format("%s", remainder));
+ if("logical-link".equals(split[0])) {
+ InstanceFilter insf = null;
+ if(data.getInstanceFilters().getInstanceFilter().isEmpty()) {
+ insf = new InstanceFilter();
+ data.getInstanceFilters().getInstanceFilter().add(insf);
+ } else {
+ insf = data.getInstanceFilters().getInstanceFilter().get(0);
+ }
+ LogicalLink logicalLink = insf.getLogicalLink();
+ if(logicalLink == null) {
+ logicalLink = new LogicalLink();
+ insf.setLogicalLink(logicalLink);
+ }
+
+ switch(split[1]) {
+ case "link-name":
+ logicalLink.setLinkName(value);
+ break;
+ case "link-type":
+ logicalLink.setLinkType(value);
+ break;
+ case "operational-state":
+ logicalLink.setOperationalStatus(value);
+ break;
+ }
+
+ } else if("pnf".equals(split[0])) {
+ Pnf pnf = new Pnf();
+ pnf.setPnfName(value);
+
+ InstanceFilter insf = new InstanceFilter();
+ insf.setPnf(pnf);
+ data.getInstanceFilters().getInstanceFilter().add(insf);
+ }
+ }
+ }
+ }
+ }
+
+ return data;
+ }
+
+ public abstract <T> T getResource(String key, Class<T> type) throws AAIServiceException ;
+ protected abstract boolean deleteRelationshipList(URL url, String caller) throws AAIServiceException;
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIExecutorInterface.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIExecutorInterface.java
new file mode 100644
index 0000000..e549a50
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIExecutorInterface.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+public interface AAIExecutorInterface {
+ Object get(AAIRequest request) throws AAIServiceException;
+ Object post(AAIRequest request) throws AAIServiceException;
+ Boolean delete(AAIRequest request, String resourceVersion) throws AAIServiceException;
+ Object query(AAIRequest request, Class clas) throws AAIServiceException;
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIRequest.java
new file mode 100644
index 0000000..dc4b8fc
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIRequest.java
@@ -0,0 +1,260 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.IOException;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonParseException;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.AnnotationIntrospector;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.JsonMappingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.type.TypeFactory;
+import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector;
+
+public abstract class AAIRequest {
+ protected static final Logger LOG = LoggerFactory.getLogger(AAIRequest.class);
+
+ protected static final String TARGET_URI = "org.openecomp.sdnc.sli.aai.uri";
+
+ protected static final String MASTER_REQUEST = "master-request";
+
+ public static final String RESOURCE_VERSION = "resource-version";
+
+ protected static Properties configProperties;
+ protected final String target_uri;
+ protected static AAIService aaiService;
+
+ protected AAIDatum requestDatum;
+
+ protected final Properties requestProperties = new Properties();
+
+
+ public static AAIRequest createRequest(String resoourceName, Map<String, String> nameValues){
+
+ String resoource = resoourceName;
+
+ if(resoource == null)
+ return null;
+
+ if(resoource.contains(":")) {
+ String[] tokens = resoource.split(":");
+ if(tokens != null && tokens.length > 0) {
+ resoource = tokens[0];
+ }
+ }
+
+ if(nameValues.containsKey("selflink")){
+ AAIRequest localRequest = createRequest(resoource, new HashMap<String, String>());
+ if(localRequest != null)
+ return new SelfLinkRequest(localRequest.getModelClass());
+ else
+ return null;
+ }
+
+ switch(resoource){
+ case "cloud-region":
+ return new CloudRegionRequest();
+ case "customer":
+ return new CustomerRequest();
+ case "generic-query":
+ return new GenericQueryRequest();
+ case "generic-vnf":
+ return new GenericVnfRequest();
+ case "logical-link":
+ return new LogicalLinkRequest();
+ case "l-interface":
+ if(nameValues.containsKey("generic_vnf.vnf_id") || nameValues.containsKey("vnf_id")) {
+ return new GenericVnfLInterfaceRequest();
+ }
+ case "linterface":
+ return new LInterfaceRequest(LInterfaceRequest.TYPE.L2_BRIDGE_SBG);
+ case "l2-bridge-sbg":
+ return new SubInterfaceRequest(SubInterfaceRequest.TYPE.L2_BRIDGE_SBG);
+ case "l2-bridge-bgf":
+ return new SubInterfaceRequest(SubInterfaceRequest.TYPE.L2_BRIDGE_BGF);
+ case "l3-interface-ipv4-address-list":
+ return new L3InterfaceIpv4AddressListRequest();
+ case "l3-interface-ipv6-address-list":
+ return new L3InterfaceIpv6AddressListRequest();
+ case "l3-network":
+ return new L3NetworkRequest();
+ case "l3-network-subnet":
+ case "subnet":
+ return new SubnetRequest();
+ case "lag-interface":
+ return new LagInterfacePnfRequest();
+ case "named-query":
+ return new NamedQueryRequest();
+ case "nodes-query":
+ return new NodesQueryRequest();
+ case "p-interface":
+ if(nameValues.containsKey(PInterfaceRequest.HOSTNAME) || nameValues.containsKey(PInterfaceRequest.PSERVER_HOSTNAME)){
+ return new PInterfaceRequest();
+ }
+ if(nameValues.containsKey(PnfRequest.PNF_NAME.replaceAll("-", "_")) || nameValues.containsKey(PnfRequest.PNF_PNF_NAME.replaceAll("-", "_"))){
+ return new PInterfacePnfRequest();
+ }
+ return null;
+ case "physical-link":
+ return new PhysicalLinkRequest();
+ case "pnf":
+ return new PnfRequest();
+ case "pserver":
+ return new PServerRequest();
+ case "service":
+ return new ServiceRequest();
+ case "service-instance":
+ return new ServiceInstanceRequest();
+ case "service-subscription":
+ return new ServiceSubscriptionRequest();
+ case "tenant":
+ return new TenantRequest();
+ case "vnfc":
+ return new VnfcRequest();
+ case "vserver":
+ case "vserver2":
+ return new VserverRequest();
+ case "vf-module":
+ return new VfModuleRequest();
+ case "vlan":
+ if(nameValues.containsKey(GenVnfrVLanRequest.VNF_ID))
+ return new GenVnfrVLanRequest();
+ else if(nameValues.containsKey(VServerVLanRequest.VSERVER_ID))
+ return new VServerVLanRequest();
+ else {
+ LOG.warn("VLAN request is not supported based on the key structure " + nameValues.keySet().toString());
+ return new VLanRequest();
+ }
+ case "volume-group":
+ return new VolumeGroupRequest();
+ case "echo":
+ case "test":
+ return new EchoRequest();
+ default:
+ return null;
+ }
+ }
+
+ public static void setProperties(Properties props, AAIService aaiService) {
+ AAIRequest.configProperties = props;
+ AAIRequest.aaiService = aaiService;
+ }
+
+ public AAIRequest() {
+ target_uri = configProperties.getProperty(TARGET_URI);
+ }
+
+ public final void addRequestProperty(String key, String value) {
+ requestProperties.put(key, value);
+ }
+
+ public final void setRequestObject(AAIDatum value) {
+ requestDatum = value;
+ }
+
+ public final AAIDatum getRequestObject() {
+ return requestDatum;
+ }
+
+ public final void addMasterRequest(AAIRequest masterRequest) {
+ requestProperties.put(MASTER_REQUEST, masterRequest);
+ }
+
+ protected static String encodeQuery(String param) throws UnsupportedEncodingException {
+ return URLEncoder.encode(param, "UTF-8").replace("+", "%20");
+ }
+
+ protected void handleException(AAIRequest lInterfaceRequest, JsonProcessingException exc) {
+ aaiService.getLogger().warn("Could not deserialize object of type " + lInterfaceRequest.getClass().getSimpleName(), exc) ;
+ }
+
+ public abstract URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException;
+ public abstract URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException;
+
+ public abstract String toJSONString();
+
+ public abstract String[] getArgsList();
+
+ public abstract Class<? extends AAIDatum> getModelClass() ;
+
+ public String getPrimaryResourceName(String resource) {
+ return resource;
+ }
+
+ public String formatKey(String argument) {
+ return argument;
+ }
+
+ public AAIDatum jsonStringToObject(String jsonData) throws JsonParseException, JsonMappingException, IOException {
+ if(jsonData == null) {
+ return null;
+ }
+
+ AAIDatum response = null;
+ ObjectMapper mapper = getObjectMapper();
+ response = mapper.readValue(jsonData, getModelClass());
+ return response;
+ }
+
+ public void processRequestPathValues(Map<String, String> nameValues) {
+
+ String[] arguments = this.getArgsList();
+ for(String name : arguments) {
+ String tmpName = name.replaceAll("-", "_");
+ String value = nameValues.get(tmpName);
+ if(value != null && !value.isEmpty()) {
+ value = value.trim().replace("'", "").replace("$", "").replace("'", "");
+ this.addRequestProperty(name, value);
+ }
+ }
+ }
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+ return request_url;
+ }
+
+ public boolean isDeleteDataRequired() {
+ return false;
+ }
+
+ ObjectMapper getObjectMapper() {
+ ObjectMapper mapper = new ObjectMapper();
+ AnnotationIntrospector introspector = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance());
+ // if ONLY using JAXB annotations:
+ mapper.setAnnotationIntrospector(introspector);
+ mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+ return mapper;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIService.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIService.java
new file mode 100644
index 0000000..5b9ec75
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIService.java
@@ -0,0 +1,3301 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+
+import java.io.BufferedReader;
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.TimeZone;
+import java.util.UUID;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLSession;
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.core.UriBuilder;
+
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.aai.inventory.v8.AvailabilityZone;
+import org.openecomp.aai.inventory.v8.GenericVnf;
+import org.openecomp.aai.inventory.v8.L3Network;
+import org.openecomp.aai.inventory.v8.PInterface;
+import org.openecomp.aai.inventory.v8.PhysicalLink;
+import org.openecomp.aai.inventory.v8.Pserver;
+import org.openecomp.aai.inventory.v8.ResultData;
+import org.openecomp.aai.inventory.v8.SearchResults;
+import org.openecomp.aai.inventory.v8.Service;
+import org.openecomp.aai.inventory.v8.ServiceInstance;
+import org.openecomp.aai.inventory.v8.Tenant;
+import org.openecomp.aai.inventory.v8.Vserver;
+import org.openecomp.sdnc.sli.ConfigurationException;
+import org.openecomp.sdnc.sli.MetricLogger;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+import org.openecomp.sdnc.sli.aai.data.ErrorResponse;
+import org.openecomp.sdnc.sli.aai.data.RequestError;
+import org.openecomp.sdnc.sli.aai.data.ResourceVersion;
+import org.openecomp.sdnc.sli.aai.data.ServiceException;
+import org.openecomp.sdnc.sli.aai.data.notify.NotifyEvent;
+import org.openecomp.sdnc.sli.aai.data.v1507.VServer;
+import org.openecomp.sdnc.sli.aai.update.Update;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.databind.AnnotationIntrospector;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
+import com.fasterxml.jackson.databind.type.TypeFactory;
+import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector;
+
+
+public class AAIService extends AAIDeclarations implements AAIClient, SvcLogicResource {
+
+ public static final String AAICLIENT_PROPERTIES = "/aaiclient.properties";
+
+ private static final Logger LOG = LoggerFactory.getLogger(AAIService.class);
+
+ private final String truststore_path;
+ private final String truststore_password;
+// private final String keystore_path;
+// private final String keystore_password;
+ private final Boolean ignore_certificate_host_error;
+
+ private final String target_uri;
+ private final String query_path;
+ private final String network_vce_path;
+
+ private final String network_vpe_path;
+
+ private final String network_vpls_pe_path;
+
+ private final String network_complex_path;
+
+ private final String network_pserver_path;
+
+ private final String network_vserver_path;
+
+ private final String ctag_pool_path;
+
+ private final String svc_instance_path;
+ private final String svc_inst_qry_path;
+
+ private final String generic_vnf_path;
+
+ private final String network_dvsswitch_path;
+
+ private final String l3_network_path;
+ private final String l3_network_path_query_name;
+
+ private final String vpn_binding_path;
+
+ private final String vnf_image_path;
+ private final String vnf_image_query_path;
+
+ private final String param_format; //= "filter=%s:%s";
+ private final String param_vnf_type; //= "vnf-type";
+ private final String param_physical_location_id; //= "physical-location-id";
+ private final String param_service_type; //= "service-type";
+
+ private final String ubb_notify_path;
+ private final String selflink_avpn;
+ private final String selflink_fqdn;
+
+ private final String p_interface_path;
+ private final String physical_link_path;
+ private final String customer_path;
+
+ private final String service_path;
+ private final String site_pair_set_path;
+
+ private final int connection_timeout;
+ private final int read_timeout;
+
+ // 1602
+ private final String query_nodes_path;
+ private final String update_path;
+
+ private final String application_id;
+
+ // authentication credentials
+ private String user_name;
+ private String user_password;
+
+ private final MetricLogger ml = new MetricLogger();
+
+ private final AAIRequestExecutor executor;
+
+ public AAIService(URL propURL) {
+ LOG.info("Entered AAIService.ctor");
+ Properties props = null;
+ try {
+ props = initialize(propURL);
+ AAIRequest.setProperties(props, this);
+
+ } catch(Exception exc){
+ LOG.error("AicAAIResource.static", exc);
+ }
+
+ executor = new AAIRequestExecutor();
+
+ user_name = props.getProperty(CLIENT_NAME);
+ user_password = props.getProperty(CLIENT_PWWD);
+
+ if(user_name == null || user_name.isEmpty()){
+ LOG.debug("Basic user name is not set");
+ }
+ if(user_password == null || user_password.isEmpty()) {
+ LOG.debug("Basic password is not set");
+ }
+
+ truststore_path = props.getProperty(TRUSTSTORE_PATH);
+ truststore_password = props.getProperty(TRUSTSTORE_PSSWD);
+
+ target_uri = props.getProperty(TARGET_URI);
+ query_path = props.getProperty(QUERY_PATH);
+ update_path = props.getProperty(UPDATE_PATH);
+
+ String applicationId =props.getProperty(APPLICATION_ID);
+ if(applicationId == null || applicationId.isEmpty()) {
+ applicationId = "SDNC";
+ }
+ application_id = applicationId;
+
+ // connection timeout
+ int tmpConnectionTimeout = 30000;
+ int tmpReadTimeout = 30000;
+
+ try {
+ String tmpValue = null;
+ tmpValue = props.getProperty(CONNECTION_TIMEOUT, "30000");
+ tmpConnectionTimeout = Integer.parseInt(tmpValue);
+ tmpValue = props.getProperty(READ_TIMEOUT, "30000");
+ tmpReadTimeout = Integer.parseInt(tmpValue);
+ } catch(Exception exc) {
+ LOG.error("Failed setting connection timeout", exc);
+ tmpConnectionTimeout = 30000;
+ tmpReadTimeout = 30000;
+ }
+ connection_timeout = tmpConnectionTimeout;
+ read_timeout = tmpReadTimeout;
+
+ network_vce_path = props.getProperty(NETWORK_VCE_PATH);
+
+ network_vpe_path = props.getProperty(NETWORK_VPE_PATH);
+
+ network_vpls_pe_path =props.getProperty(NETWORK_VPLS_PE_PATH);
+
+ network_complex_path =props.getProperty(NETWORK_COMPLEX_PATH);
+
+ network_pserver_path =props.getProperty(NETWORK_PSERVER_PATH);
+
+ network_vserver_path =props.getProperty(NETWORK_VSERVER_PATH);
+
+ ctag_pool_path =props.getProperty(CTAG_POOL_PATH);
+
+
+ svc_instance_path = props.getProperty(SVC_INSTANCE_PATH); // "/aai/v1/business/customers/customer/{customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances");
+// "/aai/v1/business/customers/customer/ma9181-203-customerid/service-subscriptions/service-subscription/ma9181%20Hosted%20Voice/service-instances";
+
+// svc_inst_qry_path = props.getProperty(SVC_INST_QRY_PATH, "/aai/v1/search/generic-query?key=service-instance.service-instance-id:ma9181-204-instance&start-node-type=service-instance&include=service-instance");
+ svc_inst_qry_path = props.getProperty(SVC_INST_QRY_PATH); // "/aai/v1/search/generic-query?key=service-instance.service-instance-id:{svc-instance-id}&start-node-type=service-instance&include=service-instance");
+
+
+ param_format = props.getProperty(QUERY_FORMAT, "filter=%s:%s");
+ param_vnf_type = props.getProperty(PARAM_VNF_TYPE, "vnf-type");
+ param_physical_location_id = props.getProperty(PARAM_PHYS_LOC_ID, "physical-location-id");
+ param_service_type = props.getProperty(PARAM_SERVICE_TYPE, "service-type");
+
+ // P-Interfaces
+ p_interface_path = props.getProperty(P_INTERFACE_PATH);
+
+ // Physical Link
+ physical_link_path = props.getProperty(PHYSICAL_LINK_PATH);
+
+ generic_vnf_path = props.getProperty(GENERIC_VNF_PATH);
+
+ network_dvsswitch_path = props.getProperty(NETWORK_DVSSWITCH_PATH);
+
+ l3_network_path = props.getProperty(L3_NETWORK_PATH);
+ l3_network_path_query_name = props.getProperty(L3_NETWORK_PATH_QUERY_NAME);
+
+ vpn_binding_path = props.getProperty(VPN_BINDING_PATH);
+
+ vnf_image_path = props.getProperty(VNF_IMAGE_PATH);
+ vnf_image_query_path = props.getProperty(VNF_IMAGE_QUERY_PATH);
+
+ ubb_notify_path = props.getProperty(UBB_NOTIFY_PATH);
+ selflink_avpn = props.getProperty(SELFLINK_AVPN);
+ selflink_fqdn = props.getProperty(SELFLINK_FQDN);
+
+ customer_path = props.getProperty(CUSTOMER_PATH);
+
+ service_path = props.getProperty(SERVICE_PATH);
+
+ site_pair_set_path = props.getProperty(SITE_PAIR_SET_PATH);
+
+ query_nodes_path = props.getProperty(QUERY_NODES_PATH);
+
+ String iche = props.getProperty(CERTIFICATE_HOST_ERROR);
+ boolean host_error = false;
+ if(iche != null && !iche.isEmpty()) {
+ host_error = Boolean.valueOf(iche);
+ }
+
+ ignore_certificate_host_error = host_error;
+
+ HttpsURLConnection.setDefaultHostnameVerifier( new HostnameVerifier(){
+ public boolean verify(String string,SSLSession ssls) {
+ return ignore_certificate_host_error;
+ }
+ });
+
+ if(truststore_path != null && truststore_password != null && (new File(truststore_path)).exists()) {
+ System.setProperty("javax.net.ssl.trustStore", truststore_path);
+ System.setProperty("javax.net.ssl.trustStorePassword", truststore_password);
+ }
+
+ LOG.info("AAIResource.ctor initialized.");
+ }
+
+ /**
+ *
+ * @param http_req_url
+ * @param method
+ * @return
+ * @throws Exception
+ */
+ protected HttpURLConnection getConfiguredConnection(URL http_req_url, String method) throws Exception {
+ HttpURLConnection con = (HttpURLConnection) http_req_url.openConnection();
+
+ // Set up the connection properties
+ con.setRequestProperty( "Connection", "close" );
+ con.setDoInput(true);
+ con.setDoOutput(true);
+ con.setUseCaches(false);
+ con.setConnectTimeout( connection_timeout );
+ con.setReadTimeout( read_timeout );
+ con.setRequestMethod( method );
+ con.setRequestProperty( "Accept", "application/json" );
+ con.setRequestProperty( "Content-Type", "application/json" );
+ con.setRequestProperty("X-FromAppId", application_id);
+ con.setRequestProperty("X-TransactionId",TransactionIdTracker.getNextTransactionId());
+
+ if(user_name != null && !user_name.isEmpty() && user_password != null && !user_password.isEmpty()) {
+ String basicAuth = "Basic " + new String(Base64.encodeBase64((user_name + ":" + user_password).getBytes()));
+ con.setRequestProperty ("Authorization", basicAuth);
+ }
+
+ return con;
+ }
+
+
+ @Override
+ public GenericVnf requestGenericVnfData(String vnf_id) throws AAIServiceException {
+ GenericVnf response = null;
+
+ try {
+ AAIRequest request = new GenericVnfRequest();
+ request.addRequestProperty(GenericVnfRequest.GENERIC_VNF_ID, vnf_id);
+ String rv = executor.get(request);
+ if(rv != null) {
+ ObjectMapper mapper = getObjectMapper();
+ response = mapper.readValue(rv, GenericVnf.class);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ throw new AAIServiceException(exc);
+ }
+
+ return response;
+
+ }
+
+ @Override
+ public boolean postGenericVnfData(String vnf_id, GenericVnf data) throws AAIServiceException {
+ boolean response = false;
+
+ try {
+ AAIRequest request = new GenericVnfRequest();
+ request.addRequestProperty(GenericVnfRequest.GENERIC_VNF_ID, vnf_id);
+ request.setRequestObject(data);
+ response = executor.post(request);
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestGenericVnfData", exc);
+ throw new AAIServiceException(exc);
+ }
+ return response;
+ }
+
+ @Override
+ public boolean deleteGenericVnfData(String vnf_id, String resourceVersion) throws AAIServiceException {
+ boolean response = false;
+ InputStream inputStream = null;
+
+ try {
+
+ String request_url = target_uri+generic_vnf_path;
+
+ String encoded_vnf = encodeQuery(vnf_id);
+ request_url = request_url.replace("{vnf-id}", encoded_vnf) ;
+ if(resourceVersion!=null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.DELETE);
+
+ LOGwriteFirstTrace(HttpMethod.DELETE, http_req_url.toString());
+ LOGwriteDateTrace("vnf_id", vnf_id);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ String line = null;
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", stringBuilder.toString());
+ response = true;
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ response = false;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("deleteGenericVnfData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+
+
+ @Override
+ public SearchResults requestServiceInstanceURL(String svc_instance_id) throws AAIServiceException {
+ SearchResults response = null;
+ InputStream inputStream = null;
+
+ try {
+ String path = svc_inst_qry_path;
+ path = path.replace("{svc-instance-id}", encodeQuery(svc_instance_id));
+
+ String request_url = target_uri+path;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.GET);
+
+ LOGwriteFirstTrace(HttpMethod.GET, http_req_url.toString());
+ LOGwriteDateTrace("svc_instance_id", svc_instance_id);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ ObjectMapper mapper = new ObjectMapper();
+ AnnotationIntrospector introspector = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance());
+ // if ONLY using JAXB annotations:
+ mapper.setAnnotationIntrospector(introspector);
+ mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+// StringBuilder stringBuilder = new StringBuilder("\n");
+// String line = null;
+// while( ( line = reader.readLine() ) != null ) {
+// stringBuilder.append("\n").append( line );
+// }
+// LOG.info(stringBuilder.toString());
+ response = mapper.readValue(reader, SearchResults.class);
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ return response;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestServiceInstanceURL", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+
+ @Override
+ public ServiceInstance requestServiceInterfaceData(String svc_instance_id) throws AAIServiceException {
+ ServiceInstance response = null;
+ InputStream inputStream = null;
+
+ try {
+ SearchResults search_result = this.requestServiceInstanceURL(svc_instance_id);
+ ResultData[] array = search_result.getResultData().toArray(new ResultData[0]);
+ ResultData datum = array[0];
+
+ String request_url = datum.getResourceLink();
+ request_url = encodeCustomerURL(request_url);
+
+ URL http_req_url = new URL(request_url);
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.GET);
+
+ LOGwriteFirstTrace(HttpMethod.GET, http_req_url.toString());
+ LOGwriteDateTrace("svc_instance_id", svc_instance_id);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+// StringBuilder stringBuilder = new StringBuilder("\n");
+// String line = null;
+// while( ( line = reader.readLine() ) != null ) {
+// stringBuilder.append("\n").append( line );
+// }
+// LOG.info(stringBuilder.toString());
+ response = mapper.readValue(reader, ServiceInstance.class);
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ return response;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestServiceInterfaceData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+
+ @Override
+ public ServiceInstance requestServiceInterfaceData(String customer_id, String service_type, String svc_instance_id) throws AAIServiceException {
+ ServiceInstance response = null;
+ InputStream inputStream = null;
+
+ try {
+ String path = svc_instance_path;
+ path = path.replace("{customer-id}", encodeQuery(customer_id));
+ path = path.replace("{service-type}", encodeQuery(service_type));
+ String request_url = target_uri+path;
+ if(!request_url.endsWith("/")) {
+ request_url = request_url + "/service-instance/";
+ } else {
+ request_url = request_url + "service-instance/";
+ }
+ request_url = request_url + encodeQuery(svc_instance_id);
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.GET);
+
+ LOGwriteFirstTrace(HttpMethod.GET, http_req_url.toString());
+ LOGwriteDateTrace("customer_id", customer_id);
+ LOGwriteDateTrace("service_type", service_type);
+ LOGwriteDateTrace("svc_instance_id", svc_instance_id);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+// StringBuilder stringBuilder = new StringBuilder("\n");
+// String line = null;
+// while( ( line = reader.readLine() ) != null ) {
+// stringBuilder.append("\n").append( line );
+// }
+// LOG.info(stringBuilder.toString());
+ response = mapper.readValue(reader, ServiceInstance.class);
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ return response;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestServiceInterfaceData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+ @Override
+ public boolean postServiceInterfaceData(String customer_id, String service_type, String svc_instance_id, ServiceInstance request) throws AAIServiceException {
+
+ InputStream inputStream = null;
+
+ try {
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = mapper.writeValueAsString(request);
+
+ String path = svc_instance_path;
+ path = path.replace("{customer-id}", encodeQuery(customer_id));
+ path = path.replace("{service-type}", encodeQuery(service_type));
+ String request_url = target_uri+path;
+ if(!request_url.endsWith("/")) {
+ request_url = request_url + "/service-instance/";
+ } else {
+ request_url = request_url + "service-instance/";
+ }
+ request_url = request_url + encodeQuery(svc_instance_id);
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.PUT);
+
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+ osw.close();
+
+
+ LOGwriteFirstTrace("PUT", request_url);
+ LOGwriteDateTrace("customer_id", customer_id);
+ LOGwriteDateTrace("service_type", service_type);
+ LOGwriteDateTrace("svc_instance_id", svc_instance_id);
+ LOGwriteDateTrace("RelationshipList", json_text);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ BufferedReader reader;
+ String line = null;
+ reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ return true;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("postServiceInterfaceData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ try {
+ if(inputStream != null)
+ inputStream.close();
+ } catch (Exception exc) {
+
+ }
+ }
+ }
+
+ /*
+ * Supporting methosd
+ */
+ private URL getRequestURL(String service_type, String vnf_type, String physical_location_id) throws MalformedURLException, URISyntaxException, UnsupportedEncodingException {
+
+ StringBuilder query = new StringBuilder();
+ query.append("filter=vnf-type:").append(encodeQuery(vnf_type));
+ query.append("&filter=service-type:").append(encodeQuery(service_type));
+ query.append("&filter=physical-location-id:").append(physical_location_id);
+
+ UriBuilder builder = javax.ws.rs.core.UriBuilder.fromUri(target_uri).path(query_path).replaceQuery(query.toString());
+// String y = x.build().toString();
+
+ return builder.build().toURL();
+
+ }
+
+ private static Properties initialize(URL url ) throws ConfigurationException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ InputStream is = null;
+ Properties props = new Properties();
+
+ try {
+ if(LOG.isDebugEnabled())
+ LOG.info("Property file is: " + url.toString());
+
+ is = url.openStream();
+
+ props.load(is);
+ if(LOG.isDebugEnabled()) {
+ LOG.info("Properties loaded: " + props.size());
+ Enumeration<Object> en = props.keys();
+
+ while(en.hasMoreElements()) {
+ String key = (String)en.nextElement();
+ String property = props.getProperty(key);
+ LOG.debug(key + " : " + property);
+ }
+ }
+ } catch (Exception e) {
+ throw new ConfigurationException("Could not load properties file.", e);
+ }
+ return props;
+ }
+
+ static class TransactionIdTracker {
+// protected static AtomicLong tracker = new AtomicLong();
+
+ public static String getNextTransactionId() {
+// long id = tracker.getAndIncrement();
+// String transactionId = String.format("N%016X", id);
+ String transactionId = UUID.randomUUID().toString();
+ return transactionId;
+ }
+
+ }
+
+ protected void LOGwriteFirstTrace(String method, String url) {
+ String time = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").format(System.currentTimeMillis());
+ LOG.info("A&AI transaction :");
+ LOG.info("Request Time : " + time + ", Method : " + method);
+ LOG.info("Request URL : "+ url);
+ }
+
+ protected void LOGwriteDateTrace(String name, String data) {
+ LOG.info("Input - " + name + " : " + data);
+ }
+
+ protected void LOGwriteEndingTrace(int response_code, String comment, String data) {
+ LOG.info("Response code : " + response_code +", " + comment);
+ LOG.info(String.format("Response data : %s", data));
+ }
+
+ protected String encodeQuery(String param) throws UnsupportedEncodingException {
+ return URLEncoder.encode(param, "UTF-8").replace("+", "%20");
+ }
+
+ private String encodeCustomerURL(final String selection)
+ {
+ String encrypted_url = selection;
+ String apnpattern =
+ "/aai/v2/business/customers/customer/(.+)/service-subscriptions/service-subscription/(.+)/service-instances/service-instance/(.+)/";
+ Pattern pattern = Pattern.compile(apnpattern);
+
+ try {
+ URL url = new URL(selection);
+ String path = url.getPath();
+
+ LOG.info("Trying to match apn to <" + path + ">");
+
+ Matcher matcher = pattern.matcher(path);
+
+ while(matcher.find()) {
+ String customer = matcher.group(1);
+ String subscription = matcher.group(2);
+ String service = matcher.group(3);
+
+ encrypted_url = selection.replace(customer, encodeQuery(customer));
+ encrypted_url = encrypted_url.replace(subscription, encodeQuery(subscription));
+ encrypted_url = encrypted_url.replace(service, encodeQuery(service));
+ }
+ } catch (Exception e) {
+ LOG.warn("", e);
+ }
+
+ return encrypted_url;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.openecomp.sdnc.sli.aai.AAIClient#requestVServersData(java.lang.String, java.lang.String)
+ */
+ @Override
+ public Vserver requestVServerData(String tenant_id, String vserver_id, String cloudOwner, String cloudRegionId) throws AAIServiceException {
+ Vserver response = null;
+
+ try {
+ AAIRequest request = new VserverRequest();
+ request.addRequestProperty(TenantRequest.TENANT_TENANT_ID, tenant_id);
+ request.addRequestProperty(VserverRequest.VSERVER_VSERVER_ID, vserver_id);
+ request.addRequestProperty(CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER, cloudOwner);
+ request.addRequestProperty(CloudRegionRequest.CLOUD_REGION_CLOUD_REGION_ID, cloudRegionId);
+
+ String rv = executor.get(request);
+ if(rv != null) {
+ ObjectMapper mapper = getObjectMapper();
+ response = mapper.readValue(rv, Vserver.class);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ throw new AAIServiceException(exc);
+ }
+ return response;
+ }
+
+
+ @Override
+ public boolean postVServerData(String tenantId, String vserverId, String cloudOwner, String cloudRegionId, Vserver request) throws AAIServiceException {
+ InputStream inputStream = null;
+
+ try {
+
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = mapper.writeValueAsString(request);
+
+ String local_network_complexes_path = network_vserver_path.replace("{tenant-id}", encodeQuery(tenantId));
+ local_network_complexes_path = local_network_complexes_path.replace("{vserver-id}", encodeQuery(vserverId));
+
+ local_network_complexes_path = local_network_complexes_path.replace("{cloud-owner}", encodeQuery(cloudOwner));
+ local_network_complexes_path = local_network_complexes_path.replace("{cloud-region-id}", encodeQuery(cloudRegionId));
+
+ String request_url = target_uri+local_network_complexes_path;
+
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.PUT);
+
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+ osw.close();
+
+
+ LOGwriteFirstTrace("PUT", request_url);
+ LOGwriteDateTrace("tenant-id", tenantId);
+ LOGwriteDateTrace("vserver-id", vserverId);
+ LOGwriteDateTrace("cloud-owner", cloudOwner);
+ LOGwriteDateTrace("cloud-region-id", cloudRegionId);
+
+ LOGwriteDateTrace("Vserver", json_text);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ BufferedReader reader;
+ String line = null;
+ reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ return true;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("postVServerData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ try {
+ if(inputStream != null)
+ inputStream.close();
+ } catch (Exception exc) {
+
+ }
+ }
+ }
+
+ @Override
+ public boolean deleteVServerData(String tenant_id, String vserver_id, String cloudOwner, String cloudRegionId, String resourceVersion) throws AAIServiceException {
+ boolean response = false;
+ InputStream inputStream = null;
+
+ try {
+ String local_network_complexes_path = network_vserver_path.replace("{tenant-id}", encodeQuery(tenant_id));
+ local_network_complexes_path = local_network_complexes_path.replace("{vserver-id}", encodeQuery(vserver_id));
+ local_network_complexes_path = local_network_complexes_path.replace("{cloud-owner}", encodeQuery(cloudOwner));
+ local_network_complexes_path = local_network_complexes_path.replace("{cloud-region-id}", encodeQuery(cloudRegionId));
+
+ String request_url = target_uri+local_network_complexes_path;
+ if(resourceVersion!=null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.DELETE);
+
+ LOGwriteFirstTrace(HttpMethod.DELETE, http_req_url.toString());
+ LOGwriteDateTrace("tenant_id", tenant_id);
+ LOGwriteDateTrace("vserver_id", vserver_id);
+ LOGwriteDateTrace("cloud-owner", cloudOwner);
+ LOGwriteDateTrace("cloud-region-id", cloudRegionId);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ String line = null;
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", stringBuilder.toString());
+ response = true;
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ response = false;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("deleteVServerData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+
+ //================== End of DvsSwitch =================
+ //==================== PhysicalLink ======================
+ @Override
+ public PhysicalLink requestPhysicalLinkData(String linkName) throws AAIServiceException {
+ PhysicalLink response = null;
+ InputStream inputStream = null;
+
+ try {
+ String request_url = target_uri+physical_link_path;
+
+ String encoded_vnf = encodeQuery(linkName);
+ request_url = request_url.replace("{link-name}", encoded_vnf) ;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.GET);
+
+ LOGwriteFirstTrace(HttpMethod.GET, http_req_url.toString());
+ LOGwriteDateTrace("link-name", linkName);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+// StringBuilder stringBuilder = new StringBuilder("\n");
+// String line = null;
+// while( ( line = reader.readLine() ) != null ) {
+// stringBuilder.append("\n").append( line );
+// }
+// LOG.info(stringBuilder.toString());
+ response = mapper.readValue(reader, PhysicalLink.class);
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
+ } else if (responseCode == HttpURLConnection.HTTP_NOT_FOUND) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ return response;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestPhysicalLinkData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+ @Override
+ public boolean postPhysicalLinkData(String linkName, PhysicalLink request) throws AAIServiceException {
+ InputStream inputStream = null;
+
+ try {
+
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = mapper.writeValueAsString(request);
+
+ String request_url = target_uri+physical_link_path;
+ String encoded_vnf = encodeQuery(linkName);
+ request_url = request_url.replace("{link-name}", encoded_vnf) ;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.PUT);
+
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+ osw.close();
+
+
+ LOGwriteFirstTrace("PUT", request_url);
+ LOGwriteDateTrace("link-name", linkName);
+ LOGwriteDateTrace("PhysicalLink", json_text);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ BufferedReader reader;
+ String line = null;
+ reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ return true;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("postPhysicalLinkData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ try {
+ if(inputStream != null)
+ inputStream.close();
+ } catch (Exception exc) {
+
+ }
+ }
+ }
+
+ @Override
+ public boolean deletePhysicalLinkData(String linkName, String resourceVersion) throws AAIServiceException {
+ boolean response = false;
+ InputStream inputStream = null;
+
+ try {
+ String request_url = target_uri+physical_link_path;
+ String encoded_vnf = encodeQuery(linkName);
+ request_url = request_url.replace("{link-name}", encoded_vnf) ;
+ if(resourceVersion!=null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.DELETE);
+
+ LOGwriteFirstTrace("DELETE", http_req_url.toString());
+ LOGwriteDateTrace("link-name", linkName);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ String line = null;
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", stringBuilder.toString());
+ response = true;
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ response = false;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("deletePhysicalLinkData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+ //================== End of PhysicalLink =================
+ //==================== PInterface ======================
+ @Override
+ public PInterface requestPInterfaceData(String hostname, String interfaceName) throws AAIServiceException {
+ PInterface response = null;
+
+ try {
+ AAIRequest request = new PInterfaceRequest();
+ request.addRequestProperty(PInterfaceRequest.PINTERFACE_INTERFACE_NAME, interfaceName);
+ request.addRequestProperty(PInterfaceRequest.HOSTNAME, hostname);
+ String rv = executor.get(request);
+ if(rv != null) {
+ ObjectMapper mapper = getObjectMapper();
+ response = mapper.readValue(rv, PInterface.class);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn(new Object(){}.getClass().getEnclosingMethod().getName(), exc);
+ throw new AAIServiceException(exc);
+ }
+ return response;
+ }
+
+ @Override
+ public boolean postPInterfaceData(String hostname, String interfaceName, PInterface request) throws AAIServiceException {
+ InputStream inputStream = null;
+
+ try {
+
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = mapper.writeValueAsString(request);
+
+ String request_url = target_uri+p_interface_path;
+ String encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{hostname}", encoded_vnf) ;
+ encoded_vnf = encodeQuery(interfaceName);
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.PUT);
+
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+ osw.close();
+
+
+ LOGwriteFirstTrace("PUT", request_url);
+ LOGwriteDateTrace("hostname", hostname);
+ LOGwriteDateTrace("interface-name", interfaceName);
+ LOGwriteDateTrace("PInterface", json_text);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ BufferedReader reader;
+ String line = null;
+ reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ return true;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("postPInterfaceData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ try {
+ if(inputStream != null)
+ inputStream.close();
+ } catch (Exception exc) {
+
+ }
+ }
+ }
+
+ @Override
+ public boolean deletePInterfaceData(String hostname, String interfaceName, String resourceVersion) throws AAIServiceException {
+ boolean response = false;
+ InputStream inputStream = null;
+
+ try {
+ String request_url = target_uri+p_interface_path;
+ String encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{hostname}", encoded_vnf) ;
+ encoded_vnf = encodeQuery(interfaceName);
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+ if(resourceVersion!=null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.DELETE);
+
+ LOGwriteFirstTrace("DELETE", http_req_url.toString());
+ LOGwriteDateTrace("hostname", hostname);
+ LOGwriteDateTrace("interface-name", interfaceName);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ String line = null;
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", stringBuilder.toString());
+ response = true;
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ response = false;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("deletePInterfaceData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+ //==================== Service ======================
+ @Override
+ public Service requestServiceData(String serviceId) throws AAIServiceException {
+ Service response = null;
+ InputStream inputStream = null;
+
+ try {
+ String request_url = target_uri+service_path;
+
+ String encoded_vnf = encodeQuery(serviceId);
+ request_url = request_url.replace("{service-id}", encoded_vnf) ;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.GET);
+
+ LOGwriteFirstTrace(HttpMethod.GET, http_req_url.toString());
+ LOGwriteDateTrace("service-id", serviceId);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+// StringBuilder stringBuilder = new StringBuilder("\n");
+// String line = null;
+// while( ( line = reader.readLine() ) != null ) {
+// stringBuilder.append("\n").append( line );
+// }
+// LOG.info(stringBuilder.toString());
+ response = mapper.readValue(reader, Service.class);
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestServiceData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+ @Override
+ public boolean postServiceData(String linkName, Service request) throws AAIServiceException {
+ InputStream inputStream = null;
+
+ try {
+
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = mapper.writeValueAsString(request);
+
+ String request_url = target_uri+service_path;
+ String encoded_vnf = encodeQuery(linkName);
+ request_url = request_url.replace("{service-id}", encoded_vnf) ;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.PUT);
+
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+ osw.close();
+
+
+ LOGwriteFirstTrace("PUT", request_url);
+ LOGwriteDateTrace("service-id", linkName);
+ LOGwriteDateTrace("Service", json_text);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ BufferedReader reader;
+ String line = null;
+ reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ return true;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("postServiceData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ try {
+ if(inputStream != null)
+ inputStream.close();
+ } catch (Exception exc) {
+
+ }
+ }
+ }
+
+ @Override
+ public boolean deleteServiceData(String linkName, String resourceVersion) throws AAIServiceException {
+ boolean response = false;
+ InputStream inputStream = null;
+
+ try {
+ String request_url = target_uri+service_path;
+ String encoded_vnf = encodeQuery(linkName);
+ request_url = request_url.replace("{service-id}", encoded_vnf) ;
+ if(resourceVersion!=null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.DELETE);
+
+ LOGwriteFirstTrace("DELETE", http_req_url.toString());
+ LOGwriteDateTrace("service-id", linkName);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ String line = null;
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", stringBuilder.toString());
+ response = true;
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ response = false;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("deleteServiceData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+ //================== End of Service =================
+
+
+
+ // 1507 - Request
+ @Override
+ public VServer dataChangeRequestVServerData(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ return this.getResource(url.toString(), VServer.class);
+ }
+
+ @Override
+ public Pserver dataChangeRequestPServerData(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ return this.getResource(url.toString(), Pserver.class);
+ }
+
+ @Override
+ public AvailabilityZone dataChangeRequestAvailabilityZoneData(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ return this.getResource(url.toString(), AvailabilityZone.class);
+ }
+
+ /* DELETE */
+ public boolean dataChangeDeleteVServerData(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ }
+
+ public boolean dataChangeDeleteCtagPoolData(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ }
+
+ public boolean dataChangeDeleteVplsPeData(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ }
+
+ public boolean dataChangeDeleteVpeData(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ }
+
+ public boolean dataChangeDeleteDvsSwitchData(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ }
+ //OAM-Network:
+ public boolean dataChangeDeleteOAMNetworkData(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ }
+ //Availability-Zone:
+ public boolean dataChangeDeleteAvailabilityZoneData(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ }
+ //Complex:
+ public boolean dataChangeDeleteComplexData(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ return deleteAAIEntity(url, new Object(){}.getClass().getEnclosingMethod().getName());
+ }
+
+ private boolean deleteAAIEntity(URL url, String caller) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ boolean response = false;
+ InputStream inputStream = null;
+
+ try {
+ URL http_req_url = url;
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.DELETE);
+
+ LOGwriteFirstTrace("DELETE", http_req_url.toString());
+
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ String line = null;
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", stringBuilder.toString());
+ response = true;
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ response = false;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn(caller, exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+ /**
+ * Generic method to GET json data from an A&AI callback URL.
+ * Then convert that json to an Object.
+ * If successful the Object is attempted to be cast to the type parameter.
+ *
+ * @param key
+ * callback url for A&AI
+ * @param type
+ * the class of object that A&AI will return
+ * @return the object created from json or null if the response code is not 200
+ *
+ * @throws AAIServiceException
+ * if empty or null key and or type or there's an error with processing
+ */
+ public <T> T dataChangeRequestAaiData(String key, Class<T> type) throws AAIServiceException {
+ if (StringUtils.isEmpty(key) || type == null) {
+ throw new AAIServiceException("Key is empty or null and or type is null");
+ }
+
+ T response = null;
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ if(!key.contains(" = ") && isValidURL(key)) {
+ key = String.format("selflink = '%s'", key);
+ }
+ HashMap<String, String> nameValues = keyToHashMap(key, ctx);
+
+ SelfLinkRequest request = new SelfLinkRequest(type);
+ request.processRequestPathValues(nameValues);
+ Object obj = this.getExecutor().query(request, type);
+ response = type.cast(obj);
+
+ return response != null ? type.cast(response) : response;
+ }
+
+ @Override
+ public Pserver requestPServerData(String hostname) throws AAIServiceException {
+ Pserver response = null;
+ InputStream inputStream = null;
+
+ try {
+ String request_url = target_uri+network_pserver_path;
+ String encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{hostname}", encoded_vnf) ;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.GET);
+
+ LOGwriteFirstTrace(HttpMethod.GET, http_req_url.toString());
+ LOGwriteDateTrace("hostname", hostname);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+// StringBuilder stringBuilder = new StringBuilder("\n");
+// String line = null;
+// while( ( line = reader.readLine() ) != null ) {
+// stringBuilder.append("\n").append( line );
+// }
+// LOG.info(stringBuilder.toString());
+ response = mapper.readValue(reader, Pserver.class);
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ return response;
+ } else {
+ ErrorResponse errorresponse = new ErrorResponse();
+ try {
+ errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ } catch(Exception exc) {
+ }
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestPServerData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+ @Override
+ public boolean postPServerData(String hostname, Pserver request) throws AAIServiceException {
+ InputStream inputStream = null;
+
+ try {
+
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = mapper.writeValueAsString(request);
+
+ String request_url = target_uri+network_pserver_path;
+
+ request_url = request_url.replace("{hostname}", encodeQuery(hostname)) ;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.PUT);
+
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+ osw.close();
+
+
+ LOGwriteFirstTrace("PUT", request_url);
+ LOGwriteDateTrace("hostname", hostname);
+ LOGwriteDateTrace("PServer", json_text);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ BufferedReader reader;
+ String line = null;
+ reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ return true;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("postPServerData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ try {
+ if(inputStream != null)
+ inputStream.close();
+ } catch (Exception exc) {
+
+ }
+ }
+ }
+
+ @Override
+ public boolean deletePServerData(String hostname, String resourceVersion) throws AAIServiceException {
+ boolean response = false;
+ InputStream inputStream = null;
+
+ try {
+
+ String request_url = target_uri+network_pserver_path;
+
+ String encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{hostname}", encoded_vnf) ;
+ if(resourceVersion!=null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.DELETE);
+
+ LOGwriteFirstTrace("DELETE", http_req_url.toString());
+ LOGwriteDateTrace("hostname", hostname);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ String line = null;
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", stringBuilder.toString());
+ response = true;
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ response = true;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("deletePServersData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+
+ @Override
+ public L3Network requestL3NetworkData(String networkId) throws AAIServiceException {
+ L3Network response = null;
+ InputStream inputStream = null;
+
+ try {
+ String request_url = target_uri+l3_network_path;
+ String encoded_vnf = encodeQuery(networkId);
+ request_url = request_url.replace("{network-id}", encoded_vnf) ;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.GET);
+
+ LOGwriteFirstTrace(HttpMethod.GET, http_req_url.toString());
+ LOGwriteDateTrace("network-id", networkId);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+// StringBuilder stringBuilder = new StringBuilder("\n");
+// String line = null;
+// while( ( line = reader.readLine() ) != null ) {
+// stringBuilder.append("\n").append( line );
+// }
+// LOG.info(stringBuilder.toString());
+ response = mapper.readValue(reader, L3Network.class);
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ return response;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestL3NetworkData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+ @Override
+ public L3Network requestL3NetworkQueryByName(String networkName) throws AAIServiceException {
+ L3Network response = null;
+ InputStream inputStream = null;
+
+ try {
+ String request_url = target_uri+l3_network_path_query_name;
+ String encoded_name = encodeQuery(networkName);
+ request_url = request_url.replace("{network-name}", encoded_name) ;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.GET);
+
+ LOGwriteFirstTrace(HttpMethod.GET, http_req_url.toString());
+ LOGwriteDateTrace("network-name", networkName);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+// StringBuilder stringBuilder = new StringBuilder("\n");
+// String line = null;
+// while( ( line = reader.readLine() ) != null ) {
+// stringBuilder.append("\n").append( line );
+// }
+// LOG.info(stringBuilder.toString());
+ response = mapper.readValue(reader, L3Network.class);
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ return response;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestL3NetworkData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+ @Override
+ public boolean postL3NetworkData(String networkId, L3Network request) throws AAIServiceException {
+ InputStream inputStream = null;
+
+ try {
+
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = mapper.writeValueAsString(request);
+
+ String request_url = target_uri+l3_network_path;
+
+ String encoded_vnf = encodeQuery(networkId);
+ request_url = request_url.replace("{network-id}", encoded_vnf) ;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.PUT);
+
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+ osw.close();
+
+
+ LOGwriteFirstTrace("PUT", request_url);
+ LOGwriteDateTrace("network-id", networkId);
+ LOGwriteDateTrace("GenericVnf", json_text);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ BufferedReader reader;
+ String line = null;
+ reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ return true;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("postL3NetworkData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ try {
+ if(inputStream != null)
+ inputStream.close();
+ } catch (Exception exc) {
+
+ }
+ }
+ }
+
+ @Override
+ public boolean deleteL3NetworkData(String networkId, String resourceVersion) throws AAIServiceException {
+ boolean response = false;
+ InputStream inputStream = null;
+
+ try {
+ String request_url = target_uri+l3_network_path;
+
+ String encoded_vnf = encodeQuery(networkId);
+ request_url = request_url.replace("{network-id}", encoded_vnf) ;
+ if(resourceVersion!=null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.DELETE);
+
+ LOGwriteFirstTrace("DELETE", http_req_url.toString());
+ LOGwriteDateTrace("network-id", networkId);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ String line = null;
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", stringBuilder.toString());
+ response = true;
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ response = false;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("deleteL3NetworkData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+
+ public boolean sendNotify(NotifyEvent event, String serviceInstanceId, String pathCode) throws AAIServiceException {
+ InputStream inputStream = null;
+
+ try {
+
+ String selfLink = selflink_fqdn;
+ if(SELFLINK_AVPN != null && SELFLINK_AVPN.equals(pathCode)) {
+ selfLink = selflink_avpn;
+ }
+ selfLink = selfLink.replace("{service-instance-id}", encodeQuery(serviceInstanceId));
+ event.setSelflink(selfLink);
+
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = mapper.writeValueAsString(event);
+
+ String request_url = target_uri+ubb_notify_path;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.PUT);
+
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+ osw.close();
+
+
+ LOGwriteFirstTrace("PUT", request_url);
+ LOGwriteDateTrace("NotifyEvent", json_text);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ BufferedReader reader;
+ String line = null;
+ reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ return true;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("sendNotify", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ try {
+ if(inputStream != null)
+ inputStream.close();
+ } catch (Exception exc) {
+
+ }
+ }
+ }
+
+ @Override
+ public SearchResults requestNodeQuery(String node_type, String entityIdentifier, String entityName) throws AAIServiceException {
+ SearchResults response = null;
+ InputStream inputStream = null;
+
+ try {
+ String request_url = target_uri+query_nodes_path;
+ request_url = request_url.replace("{node-type}", encodeQuery(node_type)) ;
+ request_url = request_url.replace("{entity-identifier}", entityIdentifier) ;
+ request_url = request_url.replace("{entity-name}", encodeQuery(entityName)) ;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.GET);
+
+ LOGwriteFirstTrace(HttpMethod.GET, http_req_url.toString());
+ LOGwriteDateTrace("node_type", node_type);
+ LOGwriteDateTrace("vnf_name", entityName);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ response = mapper.readValue(reader, SearchResults.class);
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
+ } else if (responseCode == HttpURLConnection.HTTP_NOT_FOUND) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ return response;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestNodeQuery", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+
+ }
+
+
+ @Override
+ public String requestDataByURL(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ String response = null;
+ InputStream inputStream = null;
+
+ try {
+ URL http_req_url = url;
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.GET);
+
+ LOGwriteFirstTrace(HttpMethod.GET, http_req_url.toString());
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ StringBuilder stringBuilder = new StringBuilder("\n");
+ String line = null;
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOG.info(stringBuilder.toString());
+// response = mapper.readValue(reader, String.class);
+ response = stringBuilder.toString();
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ response = null;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestNetworkVceData", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+
+ @Override
+ public GenericVnf requestGenericVnfeNodeQuery(String vnf_name) throws AAIServiceException {
+
+ if(vnf_name == null) {
+ throw new NullPointerException();
+ }
+
+ GenericVnf entity = null;
+ SearchResults resp = this.requestNodeQuery("generic-vnf", "vnf-name", vnf_name);
+
+ List<ResultData> resultDataList = resp.getResultData();
+
+ try {
+ for (ResultData datum : resultDataList) {
+ String data_type = datum.getResourceType();
+ URL url = new URL(datum.getResourceLink());
+ entity = this.getResource(url.toString(), GenericVnf.class);
+ }
+ }
+ catch (Exception e)
+ {
+ LOG.error("Caught exception", e);
+ }
+ return entity;
+ }
+
+ @Override
+ public Vserver requestVServerDataByURL(URL url) throws AAIServiceException {
+
+ if(url == null) {
+ throw new NullPointerException();
+ }
+
+ Vserver entity = null;
+
+ try {
+ entity = this.getResource(url.toString(), Vserver.class);
+ }
+ catch (Exception e)
+ {
+ LOG.error("Caught exception", e);
+ }
+ return entity;
+ }
+
+ @Override
+ public URL requestVserverURLNodeQuery(String vserver_name) throws AAIServiceException {
+
+ if(vserver_name == null) {
+ throw new NullPointerException();
+ }
+
+ URL entity = null;
+ SearchResults resp = this.requestNodeQuery("vserver", "vserver-name", vserver_name);
+
+ List<ResultData> resultDataList = resp.getResultData();
+
+ try {
+ for (ResultData datum : resultDataList) {
+ String data_type = datum.getResourceType();
+ entity = new URL(datum.getResourceLink());
+ }
+ }
+ catch (Exception e)
+ {
+ LOG.error("Caught exception", e);
+ }
+ return entity;
+ }
+
+ class AAIRequestExecutor implements AAIExecutorInterface {
+
+ @Override
+ public String get(AAIRequest request) throws AAIServiceException {
+ String response = null;
+ InputStream inputStream = null;
+ HttpURLConnection con = null;
+ URL requestUrl = null;
+
+ try {
+
+ if(request.getRequestObject() != null) {
+ con = getConfiguredConnection(requestUrl = request.getRequestUrl(HttpMethod.POST, null), HttpMethod.POST);
+ String json_text = request.toJSONString();
+ LOGwriteDateTrace("data", json_text);
+ logMetricRequest("POST "+requestUrl.getPath(), json_text);
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+ } else {
+ con = getConfiguredConnection(requestUrl = request.getRequestUrl(HttpMethod.GET, null), HttpMethod.GET);
+ logMetricRequest("GET "+requestUrl.getPath(), "");
+ }
+
+ // Check for errors
+ String responseMessage = con.getResponseMessage();
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode + " : " + responseMessage);
+ logMetricResponse(responseCode, responseMessage);
+
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ StringBuilder stringBuilder = new StringBuilder();
+ String line = null;
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ response = stringBuilder.toString();
+ try {
+ Object object = mapper.readValue(response, Object.class);
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, responseMessage, mapper.writeValueAsString(object));
+ } catch(Exception exc) {
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, responseMessage, mapper.writeValueAsString(response));
+ }
+ } else if (responseCode == HttpURLConnection.HTTP_NOT_FOUND) {
+ LOGwriteEndingTrace(responseCode, responseMessage, "Entry does not exist.");
+ ErrorResponse errorresponse = null;
+ try {
+ errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ } catch(Exception exc) {
+ errorresponse = new ErrorResponse();
+ RequestError requestError = new RequestError();
+ ServiceException serviceException = new ServiceException();
+ serviceException.setText("Entry does not exist.");
+ requestError.setServiceException(serviceException);
+ errorresponse.setRequestError(requestError );
+ }
+ throw new AAIServiceException(responseCode, errorresponse);
+ } else if (responseCode == HttpURLConnection.HTTP_UNAUTHORIZED) {
+ StringBuilder stringBuilder = new StringBuilder();
+ String line = null;
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, responseMessage, stringBuilder.toString());
+ ServiceException serviceException = new ServiceException();
+ serviceException.setMessageId("HTTP_UNAUTHORIZED");
+ serviceException.setText(stringBuilder.toString());
+ RequestError requestError = new RequestError();
+ requestError.setServiceException(serviceException);
+ ErrorResponse errorresponse = new ErrorResponse();
+ errorresponse.setRequestError(requestError);
+ throw new AAIServiceException(responseCode, errorresponse);
+ } else {
+//
+// StringBuilder stringBuilder = new StringBuilder("\n");
+// String line = null;
+// while( ( line = reader.readLine() ) != null ) {
+// stringBuilder.append("\n").append( line );
+// }
+// LOG.info(stringBuilder.toString());
+//
+// ErrorResponse errorresponse = mapper.readValue(stringBuilder.toString(), ErrorResponse.class);
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, responseMessage, mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("GET", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+ @Override
+ public Boolean post(AAIRequest request) throws AAIServiceException {
+ InputStream inputStream = null;
+
+ try {
+ String resourceVersion = null;
+ AAIDatum instance = request.getRequestObject();
+ if(instance instanceof ResourceVersion) {
+ resourceVersion = ((ResourceVersion)instance).getResourceVersion();
+ }
+
+ URL requestUrl = null;
+ HttpURLConnection con = getConfiguredConnection(requestUrl = request.getRequestUrl(HttpMethod.PUT, resourceVersion), HttpMethod.PUT);
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = request.toJSONString();
+
+ LOGwriteDateTrace("data", json_text);
+ logMetricRequest("PUT "+requestUrl.getPath(), json_text);
+
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+
+ // Check for errors
+ String responseMessage = con.getResponseMessage();
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ LOG.debug("HttpURLConnection result:" + responseCode + " : " + responseMessage);
+ logMetricResponse(responseCode, responseMessage);
+
+ // Process the response
+ BufferedReader reader;
+ String line = null;
+ reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, responseMessage, (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ return true;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, responseMessage, mapper.writeValueAsString(errorresponse));
+
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("AAIRequestExecutor.post", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ try {
+ if(inputStream != null)
+ inputStream.close();
+ } catch (Exception exc) {
+
+ }
+ }
+ }
+
+ @Override
+ public Boolean delete(AAIRequest request, String resourceVersion) throws AAIServiceException {
+ Boolean response = null;
+ InputStream inputStream = null;
+
+ if(resourceVersion == null) {
+ throw new AAIServiceException("resource-version is required for DELETE request");
+ }
+
+ try {
+ URL requestUrl = null;
+ HttpURLConnection conn = getConfiguredConnection(requestUrl = request.getRequestUrl(HttpMethod.DELETE, resourceVersion), HttpMethod.DELETE);
+ logMetricRequest("DELETE "+requestUrl.getPath(), "");
+ conn.setDoOutput(true);
+// if(request.isDeleteDataRequired()) {
+// String json_text = request.toJSONString();
+//
+// LOGwriteDateTrace("data", json_text);
+// OutputStream os = con.getOutputStream();
+// OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+// osw.write(json_text);
+// osw.flush();
+// }
+
+ // Check for errors
+ String responseMessage = conn.getResponseMessage();
+ int responseCode = conn.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = conn.getInputStream();
+ } else {
+ inputStream = conn.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode + " : " + responseMessage);
+ logMetricResponse(responseCode, responseMessage);
+
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ String line = null;
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, responseMessage, stringBuilder.toString());
+ response = true;
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, responseMessage, "Entry does not exist.");
+ response = false;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, responseMessage, mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("delete", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+ @Override
+ public Object query(AAIRequest request, Class clas) throws AAIServiceException {
+ Object response = null;
+ InputStream inputStream = null;
+ HttpURLConnection con = null;
+ URL requestUrl = null;
+
+ try {
+ con = getConfiguredConnection(requestUrl = request.getRequestQueryUrl(HttpMethod.GET), HttpMethod.GET);
+ logMetricRequest("GET "+requestUrl.getPath(), "");
+
+ // Check for errors
+ String responseMessage = con.getResponseMessage();
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ logMetricResponse(responseCode, responseMessage);
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK) {
+ // Process the response
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ response = mapper.readValue(reader, clas);
+ LOGwriteEndingTrace(HttpURLConnection.HTTP_OK, "SUCCESS", mapper.writeValueAsString(response));
+ } else if (responseCode == HttpURLConnection.HTTP_NOT_FOUND) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ return response;
+ } else {
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("GET", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ con = null;
+ }
+ return response;
+ }
+
+ }
+
+ @Override
+ public Tenant requestTenantData(String tenant_id, String cloudOwner, String cloudRegionId) throws AAIServiceException {
+ Tenant response = null;
+
+ try {
+ AAIRequest request = new TenantRequest();
+ request.addRequestProperty(TenantRequest.TENANT_ID, tenant_id);
+ request.addRequestProperty(CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER, cloudOwner);
+ request.addRequestProperty(CloudRegionRequest.CLOUD_REGION_CLOUD_REGION_ID, cloudRegionId);
+
+ String rv = executor.get(request);
+ if(rv != null) {
+ ObjectMapper mapper = getObjectMapper();
+ response = mapper.readValue(rv, Tenant.class);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestTenantData", exc);
+ throw new AAIServiceException(exc);
+ }
+
+ return response;
+ }
+
+ @Override
+ public Tenant requestTenantDataByName(String tenant_name, String cloudOwner, String cloudRegionId) throws AAIServiceException {
+ Tenant response = null;
+
+ try {
+ AAIRequest request = new TenantRequest();
+ request.addRequestProperty(TenantRequest.TENANT_NAME, tenant_name);
+ request.addRequestProperty(CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER, cloudOwner);
+ request.addRequestProperty(CloudRegionRequest.CLOUD_REGION_CLOUD_REGION_ID, cloudRegionId);
+ Object rv = executor.query(request, Tenant.class);
+ if(rv == null)
+ return (Tenant)null;
+ else
+ response = (Tenant)rv;
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("requestTenantDataByName", exc);
+ throw new AAIServiceException(exc);
+ }
+
+ return response;
+ }
+
+
+ @Override
+ public boolean postTenantData(String tenant_id, String cloudOwner, String cloudRegionId, Tenant tenannt) throws AAIServiceException {
+ Boolean response = null;
+
+ try {
+ AAIRequest request = new TenantRequest();
+ request.addRequestProperty(TenantRequest.TENANT_ID, tenant_id);
+ request.addRequestProperty(CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER, cloudOwner);
+ request.addRequestProperty(CloudRegionRequest.CLOUD_REGION_CLOUD_REGION_ID, cloudRegionId);
+ request.setRequestObject(tenannt);
+ response = executor.post(request);
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("postTenantData", exc);
+ throw new AAIServiceException(exc);
+ }
+
+ return response;
+ }
+
+
+ @Override
+ public String getTenantIdFromVserverUrl(URL url) {
+
+ String path = url.getPath();
+
+ String[] split = path.split("/tenants/tenant/");
+ if(split.length > 1) {
+ split = split[1].split("/");
+ return split[0];
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public String getCloudOwnerFromVserverUrl(URL url) {
+
+ String path = url.getPath();
+
+ String[] split = path.split("/cloud-regions/cloud-region/");
+ if(split.length > 1) {
+ split = split[1].split("/");
+ return split[0];
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public String getCloudRegionFromVserverUrl(URL url) {
+
+ String path = url.getPath();
+
+ String[] split = path.split("/cloud-regions/cloud-region/");
+ if(split.length > 1) {
+ split = split[1].split("/");
+ return split[1];
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public String getVServerIdFromVserverUrl(URL url, String tenantId) {
+ String pattern = network_vserver_path;
+ pattern = pattern.replace("{tenant-id}", tenantId);
+
+ int end = pattern.indexOf("{vserver-id}");
+ String prefix = pattern.substring(0, end);
+
+ String path = url.getPath();
+
+ if(path.startsWith(prefix)) {
+ path = path.substring(prefix.length());
+ }
+
+ return path;
+ }
+
+ protected Logger getLogger(){
+ return LOG;
+ }
+
+ @Override
+ public boolean updateAnAIEntry(Update request) throws AAIServiceException {
+ InputStream inputStream = null;
+
+ try {
+
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = mapper.writeValueAsString(request);
+
+ String request_url = target_uri+update_path;
+ URL http_req_url = new URL(request_url);
+
+ HttpURLConnection con = getConfiguredConnection(http_req_url, HttpMethod.PUT);
+
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+ osw.close();
+
+ LOGwriteFirstTrace("PUT", request_url);
+ LOGwriteDateTrace("Update", json_text);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ BufferedReader reader;
+ String line = null;
+ reader = new BufferedReader( new InputStreamReader( inputStream ) );
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_CREATED || responseCode == HttpURLConnection.HTTP_ACCEPTED || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", (stringBuilder != null) ? stringBuilder.toString() : "{no-data}");
+ return true;
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ throw new AAIServiceException(responseCode, errorresponse);
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("updateAnAIEntry", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ try {
+ if(inputStream != null)
+ inputStream.close();
+ } catch (Exception exc) {
+
+ }
+ }
+ }
+
+ @Override
+ public AAIRequestExecutor getExecutor() {
+ return executor;
+ }
+
+ /**
+ * Creates a current time stamp in UTC i.e. 2016-03-08T22:15:13.343Z.
+ * If there are any parameters the values are appended to the time stamp.
+ *
+ * @param parameters
+ * values to be appended to current time stamp
+ * @param ctx
+ * used to set an attribute for a DG
+ * @throws SvcLogicException
+ */
+ public void setStatusMethod(Map<String, String> parameters, SvcLogicContext ctx) throws SvcLogicException {
+ if (ctx == null) {
+ throw new SvcLogicException("SvcLogicContext is null.");
+ }
+
+ StringBuilder sb = new StringBuilder();
+ sb.append(String.format("%tFT%<tTZ", Calendar.getInstance(TimeZone.getTimeZone("Z")))).append(" - ");
+
+ for (Entry<String, String> entry : parameters.entrySet()) {
+ sb.append(entry.getValue()).append(" ");
+ }
+
+ if (sb.length() > 0) {
+ sb.setLength(sb.length() - 2);
+ }
+
+ ctx.setAttribute("aai-summary-status-message", sb.toString());
+ LOG.info("aai-summary-status-message: " + sb.toString());
+ }
+
+ /**
+ * Generic method to GET json data from an A&AI using key structure.
+ * Then convert that json to an Object.
+ * If successful the Object is attempted to be cast to the type parameter.
+ *
+ * @param key
+ * key identifying the resource to be retrieved from AAI
+ * @param type
+ * the class of object that A&AI will return
+ * @return the object created from json or null if the response code is not 200
+ *
+ * @throws AAIServiceException
+ * if empty or null key and or type or there's an error with processing
+ */
+
+ public <T> T getResource(String key, Class<T> type) throws AAIServiceException {
+ if (StringUtils.isEmpty(key) || type == null) {
+ throw new AAIServiceException("Key is empty or null and or type is null");
+ }
+
+ T response = null;
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ if(!key.contains(" = ")) {
+ if(isValidURL(key)) {
+ key = String.format("selflink = '%s'", key);
+ } else {
+ return response;
+ }
+ }
+
+ HashMap<String, String> nameValues = keyToHashMap(key, ctx);
+
+ AAIRequest request = new SelfLinkRequest(type);
+ if(nameValues.containsKey(PathRequest.RESOURCE_PATH.replaceAll("-", "_"))) {
+ request = new PathRequest(type);
+ }
+
+ request.processRequestPathValues(nameValues);
+ Object obj = this.getExecutor().query(request, type);
+ response = type.cast(obj);
+
+ return response != null ? type.cast(response) : response;
+ }
+
+ public boolean isValidURL(String url) {
+
+ URL u = null;
+
+ try {
+ u = new URL(url);
+ } catch (MalformedURLException e) {
+ return false;
+ }
+
+ try {
+ u.toURI();
+ } catch (URISyntaxException e) {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ protected boolean deleteRelationshipList(URL httpReqUrl, String json_text) throws AAIServiceException {
+ if(httpReqUrl == null) {
+ throw new NullPointerException();
+ }
+
+ boolean response = false;
+ InputStream inputStream = null;
+
+ try {
+ HttpURLConnection con = getConfiguredConnection(httpReqUrl, HttpMethod.DELETE);
+
+ OutputStreamWriter osw = new OutputStreamWriter(con.getOutputStream());
+ osw.write(json_text);
+ osw.flush();
+ osw.close();
+
+
+ LOGwriteFirstTrace("DELETE", httpReqUrl.toString());
+ LOGwriteDateTrace("data", json_text);
+
+ // Check for errors
+ int responseCode = con.getResponseCode();
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ inputStream = con.getInputStream();
+ } else {
+ inputStream = con.getErrorStream();
+ }
+
+ // Process the response
+ LOG.debug("HttpURLConnection result:" + responseCode);
+ if(inputStream == null) inputStream = new ByteArrayInputStream("".getBytes(StandardCharsets.UTF_8));
+ BufferedReader reader = new BufferedReader( new InputStreamReader( inputStream ) );
+ String line = null;
+
+ ObjectMapper mapper = getObjectMapper();
+
+ if (responseCode == HttpURLConnection.HTTP_OK || responseCode == HttpURLConnection.HTTP_NO_CONTENT) {
+ StringBuilder stringBuilder = new StringBuilder();
+
+ while( ( line = reader.readLine() ) != null ) {
+ stringBuilder.append( line );
+ }
+ LOGwriteEndingTrace(responseCode, "SUCCESS", stringBuilder.toString());
+ response = true;
+ } else if(responseCode == HttpURLConnection.HTTP_NOT_FOUND ) {
+ LOGwriteEndingTrace(responseCode, "HTTP_NOT_FOUND", "Entry does not exist.");
+ response = false;
+ } else {
+ ErrorResponse errorresponse = mapper.readValue(reader, ErrorResponse.class);
+ LOGwriteEndingTrace(responseCode, "FAILURE", mapper.writeValueAsString(errorresponse));
+ throw new AAIServiceException(responseCode, errorresponse);
+ }
+
+ } catch(AAIServiceException aaiexc) {
+ throw aaiexc;
+ } catch (Exception exc) {
+ LOG.warn("deleteRelationshipList", exc);
+ throw new AAIServiceException(exc);
+ } finally {
+ if(inputStream != null){
+ try {
+ inputStream.close();
+ } catch(Exception exc) {
+
+ }
+ }
+ }
+ return response;
+ }
+
+ public ObjectMapper getObjectMapper() {
+ ObjectMapper mapper = new ObjectMapper();
+ AnnotationIntrospector introspector = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance());
+ AnnotationIntrospector secondary = new JacksonAnnotationIntrospector();
+ mapper.setAnnotationIntrospector(AnnotationIntrospector.pair(introspector, secondary));
+ mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+ return mapper;
+ }
+
+ public void logMetricRequest(String targetServiceName, String msg){
+ String svcInstanceId = "";
+ String svcName = null;
+ String partnerName = null;
+ String targetEntity = "A&AI";
+ String targetVirtualEntity = null;
+
+ targetServiceName = "";
+
+ ml.logRequest(svcInstanceId, svcName, partnerName, targetEntity, targetServiceName, targetVirtualEntity, msg);
+ }
+
+ public void logMetricResponse(int responseCode, String responseDescription){
+ ml.logResponse(responseCode < 400 ? "SUCCESS" : "FAILURE", Integer.toBinaryString(responseCode), responseDescription);
+ }
+
+ public void logKeyError(String keys){
+ LOG.error("Atleast one of the keys [" + keys + "] should have been populated. This will cause a NPE.");
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIServiceActivator.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIServiceActivator.java
new file mode 100644
index 0000000..857a6ea
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIServiceActivator.java
@@ -0,0 +1,228 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+
+import org.openecomp.sdnc.sli.ConfigurationException;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AAIServiceActivator implements BundleActivator {
+
+ private static final String DEFAULT_CONFIG_FILE_NAME = "aaiclient.config";
+ private static final String DEFAULT_PROPERTY_FILE_NAME = "aaiclient.properties";
+ private static final String DEFAULT_KEYWORD = "default";
+
+ private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR";
+
+ private static final String BVC_PROPERTY_FILE = "/opt/bvc/controller/configuration/aaiclient.properties";
+ private static final String DEFAULT_SDNC_PROPERTY_FILE = "/opt/sdnc/data/properties/aaiclient.properties";
+
+ private Set<ServiceRegistration> registrationSet = new HashSet<ServiceRegistration>();
+
+ private static final Logger LOG = LoggerFactory.getLogger(AAIServiceActivator.class);
+
+ @Override
+ public void start(BundleContext ctx) throws Exception {
+
+ String sdnConfigDirectory = System.getenv(SDNC_CONFIG_DIR);
+
+ // check SDNC CONFIG DIR system property
+ if(sdnConfigDirectory == null ) {
+ LOG.error("System property SDNC_CONFIG_DIR is not defined.");
+ LOG.info("Defaulting SDNC_CONFIG_DIR to '/opt/sdnc/data/properties/'");
+ sdnConfigDirectory = "/opt/sdnc/data/properties/";
+ }
+
+ LOG.debug("Configuration directory used : " + sdnConfigDirectory);
+
+ // check existance of properties directory
+ File configDirectory = new File(sdnConfigDirectory);
+ if(!configDirectory.exists() || !configDirectory.isDirectory()){
+ LOG.error("System property SDNC_CONFIG_DIR = '" + sdnConfigDirectory + "' does not point to a valid directory. AAIService will not be initialized.");
+ return;
+ }
+
+ Properties properties = new Properties();
+ InputStream input = null;
+
+ // find aaiclient config file
+ File[] files = findFiles(configDirectory, DEFAULT_CONFIG_FILE_NAME);
+
+ // read the aai config data
+ if(files != null && files.length > 0) {
+ LOG.debug("AAIService config file exists and it is named :" + files[0].getAbsolutePath() );
+ try {
+ input = new FileInputStream(files[0]);
+ properties.load(input);
+ LOG.debug("Loaded AAI Client properties from " + files[0].getAbsolutePath());
+ } catch (IOException exc) {
+ LOG.warn("Problem loading AAI Client properties from " + files[0].getAbsolutePath(), exc);
+ } finally {
+ if(input != null ) {
+ try {
+ input.close();
+ } catch(Exception exc) {
+ // ignore
+ }
+ }
+ int size = properties.keySet().size() ;
+ if(size == 0) {
+ LOG.debug(files[0].getAbsolutePath() + " contained no entries. Adding the default entry");
+ properties.put(DEFAULT_KEYWORD, DEFAULT_PROPERTY_FILE_NAME);
+ }
+ }
+ } else {
+ LOG.debug("No configuration entries were found. Adding the default entry");
+ properties.put(DEFAULT_KEYWORD, DEFAULT_PROPERTY_FILE_NAME);
+ }
+
+ Set<String> entrySet = properties. stringPropertyNames();
+ String value = null;
+
+ // initialize AAI Service for each aai client property files
+ for(String entry : entrySet) {
+ value = properties.getProperty(entry);
+ if(value != null && !value.isEmpty()) {
+
+ final String fileName = value;
+
+ File[] propertyFileList = findFiles(configDirectory, fileName);
+
+ for(File propertiesFile : propertyFileList) {
+ LOG.info(propertiesFile.getName());
+ // Advertise AAI resource adaptor
+ AAIClient impl = null;
+ switch(entry) {
+ case DEFAULT_KEYWORD:
+ impl = new AAIService(propertiesFile.toURI().toURL());
+ break;
+ case "trinity":
+ impl = new AAITrinityService(propertiesFile.toURI().toURL());
+ break;
+ default:
+ LOG.error("Invalid configuration keyword '"+entry+"' detected in aaiclient.config. Aborting initialization");
+ continue;
+ }
+ String regName = impl.getClass().getName();
+
+ LOG.debug("Registering AAIService service "+regName);
+ ServiceRegistration registration = ctx.registerService(regName, impl, null);
+ registrationSet.add(registration);
+
+ }
+ }
+ }
+ }
+
+// @Override
+ @Deprecated
+ public void start1(BundleContext ctx) throws Exception {
+
+ String sdnConfigDirectory = System.getenv(SDNC_CONFIG_DIR);
+ String propertiesPath = null;
+
+ if (sdnConfigDirectory == null || sdnConfigDirectory.isEmpty()) {
+ String filename = DEFAULT_SDNC_PROPERTY_FILE;
+ File file = new File(filename);
+ if(file != null && file.exists()) {
+ propertiesPath = filename;
+ LOG.info("Using property file (1): " + propertiesPath);
+ } else {
+ filename = BVC_PROPERTY_FILE;
+ file = new File(filename);
+ if(file != null && file.exists()) {
+ propertiesPath = filename;
+ LOG.info("Using property file (1): " + propertiesPath);
+ } else {
+ throw new ConfigurationException("Cannot find config file - "+filename+" and "+SDNC_CONFIG_DIR+" is unset");
+ }
+ }
+ } else {
+ propertiesPath = sdnConfigDirectory + "/aaiclient.properties";
+ LOG.info("Environment variable " + SDNC_CONFIG_DIR + " set, - calculated path " + propertiesPath);
+ }
+
+ File propFile = new File(propertiesPath);
+ if(!propFile.exists()) {
+ String filename = DEFAULT_SDNC_PROPERTY_FILE;
+ File file = new File(filename);
+ if(file != null && file.exists()) {
+ propertiesPath = filename;
+ LOG.info("Using property file (1): " + propertiesPath);
+ } else {
+ filename = BVC_PROPERTY_FILE;
+ file = new File(filename);
+ if(file != null && file.exists()) {
+ propertiesPath = filename;
+ LOG.info("Using property file (1): " + propertiesPath);
+ } else {
+ LOG.error("AnAI Service Property file " + propertiesPath + "does not exist.");
+ throw new ConfigurationException("Cannot find config file - "+propertiesPath+" and " + SDNC_CONFIG_DIR + " is unset.");
+ }
+ }
+ }
+
+ // Advertise AAI resource adaptor
+ AAIClient impl = new AAIService(propFile.toURI().toURL());
+ String regName = impl.getClass().getName();
+
+ LOG.debug("Registering AAIService service "+regName);
+ ServiceRegistration registration = ctx.registerService(regName, impl, null);
+ registrationSet.add(registration);
+ }
+
+ @Override
+ public void stop(BundleContext ctx) throws Exception {
+
+ Set<ServiceRegistration> localRegistrationSet = new HashSet<ServiceRegistration>();
+ localRegistrationSet.addAll(registrationSet);
+
+ for(ServiceRegistration registration : localRegistrationSet) {
+ if (registration != null) {
+ registration.unregister();
+ registrationSet.remove(registration);
+ }
+ }
+ }
+
+ private File[] findFiles(File configDirectory, final String filter) {
+ File[] files = configDirectory.listFiles(new FilenameFilter() {
+ public boolean accept(File dir, String name) {
+ return name.equalsIgnoreCase(filter);
+ }
+ });
+
+ return files;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIServiceException.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIServiceException.java
new file mode 100644
index 0000000..e5ae735
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAIServiceException.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import org.openecomp.sdnc.sli.aai.data.ErrorResponse;
+
+public class AAIServiceException extends Exception {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -9039257722542999522L;
+
+ protected ErrorResponse errorResponse = null;
+ protected int returnCode = -1;
+
+ public AAIServiceException() {
+
+ }
+
+ public AAIServiceException(String message) {
+ super(message);
+ }
+
+ public AAIServiceException(Throwable cause) {
+ super(cause);
+ }
+
+ public AAIServiceException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public AAIServiceException(String message, Throwable cause,
+ boolean enableSuppression, boolean writableStackTrace) {
+ super(message, cause, enableSuppression, writableStackTrace);
+ }
+
+ public AAIServiceException(int returnCode, ErrorResponse errorresponse) {
+ this.errorResponse = errorresponse;
+ this.returnCode = returnCode;
+ }
+
+ public ErrorResponse getErrorResponse() {
+ return errorResponse;
+ }
+
+ public int getReturnCode() {
+ return returnCode;
+ }
+
+ public String getMessage() {
+ if(errorResponse != null) {
+ return errorResponse.getRequestError().getServiceException().getText();
+ } else {
+ return super.getMessage();
+ }
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAITrinityService.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAITrinityService.java
new file mode 100644
index 0000000..e882b5d
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/AAITrinityService.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.net.URL;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AAITrinityService extends AAIService {
+
+ private static final Logger LOG = LoggerFactory.getLogger(AAITrinityService.class);
+
+ public AAITrinityService(URL propURL) {
+ super(propURL);
+ LOG.info("Entered AAITrinityService.ctor");
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/CloudRegionRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/CloudRegionRequest.java
new file mode 100644
index 0000000..ff94174
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/CloudRegionRequest.java
@@ -0,0 +1,120 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.CloudRegion;
+
+public class CloudRegionRequest extends AAIRequest {
+
+ public static final String CLOUD_REGION_PATH = "org.openecomp.sdnc.sli.aai.path.cloud.region";
+
+ private final String cloud_region_path;
+
+ public static final String CLOUD_REGION_CLOUD_OWNER = "cloud-region.cloud-owner";
+ public static final String CLOUD_REGION_CLOUD_REGION_ID = "cloud-region.cloud-region-id";
+
+
+ public CloudRegionRequest() {
+ cloud_region_path = configProperties.getProperty(CLOUD_REGION_PATH);
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+cloud_region_path;
+
+ request_url = processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ CloudRegion vnfc = (CloudRegion)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args =
+ {
+ CLOUD_REGION_CLOUD_OWNER,
+ CLOUD_REGION_CLOUD_REGION_ID
+ };
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return CloudRegion.class;
+ }
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+
+ if(!requestProperties.containsKey(CLOUD_REGION_CLOUD_OWNER) || !requestProperties.containsKey(CLOUD_REGION_CLOUD_REGION_ID)) {
+ aaiService.logKeyError(String.format("%s,%s", CLOUD_REGION_CLOUD_OWNER, CLOUD_REGION_CLOUD_REGION_ID));
+ }
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(CLOUD_REGION_CLOUD_OWNER));
+ request_url = request_url.replace("{cloud-owner}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(CLOUD_REGION_CLOUD_REGION_ID));
+ request_url = request_url.replace("{cloud-region-id}", encoded_vnf) ;
+
+ aaiService.LOGwriteDateTrace("cloud-owner", requestProperties.getProperty(CLOUD_REGION_CLOUD_OWNER));
+ aaiService.LOGwriteDateTrace("cloud-region-id", requestProperties.getProperty(CLOUD_REGION_CLOUD_REGION_ID));
+
+ return request_url;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/CustomerRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/CustomerRequest.java
new file mode 100644
index 0000000..ba83255
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/CustomerRequest.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Customer;
+
+public class CustomerRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String CUSTOMER_PATH = "org.openecomp.sdnc.sli.aai.path.customer";
+ public static final String CUSTOMER_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.customer.query";
+
+ private final String customer_path;
+ private final String customer_query_path;
+
+ public static final String CUSTOMER_GLOBAL_CUSTOMER_ID = "customer.global-customer-id";
+
+
+ public CustomerRequest() {
+ customer_path = configProperties.getProperty(CUSTOMER_PATH);
+ customer_query_path = configProperties.getProperty(CUSTOMER_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri + customer_path;
+ String encoded_vnf = null;
+
+ String hostname = null;
+
+ if(requestProperties.containsKey(CUSTOMER_GLOBAL_CUSTOMER_ID)) {
+ hostname = requestProperties.getProperty(CUSTOMER_GLOBAL_CUSTOMER_ID);
+ encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{customer-id}", encoded_vnf) ;
+ } else {
+ LOG.error("Required key "+CUSTOMER_GLOBAL_CUSTOMER_ID+" is misssing.");
+ }
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("global-customer-id", hostname);
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+
+ String key = CUSTOMER_GLOBAL_CUSTOMER_ID;
+
+ if(!requestProperties.containsKey(key)) {
+ aaiService.logKeyError(CUSTOMER_GLOBAL_CUSTOMER_ID);
+ }
+
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{global-customer-id}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("global-customer-id", requestProperties.getProperty(key));
+
+ return request_url;
+ }
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Customer vnfc = (Customer)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {CUSTOMER_GLOBAL_CUSTOMER_ID};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Customer.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/EchoRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/EchoRequest.java
new file mode 100644
index 0000000..995a7da
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/EchoRequest.java
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+import org.openecomp.sdnc.sli.aai.data.EchoResponse;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class EchoRequest extends AAIRequest {
+
+
+
+ private final String echo_path;
+
+ public EchoRequest() {
+ echo_path = "/aai/util/echo";
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+echo_path;
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ EchoResponse tenant = (EchoResponse)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(tenant);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {};
+ return args;
+ }
+
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return EchoResponse.class;
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GVnfLInterfaceRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GVnfLInterfaceRequest.java
new file mode 100644
index 0000000..17a9df2
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GVnfLInterfaceRequest.java
@@ -0,0 +1,137 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.LInterface;
+
+public class GVnfLInterfaceRequest extends AAIRequest {
+
+ private final String generic_vnf_linterface_path;
+ private final String generic_vnf_linterface_query_path;
+
+
+ public static final String INTERFACE_NAME = "interface-name";
+ public static final String LINTERFACE_INTERFACE_NAME = "l-interface.interface-name";
+
+
+ public GVnfLInterfaceRequest()
+ {
+
+ String tmpGenericVnfLinterfacePath = configProperties.getProperty(GenericVnfRequest.GENERIC_VNF_PATH);
+
+ generic_vnf_linterface_query_path = configProperties.getProperty(GenericVnfRequest.GENERIC_VNF_QUERY_PATH);
+
+ if(tmpGenericVnfLinterfacePath != null) {
+ tmpGenericVnfLinterfacePath = tmpGenericVnfLinterfacePath + "/l-interfaces/l-interface/{interface-name}";
+ LOG.debug("GVnfLInterfaceRequest.PATH = " + tmpGenericVnfLinterfacePath);
+ } else {
+ LOG.warn("PATH " + GenericVnfRequest.GENERIC_VNF_PATH + " not defined");
+ }
+
+ generic_vnf_linterface_path = tmpGenericVnfLinterfacePath;
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = null;
+
+
+ request_url = target_uri + generic_vnf_linterface_path;
+
+ String vnfId = requestProperties.getProperty(GenericVnfRequest.VNF_ID);
+ if(vnfId == null) {
+ vnfId = requestProperties.getProperty(GenericVnfRequest.GENERIC_VNF_ID);
+ }
+
+ String encoded_vnf = encodeQuery(vnfId);
+ request_url = request_url.replace("{vnf-id}", encoded_vnf);
+
+ String interfaceName = requestProperties.getProperty(INTERFACE_NAME);
+ if(interfaceName == null || interfaceName.isEmpty()) {
+ interfaceName = requestProperties.getProperty(LINTERFACE_INTERFACE_NAME);
+ }
+ encoded_vnf = encodeQuery(interfaceName);
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("vnf-id", vnfId);
+ aaiService.LOGwriteDateTrace("interface-name", interfaceName);
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ LInterface vnfc = (LInterface)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {INTERFACE_NAME, LINTERFACE_INTERFACE_NAME, GenericVnfRequest.VNF_ID, GenericVnfRequest.GENERIC_VNF_ID};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return LInterface.class;
+ }
+
+ @Override
+ public String getPrimaryResourceName(String resource) {
+ return "l-interface";
+ }
+
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenVnfrVLanRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenVnfrVLanRequest.java
new file mode 100644
index 0000000..0e34e31
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenVnfrVLanRequest.java
@@ -0,0 +1,132 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Vlan;
+
+public class GenVnfrVLanRequest extends AAIRequest {
+ //aai/v7/cloud-infrastructure/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}
+
+ // tenant (1602)
+ public static final String VLAN_PATH = "org.openecomp.sdnc.sli.aai.path.generic.vnf";
+ public static final String VLAN_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.generic.vnf.query";
+
+ private final String vlan_path;
+ private final String vlan_query_path;
+
+ public static final String VNF_ID = "generic_vnf.vnf_id";
+ public static final String INTERFACE_NAME = "l_interface.interface_name";
+ public static final String VLAN_INTERFACE = "vlan.vlan_interface";
+
+ public GenVnfrVLanRequest() {
+ vlan_path = configProperties.getProperty(VLAN_PATH) + "/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}";
+ vlan_query_path = configProperties.getProperty(VLAN_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+vlan_path;
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(VNF_ID));
+ request_url = request_url.replace("{vnf-id}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(INTERFACE_NAME));
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(VLAN_INTERFACE));
+ request_url = request_url.replace("{vlan-interface}", encoded_vnf) ;
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("vnf-id", requestProperties.getProperty(VNF_ID));
+ aaiService.LOGwriteDateTrace("interface-name", requestProperties.getProperty(INTERFACE_NAME));
+ aaiService.LOGwriteDateTrace("vlan-interface", requestProperties.getProperty(VLAN_INTERFACE));
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+vlan_path;
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(VNF_ID));
+ request_url = request_url.replace("{vnf-id}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(INTERFACE_NAME));
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(VLAN_INTERFACE));
+ request_url = request_url.replace("{vlan-interface}", encoded_vnf) ;
+
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ aaiService.LOGwriteDateTrace("vnf-id", requestProperties.getProperty(VNF_ID));
+ aaiService.LOGwriteDateTrace("interface-name", requestProperties.getProperty(INTERFACE_NAME));
+ aaiService.LOGwriteDateTrace("vlan-interface", requestProperties.getProperty(VLAN_INTERFACE));
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Vlan tenant = (Vlan)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(tenant);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {VNF_ID, INTERFACE_NAME, VLAN_INTERFACE};
+ return args;
+ }
+
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Vlan.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericQueryRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericQueryRequest.java
new file mode 100644
index 0000000..83b5a51
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericQueryRequest.java
@@ -0,0 +1,145 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.ResultData;
+
+public class GenericQueryRequest extends AAIRequest {
+
+ public static final String GENERIC_SEARCH_PATH = "org.openecomp.sdnc.sli.aai.query.generic";
+
+ private final String generic_search_path;
+
+ public static final String START_NODE_TYPE = "start-node-type";
+ public static final String IDENTIFIER = "identifier";
+ public static final String VALUE = "value";
+
+
+ public GenericQueryRequest() {
+ generic_search_path = configProperties.getProperty(GENERIC_SEARCH_PATH);
+ }
+
+
+// @Override
+// public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+//
+// String request_url = target_uri+generic_search_path;
+// String key = START_NODE_TYPE;
+//
+// String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+// request_url = request_url.replace("{vnf-id}", encoded_vnf) ;
+//
+// if(resourceVersion != null) {
+// request_url = request_url +"?resource-version="+resourceVersion;
+// }
+// URL http_req_url = new URL(request_url);
+//
+// aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+//
+//
+// return http_req_url;
+// }
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+generic_search_path;
+
+ request_url = processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ ResultData tenant = (ResultData)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(tenant);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {START_NODE_TYPE, IDENTIFIER, VALUE};
+ return args;
+ }
+
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return ResultData.class;
+ }
+
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+
+ String key = IDENTIFIER;
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{identifier}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("identifier", requestProperties.getProperty(key));
+
+ key = VALUE;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{value}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("value", requestProperties.getProperty(key));
+
+ key = START_NODE_TYPE;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{start-node-type}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("start-node-type", requestProperties.getProperty(key));
+
+ return request_url;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericVnfLInterfaceRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericVnfLInterfaceRequest.java
new file mode 100644
index 0000000..efa9ff6
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericVnfLInterfaceRequest.java
@@ -0,0 +1,125 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.LInterface;
+
+public class GenericVnfLInterfaceRequest extends AAIRequest {
+
+ public static final String GENERIC_VNF_LINTERFACE_PATH = "org.openecomp.sdnc.sli.aai.path.generic.vnf.linterface";
+
+ private final String generic_vnf_linterface_path;
+
+
+ public static final String INTERFACE_NAME = "interface-name";
+ public static final String LINTERFACE_INTERFACE_NAME = "l-interface.interface-name";
+
+ public GenericVnfLInterfaceRequest() {
+ generic_vnf_linterface_path = configProperties.getProperty(GENERIC_VNF_LINTERFACE_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = null;
+
+ request_url = target_uri + generic_vnf_linterface_path;
+
+
+ request_url = processPathData(request_url, requestProperties);
+ request_url = GenericVnfRequest.processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ LInterface vnfc = (LInterface)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return LInterface.class;
+ }
+
+ @Override
+ public String getPrimaryResourceName(String resource) {
+ return "l-interface";
+ }
+
+ public static final String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+ String interfaceName = requestProperties.getProperty(INTERFACE_NAME);
+ if(interfaceName == null || requestProperties.containsKey(LINTERFACE_INTERFACE_NAME)) {
+ interfaceName = requestProperties.getProperty(LINTERFACE_INTERFACE_NAME);
+ }
+
+ if(interfaceName == null) {
+ aaiService.logKeyError(String.format("%s,%s", INTERFACE_NAME, LINTERFACE_INTERFACE_NAME));
+ }
+
+ request_url = request_url.replace("{interface-name}", encodeQuery(interfaceName)) ;
+ aaiService.LOGwriteDateTrace("interface-name", interfaceName);
+ return request_url;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] tmpArray = {INTERFACE_NAME, LINTERFACE_INTERFACE_NAME, GenericVnfRequest.GENERIC_VNF_ID, GenericVnfRequest.VNF_ID};
+ return tmpArray;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericVnfRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericVnfRequest.java
new file mode 100644
index 0000000..093ab80
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/GenericVnfRequest.java
@@ -0,0 +1,145 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.GenericVnf;
+
+public class GenericVnfRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String GENERIC_VNF_PATH = "org.openecomp.sdnc.sli.aai.path.generic.vnf";
+ public static final String GENERIC_VNF_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.generic.vnf.query";
+
+ private final String generic_vnf_path;
+ private final String generic_vnf_query_path;
+
+ public static final String GENERIC_VNF_ID = "generic_vnf.vnf_id";
+ public static final String VNF_ID = "vnf_id";
+
+
+ public GenericVnfRequest() {
+ generic_vnf_path = configProperties.getProperty(GENERIC_VNF_PATH);
+ generic_vnf_query_path = configProperties.getProperty(GENERIC_VNF_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+generic_vnf_path;
+ String key = VNF_ID;
+ if(requestProperties.containsKey(GENERIC_VNF_ID)) {
+ key = GENERIC_VNF_ID;
+ }
+
+ if(!requestProperties.containsKey(key)) {
+ aaiService.logKeyError(String.format("%s,%s", VNF_ID, GENERIC_VNF_ID));
+ }
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{vnf-id}", encoded_vnf) ;
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("vnf-id", requestProperties.getProperty(key));
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+generic_vnf_path;
+
+ String key = VNF_ID;
+ if(requestProperties.containsKey(GENERIC_VNF_ID)) {
+ key = GENERIC_VNF_ID;
+ }
+
+ if(!requestProperties.containsKey(key)) {
+ aaiService.logKeyError(String.format("%s,%s", VNF_ID, GENERIC_VNF_ID));
+ }
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{vnf-id}", encoded_vnf) ;
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("vnf-id", requestProperties.getProperty(key));
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ GenericVnf tenant = (GenericVnf)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(tenant);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {VNF_ID, GENERIC_VNF_ID};
+ return args;
+ }
+
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return GenericVnf.class;
+ }
+
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+
+ String key = VNF_ID;
+ if(requestProperties.containsKey(GENERIC_VNF_ID)) {
+ key = GENERIC_VNF_ID;
+ }
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{vnf-id}", encoded_vnf) ;
+
+ return request_url;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3InterfaceIpv4AddressListRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3InterfaceIpv4AddressListRequest.java
new file mode 100644
index 0000000..014a8a2
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3InterfaceIpv4AddressListRequest.java
@@ -0,0 +1,196 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.L3InterfaceIpv4AddressList;
+
+public class L3InterfaceIpv4AddressListRequest extends AAIRequest {
+
+ /*
+ * Note: there are 3 possible paths:
+ * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ * aaiv7:inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+ */
+
+ public static final String L3_INTERFACE_IPV4_ADDRESS_LIST_PATH = "org.openecomp.sdnc.sli.aai.path.l3.interface.ipv4.address.list";
+ public static final String VLAN_L3_INTERFACE_IPV4_ADDRESS_LIST_PATH = "org.openecomp.sdnc.sli.aai.path.vlan.l3.interface.ipv4.address.list";
+
+ private final String l3_interface_ipv4_address_list_path;
+ private final String vlan_l3_interface_ipv4_address_list_path;
+
+ public static final String L3_INTERFACE_IPV4_ADDRESS = "l3-interface-ipv4-address";
+ public static final String LIST_L3_INTERFACE_IPV4_ADDRESS = "l3-interface-ipv4-address-list.l3-interface-ipv4-address";
+
+
+ public L3InterfaceIpv4AddressListRequest() {
+ l3_interface_ipv4_address_list_path = configProperties.getProperty(L3_INTERFACE_IPV4_ADDRESS_LIST_PATH);
+ vlan_l3_interface_ipv4_address_list_path = configProperties.getProperty(VLAN_L3_INTERFACE_IPV4_ADDRESS_LIST_PATH);
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+l3_interface_ipv4_address_list_path;
+
+ if(requestProperties.containsKey(VLanRequest.VLAN_INTERFACE) || requestProperties.containsKey(VLanRequest.VLAN_VLAN_INTERFACE)){
+ request_url = target_uri+vlan_l3_interface_ipv4_address_list_path;
+ request_url = VLanRequest.processPathData(request_url, requestProperties);
+ }
+
+ request_url = processPathData(request_url, requestProperties);
+ request_url = LInterfaceRequest.processPathData(request_url, requestProperties);
+ request_url = GenericVnfRequest.processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ L3InterfaceIpv4AddressList vnfc = (L3InterfaceIpv4AddressList)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args =
+ {
+ L3_INTERFACE_IPV4_ADDRESS,
+ LIST_L3_INTERFACE_IPV4_ADDRESS,
+ VLanRequest.VLAN_INTERFACE,
+ VLanRequest.VLAN_VLAN_INTERFACE,
+ LInterfaceRequest.INTERFACE_NAME,
+ LInterfaceRequest.LINTERFACE_INTERFACE_NAME,
+ GenericVnfRequest.GENERIC_VNF_ID,
+ GenericVnfRequest.VNF_ID
+ };
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return L3InterfaceIpv4AddressList.class;
+ }
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+ String key = L3_INTERFACE_IPV4_ADDRESS;
+ if(requestProperties.containsKey(LIST_L3_INTERFACE_IPV4_ADDRESS)) {
+ key = LIST_L3_INTERFACE_IPV4_ADDRESS;
+ }
+
+ if(!requestProperties.containsKey(key)) {
+ aaiService.logKeyError(String.format("%s,%s", L3_INTERFACE_IPV4_ADDRESS, LIST_L3_INTERFACE_IPV4_ADDRESS));
+ }
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+
+ request_url = request_url.replace("{l3-interface-ipv4-address}", encoded_vnf) ;
+
+ aaiService.LOGwriteDateTrace("l3-interface-ipv4-address", requestProperties.getProperty(key));
+ return request_url;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.openecomp.sdnc.sli.aai.PathConfigurator#configurePath(java.lang.String)
+ */
+// @Override
+// public void processRequestPathValues(Map<String, String> nameValues) {
+// String[] paths =
+// {
+// "/aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}",
+// "/aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}",
+// "/aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}",
+// "/aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}"
+// };
+//
+// List<String>keys = new LinkedList<String>();
+// keys.addAll(nameValues.keySet());
+// for(String key : keys) {
+// if(key.contains(".")) {
+// key = key.replaceAll("_", "-");
+// if(!LIST_L3_INTERFACE_IPV4_ADDRESS.equals(key)) {
+// int index = key.indexOf(".");
+// String resource = key.substring(0, index);
+// AAIRequest rx = createRequest(resource, nameValues);
+// if(rx != null) {
+// pathElements.add(rx);
+// }
+// }
+// }
+// }
+// super.processRequestPathValues(nameValues);
+// }
+// List<AAIRequest> pathElements = new LinkedList<AAIRequest>();
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3InterfaceIpv6AddressListRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3InterfaceIpv6AddressListRequest.java
new file mode 100644
index 0000000..549cb93
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3InterfaceIpv6AddressListRequest.java
@@ -0,0 +1,163 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.L3InterfaceIpv6AddressList;
+
+public class L3InterfaceIpv6AddressListRequest extends AAIRequest {
+
+ /*
+ * Note: there are 3 possible paths:
+ * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * /aai/v7/network/generic-vnfs/generic-vnf/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/cloud-infrastructure/cloud-regions/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/newvces/newvce/{vnf-id2}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/vpes/vpe/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/vpes/vpe/{vnf-id}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/vpls-pes/vpls-pe/{equipment-name}/lag-interfaces/lag-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ * aaiv7:inventory/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{interface-name}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+ */
+
+ public static final String L3_INTERFACE_IPV6_ADDRESS_LIST_PATH = "org.openecomp.sdnc.sli.aai.path.l3.interface.ipv6.address.list";
+ public static final String VLAN_L3_INTERFACE_IPV6_ADDRESS_LIST_PATH = "org.openecomp.sdnc.sli.aai.path.vlan.l3.interface.ipv6.address.list";
+
+ private final String l3_interface_ipv6_address_list_path;
+ private final String vlan_l3_interface_ipv6_address_list_path;
+
+ public static final String L3_INTERFACE_IPV6_ADDRESS = "l3-interface-ipv6-address";
+ public static final String LIST_L3_INTERFACE_IPV6_ADDRESS = "l3-interface-ipv6-address-list.l3-interface-ipv6-address";
+
+
+ public L3InterfaceIpv6AddressListRequest() {
+ l3_interface_ipv6_address_list_path = configProperties.getProperty(L3_INTERFACE_IPV6_ADDRESS_LIST_PATH);
+ vlan_l3_interface_ipv6_address_list_path = configProperties.getProperty(VLAN_L3_INTERFACE_IPV6_ADDRESS_LIST_PATH);
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+l3_interface_ipv6_address_list_path;
+
+ if(requestProperties.containsKey(VLanRequest.VLAN_INTERFACE) || requestProperties.containsKey(VLanRequest.VLAN_VLAN_INTERFACE)){
+ request_url = target_uri+vlan_l3_interface_ipv6_address_list_path;
+ request_url = VLanRequest.processPathData(request_url, requestProperties);
+ }
+
+ request_url = processPathData(request_url, requestProperties);
+ request_url = LInterfaceRequest.processPathData(request_url, requestProperties);
+ request_url = GenericVnfRequest.processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ L3InterfaceIpv6AddressList vnfc = (L3InterfaceIpv6AddressList)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args =
+ {
+ L3_INTERFACE_IPV6_ADDRESS,
+ LIST_L3_INTERFACE_IPV6_ADDRESS,
+ VLanRequest.VLAN_INTERFACE,
+ VLanRequest.VLAN_VLAN_INTERFACE,
+ LInterfaceRequest.INTERFACE_NAME,
+ LInterfaceRequest.LINTERFACE_INTERFACE_NAME,
+ GenericVnfRequest.GENERIC_VNF_ID,
+ GenericVnfRequest.VNF_ID
+
+ };
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return L3InterfaceIpv6AddressList.class;
+ }
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+ String key = L3_INTERFACE_IPV6_ADDRESS;
+ if(requestProperties.containsKey(LIST_L3_INTERFACE_IPV6_ADDRESS)) {
+ key = LIST_L3_INTERFACE_IPV6_ADDRESS;
+ }
+
+ if(!requestProperties.containsKey(key)) {
+ aaiService.logKeyError(String.format("%s,%s", L3_INTERFACE_IPV6_ADDRESS, LIST_L3_INTERFACE_IPV6_ADDRESS));
+ }
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+
+ request_url = request_url.replace("{l3-interface-ipv6-address}", encoded_vnf) ;
+
+ aaiService.LOGwriteDateTrace("l3-interface-ipv6-address", requestProperties.getProperty(key));
+ return request_url;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3NetworkRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3NetworkRequest.java
new file mode 100644
index 0000000..608646a
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/L3NetworkRequest.java
@@ -0,0 +1,130 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.L3Network;
+
+public class L3NetworkRequest extends AAIRequest {
+
+ public static final String L3_NETWORK_PATH = "org.openecomp.sdnc.sli.aai.path.l3.network";
+ public static final String L3_NETWORK_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.l3network.query.name";
+
+ private final String l3_network_path;
+ private final String l3_network_query_path;
+
+ public static final String NETWORK_ID = "l3-network.network-id";
+ public static final String NETWORK_NAME = "l3-network.network-name";
+
+
+ public L3NetworkRequest() {
+ l3_network_path = configProperties.getProperty(L3_NETWORK_PATH);
+ l3_network_query_path = configProperties.getProperty(L3_NETWORK_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+ if(requestProperties.containsKey(NETWORK_NAME)) {
+ return getRequestQueryUrl(method);
+ }
+
+ String request_url = target_uri+l3_network_path;
+
+ String encoded_vnf = null;
+
+ if(requestProperties.containsKey(NETWORK_ID)) {
+ encoded_vnf = encodeQuery(requestProperties.getProperty(NETWORK_ID));
+ request_url = request_url.replace("{network-id}", encoded_vnf) ;
+
+ }
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace(NETWORK_ID, requestProperties.getProperty(NETWORK_ID));
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+l3_network_query_path;
+
+ String encoded_vnf = null;
+
+ if(requestProperties.containsKey(NETWORK_NAME)) {
+ encoded_vnf = encodeQuery(requestProperties.getProperty(NETWORK_NAME));
+ request_url = request_url.replace("{network-name}", encoded_vnf) ;
+
+ }
+
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace(NETWORK_NAME, requestProperties.getProperty(NETWORK_NAME));
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ L3Network l3Network = (L3Network)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(l3Network);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {NETWORK_ID, NETWORK_NAME};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return L3Network.class;
+ }
+
+ public String getPrimaryResourceName(String resource) {
+ return "l3-network";
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LInterfaceRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LInterfaceRequest.java
new file mode 100644
index 0000000..2923667
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LInterfaceRequest.java
@@ -0,0 +1,244 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.LInterface;
+
+public class LInterfaceRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String LAGINTERFACE_LINTERFACE_PATH = "org.openecomp.sdnc.sli.aai.path.lag.interface.l.interface";
+ public static final String LAGINTERFACE_LINTERFACE_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.lag.interface.l.interface.query";
+
+ public static final String P_INTERFACE_LINTERFACE_PATH = "org.openecomp.sdnc.sli.aai.path.p.interface.l.interface";
+ public static final String P_INTERFACE_LINTERFACE_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.p.interface.l.interface.query";
+
+ public static final String LAGINTERFACE_LINTERFACE_PNF_PATH = "org.openecomp.sdnc.sli.aai.path.lag.interface.l.interface.pnf";
+ public static final String P_INTERFACE_LINTERFACE_PNF_PATH = "org.openecomp.sdnc.sli.aai.path.p.interface.l.interface.pnf";
+
+ private final String laginterface_linterface_path;
+ private final String laginterface_linterface_query_path;
+ private final String p_interface_linterface_path;
+ private final String p_interface_linterface_query_path;
+
+ private final String laginterface_linterface_pnf_path;
+ private final String p_interface_linterface_pnf_path;
+
+ public static final String INTERFACE_NAME = "interface-name";
+ public static final String LINTERFACE_INTERFACE_NAME = "l-interface.interface-name";
+ public static final String LAG_INTERFACE_INTERFACE_NAME = "lag-interface.interface-name";
+ public static final String P_INTERFACE_INTERFACE_NAME = "p-interface.interface-name";
+
+ public static final String ROUTER_NAME = "router-name";
+ public static final String HOSTNAME = "hostname";
+
+
+ public static enum TYPE { L2_BRIDGE_BGF, L2_BRIDGE_SBG};
+
+ private final TYPE type;
+
+ public LInterfaceRequest(TYPE type) {
+ this.type = type;
+
+ laginterface_linterface_path = configProperties.getProperty(LAGINTERFACE_LINTERFACE_PATH);
+ laginterface_linterface_query_path = configProperties.getProperty(LAGINTERFACE_LINTERFACE_QUERY_PATH);
+
+ p_interface_linterface_path = configProperties.getProperty(P_INTERFACE_LINTERFACE_PATH);
+ p_interface_linterface_query_path = configProperties.getProperty(P_INTERFACE_LINTERFACE_QUERY_PATH);
+
+ laginterface_linterface_pnf_path = configProperties.getProperty(LAGINTERFACE_LINTERFACE_PNF_PATH);
+ p_interface_linterface_pnf_path = configProperties.getProperty(P_INTERFACE_LINTERFACE_PNF_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = null;
+ String encoded_vnf = null;
+ String hostname = null;
+ String pnfname = null;
+ String interfaceName = null;
+
+ if(type == TYPE.L2_BRIDGE_SBG) {
+ if(requestProperties.containsKey(PnfRequest.PNF_PNF_NAME)) {
+ request_url = target_uri + laginterface_linterface_pnf_path;
+ } else {
+ request_url = target_uri + laginterface_linterface_path;
+ }
+
+ if(requestProperties.containsKey(ROUTER_NAME)) {
+ hostname = requestProperties.getProperty(ROUTER_NAME);
+ encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{hostname}", encoded_vnf);
+ }
+
+ if(requestProperties.containsKey(HOSTNAME)) {
+ hostname = requestProperties.getProperty(HOSTNAME);
+ encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{hostname}", encoded_vnf);
+ }
+
+ if(requestProperties.containsKey(PnfRequest.PNF_PNF_NAME)) {
+ pnfname = requestProperties.getProperty(PnfRequest.PNF_PNF_NAME);
+ encoded_vnf = encodeQuery(pnfname);
+ request_url = request_url.replace("{pnf-name}", encoded_vnf);
+ }
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(LAG_INTERFACE_INTERFACE_NAME));
+ request_url = request_url.replace("{lag-interface.interface-name}", encoded_vnf) ;
+
+
+ interfaceName = requestProperties.getProperty(INTERFACE_NAME);
+ if(interfaceName == null || interfaceName.isEmpty()) {
+ interfaceName = requestProperties.getProperty(LINTERFACE_INTERFACE_NAME);
+ }
+ encoded_vnf = encodeQuery(interfaceName);
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+
+ }
+ if(type == TYPE.L2_BRIDGE_BGF) {
+ if(requestProperties.containsKey(PnfRequest.PNF_PNF_NAME)) {
+ request_url = target_uri + p_interface_linterface_pnf_path;
+ } else {
+ request_url = target_uri + p_interface_linterface_path;
+ }
+
+
+ if(requestProperties.containsKey(ROUTER_NAME)) {
+ hostname = requestProperties.getProperty(ROUTER_NAME);
+ encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{hostname}", encoded_vnf);
+ }
+
+ if(requestProperties.containsKey(HOSTNAME)) {
+ hostname = requestProperties.getProperty(HOSTNAME);
+ encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{hostname}", encoded_vnf);
+ }
+
+ if(requestProperties.containsKey(PnfRequest.PNF_PNF_NAME)) {
+ pnfname = requestProperties.getProperty(PnfRequest.PNF_PNF_NAME);
+ encoded_vnf = encodeQuery(pnfname);
+ request_url = request_url.replace("{pnf-name}", encoded_vnf);
+ }
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(P_INTERFACE_INTERFACE_NAME));
+ request_url = request_url.replace("{p-interface.interface-name}", encoded_vnf) ;
+
+
+ interfaceName = requestProperties.getProperty(INTERFACE_NAME);
+ if(interfaceName == null || interfaceName.isEmpty()) {
+ interfaceName = requestProperties.getProperty(LINTERFACE_INTERFACE_NAME);
+ }
+ encoded_vnf = encodeQuery(interfaceName);
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+ }
+
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ if(hostname != null)
+ aaiService.LOGwriteDateTrace("hostname", hostname);
+ if(pnfname != null)
+ aaiService.LOGwriteDateTrace("pnf-name", pnfname);
+ if(requestProperties.containsKey(LAG_INTERFACE_INTERFACE_NAME)) {
+ aaiService.LOGwriteDateTrace("lag-interface.interface-name", requestProperties.getProperty(LAG_INTERFACE_INTERFACE_NAME));
+ }
+ if(requestProperties.containsKey(P_INTERFACE_INTERFACE_NAME)) {
+ aaiService.LOGwriteDateTrace("p-interface.interface-name", requestProperties.getProperty(P_INTERFACE_INTERFACE_NAME));
+ }
+ aaiService.LOGwriteDateTrace("interface-name", interfaceName);
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ LInterface vnfc = (LInterface)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {};
+ if(type == TYPE.L2_BRIDGE_SBG) {
+ String[] tmpArray = {INTERFACE_NAME, LINTERFACE_INTERFACE_NAME, LAG_INTERFACE_INTERFACE_NAME, HOSTNAME, ROUTER_NAME, PnfRequest.PNF_PNF_NAME};
+ args = tmpArray;
+ }
+ if(type == TYPE.L2_BRIDGE_BGF) {
+ String[] tmpArray = {INTERFACE_NAME, LINTERFACE_INTERFACE_NAME, P_INTERFACE_INTERFACE_NAME, HOSTNAME, ROUTER_NAME, PnfRequest.PNF_PNF_NAME};
+ args = tmpArray;
+ }
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return LInterface.class;
+ }
+
+ @Override
+ public String getPrimaryResourceName(String resource) {
+ return "l-interface";
+ }
+
+ public static final String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+ String interfaceName = requestProperties.getProperty(INTERFACE_NAME);
+ if(interfaceName == null || interfaceName.isEmpty()) {
+ interfaceName = requestProperties.getProperty(LINTERFACE_INTERFACE_NAME);
+ }
+
+ request_url = request_url.replace("{interface-name}", encodeQuery(interfaceName)) ;
+ return request_url;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LagInterfacePnfRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LagInterfacePnfRequest.java
new file mode 100644
index 0000000..8dbbd4f
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LagInterfacePnfRequest.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.LagInterface;
+
+public class LagInterfacePnfRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String LAG_INTERFACE_PATH = "org.openecomp.sdnc.sli.aai.path.pserver.pinterface";
+ public static final String LAG_INTERFACE_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.pserver.pinterface.query";
+
+ private final String lag_interface_path;
+ private final String lag_interface_query_path;
+
+ public static final String INTERFACE_NAME = "interface-name";
+ public static final String LAG_INTERFACE_INTERFACE_NAME = "lag-interface.interface-name";
+
+
+ public LagInterfacePnfRequest() {
+ lag_interface_path = configProperties.getProperty(PnfRequest.PNF_PATH) + "/lag-interfaces/lag-interface/{interface-name}";
+ lag_interface_query_path = configProperties.getProperty(LAG_INTERFACE_QUERY_PATH);
+ LoggerFactory.getLogger(LagInterfacePnfRequest.class).debug("org.openecomp.sdnc.sli.aai.path.pserver.pinterface=\t" + lag_interface_path);
+ LoggerFactory.getLogger(LagInterfacePnfRequest.class).debug("org.openecomp.sdnc.sli.aai.path.pserver.pinterface.query=\t" + lag_interface_query_path);
+ if(lag_interface_path == null) {
+ LoggerFactory.getLogger(LagInterfacePnfRequest.class).warn("org.openecomp.sdnc.sli.aai.path.pserver.pinterface PATH not found in aaiclient.properties");
+ }
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri + lag_interface_path;
+ String encoded_vnf = null;
+
+ String interfaceName = null;
+
+ if(requestProperties.containsKey(INTERFACE_NAME)) {
+ interfaceName = requestProperties.getProperty(INTERFACE_NAME);
+ } else
+ if(requestProperties.containsKey(LAG_INTERFACE_INTERFACE_NAME)) {
+ interfaceName = requestProperties.getProperty(LAG_INTERFACE_INTERFACE_NAME);
+ }
+
+ encoded_vnf = encodeQuery(interfaceName);
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+
+ request_url = PnfRequest.processPathData(request_url,requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("interface-name", interfaceName);
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ LagInterface vnfc = (LagInterface)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {INTERFACE_NAME, LAG_INTERFACE_INTERFACE_NAME};
+ String[] tmpArgs = new PnfRequest().getArgsList();
+
+ args = (String[]) ArrayUtils.addAll(args, tmpArgs);
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return LagInterface.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LogicalLinkRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LogicalLinkRequest.java
new file mode 100644
index 0000000..66c80b0
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/LogicalLinkRequest.java
@@ -0,0 +1,110 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.LogicalLink;
+
+public class LogicalLinkRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String LOGICAL_LINK_PATH = "org.openecomp.sdnc.sli.aai.path.logical.link";
+ public static final String LOGICAL_LINK_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.logical.link.query";
+
+ private final String logical_link_path;
+ private final String logical_link_query_path;
+
+ public static final String LIK_NAME = "link-name";
+ public static final String LOGICAL_LIK_NAME = "logical-link.link-name";
+
+ public LogicalLinkRequest() {
+ logical_link_path = configProperties.getProperty(LOGICAL_LINK_PATH);
+ logical_link_query_path = configProperties.getProperty(LOGICAL_LINK_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri + logical_link_path;
+ String encoded_vnf = null;
+
+ String linkNameKey = LIK_NAME;
+ if(requestProperties.containsKey(LOGICAL_LIK_NAME)) {
+ linkNameKey = LOGICAL_LIK_NAME;
+ }
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(linkNameKey));
+ request_url = request_url.replace("{link-name}", encoded_vnf) ;
+
+
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("link-name", requestProperties.getProperty(linkNameKey));
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ LogicalLink vnfc = (LogicalLink)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {LIK_NAME, LOGICAL_LIK_NAME};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return LogicalLink.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/NamedQueryRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/NamedQueryRequest.java
new file mode 100644
index 0000000..5fa1270
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/NamedQueryRequest.java
@@ -0,0 +1,133 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.AnnotationIntrospector;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector;
+import com.fasterxml.jackson.databind.type.TypeFactory;
+import com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector;
+
+import org.openecomp.aai.inventory.v8.InventoryResponseItems;
+
+public class NamedQueryRequest extends AAIRequest {
+
+ public static final String NAMED_SEARCH_PATH = "org.openecomp.sdnc.sli.aai.query.named";
+
+ private final String named_search_path;
+
+ public static final String NAMED_QUERY_UUID = "named-query-uuid";
+ public static final String PREFIX = "prefix";
+
+
+ public NamedQueryRequest() {
+ named_search_path = configProperties.getProperty(NAMED_SEARCH_PATH);
+ }
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+named_search_path;
+
+ request_url = processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = new ObjectMapper();
+ AnnotationIntrospector introspector = new JaxbAnnotationIntrospector(TypeFactory.defaultInstance());
+ AnnotationIntrospector secondary = new JacksonAnnotationIntrospector();
+ mapper.setAnnotationIntrospector(AnnotationIntrospector.pair(introspector, secondary));
+ mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+
+ AAIDatum tenant = (AAIDatum)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(tenant);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {NAMED_QUERY_UUID, PREFIX};
+ return args;
+ }
+
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return InventoryResponseItems.class;
+ }
+
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+
+
+ String encoded_vnf ;
+ String key = NAMED_QUERY_UUID;
+
+ if(requestProperties.containsKey(key)) {
+ encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{named-query-uuid}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("named-query-uuid", requestProperties.getProperty(key));
+ }
+
+ key = PREFIX;
+
+ if(requestProperties.containsKey(key)) {
+ encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{prefix}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("prefix", requestProperties.getProperty(key));
+ }
+
+ return request_url;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/NodesQueryRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/NodesQueryRequest.java
new file mode 100644
index 0000000..bc1dccb
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/NodesQueryRequest.java
@@ -0,0 +1,145 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.SearchResults;
+
+public class NodesQueryRequest extends AAIRequest {
+
+ public static final String NODES_SEARCH_PATH = "org.openecomp.sdnc.sli.aai.query.nodes";
+
+ private final String nodes_search_path;
+
+ public static final String NODE_TYPE = "node-type";
+ public static final String ENTITY_IDENTIFIER = "entity-identifier";
+ public static final String ENTITY_VALUE = "entity-value";
+
+
+ public NodesQueryRequest() {
+ nodes_search_path = configProperties.getProperty(NODES_SEARCH_PATH);
+ }
+
+
+// @Override
+// public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+//
+// String request_url = target_uri+generic_search_path;
+// String key = START_NODE_TYPE;
+//
+// String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+// request_url = request_url.replace("{vnf-id}", encoded_vnf) ;
+//
+// if(resourceVersion != null) {
+// request_url = request_url +"?resource-version="+resourceVersion;
+// }
+// URL http_req_url = new URL(request_url);
+//
+// aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+//
+//
+// return http_req_url;
+// }
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+nodes_search_path;
+
+ request_url = processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ SearchResults tenant = (SearchResults)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(tenant);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {NODE_TYPE, ENTITY_IDENTIFIER, ENTITY_VALUE};
+ return args;
+ }
+
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return SearchResults.class;
+ }
+
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+
+ String key = ENTITY_IDENTIFIER;
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{entity-identifier}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("entity-identifier", requestProperties.getProperty(key));
+
+ key = ENTITY_VALUE;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{entity-name}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("entity-name", requestProperties.getProperty(key));
+
+ key = NODE_TYPE;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{node-type}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("node-type", requestProperties.getProperty(key));
+
+ return request_url;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PInterfacePnfRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PInterfacePnfRequest.java
new file mode 100644
index 0000000..91f6569
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PInterfacePnfRequest.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.apache.commons.lang.ArrayUtils;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.PInterface;
+
+public class PInterfacePnfRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String PINTERFACE_PATH = "org.openecomp.sdnc.sli.aai.path.pserver.pinterface";
+ public static final String PINTERFACE_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.pserver.pinterface.query";
+
+ private final String pinterface_path;
+ private final String pinterface_query_path;
+
+ public static final String INTERFACE_NAME = "interface-name";
+ public static final String PINTERFACE_INTERFACE_NAME = "p-interface.interface-name";
+
+
+ public PInterfacePnfRequest() {
+ pinterface_path = configProperties.getProperty(PnfRequest.PNF_PATH) + "/p-interfaces/p-interface/{interface-name}";
+ pinterface_query_path = configProperties.getProperty(PINTERFACE_QUERY_PATH);
+ LoggerFactory.getLogger(PInterfacePnfRequest.class).debug("org.openecomp.sdnc.sli.aai.path.pserver.pinterface=\t" + pinterface_path);
+ LoggerFactory.getLogger(PInterfacePnfRequest.class).debug("org.openecomp.sdnc.sli.aai.path.pserver.pinterface.query=\t" + pinterface_query_path);
+ if(pinterface_path == null) {
+ LoggerFactory.getLogger(PInterfacePnfRequest.class).warn("org.openecomp.sdnc.sli.aai.path.pserver.pinterface PATH not found in aaiclient.properties");
+ }
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri + pinterface_path;
+ String encoded_vnf = null;
+
+ String interfaceName = null;
+
+ if(requestProperties.containsKey(INTERFACE_NAME)) {
+ interfaceName = requestProperties.getProperty(INTERFACE_NAME);
+ } else
+ if(requestProperties.containsKey(PINTERFACE_INTERFACE_NAME)) {
+ interfaceName = requestProperties.getProperty(PINTERFACE_INTERFACE_NAME);
+ }
+
+ encoded_vnf = encodeQuery(interfaceName);
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+
+ request_url = PnfRequest.processPathData(request_url,requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("interface-name", interfaceName);
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ PInterface vnfc = (PInterface)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {INTERFACE_NAME, PINTERFACE_INTERFACE_NAME};
+ String[] tmpArgs = new PnfRequest().getArgsList();
+
+ args = (String[]) ArrayUtils.addAll(args, tmpArgs);
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return PInterface.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PInterfaceRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PInterfaceRequest.java
new file mode 100644
index 0000000..33d6b3b
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PInterfaceRequest.java
@@ -0,0 +1,133 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.PInterface;
+
+public class PInterfaceRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String PINTERFACE_PATH = "org.openecomp.sdnc.sli.aai.path.pserver.pinterface";
+ public static final String PINTERFACE_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.pserver.pinterface.query";
+
+ private final String pinterface_path;
+ private final String pinterface_query_path;
+
+ public static final String HOSTNAME = "hostname";
+ public static final String PSERVER_HOSTNAME = "pserver.hostname";
+ public static final String INTERFACE_NAME = "interface-name";
+ public static final String PINTERFACE_INTERFACE_NAME = "p-interface.interface-name";
+
+
+ public PInterfaceRequest() {
+ pinterface_path = configProperties.getProperty(PINTERFACE_PATH);
+ pinterface_query_path = configProperties.getProperty(PINTERFACE_QUERY_PATH);
+ LoggerFactory.getLogger(PInterfaceRequest.class).debug("org.openecomp.sdnc.sli.aai.path.pserver.pinterface=\t" + pinterface_path);
+ LoggerFactory.getLogger(PInterfaceRequest.class).debug("org.openecomp.sdnc.sli.aai.path.pserver.pinterface.query=\t" + pinterface_query_path);
+ if(pinterface_path == null) {
+ LoggerFactory.getLogger(PInterfaceRequest.class).warn("org.openecomp.sdnc.sli.aai.path.pserver.pinterface PATH not found in aaiclient.properties");
+ }
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri + pinterface_path;
+ String encoded_vnf = null;
+
+ String hostname = null;
+ String interfaceName = null;
+
+ if(requestProperties.containsKey(HOSTNAME)) {
+ hostname = requestProperties.getProperty(HOSTNAME);
+ }
+ if(requestProperties.containsKey(PSERVER_HOSTNAME)) {
+ hostname = requestProperties.getProperty(PSERVER_HOSTNAME);
+ }
+
+ if(requestProperties.containsKey(INTERFACE_NAME)) {
+ interfaceName = requestProperties.getProperty(INTERFACE_NAME);
+ }
+ if(requestProperties.containsKey(PINTERFACE_INTERFACE_NAME)) {
+ interfaceName = requestProperties.getProperty(PINTERFACE_INTERFACE_NAME);
+ }
+
+ encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{hostname}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(interfaceName);
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("hostname", hostname);
+ aaiService.LOGwriteDateTrace("interface-name", hostname);
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ PInterface vnfc = (PInterface)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {HOSTNAME, PSERVER_HOSTNAME, INTERFACE_NAME, PINTERFACE_INTERFACE_NAME};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return PInterface.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PServerRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PServerRequest.java
new file mode 100644
index 0000000..09674b8
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PServerRequest.java
@@ -0,0 +1,116 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Pserver;
+
+public class PServerRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String PSERVER_PATH = "org.openecomp.sdnc.sli.aai.path.pserver";
+ public static final String PSERVER_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.pserver.query";
+
+ private final String pserver_path;
+ private final String pserver_query_path;
+
+ public static final String HOSTNAME = "hostname";
+ public static final String PSERVER_HOSTNAME = "pserver.hostname";
+
+
+ public PServerRequest() {
+ pserver_path = configProperties.getProperty(PSERVER_PATH);
+ pserver_query_path = configProperties.getProperty(PSERVER_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri + pserver_path;
+ String encoded_vnf = null;
+
+ String hostname = null;
+ if(requestProperties.containsKey(HOSTNAME)) {
+ hostname = requestProperties.getProperty(HOSTNAME);
+ encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{hostname}", encoded_vnf) ;
+
+ } else if(requestProperties.containsKey(PSERVER_HOSTNAME)) {
+ hostname = requestProperties.getProperty(PSERVER_HOSTNAME);
+ encoded_vnf = encodeQuery(hostname);
+ request_url = request_url.replace("{hostname}", encoded_vnf) ;
+
+ } else {
+ LOG.error("Required key "+PSERVER_HOSTNAME+" is misssing.");
+ }
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("hostname", hostname);
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Pserver vnfc = (Pserver)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {HOSTNAME, PSERVER_HOSTNAME};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Pserver.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PathRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PathRequest.java
new file mode 100644
index 0000000..e46f005
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PathRequest.java
@@ -0,0 +1,88 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class PathRequest extends AAIRequest {
+
+ private final Class<? extends AAIDatum> classType;
+
+ public static final String RESOURCE_PATH = "resource-path";
+
+ public PathRequest(Class<?> type) {
+ classType = (Class<? extends AAIDatum>)type;
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri + "{resource-path}";
+
+ String encoded_vnf = requestProperties.getProperty(RESOURCE_PATH);
+ request_url = request_url.replace("{resource-path}", encoded_vnf) ;
+
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(classType);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {RESOURCE_PATH};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return classType;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PhysicalLinkRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PhysicalLinkRequest.java
new file mode 100644
index 0000000..055da4a
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PhysicalLinkRequest.java
@@ -0,0 +1,113 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.PhysicalLink;
+
+public class PhysicalLinkRequest extends AAIRequest {
+
+ // physical link
+ public static final String PHYSICAL_LINK_PATH = "org.openecomp.sdnc.sli.aai.path.physical.link";
+ public static final String PHYSICAL_LINK_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.physical.link.query";
+
+ private final String physical_link_path;
+ private final String physical_link_query_path;
+
+ public static final String LINK_NAME = "link-name";
+ public static final String PHYSICAL_LINK_NAME = "physical-link.link-name";
+
+
+ public PhysicalLinkRequest() {
+ physical_link_path = configProperties.getProperty(PHYSICAL_LINK_PATH);
+ physical_link_query_path = configProperties.getProperty(PHYSICAL_LINK_QUERY_PATH);
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+physical_link_path;
+
+ String linkName = null;
+ if(requestProperties.containsKey(LINK_NAME)) {
+ linkName = requestProperties.getProperty(LINK_NAME);
+ }
+
+ if(requestProperties.containsKey(PHYSICAL_LINK_NAME)) {
+ linkName = requestProperties.getProperty(PHYSICAL_LINK_NAME);
+ }
+
+
+ String encoded_vnf = encodeQuery(linkName);
+ request_url = request_url.replace("{link-name}", encoded_vnf) ;
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("link-name", linkName);
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ PhysicalLink vpe = (PhysicalLink)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vpe);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {LINK_NAME, PHYSICAL_LINK_NAME};
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return PhysicalLink.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PnfRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PnfRequest.java
new file mode 100644
index 0000000..e668a27
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/PnfRequest.java
@@ -0,0 +1,117 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Pnf;
+
+public class PnfRequest extends AAIRequest {
+
+ // pnf
+ public static final String PNF_PATH = "org.openecomp.sdnc.sli.aai.path.pnf";
+
+
+ private final String pnf_path;
+
+
+ public static final String PNF_NAME = "pnf-name";
+ public static final String PNF_PNF_NAME = "pnf.pnf-name";
+
+
+ public PnfRequest() {
+ pnf_path = configProperties.getProperty(PNF_PATH);
+
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+pnf_path;
+ request_url = processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+
+ String key = PNF_NAME;
+ if(requestProperties.containsKey(PNF_PNF_NAME)) {
+ key = PNF_PNF_NAME;
+ }
+
+ if(!requestProperties.containsKey(key)) {
+ aaiService.logKeyError(String.format("%s,%s", PNF_NAME, PNF_PNF_NAME));
+ }
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{pnf-name}", encoded_vnf) ;
+
+ return request_url;
+ }
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Pnf pnf = (Pnf)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(pnf);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {PNF_NAME, PNF_PNF_NAME};
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Pnf.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/RelationshipRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/RelationshipRequest.java
new file mode 100644
index 0000000..06ab78f
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/RelationshipRequest.java
@@ -0,0 +1,127 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.RelationshipList;
+
+public class RelationshipRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String RELATIONSHIP_LIST_PATH = "org.openecomp.sdnc.sli.aai.path.relationship.list";
+ public static final String RELATIONSHIP_LIST_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.relationship.list.query";
+
+ private final String relationship_path;
+ private final String relationship_query_path;
+
+ public static final String RELATED_TO = "related-to";
+ public static final String RELATIONSHIP_KEY = "relationship-key";
+
+ public RelationshipRequest() {
+ relationship_path = configProperties.getProperty(RELATIONSHIP_LIST_PATH, "/relationship-list/relationship");
+ relationship_query_path = configProperties.getProperty(RELATIONSHIP_LIST_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ AAIRequest masterRequest = (AAIRequest)requestProperties.get(MASTER_REQUEST);
+ URL masterURL = masterRequest.getRequestUrl(method, null);
+
+ String request_url = masterURL.toString();
+ request_url = request_url + relationship_path;
+
+ if(request_url.contains("//")) {
+ request_url = request_url.replaceAll("//", "/");
+ }
+
+ if(requestProperties.containsKey(RELATED_TO)) {
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(RELATED_TO));
+ request_url = request_url.replace("{related-to}", encoded_vnf) ;
+ }
+
+// if(resourceVersion != null) {
+// request_url = request_url +"?resource-version="+resourceVersion;
+// }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("related-to", requestProperties.getProperty(RELATED_TO));
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+relationship_query_path;
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(RELATIONSHIP_KEY));
+ request_url = request_url.replace("{tenant-name}", encoded_vnf) ;
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("tenant_name", requestProperties.getProperty(RELATIONSHIP_KEY));
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Object tenant = requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(tenant);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {RELATED_TO, RELATIONSHIP_KEY};
+ return args;
+ }
+
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return RelationshipList.class;
+ }
+
+ public boolean isDeleteDataRequired() {
+ return true;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SelfLinkRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SelfLinkRequest.java
new file mode 100644
index 0000000..d8c36f3
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SelfLinkRequest.java
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class SelfLinkRequest extends AAIRequest {
+
+ private final Class<? extends AAIDatum> classType;
+
+ public static final String SELFLINK = "selflink";
+
+ public SelfLinkRequest(Class<?> type) {
+ classType = (Class<? extends AAIDatum>)type;
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = null;
+
+ request_url = requestProperties.getProperty(SELFLINK);
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(classType);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {SELFLINK};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return classType;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceInstanceRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceInstanceRequest.java
new file mode 100644
index 0000000..e03fc98
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceInstanceRequest.java
@@ -0,0 +1,120 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.ServiceInstance;
+
+public class ServiceInstanceRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String REQUEST_PATH = "org.openecomp.sdnc.sli.aai.path.service.instance";
+ public static final String QUERY_REQUEST_PATH = "org.openecomp.sdnc.sli.aai.path.service.instance.query";
+
+ private final String request_path;
+ private final String query_request_path;
+
+ public static final String SERVICE_INSTANCE_ID = "service-instance.service-instance-id";
+
+
+
+ public ServiceInstanceRequest() {
+ request_path = configProperties.getProperty(REQUEST_PATH);
+ query_request_path = configProperties.getProperty(QUERY_REQUEST_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri + request_path;
+ String encoded_vnf = null;
+
+ request_url = processPathData(request_url, requestProperties);
+ request_url = ServiceSubscriptionRequest.processPathData(request_url, requestProperties);
+ request_url = CustomerRequest.processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+
+ String key = SERVICE_INSTANCE_ID;
+
+ if(!requestProperties.containsKey(key)) {
+ aaiService.logKeyError(SERVICE_INSTANCE_ID);
+ }
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{service-instance-id}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("service-instance-id", requestProperties.getProperty(key));
+
+ return request_url;
+ }
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ ServiceInstance vnfc = (ServiceInstance)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {SERVICE_INSTANCE_ID, ServiceSubscriptionRequest.SERVICE_TYPE, CustomerRequest.CUSTOMER_GLOBAL_CUSTOMER_ID};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return ServiceInstance.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceRequest.java
new file mode 100644
index 0000000..8ddbaef
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceRequest.java
@@ -0,0 +1,109 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Service;
+
+public class ServiceRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String SERVICE_PATH = "org.openecomp.sdnc.sli.aai.path.service";
+ public static final String SERVICE_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.service.query";
+
+ private final String service_path;
+ private final String service_query_path;
+
+ public static final String SERVICE_ID = "service.service-id";
+
+
+
+ public ServiceRequest() {
+ service_path = configProperties.getProperty(SERVICE_PATH);
+ service_query_path = configProperties.getProperty(SERVICE_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri + service_path;
+ String encoded_vnf = null;
+
+ String serviceId = null;
+ if(requestProperties.containsKey(SERVICE_ID)) {
+ serviceId = requestProperties.getProperty(SERVICE_ID);
+ }
+
+ encoded_vnf = encodeQuery(serviceId);
+ request_url = request_url.replace("{service-id}", encoded_vnf) ;
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("service-id", serviceId);
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Service vnfc = (Service)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {SERVICE_ID};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Service.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceSubscriptionRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceSubscriptionRequest.java
new file mode 100644
index 0000000..74a0340
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/ServiceSubscriptionRequest.java
@@ -0,0 +1,120 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.ServiceSubscription;
+
+public class ServiceSubscriptionRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String REQUEST_PATH = "org.openecomp.sdnc.sli.aai.path.service.subscription";
+ public static final String QUERY_REQUEST_PATH = "org.openecomp.sdnc.sli.aai.path.service.subscription.query";
+
+ private final String request_path;
+ private final String query_request_path;
+
+ public static final String SERVICE_TYPE = "service-subscription.service-type";
+
+
+
+ public ServiceSubscriptionRequest() {
+ request_path = configProperties.getProperty(REQUEST_PATH);
+ query_request_path = configProperties.getProperty(QUERY_REQUEST_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri + request_path;
+ String encoded_vnf = null;
+
+ request_url = processPathData(request_url, requestProperties);
+ request_url = CustomerRequest.processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+// aaiService.LOGwriteDateTrace("service-type", serviceId);
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+
+ String key = SERVICE_TYPE;
+
+ if(!requestProperties.containsKey(key)) {
+ aaiService.logKeyError(SERVICE_TYPE);
+ }
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{service-type}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("service-type", requestProperties.getProperty(key));
+
+ return request_url;
+ }
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ ServiceSubscription vnfc = (ServiceSubscription)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {SERVICE_TYPE, CustomerRequest.CUSTOMER_GLOBAL_CUSTOMER_ID};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return ServiceSubscription.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SubInterfaceRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SubInterfaceRequest.java
new file mode 100644
index 0000000..67bb96f
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SubInterfaceRequest.java
@@ -0,0 +1,185 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.LInterface;
+
+public class SubInterfaceRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String PNF_LAGINTERFACE_SUBINTERFACE_PATH = "org.openecomp.sdnc.sli.aai.path.pnf.lag.interface.subinterface";
+ public static final String PNF_LAGINTERFACE_SUBINTERFACE_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.pnf.lag.interface.subinterface.query";
+
+ public static final String PNF_P_INTERFACE_SUBINTERFACE_PATH = "org.openecomp.sdnc.sli.aai.path.pnf.p.interface.l.interface";
+ public static final String PNF_P_INTERFACE_SUBINTERFACE_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.pnf.p.interface.l.interface.query";
+
+ private final String pnf_laginterface_subinterface_path;
+ private final String pnf_laginterface_subinterface_query_path;
+ private final String pnf_p_interface_subinterface_path;
+ private final String pnf_p_interface_subinterface_query_path;
+
+ public static final String SUBINTERFACE_INTERFACE_NAME = "l-interface.interface-name";
+ public static final String LAG_INTERFACE_INTERFACE_NAME = "lag-interface.interface-name";
+
+ public static enum TYPE { L2_BRIDGE_BGF, L2_BRIDGE_SBG};
+
+ private final TYPE type;
+
+ public SubInterfaceRequest(TYPE type) {
+ this.type = type;
+
+ pnf_laginterface_subinterface_path = configProperties.getProperty(PNF_LAGINTERFACE_SUBINTERFACE_PATH);
+ pnf_laginterface_subinterface_query_path = configProperties.getProperty(PNF_LAGINTERFACE_SUBINTERFACE_QUERY_PATH);
+
+ pnf_p_interface_subinterface_path = configProperties.getProperty(PNF_P_INTERFACE_SUBINTERFACE_PATH);
+ pnf_p_interface_subinterface_query_path = configProperties.getProperty(PNF_P_INTERFACE_SUBINTERFACE_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = null;
+ String encoded_vnf = null;
+
+ String pnfname = null;
+ String interfaceName = null;
+
+ if(type == TYPE.L2_BRIDGE_SBG) {
+ request_url = target_uri + pnf_laginterface_subinterface_path;
+
+ if(requestProperties.containsKey(PnfRequest.PNF_PNF_NAME)) {
+ pnfname = requestProperties.getProperty(PnfRequest.PNF_PNF_NAME);
+ encoded_vnf = encodeQuery(pnfname);
+ request_url = request_url.replace("{pnf-name}", encoded_vnf);
+ }
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(LAG_INTERFACE_INTERFACE_NAME));
+ request_url = request_url.replace("{lag-interface.interface-name}", encoded_vnf) ;
+
+
+ interfaceName = requestProperties.getProperty(SUBINTERFACE_INTERFACE_NAME);
+ encoded_vnf = encodeQuery(interfaceName);
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+
+ }
+ if(type == TYPE.L2_BRIDGE_BGF) {
+ request_url = target_uri + pnf_p_interface_subinterface_path;
+
+ if(requestProperties.containsKey(PnfRequest.PNF_PNF_NAME)) {
+ pnfname = requestProperties.getProperty(PnfRequest.PNF_PNF_NAME);
+ encoded_vnf = encodeQuery(pnfname);
+ request_url = request_url.replace("{pnf-name}", encoded_vnf);
+ }
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(PInterfaceRequest.PINTERFACE_INTERFACE_NAME));
+ request_url = request_url.replace("{p-interface.interface-name}", encoded_vnf) ;
+
+
+ interfaceName = requestProperties.getProperty(SUBINTERFACE_INTERFACE_NAME);
+ encoded_vnf = encodeQuery(interfaceName);
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+ }
+
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ if(pnfname != null)
+ aaiService.LOGwriteDateTrace("pnf-name", pnfname);
+ if(requestProperties.containsKey(LAG_INTERFACE_INTERFACE_NAME)) {
+ aaiService.LOGwriteDateTrace("lag-interface.interface-name", requestProperties.getProperty(LAG_INTERFACE_INTERFACE_NAME));
+ }
+ if(requestProperties.containsKey(PInterfaceRequest.PINTERFACE_INTERFACE_NAME)) {
+ aaiService.LOGwriteDateTrace("p-interface.interface-name", requestProperties.getProperty(PInterfaceRequest.PINTERFACE_INTERFACE_NAME));
+ }
+ aaiService.LOGwriteDateTrace("interface-name", interfaceName);
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ LInterface vnfc = (LInterface)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {};
+ if(type == TYPE.L2_BRIDGE_SBG) {
+ String[] tmpArray = {SUBINTERFACE_INTERFACE_NAME, LAG_INTERFACE_INTERFACE_NAME, PnfRequest.PNF_PNF_NAME};
+ args = tmpArray;
+ }
+ if(type == TYPE.L2_BRIDGE_BGF) {
+ String[] tmpArray = {SUBINTERFACE_INTERFACE_NAME, PInterfaceRequest.PINTERFACE_INTERFACE_NAME, PnfRequest.PNF_PNF_NAME};
+ args = tmpArray;
+ }
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return LInterface.class;
+ }
+
+ @Override
+ public String getPrimaryResourceName(String resource) {
+ return "sub-interface";
+ }
+
+ public static final String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+ String interfaceName = requestProperties.getProperty(SUBINTERFACE_INTERFACE_NAME);
+ request_url = request_url.replace("{interface-name}", encodeQuery(interfaceName)) ;
+ return request_url;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SubnetRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SubnetRequest.java
new file mode 100644
index 0000000..ccaf25f
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/SubnetRequest.java
@@ -0,0 +1,116 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Subnet;
+
+public class SubnetRequest extends AAIRequest {
+
+ public static final String SUBNET_PATH = "org.openecomp.sdnc.sli.aai.path.subnet";
+ public static final String SUBNET_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.subnet.query";
+
+ private final String subnet_path;
+ private final String subnet_query_path;
+
+ public static final String SUBNET_ID = "subnet.subnet-id";
+ public static final String NETWORK_ID = "l3-network.network-id";
+
+
+ public SubnetRequest() {
+ subnet_path = configProperties.getProperty(SUBNET_PATH);
+ subnet_query_path = configProperties.getProperty(SUBNET_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+subnet_path;
+
+ String encoded_vnf = null;
+ if(requestProperties.getProperty(SUBNET_ID) != null) {
+ encoded_vnf = encodeQuery(requestProperties.getProperty(SUBNET_ID));
+ request_url = request_url.replace("{subnet-id}", encoded_vnf) ;
+ }
+
+ if(requestProperties.getProperty(NETWORK_ID) != null) {
+ encoded_vnf = encodeQuery(requestProperties.getProperty(NETWORK_ID));
+ request_url = request_url.replace("{network-id}", encoded_vnf) ;
+
+ }
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace(SUBNET_ID, requestProperties.getProperty(SUBNET_ID));
+ aaiService.LOGwriteDateTrace(NETWORK_ID, requestProperties.getProperty(NETWORK_ID));
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Subnet vnfc = (Subnet)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {SUBNET_ID, NETWORK_ID};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Subnet.class;
+ }
+
+ public String getPrimaryResourceName(String resource) {
+ return "subnet";
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/TenantRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/TenantRequest.java
new file mode 100644
index 0000000..3b94adb
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/TenantRequest.java
@@ -0,0 +1,145 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Tenant;
+
+public class TenantRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String TENANT_PATH = "org.openecomp.sdnc.sli.aai.path.tenant";
+ public static final String TENANT_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.tenant.query";
+
+ private final String tenant_path;
+ private final String tenant_query_path;
+
+ public static final String TENANT_ID = "tenant_id";
+ public static final String TENANT_NAME = "tenant_name";
+ public static final String TENANT_TENANT_ID = "tenant.tenant_id";
+ public static final String TENANT_TENANT_NAME = "tenant.tenant_name";
+
+ public TenantRequest() {
+ tenant_path = configProperties.getProperty(TENANT_PATH);
+ tenant_query_path = configProperties.getProperty(TENANT_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ if(requestProperties.getProperty(TENANT_ID) == null && requestProperties.getProperty(TENANT_NAME) != null) {
+ return getRequestQueryUrl(method);
+ }
+
+ String request_url = target_uri+tenant_path;
+// String encoded_vnf = encodeQuery(requestProperties.getProperty(TENANT_ID));
+// request_url = request_url.replace("{tenant-id}", encoded_vnf) ;
+
+ request_url = TenantRequest.processPathData(request_url, requestProperties);
+ if(requestProperties.containsKey(CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER)) {
+ request_url = CloudRegionRequest.processPathData(request_url, requestProperties);
+ }
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+tenant_query_path;
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(TENANT_NAME));
+ request_url = request_url.replace("{tenant-name}", encoded_vnf) ;
+
+ if(requestProperties.containsKey(CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER)) {
+ request_url = CloudRegionRequest.processPathData(request_url, requestProperties);
+ }
+
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("tenant_name", requestProperties.getProperty(TENANT_NAME));
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Tenant tenant = (Tenant)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(tenant);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {TENANT_ID, TENANT_NAME, TENANT_TENANT_ID, TENANT_TENANT_NAME, CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER, CloudRegionRequest.CLOUD_REGION_CLOUD_REGION_ID };
+ return args;
+ }
+
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Tenant.class;
+ }
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+ String key = TENANT_ID;
+ if(requestProperties.containsKey(TENANT_TENANT_ID)) {
+ key = TENANT_TENANT_ID;
+ }
+
+ if(!requestProperties.containsKey(key)) {
+ aaiService.logKeyError(String.format("%s,%s", TENANT_ID, TENANT_TENANT_ID));
+ }
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{tenant-id}", encoded_vnf) ;
+
+ aaiService.LOGwriteDateTrace("tenant-id", requestProperties.getProperty(key));
+ return request_url;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VLanRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VLanRequest.java
new file mode 100644
index 0000000..a24517b
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VLanRequest.java
@@ -0,0 +1,137 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Vlan;
+
+public class VLanRequest extends AAIRequest {
+
+ public static final String VLAN_PATH = "org.openecomp.sdnc.sli.aai.path.vlan";
+ public static final String GENERIC_VNF_VLAN_PATH ="org.openecomp.sdnc.sli.aai.path.generic.vnf.vlan";
+
+ private final String vlan_path;
+
+ public static final String VLAN_INTERFACE = "vlan-interface";
+ public static final String VLAN_VLAN_INTERFACE = "vlan.vlan-interface";
+
+
+ public VLanRequest() {
+ vlan_path = configProperties.getProperty(VLAN_PATH);
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+vlan_path;
+
+ String key = VLAN_INTERFACE;
+ if(requestProperties.containsKey(VLAN_VLAN_INTERFACE)) {
+ key = VLAN_VLAN_INTERFACE;
+ }
+
+ if(!requestProperties.containsKey(key)) {
+ aaiService.logKeyError(String.format("%s,%s", VLAN_INTERFACE, VLAN_VLAN_INTERFACE));
+ }
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+
+ request_url = request_url.replace("{vlan-interface}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("vlan-interface", requestProperties.getProperty(key));
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Vlan vnfc = (Vlan)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args =
+ {
+ VLAN_INTERFACE,
+ VLAN_VLAN_INTERFACE,
+ LInterfaceRequest.INTERFACE_NAME,
+ LInterfaceRequest.LINTERFACE_INTERFACE_NAME,
+ GenericVnfRequest.GENERIC_VNF_ID,
+ GenericVnfRequest.VNF_ID,
+ CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER,
+ CloudRegionRequest.CLOUD_REGION_CLOUD_REGION_ID
+ };
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Vlan.class;
+ }
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+ String key = VLAN_INTERFACE;
+ if(requestProperties.containsKey(VLAN_VLAN_INTERFACE)) {
+ key = VLAN_VLAN_INTERFACE;
+ }
+
+ if(!requestProperties.containsKey(key)) {
+ aaiService.logKeyError(String.format("%s,%s", VLAN_INTERFACE, VLAN_VLAN_INTERFACE));
+ }
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+
+ request_url = request_url.replace("{vlan-interface}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace("vlan-interface", requestProperties.getProperty(key));
+ return request_url;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VServerVLanRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VServerVLanRequest.java
new file mode 100644
index 0000000..28b5542
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VServerVLanRequest.java
@@ -0,0 +1,148 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Vlan;
+
+public class VServerVLanRequest extends AAIRequest {
+ //aai/v7/cloud-infrastructure/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}
+
+ // tenant (1602)
+ public static final String VLAN_PATH = "org.openecomp.sdnc.sli.aai.path.vlan";
+ public static final String VLAN_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.vlan.query";
+
+ private final String vlan_path;
+ private final String vlan_query_path;
+
+ public static final String TENANT_ID = "tenant.tenant_id";
+ public static final String VSERVER_ID = "vserver.vserver_id";
+ public static final String INTERFACE_NAME = "l-interface.interface-name";
+ public static final String VLAN_INTERFACE = "vlan.vlan-interface";
+
+ public VServerVLanRequest() {
+ vlan_path = configProperties.getProperty(VLAN_PATH);
+ vlan_query_path = configProperties.getProperty(VLAN_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+vlan_path;
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(TENANT_ID));
+ request_url = request_url.replace("{tenant-id}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(VSERVER_ID));
+ request_url = request_url.replace("{vserver-id}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(INTERFACE_NAME));
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(VLAN_INTERFACE));
+ request_url = request_url.replace("{vlan-interface}", encoded_vnf) ;
+
+ if(requestProperties.containsKey(CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER)) {
+ request_url = CloudRegionRequest.processPathData(request_url, requestProperties);
+ }
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("tenant-id", requestProperties.getProperty(TENANT_ID));
+ aaiService.LOGwriteDateTrace("vserver-id", requestProperties.getProperty(VSERVER_ID));
+ aaiService.LOGwriteDateTrace("interface-name", requestProperties.getProperty(INTERFACE_NAME));
+ aaiService.LOGwriteDateTrace("vlan-interface", requestProperties.getProperty(VLAN_INTERFACE));
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+vlan_path;
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(TENANT_ID));
+ request_url = request_url.replace("{tenant-id}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(VSERVER_ID));
+ request_url = request_url.replace("{vserver-id}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(INTERFACE_NAME));
+ request_url = request_url.replace("{interface-name}", encoded_vnf) ;
+
+ encoded_vnf = encodeQuery(requestProperties.getProperty(VLAN_INTERFACE));
+ request_url = request_url.replace("{vlan-interface}", encoded_vnf) ;
+
+ if(requestProperties.containsKey(CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER)) {
+ request_url = CloudRegionRequest.processPathData(request_url, requestProperties);
+ }
+
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("tenant-id", requestProperties.getProperty(TENANT_ID));
+ aaiService.LOGwriteDateTrace("vserver-id", requestProperties.getProperty(VSERVER_ID));
+ aaiService.LOGwriteDateTrace("interface-name", requestProperties.getProperty(INTERFACE_NAME));
+ aaiService.LOGwriteDateTrace("vlan-interface", requestProperties.getProperty(VLAN_INTERFACE));
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Vlan tenant = (Vlan)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(tenant);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {TENANT_ID, VSERVER_ID, INTERFACE_NAME, VLAN_INTERFACE, CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER, CloudRegionRequest.CLOUD_REGION_CLOUD_REGION_ID};
+ return args;
+ }
+
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Vlan.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VfModuleRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VfModuleRequest.java
new file mode 100644
index 0000000..64d65ef
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VfModuleRequest.java
@@ -0,0 +1,116 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.VfModule;
+
+public class VfModuleRequest extends AAIRequest {
+
+ // tenant (1602)
+ public static final String GENERIC_VNF_PATH = "org.openecomp.sdnc.sli.aai.path.vf.module";
+
+ private final String vf_module_path;
+
+ public static final String VF_MODULE_ID = "vf-module.vf-module-id";
+
+
+ public VfModuleRequest() {
+ vf_module_path = configProperties.getProperty(GENERIC_VNF_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+vf_module_path;
+ String key = VF_MODULE_ID;
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{vf-module-id}", encoded_vnf) ;
+
+ request_url = GenericVnfRequest.processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("vf-module-id", requestProperties.getProperty(key));
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ VfModule tenant = (VfModule)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(tenant);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {VF_MODULE_ID, GenericVnfRequest.GENERIC_VNF_ID, GenericVnfRequest.VNF_ID};
+ return args;
+ }
+
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return VfModule.class;
+ }
+
+
+ public static String processPathData(String request_url, Properties requestProperties) throws UnsupportedEncodingException {
+
+ String key = VF_MODULE_ID;
+
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{vf-module-id}", encoded_vnf) ;
+
+ return request_url;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VnfcRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VnfcRequest.java
new file mode 100644
index 0000000..e45e78d
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VnfcRequest.java
@@ -0,0 +1,107 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Vnfc;
+
+public class VnfcRequest extends AAIRequest {
+
+ // vnfc
+ public static final String VNFC_PATH = "org.openecomp.sdnc.sli.aai.path.vnfc";
+
+
+ private final String vnfc_path;
+
+
+ public static final String VNFC_NAME = "vnfc-name";
+ public static final String VNFC_VNFC_NAME = "vnfc.vnfc-name";
+
+
+ public VnfcRequest() {
+ vnfc_path = configProperties.getProperty(VNFC_PATH);
+
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+vnfc_path;
+
+ String key = VNFC_NAME;
+ if(requestProperties.containsKey(VNFC_VNFC_NAME)) {
+ key = VNFC_VNFC_NAME;
+ }
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{vnfc-name}", encoded_vnf) ;
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("vnfc-name", requestProperties.getProperty(key));
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Vnfc vnfc = (Vnfc)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {VNFC_NAME, VNFC_VNFC_NAME};
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Vnfc.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VolumeGroupRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VolumeGroupRequest.java
new file mode 100644
index 0000000..4437cb4
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VolumeGroupRequest.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Vnfc;
+
+public class VolumeGroupRequest extends AAIRequest {
+
+ // volume-group-id
+ public static final String VOLUME_GROUP_PATH = "org.openecomp.sdnc.sli.aai.path.volume.group";
+
+ private final String volume_group_path;
+
+ public static final String VOLUME_GROUP_NAME = "volume-group-id";
+ public static final String VOLUME_GROUP_VOLUME_GROUP_NAME = "volume-group.volume-group-id";
+
+
+ public VolumeGroupRequest() {
+ volume_group_path = configProperties.getProperty(VOLUME_GROUP_PATH);
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+volume_group_path;
+
+ String key = VOLUME_GROUP_NAME;
+ if(requestProperties.containsKey(VOLUME_GROUP_VOLUME_GROUP_NAME)) {
+ key = VOLUME_GROUP_VOLUME_GROUP_NAME;
+ }
+ String encoded_vnf = encodeQuery(requestProperties.getProperty(key));
+ request_url = request_url.replace("{volume-group-id}", encoded_vnf) ;
+
+ request_url = CloudRegionRequest.processPathData(request_url, requestProperties);
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+ aaiService.LOGwriteDateTrace("volume-group-id", requestProperties.getProperty(key));
+
+ return http_req_url;
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Vnfc vnfc = (Vnfc)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {VOLUME_GROUP_NAME, VOLUME_GROUP_VOLUME_GROUP_NAME, CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER, CloudRegionRequest.CLOUD_REGION_CLOUD_REGION_ID};
+
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Vnfc.class;
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VserverRequest.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VserverRequest.java
new file mode 100644
index 0000000..d621ac5
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/VserverRequest.java
@@ -0,0 +1,156 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai;
+
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.Arrays;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.Vserver;
+
+public class VserverRequest extends AAIRequest {
+
+ public static final String VSERVER_PATH = "org.openecomp.sdnc.sli.aai.path.vserver";
+ public static final String VSERVER_QUERY_PATH = "org.openecomp.sdnc.sli.aai.path.vserver.query";
+
+ private final String vserver_path;
+ private final String vserver_query_path;
+
+ public static final String VSERVER_ID = "vserver_id";
+ public static final String VSERVER_VSERVER_ID = "vserver.vserver_id";
+
+ public static final String TENANT_ID = "tenant_id";
+ public static final String TENANT_TENANT_ID = "tenant.tenant_id";
+
+
+ public static final String VSERVER_NAME = "vserver_name";
+
+ public VserverRequest() {
+ vserver_path = configProperties.getProperty(VSERVER_PATH);
+ vserver_query_path = configProperties.getProperty(VSERVER_QUERY_PATH);
+ }
+
+
+ @Override
+ public URL getRequestUrl(String method, String resourceVersion) throws UnsupportedEncodingException, MalformedURLException {
+
+ String request_url = target_uri+vserver_path;
+ LOG.debug(Arrays.toString(requestProperties.entrySet().toArray()));
+
+ String encoded_vnf = null;
+ if(requestProperties.containsKey(VSERVER_ID)) {
+ encoded_vnf = encodeQuery(requestProperties.getProperty(VSERVER_ID));
+ request_url = request_url.replace("{vserver-id}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace(VSERVER_ID, requestProperties.getProperty(VSERVER_ID));
+ }
+ else if(requestProperties.containsKey(VSERVER_VSERVER_ID)) {
+ encoded_vnf = encodeQuery(requestProperties.getProperty(VSERVER_VSERVER_ID));
+ request_url = request_url.replace("{vserver-id}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace(VSERVER_ID, requestProperties.getProperty(VSERVER_VSERVER_ID));
+ }
+
+
+ if(requestProperties.containsKey(TENANT_ID)) {
+ encoded_vnf = encodeQuery(requestProperties.getProperty(TENANT_ID));
+ request_url = request_url.replace("{tenant-id}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace(TENANT_ID, requestProperties.getProperty(TENANT_ID));
+ }
+ else if(requestProperties.containsKey(TENANT_TENANT_ID)) {
+ encoded_vnf = encodeQuery(requestProperties.getProperty(TENANT_TENANT_ID));
+ request_url = request_url.replace("{tenant-id}", encoded_vnf) ;
+ aaiService.LOGwriteDateTrace(TENANT_ID, requestProperties.getProperty(TENANT_TENANT_ID));
+ }
+
+ if(requestProperties.containsKey(CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER)) {
+ request_url = CloudRegionRequest.processPathData(request_url, requestProperties);
+ }
+
+
+ if(resourceVersion != null) {
+ request_url = request_url +"?resource-version="+resourceVersion;
+ }
+ URL http_req_url = new URL(request_url);
+
+ aaiService.LOGwriteFirstTrace(method, http_req_url.toString());
+
+ return http_req_url;
+ }
+
+ @Override
+ public URL getRequestQueryUrl(String method) throws UnsupportedEncodingException, MalformedURLException {
+ return this.getRequestUrl(method, null);
+ }
+
+
+ @Override
+ public String toJSONString() {
+ ObjectMapper mapper = getObjectMapper();
+ Vserver vnfc = (Vserver)requestDatum;
+ String json_text = null;
+ try {
+ json_text = mapper.writeValueAsString(vnfc);
+ } catch (JsonProcessingException exc) {
+ handleException(this, exc);
+ return null;
+ }
+ return json_text;
+ }
+
+ @Override
+ public String[] getArgsList() {
+ String[] args = {VSERVER_ID, VSERVER_VSERVER_ID, VSERVER_NAME, TENANT_ID, TENANT_TENANT_ID, CloudRegionRequest.CLOUD_REGION_CLOUD_OWNER, CloudRegionRequest.CLOUD_REGION_CLOUD_REGION_ID};
+ return args;
+ }
+
+ @Override
+ public Class<? extends AAIDatum> getModelClass() {
+ return Vserver.class;
+ }
+
+ @Override
+ public String formatKey(String argument) {
+ switch(argument) {
+ case "tenant-id":
+ return "tenant.tenant-id";
+ case "vserver-id":
+ return "vserver.vserver-id";
+ case "vserver-name":
+ return "vserver.vserver-name";
+// case "cloud-region-id":
+// return "cloud-region.cloud-region-id";
+// case "cloud-owner":
+// return "cloud-region.cloud-owner";
+ default:
+ return argument;
+ }
+ }
+
+ public String getPrimaryResourceName(String resource) {
+ return "vserver";
+ }
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/AAIDatum.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/AAIDatum.java
new file mode 100644
index 0000000..b809d9e
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/AAIDatum.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data;
+
+public interface AAIDatum {
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/EchoResponse.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/EchoResponse.java
new file mode 100644
index 0000000..abbd44f
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/EchoResponse.java
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "responseMessages"
+})
+public class EchoResponse implements AAIDatum {
+
+ @JsonProperty("responseMessages")
+ private ResponseMessages responseMessages;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The responseMessages
+ */
+ @JsonProperty("responseMessages")
+ public ResponseMessages getResponseMessages() {
+ return responseMessages;
+ }
+
+ /**
+ *
+ * @param responseMessages
+ * The responseMessages
+ */
+ @JsonProperty("responseMessages")
+ public void setResponseMessages(ResponseMessages responseMessages) {
+ this.responseMessages = responseMessages;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ErrorResponse.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ErrorResponse.java
new file mode 100644
index 0000000..93d6604
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ErrorResponse.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "requestError"
+})
+public class ErrorResponse {
+
+ @JsonProperty("requestError")
+ private RequestError requestError;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The requestError
+ */
+ @JsonProperty("requestError")
+ public RequestError getRequestError() {
+ return requestError;
+ }
+
+ /**
+ *
+ * @param requestError
+ * The requestError
+ */
+ @JsonProperty("requestError")
+ public void setRequestError(RequestError requestError) {
+ this.requestError = requestError;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/RequestError.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/RequestError.java
new file mode 100644
index 0000000..f434382
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/RequestError.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "serviceException"
+})
+public class RequestError {
+
+ @JsonProperty("serviceException")
+ private ServiceException serviceException;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The serviceException
+ */
+ @JsonProperty("serviceException")
+ public ServiceException getServiceException() {
+ return serviceException;
+ }
+
+ /**
+ *
+ * @param serviceException
+ * The serviceException
+ */
+ @JsonProperty("serviceException")
+ public void setServiceException(ServiceException serviceException) {
+ this.serviceException = serviceException;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResourceVersion.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResourceVersion.java
new file mode 100644
index 0000000..b3de714
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResourceVersion.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data;
+
+public interface ResourceVersion {
+
+ public String getResourceVersion();
+ public void setResourceVersion(String resourceVersion);
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResponseMessage.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResponseMessage.java
new file mode 100644
index 0000000..4836006
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResponseMessage.java
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "messageId",
+ "text",
+ "variables"
+})
+public class ResponseMessage {
+
+ @JsonProperty("messageId")
+ private String messageId;
+ @JsonProperty("text")
+ private String text;
+ @JsonProperty("variables")
+ private Variables variables;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The messageId
+ */
+ @JsonProperty("messageId")
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ *
+ * @param messageId
+ * The messageId
+ */
+ @JsonProperty("messageId")
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ /**
+ *
+ * @return
+ * The text
+ */
+ @JsonProperty("text")
+ public String getText() {
+ return text;
+ }
+
+ /**
+ *
+ * @param text
+ * The text
+ */
+ @JsonProperty("text")
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ *
+ * @return
+ * The variables
+ */
+ @JsonProperty("variables")
+ public Variables getVariables() {
+ return variables;
+ }
+
+ /**
+ *
+ * @param variables
+ * The variables
+ */
+ @JsonProperty("variables")
+ public void setVariables(Variables variables) {
+ this.variables = variables;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResponseMessages.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResponseMessages.java
new file mode 100644
index 0000000..96ce492
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ResponseMessages.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "responseMessage"
+})
+public class ResponseMessages {
+
+ @JsonProperty("responseMessage")
+ private List<ResponseMessage> responseMessage = new ArrayList<ResponseMessage>();
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The responseMessage
+ */
+ @JsonProperty("responseMessage")
+ public List<ResponseMessage> getResponseMessage() {
+ return responseMessage;
+ }
+
+ /**
+ *
+ * @param responseMessage
+ * The responseMessage
+ */
+ @JsonProperty("responseMessage")
+ public void setResponseMessage(List<ResponseMessage> responseMessage) {
+ this.responseMessage = responseMessage;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ServiceException.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ServiceException.java
new file mode 100644
index 0000000..13b2970
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/ServiceException.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "messageId",
+ "text",
+ "variables"
+})
+public class ServiceException {
+
+ @JsonProperty("messageId")
+ private String messageId;
+ @JsonProperty("text")
+ private String text;
+ @JsonProperty("variables")
+ private List<String> variables = new ArrayList<String>();
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The messageId
+ */
+ @JsonProperty("messageId")
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ *
+ * @param messageId
+ * The messageId
+ */
+ @JsonProperty("messageId")
+ public void setMessageId(String messageId) {
+ this.messageId = messageId;
+ }
+
+ /**
+ *
+ * @return
+ * The text
+ */
+ @JsonProperty("text")
+ public String getText() {
+ return text;
+ }
+
+ /**
+ *
+ * @param text
+ * The text
+ */
+ @JsonProperty("text")
+ public void setText(String text) {
+ this.text = text;
+ }
+
+ /**
+ *
+ * @return
+ * The variables
+ */
+ @JsonProperty("variables")
+ public List<String> getVariables() {
+ return variables;
+ }
+
+ /**
+ *
+ * @param variables
+ * The variables
+ */
+ @JsonProperty("variables")
+ public void setVariables(List<String> variables) {
+ this.variables = variables;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/SubInterface.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/SubInterface.java
new file mode 100644
index 0000000..5df2892
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/SubInterface.java
@@ -0,0 +1,171 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+import org.openecomp.aai.inventory.v8.RelationshipList;
+import org.openecomp.aai.inventory.v8.Vlans;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "interface-name",
+ "interface-role",
+ "resource-version",
+ "vlans",
+ "relationshipList"
+})
+public class SubInterface implements AAIDatum, ResourceVersion {
+
+ @JsonProperty("interface-name")
+ private String interfaceName;
+ @JsonProperty("interface-role")
+ private String interfaceRole;
+ @JsonProperty("resource-version")
+ private String resourceVersion;
+ @JsonProperty("vlans")
+ private Vlans vlans;
+ @JsonProperty("relationshipList")
+ private RelationshipList relationshipList;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The interfaceName
+ */
+ @JsonProperty("interface-name")
+ public String getInterfaceName() {
+ return interfaceName;
+ }
+
+ /**
+ *
+ * @param interfaceName
+ * The interface-name
+ */
+ @JsonProperty("interface-name")
+ public void setInterfaceName(String interfaceName) {
+ this.interfaceName = interfaceName;
+ }
+
+ /**
+ *
+ * @return
+ * The interfaceRole
+ */
+ @JsonProperty("interface-role")
+ public String getInterfaceRole() {
+ return interfaceRole;
+ }
+
+ /**
+ *
+ * @param interfaceRole
+ * The interface-role
+ */
+ @JsonProperty("interface-role")
+ public void setInterfaceRole(String interfaceRole) {
+ this.interfaceRole = interfaceRole;
+ }
+
+ /**
+ *
+ * @return
+ * The resourceVersion
+ */
+ @JsonProperty("resource-version")
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
+
+ /**
+ *
+ * @param resourceVersion
+ * The resource-version
+ */
+ @JsonProperty("resource-version")
+ public void setResourceVersion(String resourceVersion) {
+ this.resourceVersion = resourceVersion;
+ }
+
+ /**
+ *
+ * @return
+ * The vlans
+ */
+ @JsonProperty("vlans")
+ public Vlans getVlans() {
+ return vlans;
+ }
+
+ /**
+ *
+ * @param vlans
+ * The vlans
+ */
+ @JsonProperty("vlans")
+ public void setVlans(Vlans vlans) {
+ this.vlans = vlans;
+ }
+
+ /**
+ *
+ * @return
+ * The relationshipList
+ */
+ @JsonProperty("relationshipList")
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ *
+ * @param relationshipList
+ * The relationshipList
+ */
+ @JsonProperty("relationshipList")
+ public void setRelationshipList(RelationshipList relationshipList) {
+ this.relationshipList = relationshipList;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/Variables.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/Variables.java
new file mode 100644
index 0000000..e15b657
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/Variables.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "variable"
+})
+public class Variables {
+
+ @JsonProperty("variable")
+ private List<String> variable = new ArrayList<String>();
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The variable
+ */
+ @JsonProperty("variable")
+ public List<String> getVariable() {
+ return variable;
+ }
+
+ /**
+ *
+ * @param variable
+ * The variable
+ */
+ @JsonProperty("variable")
+ public void setVariable(List<String> variable) {
+ this.variable = variable;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/notify/KeyDatum.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/notify/KeyDatum.java
new file mode 100644
index 0000000..8b26ad2
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/notify/KeyDatum.java
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data.notify;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "key-name",
+ "key-value"
+})
+public class KeyDatum {
+
+ @JsonProperty("key-name")
+ private String keyName;
+ @JsonProperty("key-value")
+ private String keyValue;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The keyName
+ */
+ @JsonProperty("key-name")
+ public String getKeyName() {
+ return keyName;
+ }
+
+ /**
+ *
+ * @param keyName
+ * The key-name
+ */
+ @JsonProperty("key-name")
+ public void setKeyName(String keyName) {
+ this.keyName = keyName;
+ }
+
+ /**
+ *
+ * @return
+ * The keyValue
+ */
+ @JsonProperty("key-value")
+ public String getKeyValue() {
+ return keyValue;
+ }
+
+ /**
+ *
+ * @param keyValue
+ * The key-value
+ */
+ @JsonProperty("key-value")
+ public void setKeyValue(String keyValue) {
+ this.keyValue = keyValue;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/notify/NotifyEvent.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/notify/NotifyEvent.java
new file mode 100644
index 0000000..0196a8d
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/notify/NotifyEvent.java
@@ -0,0 +1,170 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data.notify;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "event-id",
+ "event-trigger",
+ "key-data",
+ "node-type",
+ "selflink"
+})
+public class NotifyEvent {
+
+ @JsonProperty("event-id")
+ private String eventId;
+ @JsonProperty("event-trigger")
+ private String eventTrigger;
+ @JsonProperty("key-data")
+ private List<KeyDatum> keyData = new ArrayList<KeyDatum>();
+ @JsonProperty("node-type")
+ private String nodeType;
+ @JsonProperty("selflink")
+ private String selflink;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The eventId
+ */
+ @JsonProperty("event-id")
+ public String getEventId() {
+ return eventId;
+ }
+
+ /**
+ *
+ * @param eventId
+ * The event-id
+ */
+ @JsonProperty("event-id")
+ public void setEventId(String eventId) {
+ this.eventId = eventId;
+ }
+
+ /**
+ *
+ * @return
+ * The eventTrigger
+ */
+ @JsonProperty("event-trigger")
+ public String getEventTrigger() {
+ return eventTrigger;
+ }
+
+ /**
+ *
+ * @param eventTrigger
+ * The event-trigger
+ */
+ @JsonProperty("event-trigger")
+ public void setEventTrigger(String eventTrigger) {
+ this.eventTrigger = eventTrigger;
+ }
+
+ /**
+ *
+ * @return
+ * The keyData
+ */
+ @JsonProperty("key-data")
+ public List<KeyDatum> getKeyData() {
+ return keyData;
+ }
+
+ /**
+ *
+ * @param keyData
+ * The key-data
+ */
+ @JsonProperty("key-data")
+ public void setKeyData(List<KeyDatum> keyData) {
+ this.keyData = keyData;
+ }
+
+ /**
+ *
+ * @return
+ * The nodeType
+ */
+ @JsonProperty("node-type")
+ public String getNodeType() {
+ return nodeType;
+ }
+
+ /**
+ *
+ * @param nodeType
+ * The node-type
+ */
+ @JsonProperty("node-type")
+ public void setNodeType(String nodeType) {
+ this.nodeType = nodeType;
+ }
+
+ /**
+ *
+ * @return
+ * The selflink
+ */
+ @JsonProperty("selflink")
+ public String getSelflink() {
+ return selflink;
+ }
+
+ /**
+ *
+ * @param selflink
+ * The selflink
+ */
+ @JsonProperty("selflink")
+ public void setSelflink(String selflink) {
+ this.selflink = selflink;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Flavor.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Flavor.java
new file mode 100644
index 0000000..24d93de
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Flavor.java
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data.v1507;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "flavorId",
+ "flavorName",
+ "flavorLink"
+})
+public class Flavor {
+
+ @JsonProperty("flavorId")
+ private String flavorId;
+ @JsonProperty("flavorName")
+ private String flavorName;
+ @JsonProperty("flavorLink")
+ private String flavorLink;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The flavorId
+ */
+ @JsonProperty("flavorId")
+ public String getFlavorId() {
+ return flavorId;
+ }
+
+ /**
+ *
+ * @param flavorId
+ * The flavorId
+ */
+ @JsonProperty("flavorId")
+ public void setFlavorId(String flavorId) {
+ this.flavorId = flavorId;
+ }
+
+ /**
+ *
+ * @return
+ * The flavorName
+ */
+ @JsonProperty("flavorName")
+ public String getFlavorName() {
+ return flavorName;
+ }
+
+ /**
+ *
+ * @param flavorName
+ * The flavorName
+ */
+ @JsonProperty("flavorName")
+ public void setFlavorName(String flavorName) {
+ this.flavorName = flavorName;
+ }
+
+ /**
+ *
+ * @return
+ * The flavorLink
+ */
+ @JsonProperty("flavorLink")
+ public String getFlavorLink() {
+ return flavorLink;
+ }
+
+ /**
+ *
+ * @param flavorLink
+ * The flavorLink
+ */
+ @JsonProperty("flavorLink")
+ public void setFlavorLink(String flavorLink) {
+ this.flavorLink = flavorLink;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Host.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Host.java
new file mode 100644
index 0000000..a4d43d4
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Host.java
@@ -0,0 +1,122 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data.v1507;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "hostId",
+ "hostname",
+ "hostLoc"
+})
+public class Host {
+
+ @JsonProperty("hostId")
+ private String hostId;
+ @JsonProperty("hostname")
+ private String hostname;
+ @JsonProperty("hostLoc")
+ private String hostLoc;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The hostId
+ */
+ @JsonProperty("hostId")
+ public String getHostId() {
+ return hostId;
+ }
+
+ /**
+ *
+ * @param hostId
+ * The hostId
+ */
+ @JsonProperty("hostId")
+ public void setHostId(String hostId) {
+ this.hostId = hostId;
+ }
+
+ /**
+ *
+ * @return
+ * The hostname
+ */
+ @JsonProperty("hostname")
+ public String getHostname() {
+ return hostname;
+ }
+
+ /**
+ *
+ * @param hostname
+ * The hostname
+ */
+ @JsonProperty("hostname")
+ public void setHostname(String hostname) {
+ this.hostname = hostname;
+ }
+
+ /**
+ *
+ * @return
+ * The hostLoc
+ */
+ @JsonProperty("hostLoc")
+ public String getHostLoc() {
+ return hostLoc;
+ }
+
+ /**
+ *
+ * @param hostLoc
+ * The hostLoc
+ */
+ @JsonProperty("hostLoc")
+ public void setHostLoc(String hostLoc) {
+ this.hostLoc = hostLoc;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Image.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Image.java
new file mode 100644
index 0000000..2ffa32f
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Image.java
@@ -0,0 +1,237 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data.v1507;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "imageId",
+ "imageName",
+ "osType",
+ "osVersion",
+ "application",
+ "applicationVersion",
+ "applicationVendor",
+ "imageLink"
+})
+public class Image {
+
+ @JsonProperty("imageId")
+ private String imageId;
+ @JsonProperty("imageName")
+ private String imageName;
+ @JsonProperty("osType")
+ private String osType;
+ @JsonProperty("osVersion")
+ private String osVersion;
+ @JsonProperty("application")
+ private String application;
+ @JsonProperty("applicationVersion")
+ private String applicationVersion;
+ @JsonProperty("applicationVendor")
+ private String applicationVendor;
+ @JsonProperty("imageLink")
+ private String imageLink;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The imageId
+ */
+ @JsonProperty("imageId")
+ public String getImageId() {
+ return imageId;
+ }
+
+ /**
+ *
+ * @param imageId
+ * The imageId
+ */
+ @JsonProperty("imageId")
+ public void setImageId(String imageId) {
+ this.imageId = imageId;
+ }
+
+ /**
+ *
+ * @return
+ * The imageName
+ */
+ @JsonProperty("imageName")
+ public String getImageName() {
+ return imageName;
+ }
+
+ /**
+ *
+ * @param imageName
+ * The imageName
+ */
+ @JsonProperty("imageName")
+ public void setImageName(String imageName) {
+ this.imageName = imageName;
+ }
+
+ /**
+ *
+ * @return
+ * The osType
+ */
+ @JsonProperty("osType")
+ public String getOsType() {
+ return osType;
+ }
+
+ /**
+ *
+ * @param osType
+ * The osType
+ */
+ @JsonProperty("osType")
+ public void setOsType(String osType) {
+ this.osType = osType;
+ }
+
+ /**
+ *
+ * @return
+ * The osVersion
+ */
+ @JsonProperty("osVersion")
+ public String getOsVersion() {
+ return osVersion;
+ }
+
+ /**
+ *
+ * @param osVersion
+ * The osVersion
+ */
+ @JsonProperty("osVersion")
+ public void setOsVersion(String osVersion) {
+ this.osVersion = osVersion;
+ }
+
+ /**
+ *
+ * @return
+ * The application
+ */
+ @JsonProperty("application")
+ public String getApplication() {
+ return application;
+ }
+
+ /**
+ *
+ * @param application
+ * The application
+ */
+ @JsonProperty("application")
+ public void setApplication(String application) {
+ this.application = application;
+ }
+
+ /**
+ *
+ * @return
+ * The applicationVersion
+ */
+ @JsonProperty("applicationVersion")
+ public String getApplicationVersion() {
+ return applicationVersion;
+ }
+
+ /**
+ *
+ * @param applicationVersion
+ * The applicationVersion
+ */
+ @JsonProperty("applicationVersion")
+ public void setApplicationVersion(String applicationVersion) {
+ this.applicationVersion = applicationVersion;
+ }
+
+ /**
+ *
+ * @return
+ * The applicationVendor
+ */
+ @JsonProperty("applicationVendor")
+ public String getApplicationVendor() {
+ return applicationVendor;
+ }
+
+ /**
+ *
+ * @param applicationVendor
+ * The applicationVendor
+ */
+ @JsonProperty("applicationVendor")
+ public void setApplicationVendor(String applicationVendor) {
+ this.applicationVendor = applicationVendor;
+ }
+
+ /**
+ *
+ * @return
+ * The imageLink
+ */
+ @JsonProperty("imageLink")
+ public String getImageLink() {
+ return imageLink;
+ }
+
+ /**
+ *
+ * @param imageLink
+ * The imageLink
+ */
+ @JsonProperty("imageLink")
+ public void setImageLink(String imageLink) {
+ this.imageLink = imageLink;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/IpAddress.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/IpAddress.java
new file mode 100644
index 0000000..d4faca1
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/IpAddress.java
@@ -0,0 +1,168 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data.v1507;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "addrId",
+ "addr",
+ "version",
+ "type",
+ "networkName"
+})
+public class IpAddress {
+
+ @JsonProperty("addrId")
+ private String addrId;
+ @JsonProperty("addr")
+ private String addr;
+ @JsonProperty("version")
+ private String version;
+ @JsonProperty("type")
+ private String type;
+ @JsonProperty("networkName")
+ private String networkName;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The addrId
+ */
+ @JsonProperty("addrId")
+ public String getAddrId() {
+ return addrId;
+ }
+
+ /**
+ *
+ * @param addrId
+ * The addrId
+ */
+ @JsonProperty("addrId")
+ public void setAddrId(String addrId) {
+ this.addrId = addrId;
+ }
+
+ /**
+ *
+ * @return
+ * The addr
+ */
+ @JsonProperty("addr")
+ public String getAddr() {
+ return addr;
+ }
+
+ /**
+ *
+ * @param addr
+ * The addr
+ */
+ @JsonProperty("addr")
+ public void setAddr(String addr) {
+ this.addr = addr;
+ }
+
+ /**
+ *
+ * @return
+ * The version
+ */
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ /**
+ *
+ * @param version
+ * The version
+ */
+ @JsonProperty("version")
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ /**
+ *
+ * @return
+ * The type
+ */
+ @JsonProperty("type")
+ public String getType() {
+ return type;
+ }
+
+ /**
+ *
+ * @param type
+ * The type
+ */
+ @JsonProperty("type")
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ *
+ * @return
+ * The networkName
+ */
+ @JsonProperty("networkName")
+ public String getNetworkName() {
+ return networkName;
+ }
+
+ /**
+ *
+ * @param networkName
+ * The networkName
+ */
+ @JsonProperty("networkName")
+ public void setNetworkName(String networkName) {
+ this.networkName = networkName;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Relationship.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Relationship.java
new file mode 100644
index 0000000..cb65abf
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/Relationship.java
@@ -0,0 +1,147 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data.v1507;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "relatedTo",
+ "relatedLink",
+ "relationshipData",
+ "any"
+})
+public class Relationship {
+
+ @JsonProperty("relatedTo")
+ private String relatedTo;
+ @JsonProperty("relatedLink")
+ private String relatedLink;
+ @JsonProperty("relationshipData")
+ private List<RelationshipDatum> relationshipData = new ArrayList<RelationshipDatum>();
+ @JsonProperty("any")
+ private List<Object> any = new ArrayList<Object>();
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The relatedTo
+ */
+ @JsonProperty("relatedTo")
+ public String getRelatedTo() {
+ return relatedTo;
+ }
+
+ /**
+ *
+ * @param relatedTo
+ * The relatedTo
+ */
+ @JsonProperty("relatedTo")
+ public void setRelatedTo(String relatedTo) {
+ this.relatedTo = relatedTo;
+ }
+
+ /**
+ *
+ * @return
+ * The relatedLink
+ */
+ @JsonProperty("relatedLink")
+ public String getRelatedLink() {
+ return relatedLink;
+ }
+
+ /**
+ *
+ * @param relatedLink
+ * The relatedLink
+ */
+ @JsonProperty("relatedLink")
+ public void setRelatedLink(String relatedLink) {
+ this.relatedLink = relatedLink;
+ }
+
+ /**
+ *
+ * @return
+ * The relationshipData
+ */
+ @JsonProperty("relationshipData")
+ public List<RelationshipDatum> getRelationshipData() {
+ return relationshipData;
+ }
+
+ /**
+ *
+ * @param relationshipData
+ * The relationshipData
+ */
+ @JsonProperty("relationshipData")
+ public void setRelationshipData(List<RelationshipDatum> relationshipData) {
+ this.relationshipData = relationshipData;
+ }
+
+ /**
+ *
+ * @return
+ * The any
+ */
+ @JsonProperty("any")
+ public List<Object> getAny() {
+ return any;
+ }
+
+ /**
+ *
+ * @param any
+ * The any
+ */
+ @JsonProperty("any")
+ public void setAny(List<Object> any) {
+ this.any = any;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/RelationshipDatum.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/RelationshipDatum.java
new file mode 100644
index 0000000..800bb6a
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/RelationshipDatum.java
@@ -0,0 +1,124 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data.v1507;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "relationshipKey",
+ "relationshipValue",
+ "any"
+})
+public class RelationshipDatum {
+
+ @JsonProperty("relationshipKey")
+ private String relationshipKey;
+ @JsonProperty("relationshipValue")
+ private String relationshipValue;
+ @JsonProperty("any")
+ private List<Object> any = new ArrayList<Object>();
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The relationshipKey
+ */
+ @JsonProperty("relationshipKey")
+ public String getRelationshipKey() {
+ return relationshipKey;
+ }
+
+ /**
+ *
+ * @param relationshipKey
+ * The relationshipKey
+ */
+ @JsonProperty("relationshipKey")
+ public void setRelationshipKey(String relationshipKey) {
+ this.relationshipKey = relationshipKey;
+ }
+
+ /**
+ *
+ * @return
+ * The relationshipValue
+ */
+ @JsonProperty("relationshipValue")
+ public String getRelationshipValue() {
+ return relationshipValue;
+ }
+
+ /**
+ *
+ * @param relationshipValue
+ * The relationshipValue
+ */
+ @JsonProperty("relationshipValue")
+ public void setRelationshipValue(String relationshipValue) {
+ this.relationshipValue = relationshipValue;
+ }
+
+ /**
+ *
+ * @return
+ * The any
+ */
+ @JsonProperty("any")
+ public List<Object> getAny() {
+ return any;
+ }
+
+ /**
+ *
+ * @param any
+ * The any
+ */
+ @JsonProperty("any")
+ public void setAny(List<Object> any) {
+ this.any = any;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/RelationshipList.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/RelationshipList.java
new file mode 100644
index 0000000..be39145
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/RelationshipList.java
@@ -0,0 +1,101 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data.v1507;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "relationship",
+ "any"
+})
+public class RelationshipList {
+
+ @JsonProperty("relationship")
+ private List<Relationship> relationship = new ArrayList<Relationship>();
+ @JsonProperty("any")
+ private List<Object> any = new ArrayList<Object>();
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The relationship
+ */
+ @JsonProperty("relationship")
+ public List<Relationship> getRelationship() {
+ return relationship;
+ }
+
+ /**
+ *
+ * @param relationship
+ * The relationship
+ */
+ @JsonProperty("relationship")
+ public void setRelationship(List<Relationship> relationship) {
+ this.relationship = relationship;
+ }
+
+ /**
+ *
+ * @return
+ * The any
+ */
+ @JsonProperty("any")
+ public List<Object> getAny() {
+ return any;
+ }
+
+ /**
+ *
+ * @param any
+ * The any
+ */
+ @JsonProperty("any")
+ public void setAny(List<Object> any) {
+ this.any = any;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/VServer.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/VServer.java
new file mode 100644
index 0000000..84349af
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/data/v1507/VServer.java
@@ -0,0 +1,262 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.data.v1507;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "vmId",
+ "vmName",
+ "vmName2",
+ "host",
+ "image",
+ "flavor",
+ "ipAddresses",
+ "vserverLink",
+ "relationshipList"
+})
+public class VServer {
+
+ @JsonProperty("vmId")
+ private String vmId;
+ @JsonProperty("vmName")
+ private String vmName;
+ @JsonProperty("vmName2")
+ private String vmName2;
+ @JsonProperty("host")
+ private Host host;
+ @JsonProperty("image")
+ private Image image;
+ @JsonProperty("flavor")
+ private Flavor flavor;
+ @JsonProperty("ipAddresses")
+ private List<IpAddress> ipAddresses = new ArrayList<IpAddress>();
+ @JsonProperty("vserverLink")
+ private String vserverLink;
+ @JsonProperty("relationshipList")
+ private RelationshipList relationshipList;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The vmId
+ */
+ @JsonProperty("vmId")
+ public String getVmId() {
+ return vmId;
+ }
+
+ /**
+ *
+ * @param vmId
+ * The vmId
+ */
+ @JsonProperty("vmId")
+ public void setVmId(String vmId) {
+ this.vmId = vmId;
+ }
+
+ /**
+ *
+ * @return
+ * The vmName
+ */
+ @JsonProperty("vmName")
+ public String getVmName() {
+ return vmName;
+ }
+
+ /**
+ *
+ * @param vmName
+ * The vmName
+ */
+ @JsonProperty("vmName")
+ public void setVmName(String vmName) {
+ this.vmName = vmName;
+ }
+
+ /**
+ *
+ * @return
+ * The vmName2
+ */
+ @JsonProperty("vmName2")
+ public String getVmName2() {
+ return vmName2;
+ }
+
+ /**
+ *
+ * @param vmName2
+ * The vmName2
+ */
+ @JsonProperty("vmName2")
+ public void setVmName2(String vmName2) {
+ this.vmName2 = vmName2;
+ }
+
+ /**
+ *
+ * @return
+ * The host
+ */
+ @JsonProperty("host")
+ public Host getHost() {
+ return host;
+ }
+
+ /**
+ *
+ * @param host
+ * The host
+ */
+ @JsonProperty("host")
+ public void setHost(Host host) {
+ this.host = host;
+ }
+
+ /**
+ *
+ * @return
+ * The image
+ */
+ @JsonProperty("image")
+ public Image getImage() {
+ return image;
+ }
+
+ /**
+ *
+ * @param image
+ * The image
+ */
+ @JsonProperty("image")
+ public void setImage(Image image) {
+ this.image = image;
+ }
+
+ /**
+ *
+ * @return
+ * The flavor
+ */
+ @JsonProperty("flavor")
+ public Flavor getFlavor() {
+ return flavor;
+ }
+
+ /**
+ *
+ * @param flavor
+ * The flavor
+ */
+ @JsonProperty("flavor")
+ public void setFlavor(Flavor flavor) {
+ this.flavor = flavor;
+ }
+
+ /**
+ *
+ * @return
+ * The ipAddresses
+ */
+ @JsonProperty("ipAddresses")
+ public List<IpAddress> getIpAddresses() {
+ return ipAddresses;
+ }
+
+ /**
+ *
+ * @param ipAddresses
+ * The ipAddresses
+ */
+ @JsonProperty("ipAddresses")
+ public void setIpAddresses(List<IpAddress> ipAddresses) {
+ this.ipAddresses = ipAddresses;
+ }
+
+ /**
+ *
+ * @return
+ * The vserverLink
+ */
+ @JsonProperty("vserverLink")
+ public String getVserverLink() {
+ return vserverLink;
+ }
+
+ /**
+ *
+ * @param vserverLink
+ * The vserverLink
+ */
+ @JsonProperty("vserverLink")
+ public void setVserverLink(String vserverLink) {
+ this.vserverLink = vserverLink;
+ }
+
+ /**
+ *
+ * @return
+ * The relationshipList
+ */
+ @JsonProperty("relationshipList")
+ public RelationshipList getRelationshipList() {
+ return relationshipList;
+ }
+
+ /**
+ *
+ * @param relationshipList
+ * The relationshipList
+ */
+ @JsonProperty("relationshipList")
+ public void setRelationshipList(RelationshipList relationshipList) {
+ this.relationshipList = relationshipList;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/InstanceFilter.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/InstanceFilter.java
new file mode 100644
index 0000000..d602681
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/InstanceFilter.java
@@ -0,0 +1,104 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.query;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+import org.openecomp.aai.inventory.v8.LogicalLink;
+import org.openecomp.aai.inventory.v8.Pnf;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "logical-link",
+ "pnf"
+})
+public class InstanceFilter {
+
+ @JsonProperty("logical-link")
+ private LogicalLink logicalLink;
+ @JsonProperty("pnf")
+ private Pnf pnf;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The logicalLink
+ */
+ @JsonProperty("logical-link")
+ public LogicalLink getLogicalLink() {
+ return logicalLink;
+ }
+
+ /**
+ *
+ * @param logicalLink
+ * The logical-link
+ */
+ @JsonProperty("logical-link")
+ public void setLogicalLink(LogicalLink logicalLink) {
+ this.logicalLink = logicalLink;
+ }
+
+ /**
+ *
+ * @return
+ * The pnf
+ */
+ @JsonProperty("pnf")
+ public Pnf getPnf() {
+ return pnf;
+ }
+
+ /**
+ *
+ * @param pnf
+ * The pnf
+ */
+ @JsonProperty("pnf")
+ public void setPnf(Pnf pnf) {
+ this.pnf = pnf;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/InstanceFilters.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/InstanceFilters.java
new file mode 100644
index 0000000..f251492
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/InstanceFilters.java
@@ -0,0 +1,78 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.query;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "instance-filter"
+})
+public class InstanceFilters {
+
+ @JsonProperty("instance-filter")
+ private List<InstanceFilter> instanceFilter = new ArrayList<InstanceFilter>();
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The instanceFilter
+ */
+ @JsonProperty("instance-filter")
+ public List<InstanceFilter> getInstanceFilter() {
+ return instanceFilter;
+ }
+
+ /**
+ *
+ * @param instanceFilter
+ * The instance-filter
+ */
+ @JsonProperty("instance-filter")
+ public void setInstanceFilter(List<InstanceFilter> instanceFilter) {
+ this.instanceFilter = instanceFilter;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/NamedQuery.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/NamedQuery.java
new file mode 100644
index 0000000..8f927ac
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/NamedQuery.java
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.query;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "named-query-uuid"
+})
+public class NamedQuery {
+
+ @JsonProperty("named-query-uuid")
+ private String namedQueryUuid;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The namedQueryUuid
+ */
+ @JsonProperty("named-query-uuid")
+ public String getNamedQueryUuid() {
+ return namedQueryUuid;
+ }
+
+ /**
+ *
+ * @param namedQueryUuid
+ * The named-query-uuid
+ */
+ @JsonProperty("named-query-uuid")
+ public void setNamedQueryUuid(String namedQueryUuid) {
+ this.namedQueryUuid = namedQueryUuid;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/NamedQueryData.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/NamedQueryData.java
new file mode 100644
index 0000000..595422a
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/NamedQueryData.java
@@ -0,0 +1,102 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.query;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "query-parameters",
+ "instance-filters"
+})
+public class NamedQueryData implements AAIDatum {
+
+ @JsonProperty("query-parameters")
+ private QueryParameters queryParameters;
+ @JsonProperty("instance-filters")
+ private InstanceFilters instanceFilters;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The queryParameters
+ */
+ @JsonProperty("query-parameters")
+ public QueryParameters getQueryParameters() {
+ return queryParameters;
+ }
+
+ /**
+ *
+ * @param queryParameters
+ * The query-parameters
+ */
+ @JsonProperty("query-parameters")
+ public void setQueryParameters(QueryParameters queryParameters) {
+ this.queryParameters = queryParameters;
+ }
+
+ /**
+ *
+ * @return
+ * The instanceFilters
+ */
+ @JsonProperty("instance-filters")
+ public InstanceFilters getInstanceFilters() {
+ return instanceFilters;
+ }
+
+ /**
+ *
+ * @param instanceFilters
+ * The instance-filters
+ */
+ @JsonProperty("instance-filters")
+ public void setInstanceFilters(InstanceFilters instanceFilters) {
+ this.instanceFilters = instanceFilters;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/QueryParameters.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/QueryParameters.java
new file mode 100644
index 0000000..d2cdd26
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/query/QueryParameters.java
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.query;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "named-query"
+})
+public class QueryParameters {
+
+ @JsonProperty("named-query")
+ private NamedQuery namedQuery;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The namedQuery
+ */
+ @JsonProperty("named-query")
+ public NamedQuery getNamedQuery() {
+ return namedQuery;
+ }
+
+ /**
+ *
+ * @param namedQuery
+ * The named-query
+ */
+ @JsonProperty("named-query")
+ public void setNamedQuery(NamedQuery namedQuery) {
+ this.namedQuery = namedQuery;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/Action.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/Action.java
new file mode 100644
index 0000000..7065448
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/Action.java
@@ -0,0 +1,101 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.update;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "action-data",
+ "action-type"
+})
+public class Action {
+
+ @JsonProperty("action-data")
+ private List<ActionDatum> actionData = new ArrayList<ActionDatum>();
+ @JsonProperty("action-type")
+ private String actionType;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The actionData
+ */
+ @JsonProperty("action-data")
+ public List<ActionDatum> getActionData() {
+ return actionData;
+ }
+
+ /**
+ *
+ * @param actionData
+ * The action-data
+ */
+ @JsonProperty("action-data")
+ public void setActionData(List<ActionDatum> actionData) {
+ this.actionData = actionData;
+ }
+
+ /**
+ *
+ * @return
+ * The actionType
+ */
+ @JsonProperty("action-type")
+ public String getActionType() {
+ return actionType;
+ }
+
+ /**
+ *
+ * @param actionType
+ * The action-type
+ */
+ @JsonProperty("action-type")
+ public void setActionType(String actionType) {
+ this.actionType = actionType;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/ActionDatum.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/ActionDatum.java
new file mode 100644
index 0000000..0da13c2
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/ActionDatum.java
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.update;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "property-name",
+ "property-value"
+})
+public class ActionDatum {
+
+ @JsonProperty("property-name")
+ private String propertyName;
+ @JsonProperty("property-value")
+ private String propertyValue;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The propertyName
+ */
+ @JsonProperty("property-name")
+ public String getPropertyName() {
+ return propertyName;
+ }
+
+ /**
+ *
+ * @param propertyName
+ * The property-name
+ */
+ @JsonProperty("property-name")
+ public void setPropertyName(String propertyName) {
+ this.propertyName = propertyName;
+ }
+
+ /**
+ *
+ * @return
+ * The propertyValue
+ */
+ @JsonProperty("property-value")
+ public String getPropertyValue() {
+ return propertyValue;
+ }
+
+ /**
+ *
+ * @param propertyValue
+ * The property-value
+ */
+ @JsonProperty("property-value")
+ public void setPropertyValue(String propertyValue) {
+ this.propertyValue = propertyValue;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/Update.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/Update.java
new file mode 100644
index 0000000..dc61e8b
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/Update.java
@@ -0,0 +1,124 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.update;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "update-node-type",
+ "update-node-key",
+ "action"
+})
+public class Update {
+
+ @JsonProperty("update-node-type")
+ private String updateNodeType;
+ @JsonProperty("action")
+ private List<Action> action = new ArrayList<Action>();
+ @JsonProperty("update-node-key")
+ private List<UpdateNodeKey> updateNodeKey = new ArrayList<UpdateNodeKey>();
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The updateNodeType
+ */
+ @JsonProperty("update-node-type")
+ public String getUpdateNodeType() {
+ return updateNodeType;
+ }
+
+ /**
+ *
+ * @param updateNodeType
+ * The update-node-type
+ */
+ @JsonProperty("update-node-type")
+ public void setUpdateNodeType(String updateNodeType) {
+ this.updateNodeType = updateNodeType;
+ }
+
+ /**
+ *
+ * @return
+ * The action
+ */
+ @JsonProperty("action")
+ public List<Action> getAction() {
+ return action;
+ }
+
+ /**
+ *
+ * @param action
+ * The action
+ */
+ @JsonProperty("action")
+ public void setAction(List<Action> action) {
+ this.action = action;
+ }
+
+ /**
+ *
+ * @return
+ * The updateNodeKey
+ */
+ @JsonProperty("update-node-key")
+ public List<UpdateNodeKey> getUpdateNodeKey() {
+ return updateNodeKey;
+ }
+
+ /**
+ *
+ * @param updateNodeKey
+ * The update-node-key
+ */
+ @JsonProperty("update-node-key")
+ public void setUpdateNodeKey(List<UpdateNodeKey> updateNodeKey) {
+ this.updateNodeKey = updateNodeKey;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/UpdateNodeKey.java b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/UpdateNodeKey.java
new file mode 100644
index 0000000..8060d67
--- /dev/null
+++ b/aai-service/provider/src/main/java/org/openecomp/sdnc/sli/aai/update/UpdateNodeKey.java
@@ -0,0 +1,99 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.update;
+
+import java.util.HashMap;
+import java.util.Map;
+import javax.annotation.Generated;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@Generated("org.jsonschema2pojo")
+@JsonPropertyOrder({
+ "key-name",
+ "key-value"
+})
+public class UpdateNodeKey {
+
+ @JsonProperty("key-name")
+ private String keyName;
+ @JsonProperty("key-value")
+ private String keyValue;
+ @JsonIgnore
+ private Map<String, Object> additionalProperties = new HashMap<String, Object>();
+
+ /**
+ *
+ * @return
+ * The keyName
+ */
+ @JsonProperty("key-name")
+ public String getKeyName() {
+ return keyName;
+ }
+
+ /**
+ *
+ * @param keyName
+ * The key-name
+ */
+ @JsonProperty("key-name")
+ public void setKeyName(String keyName) {
+ this.keyName = keyName;
+ }
+
+ /**
+ *
+ * @return
+ * The keyValue
+ */
+ @JsonProperty("key-value")
+ public String getKeyValue() {
+ return keyValue;
+ }
+
+ /**
+ *
+ * @param keyValue
+ * The key-value
+ */
+ @JsonProperty("key-value")
+ public void setKeyValue(String keyValue) {
+ this.keyValue = keyValue;
+ }
+
+ @JsonAnyGetter
+ public Map<String, Object> getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @JsonAnySetter
+ public void setAdditionalProperty(String name, Object value) {
+ this.additionalProperties.put(name, value);
+ }
+
+}
diff --git a/aai-service/provider/src/main/resources/aai-schema-bindings.xjb b/aai-service/provider/src/main/resources/aai-schema-bindings.xjb
new file mode 100755
index 0000000..2dd7c76
--- /dev/null
+++ b/aai-service/provider/src/main/resources/aai-schema-bindings.xjb
@@ -0,0 +1,11 @@
+<jxb:bindings version="1.0"
+ xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
+ jxb:extensionBindingPrefixes="xjc">
+ <jxb:bindings schemaLocation="aai_schema_v8.xsd" node="/xs:schema">
+ <jxb:globalBindings>
+ <xjc:superInterface name="org.openecomp.sdnc.sli.aai.data.AAIDatum"/>
+ </jxb:globalBindings>
+ </jxb:bindings>
+</jxb:bindings>
diff --git a/aai-service/provider/src/main/resources/aai_schema_v8.xsd b/aai-service/provider/src/main/resources/aai_schema_v8.xsd
new file mode 100755
index 0000000..ecbbd5b
--- /dev/null
+++ b/aai-service/provider/src/main/resources/aai_schema_v8.xsd
@@ -0,0 +1,3699 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xs:schema elementFormDefault="qualified" version="1.0" targetNamespace="http://org.openecomp.aai.inventory/v8" xmlns:tns="http://org.openecomp.aai.inventory/v8" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+ jaxb:version="2.1"
+ xmlns:annox="http://annox.dev.java.net"
+ jaxb:extensionBindingPrefixes="annox">
+
+ <xs:element name="result-data">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="resource-type" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The specific type of node in the AAI graph")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-link" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The URL to the specific resource")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="search-results">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:result-data" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="search">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:search-results" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="update-node-key">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="key-name" type="xs:string" minOccurs="0"/>
+ <xs:element name="key-value" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="action-data">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="property-name" type="xs:string" minOccurs="0"/>
+ <xs:element name="property-value" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="action">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="action-type" type="xs:string" minOccurs="0"/>
+ <xs:element ref="tns:action-data" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="update">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Serves a PATCH like function. Does not enforce concurrency control.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="update-node-type" type="xs:string"/>
+ <xs:element ref="tns:update-node-key" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="update-node-uri" type="xs:string" minOccurs="0"/>
+ <xs:element ref="tns:action" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="key-data">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="key-name" type="xs:string" minOccurs="0"/>
+ <xs:element name="key-value" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="notify">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="event-id" type="xs:string"/>
+ <xs:element name="node-type" type="xs:string" minOccurs="0"/>
+ <xs:element name="event-trigger" type="xs:string" minOccurs="0"/>
+ <xs:element ref="tns:key-data" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="selflink" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="actions">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="APIs that are more action related than REST (e.g., notify, update).")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:update" minOccurs="0"/>
+ <xs:element ref="tns:notify" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="relationship-data">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="relationship-key" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="A keyword provided by AAI to indicate an attribute.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="relationship-value" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Value of the attribute.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="related-to-property">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="property-key" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Key part of a key/value pair")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="property-value" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Value part of a key/value pair")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="relationship">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="related-to" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="A keyword provided by AAI to indicate type of node.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="related-link" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="URL to the object in AAI.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-data" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="tns:related-to-property" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="relationship-list">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:relationship" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="volume-group">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Persistent block-level storage.",indexedProps="volume-group-name,vnf-type,heat-stack-id,volume-group-id",dependentOn="cloud-region",container="volume-groups")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="volume-group-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of volume-group.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="volume-group-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Name of the volume group.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="heat-stack-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this volume-group")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vnf-type" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="String capturing type of vnf, that was intended to identify the SDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as SDC matures.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="orchestration-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Orchestration status of this volume-group")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="volume-groups">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of persistent block-level storage.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:volume-group" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="volume">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Ephemeral Block storage volume.",indexedProps="volume-id",dependentOn="vserver",container="volumes")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="volume-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of block storage volume relative to the vserver.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="volume-selflink" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="volumes">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of ephemeral Block storage volumes.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:volume" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="l3-interface-ipv4-address-list">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="IPv4 Address Range",indexedProps="l3-interface-ipv4-address,vlan-id-inner,neutron-network-id,neutron-subnet-id",dependentOn="vlan,l-interface")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="l3-interface-ipv4-address" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="IP address")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="l3-interface-ipv4-prefix-length" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Prefix length, 32 for single address")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vlan-id-inner" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Inner VLAN tag")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vlan-id-outer" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Outer VLAN tag")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="is-floating" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Indicator of fixed or floating address")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="neutron-network-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Neutron network id of the interface that address belongs to")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="neutron-subnet-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Neutron id of subnet that address belongs to")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="l3-interface-ipv6-address-list">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="IPv6 Address Range",indexedProps="l3-interface-ipv6-address,vlan-id-inner,neutron-network-id,neutron-subnet-id",dependentOn="vlan,l-interface")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="l3-interface-ipv6-address" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="IP address")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="l3-interface-ipv6-prefix-length" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Prefix length, 128 for single address")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vlan-id-inner" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Inner VLAN tag")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vlan-id-outer" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Outer VLAN tag")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="is-floating" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Indicator of fixed or floating address")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="neutron-network-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Neutron network id of the interface that address belongs to")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="neutron-subnet-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Neutron id of subnet that address belongs to")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="vlan">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Definition of vlan",indexedProps="vlan-interface,vlan-id-inner,vpn-id",uniqueProps="vpn-id",dependentOn="l-interface",container="vlans")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="vlan-interface" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="String that identifies the interface")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vlan-id-inner" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Inner VLAN tag")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vlan-id-outer" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Outer VLAN tag")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="speed-value" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="speed-units" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vlan-description" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used to describe (the service associated with) the vlan")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="backdoor-connection" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Whether customer is going to use this VLAN for backdoor connection to another customer premise device.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vpn-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="This indicates the customers VPN ID associated with this vlan")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ <xs:element ref="tns:l3-interface-ipv4-address-list" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="tns:l3-interface-ipv6-address-list" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="vlans">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:vlan" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="l-interface">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Logical interfaces, e.g., a vnic.",indexedProps="macaddr,interface-id,interface-name,network-name",dependentOn="generic-vnf,p-interface,vserver,lag-interface",container="l-interfaces")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="interface-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Name given to the interface")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="interface-role" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="E.g., CUSTOMER, UPLINK, etc.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="v6-wan-link-ip" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Questionably placed - v6 ip addr of this interface (is in vr-lan-interface from Mary B.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="selflink" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="interface-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="ID of interface")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="macaddr" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="MAC address for the interface")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="network-name" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Name of the network")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="management-option" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Whether AAI should be managing this interface of not. Could have value like CUSTOMER")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:vlans" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ <xs:element ref="tns:l3-interface-ipv4-address-list" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="tns:l3-interface-ipv6-address-list" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="l-interfaces">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of logical interfaces.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:l-interface" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="vserver">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Virtual Servers, aka virtual machine or VM.",nameProps="vserver-name",indexedProps="is-closed-loop-disabled,prov-status,vserver-name,vserver-id,in-maint,vserver-name2",searchable="vserver-name,vserver-id,vserver-name2",dependentOn="tenant",container="vservers")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="vserver-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique identifier for this vserver relative to its tenant")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vserver-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Name of vserver")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vserver-name2" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Alternative name of vserver")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="prov-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Trigger for operational monitoring of this resource by Service Assurance systems.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vserver-selflink" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="in-maint" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="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.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="is-closed-loop-disabled" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="Used to indicate whether closed loop function is enabled on this node")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:volumes" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ <xs:element ref="tns:l-interfaces" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="vservers">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of virtual Servers, aka virtual machines or VMs.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:vserver" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="tenant">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Openstack tenant",nameProps="tenant-name",indexedProps="tenant-name,tenant-id",dependentOn="cloud-region",container="tenants")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="tenant-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id relative to the cloud-region.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="tenant-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Readable name of tenant")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:vservers" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="tenants">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of openstack tenants.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:tenant" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="flavor">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Openstack flavor.",nameProps="flavor-name",indexedProps="flavor-name,flavor-id",dependentOn="cloud-region",container="flavors")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="flavor-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Flavor id, expected to be unique across cloud-region.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="flavor-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Flavor name")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="flavor-vcpus" type="xs:int" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Number of CPUs")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="flavor-ram" type="xs:int" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Amount of memory")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="flavor-disk" type="xs:int" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Disk space")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="flavor-ephemeral" type="xs:int" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Amount of ephemeral disk space")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="flavor-swap" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="amount of swap space allocation")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="flavor-is-public" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="whether flavor is available to all users or private to the tenant it was created in.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="flavor-selflink" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="flavor-disabled" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Boolean as to whether this flavor is no longer enabled")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="flavors">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of openstack flavors.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:flavor" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="group-assignment">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Openstack group-assignment used to store exclusivity groups (EG).",nameProps="group-name",indexedProps="group-id,group-type,group-name",dependentOn="cloud-region",container="group-assignments")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="group-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Group id, expected to be unique across cloud-region.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="group-type" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Group type - the type of group this instance refers to")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="group-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Group name - name assigned to the group")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="group-description" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Group description - description of the group")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="group-assignments">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of openstack group assignments")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:group-assignment" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="snapshot">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Openstack snapshot",nameProps="snapshot-name",uniqueProps="snapshot-id",indexedProps="application,snapshot-name,application-vendor,snapshot-id,application-version,prev-snapshot-id",dependentOn="cloud-region",container="snapshots")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="snapshot-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Snapshot id, this is the key UUID assoc associated in glance with the snapshots.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="snapshot-name" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Snapshot name")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="snapshot-architecture" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Operating system architecture")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="snapshot-os-distro" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The common name of the operating system distribution in lowercase")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="snapshot-os-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The operating system version as specified by the distributor.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="application" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The application that the image instantiates.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="application-vendor" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The vendor of the application.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="application-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The version of the application.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="snapshot-selflink" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="prev-snapshot-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="This field contains the UUID of the previous snapshot (if any).")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="snapshots">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of openstack snapshots")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:snapshot" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="metadatum">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Key/value pairs",indexedProps="metaname",dependentOn="tenant,image,service-instance,model",container="metadata")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="metaname" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true)</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="metaval" type="xs:string"/>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="metadata">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of metadatum (key/value pairs)")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:metadatum" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="image">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Openstack image.",nameProps="image-name",indexedProps="application,image-name,application-vendor,image-id,application-version",dependentOn="cloud-region",container="images")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="image-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Image id, expected to be unique across cloud region")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="image-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Image name")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="image-architecture" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Operating system architecture.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="image-os-distro" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The common name of the operating system distribution in lowercase")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="image-os-version" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The operating system version as specified by the distributor.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="application" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The application that the image instantiates.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="application-vendor" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The vendor of the application.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="application-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="The version of the application.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="image-selflink" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ <xs:element ref="tns:metadata" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="images">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collectio of Openstack images.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:image" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="availability-zone">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Availability zone, a collection of compute hosts/pservers",indexedProps="availability-zone-name",dependentOn="cloud-region",container="availability-zones")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="availability-zone-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Name of the availability zone. Unique across a cloud region")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="hypervisor-type" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Type of hypervisor. Source of truth should define valid values.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="operational-state" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="State that indicates whether the availability zone should be used, etc. Source of truth should define valid values.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="availability-zones">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of availability zones")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:availability-zone" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="cloud-region">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="cloud-region designates an installation of a cloud cluster or region or instantiation. Cloud regions are uniquely identified by a composite key, cloud-owner + cloud-region-id. The format of the cloud-owner is vendor-cloudname.",indexedProps="cloud-owner,cloud-region-id,cloud-type,owner-defined-type",nameProps="owner-defined-type",container="cloud-regions",namespace="cloud-infrastructure")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="cloud-owner" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Identifies the vendor and cloud name. First part of composite key should be formatted as vendor-cloudname")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="cloud-region-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Identifier used by the vendor for the region. Second part of composite key")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="cloud-type" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Type of the cloud (e.g., openstack)")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="owner-defined-type" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Cloud-owner defined type indicator")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="cloud-region-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Software version employed at the site")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="identity-url" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="URL of the keystone identity service")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="cloud-zone" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Zone where the cloud is homed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="complex-name" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="complex name for cloud-region instance")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:volume-groups" minOccurs="0"/>
+ <xs:element ref="tns:tenants" minOccurs="0"/>
+ <xs:element ref="tns:flavors" minOccurs="0"/>
+ <xs:element ref="tns:group-assignments" minOccurs="0"/>
+ <xs:element ref="tns:snapshots" minOccurs="0"/>
+ <xs:element ref="tns:images" minOccurs="0"/>
+ <xs:element ref="tns:availability-zones" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="cloud-regions">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:cloud-region" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="p-interface">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Physical interface (e.g., nic)",indexedProps="interface-name",dependentOn="pserver,pnf",container="p-interfaces")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="interface-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Name that identifies the physical interface")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="speed-value" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="speed-units" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="port-description" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Nature of the services and connectivity on this port.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="equipment-identifier" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="CLEI or other specification for p-interface hardware.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="interface-role" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Role specification for p-interface hardware.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="interface-type" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Indicates the physical properties of the interface.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ <xs:element ref="tns:l-interfaces" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="p-interfaces">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of physical interfaces.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:p-interface" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="lag-interface">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Link aggregate interface",indexedProps="interface-name",dependentOn="generic-vnf,pserver,pnf",container="lag-interfaces")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="interface-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Name that identifies the link aggregate interface")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="speed-value" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="speed-units" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ <xs:element ref="tns:l-interfaces" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="lag-interfaces">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of link aggregate interfaces.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:lag-interface" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="pserver">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Compute host whose hostname must be unique and must exactly match what is sent as a relationship to a vserver.",nameProps="pserver-name2",indexedProps="hostname,in-maint,pserver-id,pserver-name2",searchable="hostname,pserver-name2,pserver-id,ipv4-oam-address",container="pservers",namespace="cloud-infrastructure")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="hostname" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Value from executing hostname on the compute node.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="ptnii-equip-name" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="PTNII name")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="number-of-cpus" type="xs:int" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Number of cpus")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="disk-in-gigabytes" type="xs:int" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Disk size, in GBs")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="ram-in-megabytes" type="xs:int" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="RAM size, in MBs")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="equip-type" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Equipment type. Source of truth should define valid values.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="equip-vendor" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Equipment vendor. Source of truth should define valid values.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="equip-model" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Equipment model. Source of truth should define valid values.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="fqdn" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Fully-qualified domain name")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="pserver-selflink" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="ipv4-oam-address" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used to configure device, also used for troubleshooting and is IP used for traps generated by device.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="serial-number" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Serial number, may be queried")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="pserver-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="ID of Pserver")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="internet-topology" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="internet topology of Pserver")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="in-maint" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="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.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="pserver-name2" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="alternative pserver name")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="purpose" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="purpose of pserver")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ <xs:element ref="tns:p-interfaces" minOccurs="0"/>
+ <xs:element ref="tns:lag-interfaces" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="pservers">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of compute hosts.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:pserver" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="cloud-infrastructure">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Namespace for cloud infrastructure.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:cloud-regions" minOccurs="0"/>
+ <xs:element ref="tns:pservers" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="service-instance">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Instance of a service",indexedProps="service-instance-id,persona-model-id,persona-model-version,widget-model-id,widget-model-version,service-instance-name,service-instance-location-id",nameProps="service-instance-name",searchable="service-instance-id",uniqueProps="service-instance-id",dependentOn="service-subscription",container="service-instances")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="service-instance-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Uniquely identifies this instance of a service")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="service-instance-name" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="This field will store a name assigned to the service-instance.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="persona-model-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC model id for this resource or service model.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="persona-model-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC model version for this resource or service model.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="widget-model-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary widget model. This maps directly to the AAI widget.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="widget-model-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary version of the widget model.This maps directly to the AAI version of the widget.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="bandwidth-total" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Indicates the total bandwidth to be used for this service.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="bandwidth-up-wan1" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="indicates the upstream bandwidth this service will use on the WAN1 port of the physical device.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="bandwidth-down-wan1" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="indicates the downstream bandwidth this service will use on the WAN1 port of the physical device.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="bandwidth-up-wan2" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="indicates the upstream bandwidth this service will use on the WAN2 port of the physical device.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="bandwidth-down-wan2" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="indicates the downstream bandwidth this service will use on the WAN2 port of the physical device.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vhn-portal-url" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="URL customers will use to access the vHN Portal.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="operational-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Operational status of the service-instance.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="service-instance-location-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="An identifier that customers assign to the location where this service is being used.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ <xs:element ref="tns:metadata" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="service-instances">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of service instances")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:service-instance" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="service-subscription">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Object that group service instances.",indexedProps="service-type",dependentOn="customer",container="service-subscriptions")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="service-type" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Value defined by orchestration to identify this service across OpenECOMP.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="temp-ub-sub-account-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="This property will be deleted from AAI in the near future. Only stop gap solution.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:service-instances" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="service-subscriptions">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of objects that group service instances.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:service-subscription" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="customer">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="customer identifiers to provide linkage back to BSS information.",nameProps="subscriber-name",indexedProps="subscriber-name,global-customer-id,subscriber-type",searchable="subscriber-name,global-customer-id",uniqueProps="global-customer-id,subscriber-name",alternateKeys1="subscriber-name",container="customers",namespace="business")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="global-customer-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Global customer id used across OpenECOMP to uniquely identify customer.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="subscriber-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Subscriber name, an alternate way to retrieve a customer.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="subscriber-type" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Subscriber type, a way to provide VID with only the INFRA customers.",defaultValue="CUST")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:service-subscriptions" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="customers">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of customer identifiers to provide linkage back to BSS information.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:customer" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="business">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Namespace for business related constructs")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:customers" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="service">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Stand-in for service model definitions. Likely to be deprecated in favor of models from SDC.",indexedProps="service-description,service-id",container="services",namespace="service-design-and-creation")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="service-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="This gets defined by others to provide a unique ID for the service, we accept what is sent.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="service-description" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Description of the service")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="service-selflink" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="URL to endpoint where AAI can get more details")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="service-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="service version")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="services">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of service model definitions. Likely to be deprecated in favor of models from SDC.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:service" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="element-choice-set">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="This is how we would capture constraints defining allowed sets of elements.",uniqueProps="element-choice-set-uuid",indexedProps="element-choice-set-uuid",allowDirectRead="true",allowDirectWrite="false",container="element-choice-sets")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="element-choice-set-uuid" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="element-choice-set-name" type="xs:string"/>
+ <xs:element name="cardinality" type="xs:string" minOccurs="0"/>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0"/>
+ <xs:element ref="tns:model-elements" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="element-choice-sets">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:element-choice-set" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="constrained-element-set">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="This is how we would capture constraints defining allowed sets of elements.",uniqueProps="constrained-element-set-uuid",indexedProps="constrained-element-set-uuid",allowDirectRead="true",allowDirectWrite="false",container="constrained-element-sets")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="constrained-element-set-uuid" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="constraint-type" type="xs:string"/>
+ <xs:element name="check-type" type="xs:string"/>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0"/>
+ <xs:element ref="tns:element-choice-sets" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="constrained-element-sets">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:constrained-element-set" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="model-constraint">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="This is how we would capture constraints defining allowed sets of elements.",uniqueProps="model-constraint-uuid",indexedProps="model-constraint-uuid",allowDirectRead="true",allowDirectWrite="false",container="model-constraints")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="model-constraint-uuid" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="constrained-element-set-uuid-to-replace" type="xs:string"/>
+ <xs:element ref="tns:constrained-element-sets" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="model-constraints">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:model-constraint" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="model-element">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Defines how other models combine to make up a higher-level model.",uniqueProps="model-element-uuid",indexedProps="model-element-uuid",allowDirectRead="true",allowDirectWrite="false",container="model-elements")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="model-element-uuid" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="new-data-del-flag" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Indicates whether this element was created as part of instantiation from this model")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="cardinality" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="How many of this type of element are required/allowed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="linkage-points" minOccurs="0">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Defines how other models combine to make up a higher-level model.",uniqueProps="model-element-uuid",indexedProps="model-element-uuid",allowDirectRead="true",allowDirectWrite="false",container="model-elements")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="linkage-point" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:model-elements" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Defines how other models combine to make up a higher-level model")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:model-constraints" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Describes new constraints on this model element that are not part of that model's definition")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="model-elements">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:model-element" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="model">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Subgraph definition provided by SDC to describe an inventory asset and its connections related to SDC models",nameProps="model-name,model-type",indexedProps="model-name-version-id,model-type,model-name,model-id,model-version",alternateKeys1="model-id,model-version",uniqueProps="model-name-version-id",container="models",namespace="service-design-and-creation")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="model-name-version-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique identifier corresponding to one version of a model in SDC")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="model-type" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Type of the model, e.g., service, resource, widget, etc.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="model-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Name of the model, which can change from version to version.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="model-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Invariant unique ID which does not change from version to version")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="model-version" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Version")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="model-description" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Description")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:model-elements" minOccurs="0"/>
+ <xs:element ref="tns:metadata" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="models">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of subgraph definitions provided by SDC to describe the inventory assets and their connections related to SDC models")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:model" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="related-lookup">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="TBD",uniqueProps="related-lookup-uuid",indexedProps="related-lookup-uuid",allowDirectRead="true",allowDirectWrite="false",container="related-lookups")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="related-lookup-uuid" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="source-node-type" type="xs:string"/>
+ <xs:element name="source-node-property" type="xs:string"/>
+ <xs:element name="target-node-type" type="xs:string"/>
+ <xs:element name="target-node-property" type="xs:string"/>
+ <xs:element name="property-collect-list" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="related-lookups">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:related-lookup" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="property-constraint">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="TBD",uniqueProps="property-constraint-uuid",indexedProps="property-constraint-uuid",allowDirectRead="true",allowDirectWrite="false",container="property-constraints")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="property-constraint-uuid" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="constraint-type" type="xs:string"/>
+ <xs:element name="property-name" type="xs:string"/>
+ <xs:element name="property-value" type="xs:string"/>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="property-constraints">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:property-constraint" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="named-query-element">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="TBD",uniqueProps="named-query-element-uuid",indexedProps="named-query-element-uuid",allowDirectRead="true",allowDirectWrite="false",container="named-query-elements")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="named-query-element-uuid" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,autoGenerateUuid="true")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="property-collect-list" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0"/>
+ <xs:element name="property-limit-desc" type="xs:string" minOccurs="0"/>
+ <xs:element name="do-not-output" type="xs:string" minOccurs="0"/>
+ <xs:element ref="tns:named-query-elements" minOccurs="0"/>
+ <xs:element ref="tns:related-lookups" minOccurs="0"/>
+ <xs:element ref="tns:property-constraints" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="named-query-elements">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:named-query-element" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="named-query">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="TBD",nameProps="named-query-name",uniqueProps="named-query-uuid",indexedProps="named-query-uuid,named-query-name",container="named-queries",namespace="service-design-and-creation")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="named-query-uuid" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true)</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="named-query-name" type="xs:string"/>
+ <xs:element name="named-query-version" type="xs:string"/>
+ <xs:element name="required-input-params" minOccurs="0">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="TBD",nameProps="named-query-name",uniqueProps="named-query-uuid",indexedProps="named-query-uuid,named-query-name",container="named-queries",namespace="service-design-and-creation")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="required-input-param" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="description" type="xs:string" minOccurs="0"/>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0"/>
+ <xs:element ref="tns:named-query-elements" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="named-queries">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:named-query" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="service-design-and-creation">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Namespace for objects managed by SDC")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:services" minOccurs="0"/>
+ <xs:element ref="tns:models" minOccurs="0"/>
+ <xs:element ref="tns:named-queries" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="logical-link">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Logical links generally connect l-interfaces but are used to express logical connectivity between two points",indexedProps="link-name,persona-model-id,persona-model-version,widget-model-id,widget-model-version,link-id",uniqueProps="link-id",container="logical-links",namespace="network")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="link-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="e.g., evc-name, or vnf-nameA_interface-nameA_vnf-nameZ_interface-nameZ")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="link-type" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Type of logical link, e.g., evc")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="speed-value" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="speed-units" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="ip-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="v4, v6, or ds for dual stack (should be ip-version)")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="routing-protocol" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="For example, static or BGP")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="persona-model-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC model id for this resource or service model.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="persona-model-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC model version for this resource or service model.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="widget-model-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary widget model. This maps directly to the AAI widget.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="widget-model-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary version of the widget model.This maps directly to the AAI version of the widget.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="operational-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Indication of operational status of the logical link.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="link-role" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Indication of the network use of the logical link.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="link-name2" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Alias or alternate name (CLCI or D1 name).")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="link-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="UUID of the logical-link, SDNC generates this.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="logical-links">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of logical connections")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:logical-link" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="vnfc">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(indexedProps="vnfc-name,prov-status,vnfc-type,vnfc-function-code,ipaddress-v4-oam-vip,in-maint,is-closed-loop-disabled,group-notation",container="vnfcs",namespace="network")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="vnfc-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of vnfc.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vnfc-function-code" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="function code")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vnfc-type" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="type")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="prov-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="prov status of this vnfc")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="orchestration-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by APP-C")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="ipaddress-v4-oam-vip" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Oam V4 vip address of this vnfc")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="in-maint" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether or not this object is in maintenance mode (maintenance mode = true)")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="is-closed-loop-disabled" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether closed loop function is enabled on this node")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="group-notation" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Group notation of VNFC")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="vnfcs">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="virtual network components associated with a vserver from application controller.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:vnfc" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="subnet">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(indexedProps="subnet-id,subnet-name",nameProps="subnet-name",uniqueProps="subnet-id",dependentOn="l3-network",container="subnets")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="subnet-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Subnet ID, should be UUID.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="subnet-name" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Name associated with the subnet.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="neutron-subnet-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Neutron id of this subnet")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="gateway-address" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="gateway ip address")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="network-start-address" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="network start address")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="cidr-mask" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="cidr mask")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="ip-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="ip version")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="orchestration-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by MSO")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="dhcp-enabled" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="dhcp enabled")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="dhcp-start" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the start address reserved for use by dhcp")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="dhcp-end" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the last address reserved for use by dhcp")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="subnets">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:subnet" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="ctag-assignment">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(indexedProps="vlan-id-inner",dependentOn="l3-network",container="ctag-assignments")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="vlan-id-inner" type="xs:unsignedInt">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="id.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="ctag-assignments">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:ctag-assignment" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="segmentation-assignment">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Openstack segmentation assignment.",indexedProps="segmentation-id",dependentOn="l3-network",container="segmentation-assignments")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="segmentation-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Route Table Reference id, UUID assigned to this instance.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Concurrency value")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="segmentation-assignments">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of openstack segmentation assignments")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:segmentation-assignment" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="l3-network">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Generic network definition",nameProps="network-name",indexedProps="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",uniqueProps="network-id",container="l3-networks",namespace="network")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="network-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Network ID, should be uuid. Unique across AAI.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="network-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Name of the network, governed by some naming convention..")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="network-type" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Type of the network - who defines these values?")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="network-role" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Role the network plans - who defines these values?")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="network-technology" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Network technology - who defines these values?")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="neutron-network-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Neutron network id of this Interface")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="is-bound-to-vpn" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="Set to true if bound to VPN")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="service-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Unique identifier of service from SDC")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="network-role-instance" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="network role instance")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="orchestration-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, mastered by MSO")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="heat-stack-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance, managed by MSO")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="mso-catalog-key" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Corresponds to the SDN-C catalog id used to configure this VCE")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="contrail-network-fqdn" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Contrail FQDN for the network")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="persona-model-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC model id for this resource or service model.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="persona-model-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC model version for this resource or service model.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="widget-model-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary widget model. This maps directly to the AAI widget.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="widget-model-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary version of the widget model.This maps directly to the AAI version of the widget.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="physical-network-name" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Name associated with the physical network.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="is-provider-network" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="boolean indicatating whether or not network is a provider network.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="is-shared-network" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="boolean indicatating whether or not network is a shared network.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="is-external-network" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="boolean indicatating whether or not network is an external network.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:subnets" minOccurs="0"/>
+ <xs:element ref="tns:ctag-assignments" minOccurs="0"/>
+ <xs:element ref="tns:segmentation-assignments" minOccurs="0"/>
+ <xs:element ref="tns:relationship-list" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Relates to tenant (or is it a child of tenant)")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="l3-networks">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:l3-network" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="vf-module">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="a deployment unit of VNFCs",indexedProps="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",dependentOn="generic-vnf",container="vf-modules")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="vf-module-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique ID of vf-module.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vf-module-name" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Name of vf-module")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="heat-stack-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="orchestration-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="orchestration status of this vf-module, mastered by MSO")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="is-base-vf-module" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether or not this object is base vf module")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="persona-model-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC model id for this resource or service model.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="persona-model-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC model version for this resource or service model.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="widget-model-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary widget model. This maps directly to the AAI widget.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="widget-model-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary version of the widget model.This maps directly to the AAI version of the widget.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="contrail-service-instance-fqdn" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the Contrail unique ID for a service-instance")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="vf-modules">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of vf-modules, a deployment unit of VNFCs")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:vf-module" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="generic-vnf">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="General purpose VNF",nameProps="vnf-name",indexedProps="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",searchable="vnf-id,vnf-name,vnf-name2",uniqueProps="vnf-id",container="generic-vnfs",namespace="network",extendsFrom="vnf")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="vnf-id" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="Unique id of VNF. This is unique across the graph.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vnf-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Name of VNF.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vnf-name2" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Alternate name of VNF.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vnf-type" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="String capturing type of vnf, that was intended to identify the SDC resource. This field has been overloaded and clients should expect changes to occur in the future to this field as SDC matures.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="service-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Unique identifier of service from SDC")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="regional-resource-zone" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Regional way of organizing pservers, source of truth should define values")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="prov-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Trigger for operational monitoring of this resource by Service Assurance systems.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="operational-state" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Indicator for whether the resource is considered operational")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="license-key" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="License key")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="equipment-role" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Client should send valid enumerated value")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="orchestration-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Orchestration status of this VNF, used by MSO.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="heat-stack-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Heat stack id corresponding to this instance, managed by MSO")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="mso-catalog-key" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Corresponds to the SDN-C catalog id used to configure this VCE")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="management-option" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="identifier of managed by customer")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="ipv4-oam-address" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Address tail-f uses to configure generic-vnf, also used for troubleshooting and is IP used for traps generated by generic-vnf.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="ipv4-loopback0-address" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="v4 Loopback0 address")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="nm-lan-v6-address" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="v6 Loopback address")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="management-v6-address" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="v6 management address")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vcpu" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="number of vcpus ordered for this instance of VNF, used for VNFs with no vservers/flavors")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vcpu-units" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="units associated with vcpu, used for VNFs with no vservers/flavors")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vmemory" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="number of GB of memory ordered for this instance of VNF, used for VNFs with no vservers/flavors")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vmemory-units" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="units associated with vmemory, used for VNFs with no vservers/flavors")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vdisk" type="xs:unsignedInt" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="number of vdisks ordered for this instance of VNF, used for VNFs with no vservers/flavors")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="vdisk-units" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="units associated with vdisk, used for VNFs with no vservers/flavors")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="in-maint" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="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.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="is-closed-loop-disabled" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="used to indicate whether closed loop function is enabled on this node")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="summary-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="details regarding the generic-vnf operation")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="encrypted-access-flag" type="xs:boolean" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="indicates whether generic-vnf access uses SSH")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="entitlement-assignment-group-uuid" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="UUID of the Entitlement group used for licensing VNFs")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="entitlement-resource-uuid" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="UUID of the specific entitlement resource")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="license-assignment-group-uuid" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="UUID of the license assignment group")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="license-key-uuid" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="UUID of the actual license resource")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="persona-model-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC model id for this resource or service model.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="persona-model-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC model version for this resource or service model.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="persona-model-customization-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="captures the id of all the configuration used to customize the resource for the service.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="widget-model-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary widget model. This maps directly to the AAI widget.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="widget-model-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="the SDC data dictionary version of the widget model.This maps directly to the AAI version of the widget.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="as-number" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="as-number of the VNF")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="regional-resource-subzone" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="represents sub zone of the rr plane")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ <xs:element ref="tns:l-interfaces" minOccurs="0"/>
+ <xs:element ref="tns:lag-interfaces" minOccurs="0"/>
+ <xs:element ref="tns:vf-modules" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="generic-vnfs">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of VNFs")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:generic-vnf" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="pnf">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="PNF represents a physical network function.",indexedProps="pnf-name,orchestration-status",uniqueProps="pnf-name",container="pnfs",namespace="network")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="pnf-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="unique name of Physical Network Function.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="pnf-name2" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="name of Physical Network Function.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="pnf-name2-source" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="source of name2")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="pnf-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="id of pnf")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="equip-type" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Equipment type. Source of truth should define valid values.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="equip-vendor" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Equipment vendor. Source of truth should define valid values.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="equip-model" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Equipment model. Source of truth should define valid values.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="management-option" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="identifier of managed by customer")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="ipaddress-v4-oam" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="ipv4-oam-address with new naming convention for IP addresses")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="sw-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="sw-version is the version of SW for the hosted application on the PNF.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="orchestration-status" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="orchestration-status is the status of orchestration on the PNF.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="in-maint" type="xs:boolean">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(defaultValue="false",description="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.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="frame-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="ID of the physical frame (relay rack) where pnf is installed.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ <xs:element ref="tns:p-interfaces" minOccurs="0"/>
+ <xs:element ref="tns:lag-interfaces" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="pnfs">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of Physical Network Functions.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:pnf" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="physical-link">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of physical connections, typically between p-interfaces",indexedProps="circuit-id,link-name",alternateKeys1="circuit-id",container="physical-links",namespace="network")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="link-name" type="xs:string">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(isKey=true,description="e.g., hostnameA_p-connection_nameA_hostnameZ+p_connection-nameZ")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="speed-value" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Captures the numeric part of the speed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="speed-units" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Captures the units corresponding to the speed")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="circuit-id" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Circuit it")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="dual-mode" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Dual access mode (e.g., primary, secondary")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="management-option" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="To provide information on who manages this circuit. AAI or 3rd party transport provider")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="service-provider-name" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Name of the service Provider on this link.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element name="resource-version" type="xs:string" minOccurs="0">
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="field">@org.openecomp.aai.annotations.Metadata(description="Used for optimistic concurrency. Must be empty on create, valid on update and delete.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ <xs:element ref="tns:relationship-list" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="physical-links">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Collection of physical connections, typically between p-interfaces")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:physical-link" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="network">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Namespace for network inventory resources.")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:logical-links" minOccurs="0"/>
+ <xs:element ref="tns:vnfcs" minOccurs="0"/>
+ <xs:element ref="tns:l3-networks" minOccurs="0"/>
+ <xs:element ref="tns:generic-vnfs" minOccurs="0"/>
+ <xs:element ref="tns:pnfs" minOccurs="0"/>
+ <xs:element ref="tns:physical-links" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="reserved-prop-names">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Internal map to define some reserved properties of a vertex",uniqueProps="aai-unique-key",indexedProps="aai-unique-key,source-of-truth,aai-node-type")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="last-mod-source-of-truth" type="xs:string" minOccurs="0"/>
+ <xs:element name="aai-node-type" type="xs:string" minOccurs="0"/>
+ <xs:element name="aai-created-ts" type="xs:unsignedInt" minOccurs="0"/>
+ <xs:element name="aai-unique-key" type="xs:string" minOccurs="0"/>
+ <xs:element name="aai-last-mod-ts" type="xs:unsignedInt" minOccurs="0"/>
+ <xs:element name="source-of-truth" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="edge-prop-names">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Internal map to define the properties of an edge and interpret the map EdgeRules",edgeInfo="edgeLabel,direction,multiplicityRule,isParent,usesResource,hasDelTarget,SVC-INFRA,SVC-INFRA-REV")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="edgeLabel" type="xs:string" minOccurs="0"/>
+ <xs:element name="direction" type="xs:string" minOccurs="0"/>
+ <xs:element name="multiplicityRule" type="xs:string" minOccurs="0"/>
+ <xs:element name="isParent" type="xs:boolean" minOccurs="0"/>
+ <xs:element name="usesResource" type="xs:boolean" minOccurs="0"/>
+ <xs:element name="hasDelTarget" type="xs:boolean" minOccurs="0"/>
+ <xs:element name="SVC-INFRA" type="xs:string" minOccurs="0"/>
+ <xs:element name="SVC-INFRA-REV" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="aai-internal">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:reserved-prop-names" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="tns:edge-prop-names" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="inventory">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:search" minOccurs="0"/>
+ <xs:element ref="tns:actions" minOccurs="0"/>
+ <xs:element ref="tns:cloud-infrastructure" minOccurs="0"/>
+ <xs:element ref="tns:business" minOccurs="0"/>
+ <xs:element ref="tns:service-design-and-creation" minOccurs="0"/>
+ <xs:element ref="tns:network" minOccurs="0"/>
+ <xs:element ref="tns:aai-internal" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="inventory-item-data">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="property-name" type="xs:string" minOccurs="0"/>
+ <xs:element name="property-value" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="inventory-item">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="inventory-item-type" type="xs:string" minOccurs="0"/>
+ <xs:element name="inventory-item-link" type="xs:string" minOccurs="0"/>
+ <xs:element ref="tns:inventory-item-data" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element ref="tns:tagged-inventory-item-list" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="tagged-inventory-item-list">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="tns:inventory-item" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="start-node-filter">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="property-name" type="xs:string" minOccurs="0"/>
+ <xs:element name="property-value" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="include-node-filter">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="include-node-type" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="secondary-filter">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="property-name" type="xs:string" minOccurs="0"/>
+ <xs:element name="filter-type" type="xs:string" minOccurs="0"/>
+ <xs:element name="property-value" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="notification-event-header">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="id" type="xs:string" minOccurs="0"/>
+ <xs:element name="timestamp" type="xs:string" minOccurs="0"/>
+ <xs:element name="source-name" type="xs:string" minOccurs="0"/>
+ <xs:element name="domain" type="xs:string" minOccurs="0"/>
+ <xs:element name="sequence-number" type="xs:string" minOccurs="0"/>
+ <xs:element name="severity" type="xs:string" minOccurs="0"/>
+ <xs:element name="event-type" type="xs:string" minOccurs="0"/>
+ <xs:element name="version" type="xs:string" minOccurs="0"/>
+ <xs:element name="action" type="xs:string" minOccurs="0"/>
+ <xs:element name="entity-type" type="xs:string" minOccurs="0"/>
+ <xs:element name="top-entity-type" type="xs:string" minOccurs="0"/>
+ <xs:element name="entity-link" type="xs:string" minOccurs="0"/>
+ <xs:element name="status" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="notification-event">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="cambria.partition" type="xs:string" minOccurs="0"/>
+ <xs:element ref="tns:notification-event-header" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="query-parameters">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="QueryParameters for performing a named-query or model query")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:named-query" minOccurs="0"/>
+ <xs:element ref="tns:model" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="instance-filter">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="instance-filters">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="InstanceFilters for performing a named-query or model query")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:instance-filter" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="model-and-named-query-search">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="ModelAndNamedQuerySearch holds query-parameters and instance-properties for performing a named-query or model query")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:query-parameters" minOccurs="0"/>
+ <xs:element ref="tns:instance-filters" minOccurs="0"/>
+ <xs:element name="top-node-type" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="properties">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Property holder for query properties or instance properties")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="property-name" type="xs:string" minOccurs="0"/>
+ <xs:element name="property-value" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="extra-properties">
+ <xs:complexType>
+ <xs:sequence/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="inventory-response-item">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Inventory item for response list",container="inventory-response-items")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element name="model-name" type="xs:string" minOccurs="0"/>
+ <xs:element ref="tns:extra-properties" minOccurs="0"/>
+ <xs:element ref="tns:inventory-response-items" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="inventory-response-items">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Container for inventory items in response list",container="response-list")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:inventory-response-item" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="response-list">
+ <xs:complexType>
+ <xs:annotation>
+ <xs:appinfo>
+ <annox:annotate target="class">@org.openecomp.aai.annotations.Metadata(description="Response container for the results of a named-query or model query")</annox:annotate>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:sequence>
+ <xs:element ref="tns:inventory-response-items" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="extra-property">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="property-name" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/aai-service/provider/src/test/java/org/openecomp/sdnc/sli/aai/r1607/R1607AutoGeneratedTest.java b/aai-service/provider/src/test/java/org/openecomp/sdnc/sli/aai/r1607/R1607AutoGeneratedTest.java
new file mode 100644
index 0000000..1091b9f
--- /dev/null
+++ b/aai-service/provider/src/test/java/org/openecomp/sdnc/sli/aai/r1607/R1607AutoGeneratedTest.java
@@ -0,0 +1,490 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.aai.r1607;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.xml.bind.SchemaOutputResolver;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.transform.Result;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.commons.lang.RandomStringUtils;
+import org.apache.commons.lang.StringUtils;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runners.MethodSorters;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.openecomp.sdnc.sli.aai.AAIClient;
+import org.openecomp.sdnc.sli.aai.AAIDeclarations;
+import org.openecomp.sdnc.sli.aai.AAIRequest;
+import org.openecomp.sdnc.sli.aai.AAIService;
+import org.openecomp.sdnc.sli.aai.data.AAIDatum;
+import org.openecomp.sdnc.sli.aai.query.NamedQueryData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.openecomp.aai.inventory.v8.GenericVnf;
+import org.openecomp.aai.inventory.v8.InventoryResponseItems;
+
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class R1607AutoGeneratedTest {
+
+ private static final Logger LOG = LoggerFactory.getLogger(R1607AutoGeneratedTest.class);
+
+ protected static AAIClient client;
+
+ protected Map<String, String> cache = new HashMap<String, String>();
+
+ @BeforeClass
+ public static void setUp() throws Exception {
+// super.setUp();
+ URL url = AAIService.class.getResource(AAIService.AAICLIENT_PROPERTIES);
+ client = new AAIService(url);
+ LOG.info("\nTaicAAIResourceTest.setUp\n");
+ }
+
+ @AfterClass
+ public static void tearDown() throws Exception {
+// super.tearDown();
+ client = null;
+ LOG.info("----------------------- AAIResourceTest.tearDown -----------------------");
+ }
+
+
+// @Test
+ public void test01AutoGeneratedRequest() {
+
+ String[] requestDefinition = {
+ "query|generic-vnf|generic-vnf.vnf-id:assign:value:bnfm0001v-1147"
+ };
+
+ for(String line : requestDefinition){
+ // parse request line resource | key structure
+ String[] segments = line.split("\\|");
+ String action = segments[0];
+ String resource = segments[1];
+ String[] tmpKeys = segments[2].split("&");
+
+
+ String localId = null;
+
+ List<String> keys = new ArrayList<String>();
+ String keyLine = null;
+
+ for(String instruction : tmpKeys) {
+ String[] parts = instruction.split(":");
+ String identifier = parts[0];
+ String method = parts[2];
+
+ if(identifier.startsWith(resource)) {
+ localId = identifier;
+ } else if(identifier.startsWith("l-interface") && "l2-bridge-bgf".equals(resource)) {
+ localId = identifier;
+ } else if(identifier.startsWith("l-interface") && "l2-bridge-sbg".equals(resource)) {
+ localId = identifier;
+ }
+
+ switch(parts[1]) {
+ case "assign":
+ String postProcesss = parts[3];
+ keyLine = processAssign(identifier, method, postProcesss);
+ if(keyLine != null && !keyLine.trim().isEmpty()) {
+ keys.add(keyLine);
+ }
+ break;
+ case "cached":
+ keyLine = processCached(identifier, method);
+ if(keyLine != null && !keyLine.trim().isEmpty()) {
+ keys.add(keyLine);
+ }
+ break;
+ }
+
+ }
+
+ switch(action){
+ case "save":
+ List<String> x = Arrays.asList(localId.split("\\."));
+
+ testAutoGeneratedSaveRequest(resource, keys, x.get(x.size() - 1), cache.get(localId));
+ break;
+ case "query":
+ test03AutoGeneratedQueryRequest(resource, keys);
+ break;
+ case "delete":
+ test03AutoGeneratedDeleteRequest(resource, keys);
+ break;
+ }
+ }
+
+ LOG.info("done");
+ }
+
+
+ public void testAutoGeneratedSaveRequest(String resource, List<String> requestKeys, String identifier, String idValue) {
+ LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
+
+ try
+ {
+ Map<String, String> nameValues = keyToHashMap(StringUtils.join(requestKeys, " AND "), new SvcLogicContext());
+ AAIRequest request = AAIRequest.createRequest(resource, nameValues);
+ Class<AAIDatum> resourceClass = (Class<AAIDatum>) (request==null ? GenericVnf.class : request.getModelClass());
+
+ Map<String, String> data = new HashMap<String, String>();
+
+ for(Field field : resourceClass.getDeclaredFields()) {
+ String type = field.getType().getName();
+ if(type.startsWith("java.lang.")){
+ Annotation[] fieldAnnotations = field.getAnnotations();
+ for(int i = 0; i < fieldAnnotations.length; i++) {
+ Annotation a = fieldAnnotations[i];
+ if(a instanceof JsonProperty){
+ JsonProperty pa = (JsonProperty)a;
+ String name = pa.value();
+ String value;
+ switch(type) {
+ case "java.lang.Integer":
+ case "java.lang.Long":
+ value = RandomStringUtils.random(6, false, true);
+ break;
+ case "java.lang.Boolean":
+ value = "false";
+ break;
+ default:
+ if(name.equals(identifier)) {
+ value = idValue;
+ } else {
+ value = RandomStringUtils.random(10, true, false);
+ }
+ }
+ data.put(name, value);
+ } else
+ if(a instanceof javax.xml.bind.annotation.XmlElement) {
+ XmlElement xe = (XmlElement)a;
+ String name = xe.name();
+ if("link-type".equals(name)){
+ data.put(name, "roadmTail");
+ continue;
+ }
+ if("operational-status".equals(name)){
+ data.put(name, "available");
+ continue;
+ }
+ String value;
+ switch(type) {
+ case "java.lang.Integer":
+ case "java.lang.Long":
+ value = RandomStringUtils.random(6, false, true);
+ break;
+ case "java.lang.Boolean":
+ value = "false";
+ break;
+ default:
+ if(name.equals(identifier)) {
+ value = idValue;
+ } else {
+ value = RandomStringUtils.random(10, true, false);
+ }
+ }
+ data.put(name, value);
+ }
+ }
+ }
+ }
+
+ SvcLogicContext ctx = new SvcLogicContext();
+
+ data.remove("resource-version");
+
+ QueryStatus resp = null;
+
+ //(String resource, boolean force, boolean localOnly, String key, Map<String, String> parms, String prefix, SvcLogicContext ctx)
+ resp = client.save(resource, false, false, StringUtils.join(requestKeys, " AND "), data, "aaidata", ctx);
+ }
+ catch (Throwable e)
+ {
+ LOG.error("Caught exception", e);
+ fail("Caught exception");
+ }
+ }
+
+ public void test03AutoGeneratedQueryRequest(String resource, List<String> requestKeys) {
+ LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ try
+ {
+
+ QueryStatus response = null;
+
+ response = client.query(resource, false, null, StringUtils.join(requestKeys, " AND "), "aaiTest", null, ctx);
+ }
+ catch (Throwable e)
+ {
+ LOG.error("Caught exception", e);
+ fail("Caught exception");
+ }
+ }
+
+
+ public void test03AutoGeneratedDeleteRequest(String resource, List<String> requestKeys) {
+ LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
+
+ try
+ {
+ SvcLogicContext ctx = new SvcLogicContext();
+
+ QueryStatus response = null;
+
+ response = client.delete(resource, StringUtils.join(requestKeys, " AND "), ctx);
+ }
+ catch (Throwable e)
+ {
+ LOG.error("Caught exception", e);
+ fail("Caught exception");
+ }
+ }
+
+ static ArrayList<Method> findSetters(Class<?> c) {
+ ArrayList<Method> list = new ArrayList<Method>();
+ Method[] methods = c.getDeclaredMethods();
+ for (Method method : methods)
+ if (isGetter(method))
+ list.add(method);
+ return list;
+ }
+
+
+ public static boolean isGetter(Method method) {
+ if (Modifier.isPublic(method.getModifiers()) &&
+ method.getParameterTypes().length == 0) {
+ if (method.getName().matches("^get[A-Z].*") &&
+ !method.getReturnType().equals(void.class))
+ return true;
+ if (method.getName().matches("^is[A-Z].*") &&
+ method.getReturnType().equals(boolean.class))
+ return true;
+ }
+ return false;
+ }
+
+ public static boolean isSetter(Method method) {
+ return Modifier.isPublic(method.getModifiers()) &&
+ method.getReturnType().equals(void.class) &&
+ method.getParameterTypes().length == 1 &&
+ method.getName().matches("^set[A-Z].*");
+ }
+
+ private String processAssign(String identifier, String method, String postProcess) {
+ String value = null;
+ if("uuid".equals(method)) {
+ value = UUID.randomUUID().toString();
+ }
+
+ if("cache".equals(postProcess)) {
+ cache.put(identifier, value);
+ }
+
+ if("value".equals(method)) {
+ cache.put(identifier, postProcess);
+ value = postProcess;
+ }
+
+ String key = String.format("%s = '%s'", identifier, value);
+ return key;
+ }
+
+ private String processCached(String identifier, String method) {
+ String value = cache.get(identifier);
+
+ String key = String.format("%s = '%s'", identifier, value);
+ return key;
+ }
+
+ protected HashMap<String,String> keyToHashMap(String key, SvcLogicContext ctx) {
+ if (key == null) {
+ return (null);
+ }
+
+ LOG.debug("Converting key [" + key + "] to where clause");
+
+ if (key.startsWith("'") && key.endsWith("'")) {
+ key = key.substring(1, key.length() - 1);
+
+ LOG.debug("Stripped outer single quotes - key is now [" + key + "]");
+ }
+
+ String[] keyTerms = key.split("\\s+");
+
+ StringBuffer whereBuff = new StringBuffer();
+ String term1 = null;
+ String op = null;
+ String term2 = null;
+ HashMap<String, String> results = new HashMap<String, String>();
+
+ for (int i = 0; i < keyTerms.length; i++) {
+ if (term1 == null) {
+ if ("and".equalsIgnoreCase(keyTerms[i])
+ || "or".equalsIgnoreCase(keyTerms[i])) {
+ // Skip over ADD/OR
+ } else {
+ term1 = resolveTerm(keyTerms[i], ctx);
+ }
+ } else if (op == null) {
+ if ("==".equals(keyTerms[i])) {
+ op = "=";
+ } else {
+ op = keyTerms[i];
+ }
+ } else {
+ term2 = resolveTerm(keyTerms[i], ctx);
+ term2 = term2.trim().replace("'", "").replace("$", "").replace("'", "");
+ results.put(term1, term2);
+
+ term1 = null;
+ op = null;
+ term2 = null;
+ }
+ }
+
+ return (results);
+ }
+
+ private String resolveTerm(String term, SvcLogicContext ctx) {
+ if (term == null) {
+ return (null);
+ }
+
+ LOG.debug("resolveTerm: term is " + term);
+
+ if (term.startsWith("$") && (ctx != null)) {
+ // Resolve any index variables.
+
+ return ("'" + resolveCtxVariable(term.substring(1), ctx) + "'");
+ } else if (term.startsWith("'") || term.startsWith("\"")) {
+ return (term);
+ } else {
+ return (term.replaceAll("-", "_"));
+
+ }
+
+ }
+
+ private String resolveCtxVariable(String ctxVarName, SvcLogicContext ctx) {
+
+ if (ctxVarName.indexOf('[') == -1) {
+ // Ctx variable contains no arrays
+ return (ctx.getAttribute(ctxVarName));
+ }
+
+ // Resolve any array references
+ StringBuffer sbuff = new StringBuffer();
+ String[] ctxVarParts = ctxVarName.split("\\[");
+ sbuff.append(ctxVarParts[0]);
+ for (int i = 1; i < ctxVarParts.length; i++) {
+ if (ctxVarParts[i].startsWith("$")) {
+ int endBracketLoc = ctxVarParts[i].indexOf("]");
+ if (endBracketLoc == -1) {
+ // Missing end bracket ... give up parsing
+ LOG.warn("Variable reference " + ctxVarName
+ + " seems to be missing a ']'");
+ return (ctx.getAttribute(ctxVarName));
+ }
+
+ String idxVarName = ctxVarParts[i].substring(1, endBracketLoc);
+ String remainder = ctxVarParts[i].substring(endBracketLoc);
+
+ sbuff.append("[");
+ sbuff.append(ctx.getAttribute(idxVarName));
+ sbuff.append(remainder);
+
+ } else {
+ // Index is not a variable reference
+ sbuff.append("[");
+ sbuff.append(ctxVarParts[i]);
+ }
+ }
+
+ return (ctx.getAttribute(sbuff.toString()));
+ }
+
+// @Test
+ public void test04VceDataPost() {
+ LOG.info("----------------------- Test: " + new Object(){}.getClass().getEnclosingMethod().getName() + " -----------------------");
+
+ try
+ {
+ URL resource = this.getClass().getResource("/json/tails4.json");
+
+ LOG.info("Resource is " + resource.getFile());
+ File requestFile = new File(resource.getFile());
+ if(!requestFile.exists()) {
+ fail("Test file does not exist");
+ }
+ SvcLogicContext ctx = new SvcLogicContext();
+ ObjectMapper mapper = client.getObjectMapper();
+ InventoryResponseItems request = mapper.readValue(requestFile, InventoryResponseItems.class);
+ Map<String, Object> subnetsList = mapper.convertValue(request, Map.class);
+ AAIDeclarations.class.cast(client).writeMap(subnetsList, "aaiTmp", ctx);
+ assertNotNull(request);
+
+ }
+ catch (Exception e)
+ {
+ LOG.error("Caught exception", e);
+ fail("Caught exception");
+ }
+ }
+
+static class MySchemaOutputResolver extends SchemaOutputResolver {
+
+ public Result createOutput(String namespaceURI, String suggestedFileName) throws IOException {
+ File file = new File(suggestedFileName);
+ StreamResult result = new StreamResult(file);
+ result.setSystemId(file.getAbsolutePath());
+ return result;
+ }
+
+ }
+}
diff --git a/aai-service/provider/src/test/resources/aaiclient.properties b/aai-service/provider/src/test/resources/aaiclient.properties
new file mode 100644
index 0000000..0091812
--- /dev/null
+++ b/aai-service/provider/src/test/resources/aaiclient.properties
@@ -0,0 +1,251 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR 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 file for A&AI Client
+#
+
+#
+# Certificate keystore and truststore
+#
+org.openecomp.sdnc.sli.aai.ssl.trust=/sdncvar/externals/data/stores/truststore.client.jks
+org.openecomp.sdnc.sli.aai.ssl.trust.psswd=adminadmin
+#org.openecomp.sdnc.sli.aai.ssl.key=/opt/bvc/tls-client/keystore.client.jks
+#org.openecomp.sdnc.sli.aai.ssl.key.psswd=adminadmin
+org.openecomp.sdnc.sli.aai.host.certificate.ignore=true
+
+org.openecomp.sdnc.sli.aai.client.name=SDNC
+org.openecomp.sdnc.sli.aai.client.psswd=SDNC
+
+org.openecomp.sdnc.sli.aai.application=openECOMP
+#connection.timeout=1000
+#read.timeout=2000
+
+#
+# Configuration file for A&AI Client
+#
+org.openecomp.sdnc.sli.aai.uri=https://localhost:8443
+
+
+# query
+org.openecomp.sdnc.sli.aai.path.query=/aai/v8/search/sdn-zone-query
+org.openecomp.sdnc.sli.aai.query.nodes=/aai/v8/search/nodes-query?search-node-type={node-type}&filter={entity-identifier}:EQUALS:{entity-name}
+org.openecomp.sdnc.sli.aai.query.generic=/aai/v8/search/generic-query?key={identifier}:{value}&start-node-type={start-node-type}&include=complex&depth=3
+
+# named query
+org.openecomp.sdnc.sli.aai.query.named=/aai/search/named-query
+
+
+#update
+org.openecomp.sdnc.sli.aai.update=/aai/v8/actions/update
+
+# vce
+org.openecomp.sdnc.sli.aai.path.vce =/aai/v8/network/vces/vce/
+org.openecomp.sdnc.sli.aai.path.vces=/aai/v8/network/vces/
+
+# vpe
+org.openecomp.sdnc.sli.aai.path.vpe =/aai/v8/network/vpes/vpe/
+org.openecomp.sdnc.sli.aai.path.vpes=/aai/v8/network/vpes/
+
+# customer
+org.openecomp.sdnc.sli.aai.path.customer=/aai/v8/business/customers/customer/{customer-id}
+
+# service subscription
+org.openecomp.sdnc.sli.aai.path.service.subscription=/aai/v8/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}
+
+# service instance
+org.openecomp.sdnc.sli.aai.path.svcinst=/aai/v8/business/customers/customer/{customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances
+org.openecomp.sdnc.sli.aai.path.svcinst.query=/aai/v8/search/generic-query?key=service-instance.service-instance-id:{svc-instance-id}&start-node-type=service-instance&include=service-instance
+org.openecomp.sdnc.sli.aai.path.service.instance=/aai/v8/business/customers/customer/{global-customer-id}/service-subscriptions/service-subscription/{service-type}/service-instances/service-instance/{service-instance-id}
+
+# complex
+org.openecomp.sdnc.sli.aai.path.complexes=/aai/v8/cloud-infrastructure/complexes
+org.openecomp.sdnc.sli.aai.path.complex=/aai/v8/cloud-infrastructure/complexes/complex/{physical-location-id}
+
+# tenant
+org.openecomp.sdnc.sli.aai.path.tenant=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}
+org.openecomp.sdnc.sli.aai.path.tenant.query=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant?tenant-name={tenant-name}
+
+# vservers
+org.openecomp.sdnc.sli.aai.path.vservers=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/
+org.openecomp.sdnc.sli.aai.path.vserver=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}
+
+# vpls-pe
+org.openecomp.sdnc.sli.aai.path.vpls.pes=/aai/v8/network/vpls-pes/
+org.openecomp.sdnc.sli.aai.path.vpls.pe =/aai/v8/network/vpls-pes/vpls-pe/
+
+# ctag-pool
+org.openecomp.sdnc.sli.aai.path.ctag.pools=/aai/v8/cloud-infrastructure/complexes/complex/{physical-location-id}/ctag-pools
+org.openecomp.sdnc.sli.aai.path.ctag.pool=/aai/v8/cloud-infrastructure/complexes/complex/{physical-location-id}/ctag-pools/ctag-pool/{target-pe}/{availability-zone-name}
+
+#
+#-------------- 1510 ----------------------
+#
+
+# pservers
+org.openecomp.sdnc.sli.aai.path.pservers=/aai/v8/cloud-infrastructure/pservers
+org.openecomp.sdnc.sli.aai.path.pserver=/aai/v8/cloud-infrastructure/pservers/pserver/{hostname}
+
+# generic-vnf
+org.openecomp.sdnc.sli.aai.path.generic.vnfs=/aai/v8/network/generic-vnfs
+org.openecomp.sdnc.sli.aai.path.generic.vnf=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}
+
+# dvs-switch
+org.openecomp.sdnc.sli.aai.path.dvsswitches=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/dvs-switches
+org.openecomp.sdnc.sli.aai.path.dvsswitch=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/dvs-switches/dvs-switch/{switch-name}
+
+# L3 Networks
+org.openecomp.sdnc.sli.aai.path.l3networks=/aai/v8/network/l3-networks
+org.openecomp.sdnc.sli.aai.path.l3network=/aai/v8/network/l3-networks/l3-network/{network-id}
+org.openecomp.sdnc.sli.aai.path.l3network.query.name=/aai/v8/network/l3-networks/l3-network?network-name={network-name}
+
+# P-Interfaces
+org.openecomp.sdnc.sli.aai.path.pserver.pinterfaces=/aai/v8/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces
+org.openecomp.sdnc.sli.aai.path.pserver.pinterface=/aai/v8/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{interface-name}
+
+# Physical Link
+org.openecomp.sdnc.sli.aai.path.physical.links=/aai/v8/network/physical-links
+org.openecomp.sdnc.sli.aai.path.physical.link=/aai/v8/network/physical-links/physical-link/{link-name}
+
+# VPN Bindings
+org.openecomp.sdnc.sli.aai.path.vpn.bindings=/aai/v8/network/vpn-bindings/
+org.openecomp.sdnc.sli.aai.path.vpn.binding=/aai/v8/network/vpn-bindings/vpn-binding/{vpn-id}
+
+# VNF IMAGES
+org.openecomp.sdnc.sli.aai.path.vnf.images=/aai/v8/service-design-and-creation/vnf-images
+org.openecomp.sdnc.sli.aai.path.vnf.image=/aai/v8/service-design-and-creation/vnf-images/vnf-image/{att-uuid}
+org.openecomp.sdnc.sli.aai.path.vnf.image.query=/aai/v8/service-design-and-creation/vnf-images/vnf-image?application={application_model}&application-vendor={application_vendor}
+
+# UBB Notify
+org.openecomp.sdnc.sli.aai.path.notify=/aai/v8/actions/notify
+org.openecomp.sdnc.sli.aai.notify.selflink.fqdn=https://localhost:8443/restconf/config/L3SDN-API:services/layer3-service-list/{service-instance-id}
+org.openecomp.sdnc.sli.aai.notify.selflink.avpn=https://localhost:8543/restconf/config/L3AVPN-EVC-API:services/service-list/{service-instance-id}/service-data/avpn-logicalchannel-information
+
+# Service
+org.openecomp.sdnc.sli.aai.path.service=/aai/v8/service-design-and-creation/services/service/{service-id}
+org.openecomp.sdnc.sli.aai.path.services=/aai/v8/service-design-and-creation/services
+
+
+#
+#-------------- 1604 ----------------------
+#
+
+# VNFC
+org.openecomp.sdnc.sli.aai.path.vnfc=/aai/v8/network/vnfcs/vnfc/{vnfc-name}
+
+# class-of-service
+org.openecomp.sdnc.sli.aai.path.class.of.service=/aai/v8/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id}/site-pairs/site-pair/{site-pair-id}/classes-of-service/class-of-service/{cos-id}
+
+# site-pair
+org.openecomp.sdnc.sli.aai.path.site.pair=/aai/v8/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id}/site-pairs/site-pair/{site-pair-id}
+
+# routing-instance
+org.openecomp.sdnc.sli.aai.path.routing.instance=/aai/v8/network/site-pair-sets/site-pair-set/{site-pair-set-id}/routing-instances/routing-instance/{routing-instance-id}
+
+# site-pair-set
+org.openecomp.sdnc.sli.aai.path.site.pair.set=/aai/v8/network/site-pair-sets/site-pair-set/{site-pair-set-id}
+
+# license key resource
+org.openecomp.sdnc.sli.aai.path.license.acquire=/aai/v8/actions/assignment/license-management/assignment-group-uuid/{assignment-group-uuid}
+org.openecomp.sdnc.sli.aai.path.license=/aai/v8/license-management/license-key-resources/license-key-resource/{att-uuid}
+
+# logical-link
+org.openecomp.sdnc.sli.aai.path.logical.link =/aai/v8/network/logical-links/logical-link/{link-name}
+
+# virtual-data-center
+org.openecomp.sdnc.sli.aai.path.virtual.data.center=/aai/v8/cloud-infrastructure/virtual-data-centers/virtual-data-center/{vdc-id}
+
+# wan-connector
+org.openecomp.sdnc.sli.aai.path.wan.connector=/aai/v8/business/connectors/connector/{resource-instance-id}
+
+# l-interface
+org.openecomp.sdnc.sli.aai.path.lag.interface.l.interface=/aai/v8/cloud-infrastructure/pservers/pserver/{hostname}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+org.openecomp.sdnc.sli.aai.path.p.interface.l.interface=/aai/v8/cloud-infrastructure/pservers/pserver/{hostname}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+
+# l-interface pnf
+org.openecomp.sdnc.sli.aai.path.lag.interface.l.interface.pnf=/aai/v8/network/pnfs/pnf/{pnf-name}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+org.openecomp.sdnc.sli.aai.path.p.interface.l.interface.pnf=/aai/v8/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+
+# subinterface
+org.openecomp.sdnc.sli.aai.path.pnf.lag.interface.subinterface=/aai/v8/network/pnfs/pnf/{pnf-name}/lag-interfaces/lag-interface/{lag-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+org.openecomp.sdnc.sli.aai.path.pnf.p.interface.l.interface=/aai/v8/network/pnfs/pnf/{pnf-name}/p-interfaces/p-interface/{p-interface.interface-name}/l-interfaces/l-interface/{interface-name}
+
+# vlans
+org.openecomp.sdnc.sli.aai.path.vlan=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/tenants/tenant/{tenant-id}/vservers/vserver/{vserver-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}
+org.openecomp.sdnc.sli.aai.path.generic.vnf.vlan=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}
+
+# l3-interface-ipv4-address-list
+org.openecomp.sdnc.sli.aai.path.l3.interface.ipv4.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+org.openecomp.sdnc.sli.aai.path.vlan.l3.interface.ipv4.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+
+# l3-interface-ipv6-address-list
+org.openecomp.sdnc.sli.aai.path.l3.interface.ipv6.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+org.openecomp.sdnc.sli.aai.path.vlan.l3.interface.ipv6.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+
+# ipsec-configuration
+org.openecomp.sdnc.sli.aai.path.ipsec.configuration=/aai/v8/network/ipsec-configurations/ipsec-configuration/{ipsec-configuration-id}
+
+# vig server
+org.openecomp.sdnc.sli.aai.path.vig.server=/aai/v8/network/ipsec-configurations/ipsec-configuration/{ipsec-configuration-id}/vig-servers/vig-server/{vig-address-type}
+
+# l3-network
+org.openecomp.sdnc.sli.aai.path.l3.network=/aai/v8/network/l3-networks/l3-network/{network-id}
+
+# subnet
+org.openecomp.sdnc.sli.aai.path.subnet=/aai/v8/network/l3-networks/l3-network/{network-id}/subnets/subnet/{subnet-id}
+
+# multicast-configuration
+org.openecomp.sdnc.sli.aai.path.multicast.configuration=/aai/v8/network/multicast-configurations/multicast-configuration/{multicast-configuration-id}
+
+# org.openecomp.sdnc.sli.aai.path.l.interface.ipv4.address.list
+org.openecomp.sdnc.sli.aai.path.l3-interface.ipv4.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+
+# org.openecomp.sdnc.sli.aai.path.l.interface.vlan.ipv4.address.list
+org.openecomp.sdnc.sli.aai.path.l3-interface.vlan.ipv4.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/vlans/vlan/{vlan-interface}/l3-interface-ipv4-address-list/{l3-interface-ipv4-address}
+
+# org.openecomp.sdnc.sli.aai.path.l.interface.ipv6.address.list
+org.openecomp.sdnc.sli.aai.path.l3-interface.ipv6.address.list=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}/l3-interface-ipv6-address-list/{l3-interface-ipv6-address}
+
+# volume.group
+org.openecomp.sdnc.sli.aai.path.volume.group=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}/volume-groups/volume-group/{volume-group-id}
+
+#cloud region
+org.openecomp.sdnc.sli.aai.path.cloud.region=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/{cloud-owner}/{cloud-region-id}
+
+# vf-module
+org.openecomp.sdnc.sli.aai.path.vf.module=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/vf-modules/vf-module/{vf-module-id}
+
+# l-interface through generic-vnf
+org.openecomp.sdnc.sli.aai.path.generic.vnf.linterface=/aai/v8/network/generic-vnfs/generic-vnf/{vnf-id}/l-interfaces/l-interface/{interface-name}
+
+# network-policy
+org.openecomp.sdnc.sli.aai.path.network.policy=/aai/v8/network/network-policies/network-policy/{network-policy-id}
+
+# pnf
+org.openecomp.sdnc.sli.aai.path.pnf=/aai/v8/network/pnfs/pnf/{pnf-name}
+
+#
+# Formatting
+#
+org.openecomp.sdnc.sli.aai.param.format=filter=%s:%s
+org.openecomp.sdnc.sli.aai.param.vnf_type=vnf-type
+org.openecomp.sdnc.sli.aai.param.physical.location.id=physical-location-id
+org.openecomp.sdnc.sli.aai.param.service.type=service-type
diff --git a/example-settings.xml b/example-settings.xml
new file mode 100644
index 0000000..2e7ce64
--- /dev/null
+++ b/example-settings.xml
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=2 tabstop=2: -->
+<!--
+ Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+ <profiles>
+ <profile>
+ <id>openecomp-release</id>
+ <repositories>
+ <repository>
+ <id>openecomp-release</id>
+ <name>openecomp-release</name>
+ <url>https://ecomp-nexus:8443/repository/maven-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>openecomp-release</id>
+ <name>openecomp-release</name>
+ <url>https://ecomp-nexus:8443/repository/maven-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+ <profile>
+ <id>openecomp-snapshots</id>
+ <repositories>
+ <repository>
+ <id>openecomp-snapshot</id>
+ <name>openecomp-snapshot</name>
+ <url>https://ecomp-nexus:8443/repository/maven-snapshots/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>openecomp-snapshot</id>
+ <name>openecomp-snapshot</name>
+ <url>https://ecomp-nexus:8443/repository/maven-snapshots/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ <profile>
+ <id>opendaylight-release</id>
+ <repositories>
+ <repository>
+ <id>opendaylight-mirror</id>
+ <name>opendaylight-mirror</name>
+ <url>https://nexus.opendaylight.org/content/repositories/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>opendaylight-mirror</id>
+ <name>opendaylight-mirror</name>
+ <url>https://nexus.opendaylight.org/content/repositories/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+ <profile>
+ <id>opendaylight-snapshots</id>
+ <repositories>
+ <repository>
+ <id>opendaylight-snapshot</id>
+ <name>opendaylight-snapshot</name>
+ <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>opendaylight-snapshot</id>
+ <name>opendaylight-snapshot</name>
+ <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>openecomp-release</activeProfile>
+ <activeProfile>openecomp-snapshots</activeProfile>
+ <activeProfile>opendaylight-release</activeProfile>
+ <activeProfile>opendaylight-snapshots</activeProfile>
+ </activeProfiles>
+
+ <servers>
+ <server>
+ <id>nexus</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>openecomp-release</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ <server>
+ <id>openecomp-snapshot</id>
+ <username>USERNAME</username>
+ <password>PASSWORD</password>
+ </server>
+ </servers>
+</settings>
diff --git a/jenkins-settings.xml b/jenkins-settings.xml
new file mode 100644
index 0000000..344994f
--- /dev/null
+++ b/jenkins-settings.xml
@@ -0,0 +1,168 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=2 tabstop=2: -->
+<!--
+ Copyright (c) 2014, 2015 Cisco Systems, Inc. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+ <profiles>
+ <profile>
+ <id>openecomp-release</id>
+ <repositories>
+ <repository>
+ <id>openecomp-release</id>
+ <name>openecomp-release</name>
+ <url>https://ecomp-nexus:8443/repository/maven-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>openecomp-release</id>
+ <name>openecomp-release</name>
+ <url>https://ecomp-nexus:8443/repository/maven-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+ <profile>
+ <id>openecomp-snapshots</id>
+ <repositories>
+ <repository>
+ <id>openecomp-snapshot</id>
+ <name>openecomp-snapshot</name>
+ <url>https://ecomp-nexus:8443/repository/maven-snapshots/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>openecomp-snapshot</id>
+ <name>openecomp-snapshot</name>
+ <url>https://ecomp-nexus:8443/repository/maven-snapshots/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ <profile>
+ <id>opendaylight-release</id>
+ <repositories>
+ <repository>
+ <id>opendaylight-mirror</id>
+ <name>opendaylight-mirror</name>
+ <url>https://nexus.opendaylight.org/content/repositories/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>opendaylight-mirror</id>
+ <name>opendaylight-mirror</name>
+ <url>https://nexus.opendaylight.org/content/repositories/public/</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+
+ <profile>
+ <id>opendaylight-snapshots</id>
+ <repositories>
+ <repository>
+ <id>opendaylight-snapshot</id>
+ <name>opendaylight-snapshot</name>
+ <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>opendaylight-snapshot</id>
+ <name>opendaylight-snapshot</name>
+ <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
+
+ <activeProfiles>
+ <activeProfile>openecomp-release</activeProfile>
+ <activeProfile>openecomp-snapshots</activeProfile>
+ <activeProfile>opendaylight-release</activeProfile>
+ <activeProfile>opendaylight-snapshots</activeProfile>
+ </activeProfiles>
+
+ <servers>
+ <server>
+ <id>nexus</id>
+ <username>${ecomp.nexus.user}</username>
+ <password>${ecomp.nexus.password}</password>
+ </server>
+ <server>
+ <id>openecomp-release</id>
+ <username>${ecomp.nexus.user}</username>
+ <password>${ecomp.nexus.password}</password>
+ </server>
+ <server>
+ <id>openecomp-snapshot</id>
+ <username>${ecomp.nexus.user}</username>
+ <password>${ecomp.nexus.password}</password>
+ </server>
+ <server>
+ <id>sdnc-javadoc</id>
+ <username>${ecomp.nexus.user}</username>
+ <password>${ecomp.nexus.password}</password>
+ </server>
+ </servers>
+</settings>
diff --git a/mdsal-resource/.gitignore b/mdsal-resource/.gitignore
new file mode 100755
index 0000000..b73caf3
--- /dev/null
+++ b/mdsal-resource/.gitignore
@@ -0,0 +1,34 @@
+#####standard .git ignore entries#####
+
+## IDE Specific Files ##
+org.eclipse.core.resources.prefs
+.classpath
+.project
+.settings
+.idea
+.externalToolBuilders
+maven-eclipse.xml
+workspace
+
+## Compilation Files ##
+*.class
+**/target
+target
+target-ide
+MANIFEST.MF
+
+## Misc Ignores (OS specific etc) ##
+bin/
+dist
+*~
+*.ipr
+*.iml
+*.iws
+classes
+out/
+.DS_STORE
+.metadata
+
+## Folders which contain auto generated source code ##
+yang-gen-config
+yang-gen-sal
diff --git a/mdsal-resource/features/pom.xml b/mdsal-resource/features/pom.xml
new file mode 100755
index 0000000..69af540
--- /dev/null
+++ b/mdsal-resource/features/pom.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>mdsal-resource</artifactId>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>mdsal-resource-features</artifactId>
+ <name>MD-SAL Resource Adaptor - Features</name>
+
+ <packaging>jar</packaging>
+
+ <dependencies>
+
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>mdsal-resource-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>features-mdsal</artifactId>
+ <version>${odl.mdsal.features.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+
+ <scope>runtime</scope>
+ </dependency>
+
+
+ <!-- dependency for opendaylight-karaf-empty for use by testing -->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>opendaylight-karaf-empty</artifactId>
+ <version>${odl.karaf.empty.distro.version}</version>
+ <type>zip</type>
+ </dependency>
+
+
+ <dependency>
+ <!-- Required for launching the feature tests -->
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>features-test</artifactId>
+ <version>${odl.commons.opendaylight.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>features-yangtools</artifactId>
+ <version>${odl.yangtools.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <filtering>true</filtering>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>filter</id>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- launches the feature test, which validates that your karaf feature
+ can be installed inside of a karaf container. It doesn't validate that your
+ functionality works correctly, just that you have all of the dependent bundles
+ defined correctly.
+ <plugin>
+
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.16</version>
+ <configuration>
+ <systemPropertyVariables>
+ <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
+ <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
+ <karaf.distro.version>${odl.karaf.empty.distro.version}</karaf.distro.version>
+ </systemPropertyVariables>
+ <dependenciesToScan>
+ <dependency>org.opendaylight.yangtools:features-test</dependency>
+ </dependenciesToScan>
+ </configuration>
+ </plugin>
+ -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/classes/${features.file}</file>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/mdsal-resource/features/src/main/resources/features.xml b/mdsal-resource/features/src/main/resources/features.xml
new file mode 100644
index 0000000..259892f
--- /dev/null
+++ b/mdsal-resource/features/src/main/resources/features.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+
+<features name="sdnc-mdsal-resource-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+
+ <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features</repository>
+
+
+ <feature name='sdnc-mdsal-resource' description="sdnc-mdsal-resource" version='${project.version}'>
+ <!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
+ <feature version="${odl.mdsal.version}">odl-mdsal-broker</feature>
+ <feature>sdnc-sli</feature>
+ <bundle>mvn:org.openecomp.sdnc.adaptors/mdsal-resource-provider/${project.version}</bundle>
+ </feature>
+
+</features>
diff --git a/mdsal-resource/installer/pom.xml b/mdsal-resource/installer/pom.xml
new file mode 100755
index 0000000..15956db
--- /dev/null
+++ b/mdsal-resource/installer/pom.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>mdsal-resource</artifactId>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>mdsal-resource-installer</artifactId>
+ <name>MDSAL Resource - Karaf Installer</name>
+ <packaging>pom</packaging>
+
+ <properties>
+ <application.name>sdnc-mdsal-resource</application.name>
+ <features.boot>sdnc-mdsal-resource</features.boot>
+ <features.repositories>mvn:org.openecomp.sdnc.adaptors/mdsal-resource-features/${project.version}/xml/features</features.repositories>
+ <include.transitive.dependencies>false</include.transitive.dependencies>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>mdsal-resource-features</artifactId>
+ <version>${project.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>mdsal-resource-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>maven-repo-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>false</attach>
+ <finalName>stage/${application.name}-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ <execution>
+ <id>installer-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>true</attach>
+ <finalName>${application.name}-${project.version}-installer</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>prepare-package</phase>
+ <configuration>
+ <transitive>false</transitive>
+ <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <useRepositoryLayout>true</useRepositoryLayout>
+ <addParentPoms>false</addParentPoms>
+ <copyPom>false</copyPom>
+ <includeGroupIds>org.openecomp.sdnc</includeGroupIds>
+ <excludeArtifactIds>sli-common,sli-provider,dblib-provider</excludeArtifactIds>
+ <scope>provided</scope>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-version</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources/scripts</directory>
+ <includes>
+ <include>install-feature.sh</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+</project>
diff --git a/mdsal-resource/installer/src/assembly/assemble_installer_zip.xml b/mdsal-resource/installer/src/assembly/assemble_installer_zip.xml
new file mode 100644
index 0000000..0ce9b1a
--- /dev/null
+++ b/mdsal-resource/installer/src/assembly/assemble_installer_zip.xml
@@ -0,0 +1,58 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- we want "system" and related files right at the root level
+ as this file is suppose to be unzip on top of a karaf
+ distro. -->
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target/stage/</directory>
+ <outputDirectory>${application.name}</outputDirectory>
+ <fileMode>755</fileMode>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>target/stage/</directory>
+ <outputDirectory>${application.name}</outputDirectory>
+ <fileMode>644</fileMode>
+ <excludes>
+ <exclude>*.sh</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+
+
+
+</assembly>
diff --git a/mdsal-resource/installer/src/assembly/assemble_mvnrepo_zip.xml b/mdsal-resource/installer/src/assembly/assemble_mvnrepo_zip.xml
new file mode 100644
index 0000000..ba21dda
--- /dev/null
+++ b/mdsal-resource/installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -0,0 +1,48 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- we want "system" and related files right at the root level
+ as this file is suppose to be unzip on top of a karaf
+ distro. -->
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target/assembly/</directory>
+ <outputDirectory>.</outputDirectory>
+ <excludes>
+ </excludes>
+ </fileSet>
+ </fileSets>
+
+
+
+</assembly>
diff --git a/mdsal-resource/installer/src/main/resources/scripts/install-feature.sh b/mdsal-resource/installer/src/main/resources/scripts/install-feature.sh
new file mode 100644
index 0000000..33e9b03
--- /dev/null
+++ b/mdsal-resource/installer/src/main/resources/scripts/install-feature.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
+ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"}
+INSTALLERDIR=$(dirname $0)
+
+REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
+
+if [ -f ${REPOZIP} ]
+then
+ unzip -d ${ODL_HOME} ${REPOZIP}
+else
+ echo "ERROR : repo zip ($REPOZIP) not found"
+ exit 1
+fi
+
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}
diff --git a/mdsal-resource/pom.xml b/mdsal-resource/pom.xml
new file mode 100755
index 0000000..5895d1e
--- /dev/null
+++ b/mdsal-resource/pom.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sdnc-adaptors</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>mdsal-resource</artifactId>
+
+
+ <name>MD-SAL Resource Adaptor</name>
+ <description>The MD-SAL resource adaptor allows service logic to access persistent data from MD-SAL config and operational trees</description>
+
+ <version>1.0.0</version>
+
+ <dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>mdsal-resource-features</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>mdsal-resource-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+
+
+ </dependencyManagement>
+
+ <modules>
+ <module>provider</module>
+ <module>features</module>
+ <module>installer</module>
+ </modules>
+</project>
diff --git a/mdsal-resource/provider/pom.xml b/mdsal-resource/provider/pom.xml
new file mode 100755
index 0000000..7ad8f23
--- /dev/null
+++ b/mdsal-resource/provider/pom.xml
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>mdsal-resource</artifactId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>mdsal-resource-provider</artifactId>
+ <packaging>bundle</packaging>
+ <name>MD-SAL Resource Adaptor - Provider</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>sli-common</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>sli-provider</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>equinoxSDK381</groupId>
+ <artifactId>org.eclipse.osgi</artifactId>
+ <version>${equinox.osgi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>${commons.codec.version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>${bundle.plugin.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>org.openecomp.sdnc.sli.resource.mdsal</Bundle-SymbolicName>
+ <Bundle-Activator>org.openecomp.sdnc.sli.resource.mdsal.MdsalResourceActivator</Bundle-Activator>
+ <Export-Package>org.openecomp.sdnc.sli.resource.mdsal</Export-Package>
+ <Import-Package>org.openecomp.sdnc.sli.*,org.osgi.framework.*,org.slf4j.*,com.mysql.jdbc.*</Import-Package>
+ <!-- <Embed-Dependency>*;scope=compile|runtime;artifactId=!sli-common|org.eclipse.osgi|slf4j-api|jcl-over-slf4j|mysql-connector-java|xml-apis</Embed-Dependency> -->
+ <Import-Package>*</Import-Package>
+ <Embed-Transitive>true</Embed-Transitive>
+ </instructions>
+
+
+ </configuration>
+
+ </plugin>
+
+
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings
+ only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ com.brocade.developer
+ </groupId>
+ <artifactId>
+ providermodule-plugin
+ </artifactId>
+ <versionRange>
+ [1.2.0.100-SNAPSHOT,)
+ </versionRange>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore />
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
diff --git a/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/ConfigResource.java b/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/ConfigResource.java
new file mode 100644
index 0000000..db06aa1
--- /dev/null
+++ b/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/ConfigResource.java
@@ -0,0 +1,149 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.resource.mdsal;
+
+import java.util.Map;
+
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+
+public class ConfigResource implements SvcLogicResource {
+
+ private static final Logger LOG = LoggerFactory.getLogger(ConfigResource.class);
+
+ private RestService restService;
+
+ public ConfigResource(String sdncProtocol, String sdncHost, String sdncPort, String sdncUser, String sdncPasswd)
+ {
+ restService = new RestService(sdncProtocol, sdncHost, sdncPort, sdncUser, sdncPasswd, RestService.PayloadType.XML);
+ }
+
+ @Override
+ public QueryStatus isAvailable(String resource, String key, String prefix, SvcLogicContext ctx) throws SvcLogicException
+ {
+ return(query(resource, false, null, key, prefix, null, null));
+ }
+
+ @Override
+ public QueryStatus exists(String resource, String key, String prefix, SvcLogicContext ctx) throws SvcLogicException
+ {
+
+ return(query(resource, false, null, key, prefix, null, null));
+
+ }
+
+ @Override
+ public QueryStatus query(String resource, boolean localOnly, String select, String key, String prefix,
+ String orderBy, SvcLogicContext ctx) throws SvcLogicException {
+
+
+ String module = resource;
+ StringBuffer restQuery = new StringBuffer();
+
+ String[] keyParts = key.split("/");
+
+ for (String keyPart : keyParts) {
+ if (restQuery.length() > 0) {
+ restQuery.append("/");
+ }
+ if (keyPart.startsWith("$")) {
+
+ restQuery.append(ctx.resolve(keyPart.substring(1)));
+ } else {
+ restQuery.append(keyPart);
+ }
+ }
+
+ String restQueryStr = restQuery.toString();
+ if ((restQueryStr.startsWith("'") && restQueryStr.endsWith("'")) ||
+ (restQueryStr.startsWith("\"") && restQueryStr.endsWith("\""))) {
+ restQueryStr = restQueryStr.substring(1, restQueryStr.length()-1);
+ }
+
+ String urlString = "restconf/config/" + module + ":" + restQueryStr;
+
+ Document results = restService.get(urlString);
+
+
+ if (results == null) {
+ return(QueryStatus.NOT_FOUND);
+ } else {
+
+ if (ctx != null) {
+ ctx.mergeDocument(prefix, results);
+ }
+ return(QueryStatus.SUCCESS);
+ }
+
+ }
+
+ @Override
+ public QueryStatus reserve(String resource, String select, String key, String prefix,
+ SvcLogicContext ctx) throws SvcLogicException {
+
+
+ return(QueryStatus.SUCCESS);
+
+ }
+
+ @Override
+ public QueryStatus release(String resource, String key, SvcLogicContext ctx) throws SvcLogicException {
+
+ return(QueryStatus.SUCCESS);
+ }
+
+ @Override
+ public QueryStatus delete(String arg0, String arg1, SvcLogicContext arg2)
+ throws SvcLogicException {
+ // TODO Auto-generated method stub
+ return(QueryStatus.SUCCESS);
+ }
+
+ @Override
+ public QueryStatus save(String arg0, boolean arg1, boolean localOnly, String arg2,
+ Map<String, String> arg3, String arg4, SvcLogicContext arg5)
+ throws SvcLogicException {
+ // TODO Auto-generated method stub
+ return(QueryStatus.SUCCESS);
+ }
+
+ @Override
+ public QueryStatus notify(String resource, String action, String key,
+ SvcLogicContext ctx) throws SvcLogicException {
+ return(QueryStatus.SUCCESS);
+ }
+
+
+ public QueryStatus update(String resource, String key,
+ Map<String, String> parms, String prefix, SvcLogicContext ctx)
+ throws SvcLogicException {
+ return(QueryStatus.SUCCESS);
+ }
+
+
+
+}
diff --git a/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/MdsalResourceActivator.java b/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/MdsalResourceActivator.java
new file mode 100644
index 0000000..da86d15
--- /dev/null
+++ b/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/MdsalResourceActivator.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.resource.mdsal;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.LinkedList;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.ConfigurationException;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class MdsalResourceActivator implements BundleActivator {
+
+
+
+ private static final String SDNC_CONFIG_DIR = "SDNC_CONFIG_DIR";
+
+ public LinkedList<ServiceRegistration> registrations = new LinkedList<ServiceRegistration>();
+
+ private static final Logger LOG = LoggerFactory
+ .getLogger(MdsalResourceActivator.class);
+
+ @Override
+ public void start(BundleContext ctx) throws Exception {
+
+ // Read properties
+ Properties props = new Properties();
+
+ String propDir = System.getenv(SDNC_CONFIG_DIR);
+ if (propDir == null) {
+
+ propDir = "/opt/sdnc/data/properties";
+ }
+ String propPath = propDir + "/mdsal-resource.properties";
+
+
+ File propFile = new File(propPath);
+
+ if (!propFile.exists()) {
+
+ throw new ConfigurationException(
+ "Missing configuration properties file : "
+ + propFile);
+ }
+ try {
+
+ props.load(new FileInputStream(propFile));
+ } catch (Exception e) {
+ throw new ConfigurationException(
+ "Could not load properties file " + propPath, e);
+
+ }
+
+ String sdncUser = props.getProperty("org.openecomp.sdnc.sli.resource.mdsal.sdnc-user", "admin");
+ String sdncPasswd = props.getProperty("org.openecomp.sdnc.sli.resource.mdsal.sdnc-passwd", "admin");
+ String sdncHost = props.getProperty("org.openecomp.sdnc.sli.resource.mdsal.sdnc-host", "localhost");
+ String sdncProtocol = props.getProperty("org.openecomp.sdnc.sli.resource.mdsal.sdnc-protocol", "https");
+ String sdncPort = props.getProperty("org.openecomp.sdnc.sli.resource.mdsal.sdnc-port", "8443");
+
+ // Advertise MD-SAL resource adaptors
+ SvcLogicResource impl = new ConfigResource(sdncProtocol, sdncHost, sdncPort, sdncUser, sdncPasswd);
+
+ LOG.debug("Registering MdsalResource service "+impl.getClass().getName());
+ registrations.add(ctx.registerService(impl.getClass().getName(), impl, null));
+
+ impl = new OperationalResource(sdncProtocol, sdncHost, sdncPort, sdncUser, sdncPasswd);
+
+ LOG.debug("Registering MdsalResource service "+impl.getClass().getName());
+ registrations.add(ctx.registerService(impl.getClass().getName(), impl, null));
+ }
+
+ @Override
+ public void stop(BundleContext ctx) throws Exception {
+
+ for (ServiceRegistration registration : registrations)
+ {
+ registration.unregister();
+ }
+ }
+
+}
diff --git a/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/OperationalResource.java b/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/OperationalResource.java
new file mode 100644
index 0000000..d372bf2
--- /dev/null
+++ b/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/OperationalResource.java
@@ -0,0 +1,149 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.resource.mdsal;
+
+import java.util.Map;
+
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+
+public class OperationalResource implements SvcLogicResource {
+
+ private static final Logger LOG = LoggerFactory.getLogger(OperationalResource.class);
+
+ private RestService restService;
+
+ public OperationalResource(String sdncProtocol, String sdncHost, String sdncPort, String sdncUser, String sdncPasswd)
+ {
+ restService = new RestService(sdncProtocol, sdncHost, sdncPort, sdncUser, sdncPasswd, RestService.PayloadType.XML);
+
+
+ }
+
+ @Override
+ public QueryStatus isAvailable(String resource, String key, String prefix, SvcLogicContext ctx) throws SvcLogicException
+ {
+ return(query(resource, false, null, key, prefix, null, null));
+ }
+
+ @Override
+ public QueryStatus exists(String resource, String key, String prefix, SvcLogicContext ctx) throws SvcLogicException
+ {
+
+ return(query(resource, false, null, key, prefix, null, null));
+
+ }
+
+ @Override
+ public QueryStatus query(String resource, boolean localOnly, String select, String key, String prefix,
+ String orderBy, SvcLogicContext ctx) throws SvcLogicException {
+
+
+ String module = resource;
+ StringBuffer restQuery = new StringBuffer();
+
+ String[] keyParts = key.split("/");
+
+ for (String keyPart : keyParts) {
+ if (restQuery.length() > 0) {
+ restQuery.append("/");
+ }
+ if (keyPart.startsWith("$")) {
+
+ restQuery.append(ctx.resolve(keyPart.substring(1)));
+ } else {
+ restQuery.append(keyPart);
+ }
+ }
+
+ String restQueryStr = restQuery.toString();
+ if ((restQueryStr.startsWith("'") && restQueryStr.endsWith("'")) ||
+ (restQueryStr.startsWith("\"") && restQueryStr.endsWith("\""))) {
+ restQueryStr = restQueryStr.substring(1, restQueryStr.length()-1);
+ }
+
+ String urlString = "restconf/operational/" + module + ":" + restQueryStr;
+
+ Document results = restService.get(urlString);
+
+
+ if (results == null) {
+ return(QueryStatus.NOT_FOUND);
+ } else {
+
+ if (ctx != null) {
+ ctx.mergeDocument(prefix, results);
+ }
+ return(QueryStatus.SUCCESS);
+ }
+
+ }
+
+ @Override
+ public QueryStatus reserve(String resource, String select, String key, String prefix,
+ SvcLogicContext ctx) throws SvcLogicException {
+
+
+ return(QueryStatus.SUCCESS);
+
+ }
+
+ @Override
+ public QueryStatus release(String resource, String key, SvcLogicContext ctx) throws SvcLogicException {
+
+ return(QueryStatus.SUCCESS);
+ }
+
+ @Override
+ public QueryStatus delete(String arg0, String arg1, SvcLogicContext arg2)
+ throws SvcLogicException {
+ // TODO Auto-generated method stub
+ return(QueryStatus.SUCCESS);
+ }
+
+ @Override
+ public QueryStatus save(String arg0, boolean arg1, boolean localOnly, String arg2,
+ Map<String, String> arg3, String arg4, SvcLogicContext arg5)
+ throws SvcLogicException {
+ // TODO Auto-generated method stub
+ return(QueryStatus.SUCCESS);
+ }
+
+ @Override
+ public QueryStatus notify(String resource, String action, String key,
+ SvcLogicContext ctx) throws SvcLogicException {
+ return(QueryStatus.SUCCESS);
+ }
+
+ public QueryStatus update(String resource, String key,
+ Map<String, String> parms, String prefix, SvcLogicContext ctx)
+ throws SvcLogicException {
+ return(QueryStatus.SUCCESS);
+ }
+
+
+}
diff --git a/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/RestService.java b/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/RestService.java
new file mode 100644
index 0000000..a04af06
--- /dev/null
+++ b/mdsal-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/mdsal/RestService.java
@@ -0,0 +1,213 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.resource.mdsal;
+
+import java.io.BufferedReader;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.Authenticator;
+import java.net.HttpURLConnection;
+import java.net.PasswordAuthentication;
+import java.net.URL;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLSession;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.apache.commons.codec.binary.Base64;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+
+
+
+
+public class RestService {
+
+ private static final Logger LOG = LoggerFactory.getLogger(ConfigResource.class);
+
+ public enum PayloadType {
+ XML,
+ JSON
+ }
+
+ private class SdncAuthenticator extends Authenticator {
+
+ private String user;
+ private String passwd;
+
+ SdncAuthenticator(String user, String passwd) {
+ this.user = user;
+ this.passwd = passwd;
+ }
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication() {
+ return new PasswordAuthentication(user, passwd.toCharArray());
+ }
+
+ }
+
+ private String user;
+ private String passwd;
+ private PayloadType payloadType;
+
+ private String protocol;
+ private String host;
+ private String port;
+
+ public RestService(String protocol, String host, String port, String user, String passwd, PayloadType payloadType) {
+ this.protocol = protocol;
+ this.host = host;
+ this.port = port;
+ this.user = user;
+ this.passwd = passwd;
+ this.payloadType = payloadType;
+ }
+
+ private HttpURLConnection getRestConnection(String urlString, String method) throws IOException
+ {
+
+ URL sdncUrl = new URL(urlString);
+ Authenticator.setDefault(new SdncAuthenticator(user, passwd));
+
+ HttpURLConnection conn = (HttpURLConnection) sdncUrl.openConnection();
+
+ String authStr = user+":"+passwd;
+ String encodedAuthStr = new String(Base64.encodeBase64(authStr.getBytes()));
+
+ conn.addRequestProperty("Authentication", "Basic "+encodedAuthStr);
+
+ conn.setRequestMethod(method);
+
+ if (payloadType == PayloadType.XML) {
+ conn.setRequestProperty("Content-Type", "application/xml");
+ conn.setRequestProperty("Accept", "application/xml");
+ } else {
+
+ conn.setRequestProperty("Content-Type", "application/json");
+ conn.setRequestProperty("Accept", "application/json");
+ }
+
+ conn.setDoInput(true);
+ conn.setDoOutput(true);
+ conn.setUseCaches(false);
+
+ return(conn);
+
+ }
+
+
+ private Document send(String urlString, byte[] msgBytes, String method) {
+ Document response = null;
+ String fullUrl = protocol + "://" + host + ":" + port + "/" + urlString;
+ LOG.info("Sending REST "+method +" to "+fullUrl);
+
+ if (msgBytes != null) {
+ LOG.info("Message body:\n"+msgBytes);
+ }
+
+ try {
+ HttpURLConnection conn = getRestConnection(fullUrl, method);
+
+ if (conn instanceof HttpsURLConnection) {
+ HostnameVerifier hostnameVerifier = new HostnameVerifier() {
+ @Override
+ public boolean verify(String hostname, SSLSession session) {
+ return true;
+ }
+ };
+ ((HttpsURLConnection)conn).setHostnameVerifier(hostnameVerifier);
+ }
+
+ // Write message
+ if (msgBytes != null) {
+ conn.setRequestProperty("Content-Length", ""+msgBytes.length);
+ DataOutputStream outStr = new DataOutputStream(conn.getOutputStream());
+ outStr.write(msgBytes);
+ outStr.close();
+ } else {
+ conn.setRequestProperty("Content-Length", "0");
+ }
+
+
+ // Read response
+ BufferedReader respRdr;
+
+ LOG.info("Response: "+conn.getResponseCode()+" "+conn.getResponseMessage());
+
+
+ if (conn.getResponseCode() < 300) {
+
+ respRdr = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+ } else {
+ respRdr = new BufferedReader(new InputStreamReader(conn.getErrorStream()));
+ }
+
+ StringBuffer respBuff = new StringBuffer();
+
+ String respLn;
+
+ while ((respLn = respRdr.readLine()) != null) {
+ respBuff.append(respLn+"\n");
+ }
+ respRdr.close();
+
+ String respString = respBuff.toString();
+
+ LOG.info("Response body :\n"+respString);
+
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ DocumentBuilder db = dbf.newDocumentBuilder();
+
+
+ response = db.parse(new ByteArrayInputStream(respString.getBytes()));
+
+ } catch (Exception e) {
+
+ LOG.error("Caught exception executing REST command", e);
+ }
+
+ return (response);
+ }
+
+
+ public Document get(String urlString) {
+ return(send(urlString, null, "GET"));
+ }
+
+ public Document delete(String urlString) {
+ return(send(urlString, null, "DELETE"));
+ }
+
+ public Document post(String urlString, byte[] msgBytes) {
+ return(send(urlString, msgBytes, "POST"));
+ }
+
+ public Document put(String urlString, byte[] msgBytes) {
+ return(send(urlString, msgBytes, "PUT"));
+ }
+}
diff --git a/mdsal-resource/provider/src/main/resources/IPV4_ADDRESS_POOL.csv b/mdsal-resource/provider/src/main/resources/IPV4_ADDRESS_POOL.csv
new file mode 100755
index 0000000..30ce117
--- /dev/null
+++ b/mdsal-resource/provider/src/main/resources/IPV4_ADDRESS_POOL.csv
@@ -0,0 +1,9 @@
+"192.168.1.2","OAM","AVAILABLE"
+"192.168.1.3","OAM","AVAILABLE"
+"192.168.1.4","OAM","AVAILABLE"
+"192.168.1.5","OAM","AVAILABLE"
+"192.168.1.6","OAM","AVAILABLE"
+"192.168.1.7","OAM","AVAILABLE"
+"192.168.1.8","OAM","AVAILABLE"
+"192.168.1.9","OAM","AVAILABLE"
+"192.168.1.10","OAM","AVAILABLE"
diff --git a/mdsal-resource/provider/src/main/resources/VLAN_ID_POOL.csv b/mdsal-resource/provider/src/main/resources/VLAN_ID_POOL.csv
new file mode 100755
index 0000000..6c4b0f7
--- /dev/null
+++ b/mdsal-resource/provider/src/main/resources/VLAN_ID_POOL.csv
@@ -0,0 +1,22 @@
+"1100","IPAG","AVAILABLE",NULL
+"1101","IPAG","AVAILABLE",NULL
+"1102","IPAG","AVAILABLE",NULL
+"1103","IPAG","AVAILABLE",NULL
+"1104","IPAG","AVAILABLE",NULL
+"1105","IPAG","AVAILABLE",NULL
+"1106","IPAG","AVAILABLE",NULL
+"1107","IPAG","AVAILABLE",NULL
+"1108","IPAG","AVAILABLE",NULL
+"1109","IPAG","AVAILABLE",NULL
+"1110","IPAG","AVAILABLE",NULL
+"1200","VPE","AVAILABLE",NULL
+"1201","VPE","AVAILABLE",NULL
+"1202","VPE","AVAILABLE",NULL
+"1203","VPE","AVAILABLE",NULL
+"1204","VPE","AVAILABLE",NULL
+"1205","VPE","AVAILABLE",NULL
+"1206","VPE","AVAILABLE",NULL
+"1207","VPE","AVAILABLE",NULL
+"1208","VPE","AVAILABLE",NULL
+"1209","VPE","AVAILABLE",NULL
+"1210","VPE","AVAILABLE",NULL
diff --git a/mdsal-resource/provider/src/main/resources/crtables.sql b/mdsal-resource/provider/src/main/resources/crtables.sql
new file mode 100644
index 0000000..8ebc53f
--- /dev/null
+++ b/mdsal-resource/provider/src/main/resources/crtables.sql
@@ -0,0 +1,70 @@
+---
+-- ============LICENSE_START=======================================================
+-- openECOMP : SDN-C
+-- ================================================================================
+-- Copyright (C) 2017 AT&T Intellectual Property. All rights
+-- reserved.
+-- ================================================================================
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-- ============LICENSE_END=========================================================
+---
+
+CREATE TABLE sdnctl.VNF (
+vnf_id varchar(80) NOT NULL,
+vnf_name varchar(80) NOT NULL,
+vnf_type varchar(10) NOT NULL,
+orchestration_status varchar(20),
+heat_stack_id varchar(80),
+mso_catalog_key varchar(80),
+availability_zone varchar(80),
+aic_site_id varchar(80),
+oam_ipv4_address varchar(20),
+CONSTRAINT P_VNF PRIMARY KEY(vnf_id));
+
+CREATE TABLE sdnctl.VNF_NETWORK_CONNECTION (
+connection_uuid varchar(80) NOT NULL,
+vnf_id varchar(80) NOT NULL,
+connection_id varchar(80),
+connection_type varchar(20),
+neutron_network_id varchar(80),
+neutron_network_name varchar(80),
+orchestration_status varchar(20),
+switch_id varchar(40),
+heat_stack_id varchar(80),
+mso_catalog_key varchar(80),
+provider_network varchar(80),
+port_group_id varchar(80),
+port_group_name varchar(80),
+CONSTRAINT P_NETWORK_CONNECTION PRIMARY KEY(connection_uuid));
+
+CREATE TABLE sdnctl.VNF_NETWORK_CONNECTION_VLAN (
+vlan_uuid varchar(80) NOT NULL,
+vlan_id numeric(4) NOT NULL,
+vlan_type varchar(5) NOT NULL,
+connection_uuid varchar(80),
+CONSTRAINT P_VNF_NETWORK_CONNECTION_VLAN PRIMARY KEY(vlan_uuid));
+
+CREATE TABLE sdnctl.VLAN_ID_POOL (
+vlan_id numeric(4) NOT NULL,
+universe varchar(40) NOT NULL,
+status varchar(40) NOT NULL,
+vlan_uuid varchar(80),
+CONSTRAINT P_VLAN_ID_POOL PRIMARY KEY(vlan_id,universe));
+
+CREATE TABLE sdnctl.IPV4_ADDRESS_POOL (
+ipv4_addr varchar(20) NOT NULL,
+universe varchar(40) NOT NULL,
+status varchar(40) NOT NULL,
+CONSTRAINT P_IPV4_ADDRESS_POOL PRIMARY KEY(ipv4_addr, universe));
+
+
diff --git a/mdsal-resource/provider/src/main/resources/svclogic.properties b/mdsal-resource/provider/src/main/resources/svclogic.properties
new file mode 100644
index 0000000..0045534
--- /dev/null
+++ b/mdsal-resource/provider/src/main/resources/svclogic.properties
@@ -0,0 +1,26 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+org.openecomp.sdnc.sli.dbtype = jdbc
+org.openecomp.sdnc.sli.jdbc.url = jdbc:mysql://dbhost:3306/sdnctl
+org.openecomp.sdnc.sli.jdbc.database = sdnctl
+org.openecomp.sdnc.sli.jdbc.user = sdnctl
+org.openecomp.sdnc.sli.jdbc.password = gamma
diff --git a/pom.xml b/pom.xml
new file mode 100755
index 0000000..1335757
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <parent>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>root</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sdnc-adaptors</artifactId>
+
+ <name>SDN-C Adaptors</name>
+ <url>https://wiki.openecomp.org</url>
+ <description>The SDN-C core components contains the SLI, dblib and root pom</description>
+
+
+ <issueManagement>
+ <system>JIRA</system>
+ <url>https://jira.openecomp.org/</url>
+ </issueManagement>
+
+
+ <scm>
+ <connection>scm:git:ssh://git@${openecomp.git.host}/sdnc-adaptors.git</connection>
+ <developerConnection>scm:git:ssh://${openecomp.git.host}:${openecomp.git.port}/${openecomp.git.project}/sdnc-adaptors.git</developerConnection>
+ <url>${openecomp.git.protocol}://${openecomp.git.host}/projects/${openecomp.git.project}/repos/sdnc-adaptors/browse</url>
+ </scm>
+
+ <ciManagement>
+ <system>Jenkins</system>
+ <url>https://jenkins.openecomp.org/</url>
+ </ciManagement>
+
+ <distributionManagement>
+ <site>
+ <id>sdnc-javadoc</id>
+ <url>dav:https://${openecomp.nexus.host}:${openecomp.nexus.port}/repository/sdn-c-javadoc/${project.artifactId}/${project.version}</url>
+ </site>
+ </distributionManagement>
+
+ <build>
+ <plugins>
+ <!-- Blackduck plugin breaks release build
+ <plugin>
+ <groupId>com.blackducksoftware.integration</groupId>
+ <artifactId>hub-maven-plugin</artifactId>
+ <version>1.4.0</version>
+ <inherited>false</inherited>
+ <configuration>
+ <hubProjectName>${project.name}</hubProjectName>
+ <outputDirectory>${project.basedir}</outputDirectory>
+ </configuration>
+ <executions>
+ <execution>
+ <id>create-bdio-file</id>
+ <phase>package</phase>
+ <goals>
+ <goal>createHubOutput</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ -->
+ </plugins>
+
+ </build>
+ <modules>
+ <module>aai-service</module>
+ <module>mdsal-resource</module>
+ <module>resource-assignment</module>
+ <module>sql-resource</module>
+ </modules>
+ <organization>
+ <name>AT&amp;T</name>
+ </organization>
+ <version>1.0.0</version>
+
+
+</project>
diff --git a/resource-assignment/.gitignore b/resource-assignment/.gitignore
new file mode 100755
index 0000000..b73caf3
--- /dev/null
+++ b/resource-assignment/.gitignore
@@ -0,0 +1,34 @@
+#####standard .git ignore entries#####
+
+## IDE Specific Files ##
+org.eclipse.core.resources.prefs
+.classpath
+.project
+.settings
+.idea
+.externalToolBuilders
+maven-eclipse.xml
+workspace
+
+## Compilation Files ##
+*.class
+**/target
+target
+target-ide
+MANIFEST.MF
+
+## Misc Ignores (OS specific etc) ##
+bin/
+dist
+*~
+*.ipr
+*.iml
+*.iws
+classes
+out/
+.DS_STORE
+.metadata
+
+## Folders which contain auto generated source code ##
+yang-gen-config
+yang-gen-sal
diff --git a/resource-assignment/.sonar/checkstyle.xml b/resource-assignment/.sonar/checkstyle.xml
new file mode 100755
index 0000000..3fa2315
--- /dev/null
+++ b/resource-assignment/.sonar/checkstyle.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"><!-- Generated by Sonar --><module name="Checker"><module name="SuppressionCommentFilter"/><module name="TreeWalker"><module name="FileContentsHolder"/> <module name="ClassFanOutComplexity"><property name="severity" value="warning"/></module><module name="NestedForDepth"><property name="severity" value="warning"/><property name="max" value="1"/></module><module name="ClassDataAbstractionCoupling"><property name="severity" value="warning"/></module></module></module> \ No newline at end of file
diff --git a/resource-assignment/.sonar/pmd.xml b/resource-assignment/.sonar/pmd.xml
new file mode 100755
index 0000000..80343b3
--- /dev/null
+++ b/resource-assignment/.sonar/pmd.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ruleset>
+ <rule ref="rulesets/java/naming.xml/BooleanGetMethodName">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/j2ee.xml/StaticEJBFieldShouldBeFinal">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/coupling.xml/CouplingBetweenObjects">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/codesize.xml/TooManyMethods">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/naming.xml/AvoidFieldNameMatchingTypeName">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/basic.xml/DoubleCheckedLocking">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/naming.xml/AvoidFieldNameMatchingMethodName">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/coupling.xml/ExcessiveImports">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/basic.xml/OverrideBothEqualsAndHashcode">
+ <priority>2</priority>
+ </rule>
+ <rule ref="rulesets/java/naming.xml/ShortMethodName">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/basic.xml/BooleanInstantiation">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/codesize.xml/TooManyFields">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/controversial.xml/AvoidUsingNativeCode">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/optimizations.xml/UseStringBufferForStringAppends">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/coupling.xml/LooseCoupling">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/design.xml/NonThreadSafeSingleton">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/j2ee.xml/DoNotUseThreads">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/sunsecure.xml/ArrayIsStoredDirectly">
+ <priority>5</priority>
+ </rule>
+ <rule ref="rulesets/java/sunsecure.xml/MethodReturnsInternalArray">
+ <priority>2</priority>
+ </rule>
+ <rule ref="rulesets/java/design.xml/AssignmentToNonFinalStatic">
+ <priority>3</priority>
+ </rule>
+ <rule ref="rulesets/java/strictexception.xml/AvoidCatchingGenericException">
+ <priority>3</priority>
+ </rule>
+</ruleset>
+
diff --git a/resource-assignment/features/pom.xml b/resource-assignment/features/pom.xml
new file mode 100755
index 0000000..c35a0ff
--- /dev/null
+++ b/resource-assignment/features/pom.xml
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>resource-assignment</artifactId>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>resource-assignment-features</artifactId>
+ <name>Resource Assignment Adaptor - Features</name>
+
+ <packaging>jar</packaging>
+
+ <dependencies>
+
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>resource-assignment-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>features-mdsal</artifactId>
+ <version>${odl.mdsal.features.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+
+ <scope>runtime</scope>
+ </dependency>
+
+
+ <!-- dependency for opendaylight-karaf-empty for use by testing -->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>opendaylight-karaf-empty</artifactId>
+ <version>${odl.karaf.empty.distro.version}</version>
+ <type>zip</type>
+ </dependency>
+
+ <dependency>
+ <!-- Required for launching the feature tests -->
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>features-test</artifactId>
+ <version>${odl.commons.opendaylight.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>features-yangtools</artifactId>
+ <version>${odl.yangtools.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <filtering>true</filtering>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>filter</id>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- launches the feature test, which validates that your karaf feature
+ can be installed inside of a karaf container. It doesn't validate that your
+ functionality works correctly, just that you have all of the dependent bundles
+ defined correctly.
+ <plugin>
+
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.16</version>
+ <configuration>
+ <systemPropertyVariables>
+ <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
+ <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
+ <karaf.distro.version>${odl.karaf.empty.distro.version}</karaf.distro.version>
+ </systemPropertyVariables>
+ <dependenciesToScan>
+ <dependency>org.opendaylight.yangtools:features-test</dependency>
+ </dependenciesToScan>
+ </configuration>
+ </plugin>
+ -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/classes/${features.file}</file>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/resource-assignment/features/src/main/resources/features.xml b/resource-assignment/features/src/main/resources/features.xml
new file mode 100644
index 0000000..c8f7694
--- /dev/null
+++ b/resource-assignment/features/src/main/resources/features.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+
+<features name="sdnc-resource-assignment-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+
+ <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features</repository>
+
+ <feature name='sdnc-resource-assignment' description="sdnc-resource-assignment" version='${project.version}'>
+ <feature>sdnc-sli</feature>
+ <feature>sdnc-dblib</feature>
+ <feature>spring</feature>
+ <feature>spring-jdbc</feature>
+ <feature>spring-dm</feature>
+ <bundle start-level="88">mvn:org.openecomp.sdnc.adaptors/resource-assignment-provider/${project.version}</bundle>
+ <bundle>mvn:mysql/mysql-connector-java/${mysql.connector.version}</bundle>
+ </feature>
+
+</features>
diff --git a/resource-assignment/installer/pom.xml b/resource-assignment/installer/pom.xml
new file mode 100755
index 0000000..955e8c5
--- /dev/null
+++ b/resource-assignment/installer/pom.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>resource-assignment</artifactId>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>resource-assignment-installer</artifactId>
+ <name>Resource allocator- Karaf Installer</name>
+ <packaging>pom</packaging>
+
+ <properties>
+ <application.name>sdnc-resource-assignment</application.name>
+ <features.boot>sdnc-resource-assignment</features.boot>
+ <features.repositories>mvn:org.openecomp.sdnc.adaptors/resource-assignment-features/${project.version}/xml/features</features.repositories>
+ <include.transitive.dependencies>false</include.transitive.dependencies>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>resource-assignment-features</artifactId>
+ <version>${project.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>resource-assignment-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>maven-repo-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>false</attach>
+ <finalName>stage/${application.name}-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ <execution>
+ <id>installer-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>true</attach>
+ <finalName>${application.name}-${project.version}-installer</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>prepare-package</phase>
+ <configuration>
+ <transitive>false</transitive>
+ <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <useRepositoryLayout>true</useRepositoryLayout>
+ <addParentPoms>false</addParentPoms>
+ <copyPom>false</copyPom>
+ <includeGroupIds>org.openecomp.sdnc</includeGroupIds>
+ <excludeArtifactIds>sli-common,sli-provider,dblib-provider</excludeArtifactIds>
+ <scope>provided</scope>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-version</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources/scripts</directory>
+ <includes>
+ <include>install-feature.sh</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+</project>
diff --git a/resource-assignment/installer/src/assembly/assemble_installer_zip.xml b/resource-assignment/installer/src/assembly/assemble_installer_zip.xml
new file mode 100644
index 0000000..0ce9b1a
--- /dev/null
+++ b/resource-assignment/installer/src/assembly/assemble_installer_zip.xml
@@ -0,0 +1,58 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- we want "system" and related files right at the root level
+ as this file is suppose to be unzip on top of a karaf
+ distro. -->
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target/stage/</directory>
+ <outputDirectory>${application.name}</outputDirectory>
+ <fileMode>755</fileMode>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>target/stage/</directory>
+ <outputDirectory>${application.name}</outputDirectory>
+ <fileMode>644</fileMode>
+ <excludes>
+ <exclude>*.sh</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+
+
+
+</assembly>
diff --git a/resource-assignment/installer/src/assembly/assemble_mvnrepo_zip.xml b/resource-assignment/installer/src/assembly/assemble_mvnrepo_zip.xml
new file mode 100644
index 0000000..ba21dda
--- /dev/null
+++ b/resource-assignment/installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -0,0 +1,48 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- we want "system" and related files right at the root level
+ as this file is suppose to be unzip on top of a karaf
+ distro. -->
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target/assembly/</directory>
+ <outputDirectory>.</outputDirectory>
+ <excludes>
+ </excludes>
+ </fileSet>
+ </fileSets>
+
+
+
+</assembly>
diff --git a/resource-assignment/installer/src/main/resources/scripts/install-feature.sh b/resource-assignment/installer/src/main/resources/scripts/install-feature.sh
new file mode 100644
index 0000000..33e9b03
--- /dev/null
+++ b/resource-assignment/installer/src/main/resources/scripts/install-feature.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
+ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"}
+INSTALLERDIR=$(dirname $0)
+
+REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
+
+if [ -f ${REPOZIP} ]
+then
+ unzip -d ${ODL_HOME} ${REPOZIP}
+else
+ echo "ERROR : repo zip ($REPOZIP) not found"
+ exit 1
+fi
+
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}
diff --git a/resource-assignment/pom.xml b/resource-assignment/pom.xml
new file mode 100755
index 0000000..716ef71
--- /dev/null
+++ b/resource-assignment/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sdnc-adaptors</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>resource-assignment</artifactId>
+ <version>1.0.0</version>
+
+
+ <name>Resource Assignment Adaptor</name>
+ <description>The resource assignment adaptor allows service logic to check and allocate network capacity</description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>resource-assignment-features</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>resource-assignment-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>provider</module>
+ <module>features</module>
+ <module>installer</module>
+ </modules>
+</project>
+
diff --git a/resource-assignment/provider/pom.xml b/resource-assignment/provider/pom.xml
new file mode 100755
index 0000000..2926a39
--- /dev/null
+++ b/resource-assignment/provider/pom.xml
@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>resource-assignment</artifactId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>resource-assignment-provider</artifactId>
+ <packaging>bundle</packaging>
+ <name>Resource Assignment Adaptor - Provider</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ <version>${junit.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>${spring.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <version>${h2database.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>sli-common</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>sli-provider</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>dblib-provider</artifactId>
+ <version>${sdnctl.dblib.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
+ <version>${mysql.connector.version}</version>
+ <type>jar</type>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+
+
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>${bundle.plugin.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>org.openecomp.sdnc.ra</Bundle-SymbolicName>
+ <Export-Package>org.openecomp.sdnc.ra</Export-Package>
+ <Import-Package>*,org.openecomp.sdnc.sli.resource.dblib,org.openecomp.sdnc.sli.*,org.osgi.framework.*,org.slf4j.*,com.mysql.jdbc.*</Import-Package>
+ <!--Import-Package>*</Import-Package-->
+ <Embed-Transitive>true</Embed-Transitive>
+ </instructions>
+
+
+ </configuration>
+
+ </plugin>
+
+
+ </plugins>
+
+ </build>
+</project>
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/LockHelper.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/LockHelper.java
new file mode 100644
index 0000000..c7b5466
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/LockHelper.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.lock.comp;
+
+import java.util.Collection;
+
+public interface LockHelper {
+
+ void lock(String resourceName, String lockRequester, int lockTimeout /* Seconds */);
+
+ void unlock(String resourceName, boolean force);
+
+ void lock(Collection<String> resourceNameList, String lockRequester, int lockTimeout /* Seconds */);
+
+ void unlock(Collection<String> resourceNameList, boolean force);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/LockHelperImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/LockHelperImpl.java
new file mode 100644
index 0000000..139abfe
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/LockHelperImpl.java
@@ -0,0 +1,166 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.lock.comp;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
+import org.openecomp.sdnc.lock.dao.ResourceLockDao;
+import org.openecomp.sdnc.lock.data.ResourceLock;
+
+public class LockHelperImpl implements LockHelper {
+
+ private ResourceLockDao resourceLockDao;
+ private int retryCount = 10;
+ private int lockWait = 5; // Seconds
+
+ @Override
+ public void lock(String resourceName, String lockRequester, int lockTimeout /* Seconds */) {
+ lock(Collections.singleton(resourceName), lockRequester, lockTimeout);
+ }
+
+ @Override
+ public void unlock(String resourceName, boolean force) {
+ unlock(Collections.singleton(resourceName), force);
+ }
+
+ @Override
+ public void lock(Collection<String> resourceNameList, String lockRequester, int lockTimeout /* Seconds */) {
+ for (int i = 0; true; i++) {
+ try {
+ tryLock(resourceNameList, lockRequester, lockTimeout);
+ return;
+ } catch (ResourceLockedException e) {
+ if (i > retryCount)
+ throw e;
+ try {
+ Thread.sleep(lockWait * 1000);
+ } catch (InterruptedException ex) {
+ }
+ }
+ }
+ }
+
+ @Override
+ public void unlock(Collection<String> lockNames, boolean force) {
+ if (lockNames == null || lockNames.size() == 0)
+ return;
+
+ resourceLockDao.lockTable();
+
+ try {
+ for (String name : lockNames) {
+ ResourceLock l = resourceLockDao.getByResourceName(name);
+ if (l != null)
+ if (force || l.lockCount == 1)
+ resourceLockDao.delete(l.id);
+ else
+ resourceLockDao.decrementLockCount(l.id);
+ }
+ } finally {
+ resourceLockDao.unlockTable();
+ }
+ }
+
+ public void tryLock(Collection<String> resourceNameList, String lockRequester, int lockTimeout /* Seconds */) {
+ if (resourceNameList == null || resourceNameList.size() == 0)
+ return;
+
+ lockRequester = generateLockRequester(lockRequester, 100);
+
+ resourceLockDao.lockTable();
+
+ try {
+ // First check if all requested records are available to lock
+
+ Date now = new Date();
+
+ List<ResourceLock> dbLockList = new ArrayList<ResourceLock>();
+ List<String> insertLockNameList = new ArrayList<String>();
+ for (String name : resourceNameList) {
+ ResourceLock l = resourceLockDao.getByResourceName(name);
+
+ boolean canLock =
+ l == null || now.getTime() > l.expirationTime.getTime() || lockRequester != null &&
+ lockRequester.equals(l.lockHolder) || l.lockCount <= 0;
+ if (!canLock)
+ throw new ResourceLockedException(l.resourceName, l.lockHolder, lockRequester);
+
+ if (l != null)
+ dbLockList.add(l);
+ else
+ insertLockNameList.add(name);
+ }
+
+ // Update the lock info in DB
+ for (ResourceLock l : dbLockList)
+ resourceLockDao.update(l.id, now, new Date(now.getTime() + lockTimeout * 1000), l.lockCount + 1);
+
+ // Insert records for those that are not yet there
+ for (String lockName : insertLockNameList) {
+ ResourceLock l = new ResourceLock();
+ l.resourceName = lockName;
+ l.lockHolder = lockRequester;
+ l.lockTime = now;
+ l.expirationTime = new Date(now.getTime() + lockTimeout * 1000);
+ l.lockCount = 1;
+ resourceLockDao.add(l);
+ }
+ } finally {
+ resourceLockDao.unlockTable();
+ }
+ }
+
+ private static String generateLockRequester(String name, int maxLength) {
+ if (name == null)
+ name = "";
+ int l1 = name.length();
+ String tname = Thread.currentThread().getName();
+ int l2 = tname.length();
+ if (l1 + l2 + 1 > maxLength) {
+ int maxl1 = maxLength / 2;
+ if (l1 > maxl1) {
+ name = name.substring(0, maxl1);
+ l1 = maxl1;
+ }
+ int maxl2 = maxLength - l1 - 1;
+ if (l2 > maxl2)
+ tname = tname.substring(0, 6) + "..." + tname.substring(l2 - maxl2 + 9);
+ }
+ return tname + '-' + name;
+ }
+
+ public void setResourceLockDao(ResourceLockDao resourceLockDao) {
+ this.resourceLockDao = resourceLockDao;
+ }
+
+ public void setRetryCount(int retryCount) {
+ this.retryCount = retryCount;
+ }
+
+ public void setLockWait(int lockWait /* Seconds */) {
+ this.lockWait = lockWait;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/ResourceLockedException.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/ResourceLockedException.java
new file mode 100644
index 0000000..b2fa942
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/ResourceLockedException.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.lock.comp;
+
+public class ResourceLockedException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ private String lockName, lockHolder, lockRequester;
+
+ public ResourceLockedException(String lockName, String lockHolder, String lockRequester) {
+ this.lockName = lockName;
+ this.lockHolder = lockHolder;
+ this.lockRequester = lockRequester;
+ }
+
+ @Override
+ public String getMessage() {
+ return "Failed to lock [" + lockName + "] for [" + lockRequester + "]. Currently locked by [" + lockHolder +
+ "].";
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/SynchronizedFunction.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/SynchronizedFunction.java
new file mode 100644
index 0000000..0bbb053
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/comp/SynchronizedFunction.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.lock.comp;
+
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+public abstract class SynchronizedFunction {
+
+ private Set<String> synchset;
+ private String lockRequester;
+ private int lockTimeout; // Seconds
+ private LockHelper lockHelper;
+
+ protected SynchronizedFunction(LockHelper lockHelper, Collection<String> synchset, int lockTimeout) {
+ this.lockHelper = lockHelper;
+ this.synchset = new HashSet<String>(synchset);
+ this.lockRequester = generateLockRequester();
+ this.lockTimeout = lockTimeout;
+ }
+
+ protected abstract void _exec();
+
+ public void exec() {
+ lockHelper.lock(synchset, lockRequester, lockTimeout);
+ try {
+ _exec();
+ } finally {
+ lockHelper.unlock(synchset, true);
+ }
+ }
+
+ private static String generateLockRequester() {
+ return "SynchronizedFunction-" + (int) (Math.random() * 1000000);
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/dao/ResourceLockDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/dao/ResourceLockDao.java
new file mode 100644
index 0000000..3dcc511
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/dao/ResourceLockDao.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.lock.dao;
+
+import java.util.Date;
+
+import org.openecomp.sdnc.lock.data.ResourceLock;
+
+public interface ResourceLockDao {
+
+ void lockTable();
+
+ void unlockTable();
+
+ void add(ResourceLock l);
+
+ void update(long id, Date lockTime, Date expirationTime, int lockCount);
+
+ ResourceLock getByResourceName(String resourceName);
+
+ void delete(long id);
+
+ void decrementLockCount(long id);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/dao/ResourceLockDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/dao/ResourceLockDaoImpl.java
new file mode 100644
index 0000000..7edd156
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/dao/ResourceLockDaoImpl.java
@@ -0,0 +1,109 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.lock.dao;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Date;
+import java.util.List;
+
+import org.openecomp.sdnc.lock.data.ResourceLock;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.RowMapper;
+
+public class ResourceLockDaoImpl implements ResourceLockDao {
+
+ private static final Logger log = LoggerFactory.getLogger(ResourceLockDaoImpl.class);
+
+ private JdbcTemplate jdbcTemplate;
+ private boolean testing = false;
+
+ @Override
+ public void lockTable() {
+ if (!testing)
+ jdbcTemplate.update("LOCK TABLE RESOURCE_LOCK WRITE");
+ log.info("Table RESOURCE_LOCK locked.");
+ }
+
+ @Override
+ public void unlockTable() {
+ if (!testing)
+ jdbcTemplate.update("UNLOCK TABLES");
+ log.info("Table RESOURCE_LOCK unlocked.");
+ }
+
+ @Override
+ public void add(ResourceLock l) {
+ jdbcTemplate.update(
+ "INSERT INTO RESOURCE_LOCK (resource_name, lock_holder, lock_count, lock_time, expiration_time)\n" +
+ "VALUES (?, ?, ?, ?, ?)",
+ new Object[] { l.resourceName, l.lockHolder, l.lockCount, l.lockTime, l.expirationTime });
+ }
+
+ @Override
+ public void update(long id, Date lockTime, Date expirationTime, int lockCount) {
+ jdbcTemplate.update(
+ "UPDATE RESOURCE_LOCK SET lock_time = ?, expiration_time = ?, lock_count = ? WHERE resource_lock_id = ?",
+ new Object[] { lockTime, expirationTime, lockCount, id });
+ }
+
+ @Override
+ public ResourceLock getByResourceName(String resourceName) {
+ List<ResourceLock> ll = jdbcTemplate.query("SELECT * FROM RESOURCE_LOCK WHERE resource_name = ?",
+ new Object[] { resourceName }, new RowMapper<ResourceLock>() {
+
+ @Override
+ public ResourceLock mapRow(ResultSet rs, int rowNum) throws SQLException {
+ ResourceLock rl = new ResourceLock();
+ rl.id = rs.getLong("resource_lock_id");
+ rl.resourceName = rs.getString("resource_name");
+ rl.lockHolder = rs.getString("lock_holder");
+ rl.lockCount = rs.getInt("lock_count");
+ rl.lockTime = rs.getTimestamp("lock_time");
+ rl.expirationTime = rs.getTimestamp("expiration_time");
+ return rl;
+ }
+ });
+ return ll != null && !ll.isEmpty() ? ll.get(0) : null;
+ }
+
+ @Override
+ public void delete(long id) {
+ jdbcTemplate.update("DELETE FROM RESOURCE_LOCK WHERE resource_lock_id = ?", new Object[] { id });
+ }
+
+ @Override
+ public void decrementLockCount(long id) {
+ jdbcTemplate.update("UPDATE RESOURCE_LOCK SET lock_count = lock_count - 1 WHERE resource_lock_id = ?",
+ new Object[] { id });
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+
+ public void setTesting(boolean testing) {
+ this.testing = testing;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/data/ResourceLock.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/data/ResourceLock.java
new file mode 100644
index 0000000..052e38f
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/lock/data/ResourceLock.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.lock.data;
+
+import java.util.Date;
+
+public class ResourceLock {
+
+ public long id;
+ public String resourceName;
+ public String lockHolder;
+ public int lockCount;
+ public Date lockTime;
+ public Date expirationTime;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ReleaseRequestType.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ReleaseRequestType.java
new file mode 100644
index 0000000..e5af74b
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ReleaseRequestType.java
@@ -0,0 +1,45 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra;
+
+public enum ReleaseRequestType {
+ Cancel, Activate, Disconnect;
+
+ public static ReleaseRequestType convert(Object o) {
+ if (o == null)
+ return null;
+ String s = o.toString();
+ s = s.trim();
+ if (s.length() == 0)
+ return null;
+
+ if (s.equalsIgnoreCase("Cancel"))
+ return Cancel;
+ if (s.equalsIgnoreCase("Activate"))
+ return Activate;
+ if (s.equalsIgnoreCase("Disconnect"))
+ return Disconnect;
+
+ throw new IllegalArgumentException("Invalid request-type: " + s +
+ ". Supported values are Cancel, Activate, Disconnect.");
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ReserveRequestType.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ReserveRequestType.java
new file mode 100644
index 0000000..70533ce
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ReserveRequestType.java
@@ -0,0 +1,43 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra;
+
+public enum ReserveRequestType {
+ New, Change;
+
+ public static ReserveRequestType convert(Object o) {
+ if (o == null)
+ return null;
+ String s = o.toString();
+ s = s.trim();
+ if (s.length() == 0)
+ return null;
+
+ if (s.equalsIgnoreCase("New"))
+ return New;
+ if (s.equalsIgnoreCase("Change"))
+ return Change;
+
+ throw new IllegalArgumentException("Invalid request-type: " + s +
+ ". Supported values are New, Change.");
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ResourceAllocator.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ResourceAllocator.java
new file mode 100644
index 0000000..e45acc1
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/ResourceAllocator.java
@@ -0,0 +1,829 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.openecomp.sdnc.ra.comp.EndPointAllocator;
+import org.openecomp.sdnc.ra.comp.EndPointData;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.dao.ServerDao;
+import org.openecomp.sdnc.ra.equip.dao.VpePortDao;
+import org.openecomp.sdnc.ra.equip.dao.VplspePortDao;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentLevel;
+import org.openecomp.sdnc.ra.rule.comp.AllocationRequestBuilder;
+import org.openecomp.sdnc.ra.rule.dao.MaxPortSpeedDao;
+import org.openecomp.sdnc.ra.rule.dao.MaxServerSpeedDao;
+import org.openecomp.sdnc.ra.rule.dao.ParameterDao;
+import org.openecomp.sdnc.ra.rule.data.ThresholdStatus;
+import org.openecomp.sdnc.ra.service.dao.ServiceResourceDao;
+import org.openecomp.sdnc.ra.service.data.ServiceResource;
+import org.openecomp.sdnc.ra.service.data.ServiceStatus;
+import org.openecomp.sdnc.rm.comp.ResourceManager;
+import org.openecomp.sdnc.rm.data.AllocationItem;
+import org.openecomp.sdnc.rm.data.AllocationOutcome;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+import org.openecomp.sdnc.rm.data.AllocationStatus;
+import org.openecomp.sdnc.rm.data.LimitAllocationOutcome;
+import org.openecomp.sdnc.rm.data.LimitResource;
+import org.openecomp.sdnc.rm.data.MultiResourceAllocationOutcome;
+import org.openecomp.sdnc.rm.data.RangeAllocationItem;
+import org.openecomp.sdnc.rm.data.RangeResource;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.openecomp.sdnc.util.speed.SpeedUtil;
+import org.openecomp.sdnc.util.str.StrUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ResourceAllocator implements SvcLogicResource {
+
+ private static final Logger log = LoggerFactory.getLogger(ResourceAllocator.class);
+
+ public ResourceAllocator() {
+ log.info("ResourceAllocator created.");
+ }
+
+ private ServerDao serverDao;
+ private VpePortDao vpePortDao;
+ private VplspePortDao vplspePortDao;
+ private MaxPortSpeedDao maxPortSpeedDao;
+ private MaxServerSpeedDao maxServerSpeedDao;
+ private ServiceResourceDao serviceResourceDao;
+ private ParameterDao parameterDao;
+
+ private AllocationRequestBuilder allocationRequestBuilder;
+ private ResourceManager resourceManager;
+ private SpeedUtil speedUtil;
+
+ private EndPointAllocator endPointAllocator;
+
+ @Override
+ public QueryStatus notify(String resource, String action, String key, SvcLogicContext ctx)
+ throws SvcLogicException {
+ return (QueryStatus.SUCCESS);
+ }
+
+ @Override
+ public QueryStatus update(
+ String resource,
+ String key,
+ Map<String, String> parms,
+ String prefix,
+ SvcLogicContext ctx) throws SvcLogicException {
+
+ return QueryStatus.SUCCESS;
+ }
+
+ @Override
+ public QueryStatus exists(String resource, String key, String prefix, SvcLogicContext ctx)
+ throws SvcLogicException {
+ return QueryStatus.SUCCESS;
+ }
+
+ @Override
+ public QueryStatus delete(String arg0, String arg1, SvcLogicContext arg2) throws SvcLogicException {
+ return QueryStatus.SUCCESS;
+ }
+
+ @Override
+ public QueryStatus save(
+ String arg0,
+ boolean arg1,
+ boolean arg2,
+ String arg3,
+ Map<String, String> arg4,
+ String arg5,
+ SvcLogicContext arg6) throws SvcLogicException {
+ return QueryStatus.SUCCESS;
+ }
+
+ @Override
+ public QueryStatus isAvailable(String resource, String key, String prefix, SvcLogicContext ctx)
+ throws SvcLogicException {
+ String serviceModel = ctx.getAttribute("tmp.resource-allocator.service-model");
+ if (serviceModel != null && serviceModel.trim().length() > 0)
+ return allocateResources(serviceModel, ctx, true);
+ return allocateResourcesL3SDN(ctx, true);
+ }
+
+ @Override
+ public QueryStatus query(
+ String resource,
+ boolean localOnly,
+ String select,
+ String key,
+ String prefix,
+ String orderBy,
+ SvcLogicContext ctx) throws SvcLogicException {
+ log.debug("key: " + key);
+ log.debug("prefix: " + prefix);
+
+ if (key == null)
+ return QueryStatus.SUCCESS;
+
+ if (key.startsWith("'") && key.endsWith("'"))
+ key = key.substring(1, key.length() - 1);
+
+ String endPointPosition = "VPE-Cust";
+
+ prefix = prefix == null ? "" : prefix + '.';
+
+ String resourceUnionId = key + '/' + endPointPosition;
+ List<Resource> rlist = resourceManager.getResourceUnion(resourceUnionId);
+
+ log.info("Resources found for " + resourceUnionId + ": " + rlist.size());
+
+ String assetId = null;
+ for (Resource r : rlist) {
+ log.info("Resource: " + r.resourceKey.resourceName);
+
+ if (r instanceof RangeResource) {
+ RangeResource rr = (RangeResource) r;
+ for (AllocationItem ai : r.allocationItems)
+ if (ai.resourceUnionId.equals(resourceUnionId)) {
+ RangeAllocationItem rai = (RangeAllocationItem) ai;
+ ctx.setAttribute(prefix + r.resourceKey.resourceName, String.valueOf(rai.used.first()));
+
+ log.info("Added context attr: " + prefix + r.resourceKey.resourceName + ": " +
+ String.valueOf(rr.used.first()));
+
+ assetId = r.resourceKey.assetId;
+ String vpeName = assetId;
+ int i1 = assetId.indexOf('/');
+ if (i1 > 0)
+ vpeName = assetId.substring(0, i1);
+ ctx.setAttribute(prefix + "vpe-name", vpeName);
+
+ log.info("Added context attr: " + prefix + "vpe-name: " + vpeName);
+ }
+ }
+ }
+
+ String affinityLink = "1";
+ if (assetId != null) {
+ for (Resource r : rlist) {
+ if (r instanceof LimitResource) {
+ LimitResource ll = (LimitResource) r;
+ if (ll.resourceKey.assetId.startsWith(assetId + '-')) {
+ int i1 = ll.resourceKey.assetId.lastIndexOf('-');
+ affinityLink = ll.resourceKey.assetId.substring(i1 + 1);
+ break;
+ }
+ }
+ }
+ }
+
+ ctx.setAttribute(prefix + "affinity-link", affinityLink);
+
+ log.info("Added context attr: " + prefix + "affinity-link: " + affinityLink);
+
+ return QueryStatus.SUCCESS;
+ }
+
+ @Override
+ public QueryStatus reserve(String resource, String select, String key, String prefix, SvcLogicContext ctx)
+ throws SvcLogicException {
+ String serviceModel = ctx.getAttribute("tmp.resource-allocator.service-model");
+ if (serviceModel != null && serviceModel.trim().length() > 0)
+ return allocateResources(serviceModel, ctx, false);
+ return allocateResourcesL3SDN(ctx, false);
+ }
+
+ @Override
+ public QueryStatus release(String resource, String key, SvcLogicContext ctx) throws SvcLogicException {
+ String serviceInstanceId = ctx.getAttribute("tmp.resource-allocator.service-instance-id");
+ if (serviceInstanceId == null)
+ throw new SvcLogicException("tmp.resource-allocator.service-instance-id is required in ResourceAllocator");
+
+ String requestTypeStr = ctx.getAttribute("tmp.resource-allocator.request-type");
+ if (requestTypeStr == null)
+ throw new SvcLogicException("tmp.resource-allocator.request-type is required in ResourceAllocator");
+
+ ReleaseRequestType requestType = null;
+ try {
+ requestType = ReleaseRequestType.convert(requestTypeStr);
+ } catch (IllegalArgumentException e) {
+ throw new SvcLogicException("Invalid tmp.resource-allocator.request-type: " + requestTypeStr +
+ ". Supported values are Cancel, Activate, Disconnect.");
+ }
+
+ log.info("Starting release: " + requestType + " for: " + serviceInstanceId);
+
+ ServiceResource activeServiceResource =
+ serviceResourceDao.getServiceResource(serviceInstanceId, ServiceStatus.Active);
+ ServiceResource pendingServiceResource =
+ serviceResourceDao.getServiceResource(serviceInstanceId, ServiceStatus.Pending);
+
+ log.info("Active ServiceResource: ");
+ StrUtil.info(log, activeServiceResource);
+ log.info("Pending ServiceResource: ");
+ StrUtil.info(log, pendingServiceResource);
+
+ if (requestType == ReleaseRequestType.Cancel) {
+ if (pendingServiceResource != null) {
+ log.info("Releasing pending resources: " + pendingServiceResource.resourceSetId);
+
+ resourceManager.releaseResourceSet(pendingServiceResource.resourceSetId);
+ serviceResourceDao.deleteServiceResource(serviceInstanceId, ServiceStatus.Pending);
+ } else {
+ log.info("Pending record not found for service instance: " + serviceInstanceId + ". Nothing to do.");
+ }
+
+ } else if (requestType == ReleaseRequestType.Activate) {
+ if (pendingServiceResource != null) {
+ if (activeServiceResource != null) {
+ log.info("Releasing active resources: " + activeServiceResource.resourceSetId);
+
+ resourceManager.releaseResourceSet(activeServiceResource.resourceSetId);
+ serviceResourceDao.deleteServiceResource(serviceInstanceId, ServiceStatus.Active);
+ }
+
+ log.info("Updating the status of the pending record to active.");
+
+ serviceResourceDao.updateServiceStatus(serviceInstanceId, ServiceStatus.Pending, ServiceStatus.Active);
+ } else {
+ log.info("Pending record not found for service instance: " + serviceInstanceId + ". Nothing to do.");
+ }
+
+ } else if (requestType == ReleaseRequestType.Disconnect) {
+ if (pendingServiceResource != null) {
+ log.info("Releasing pending resources: " + pendingServiceResource.resourceSetId);
+
+ resourceManager.releaseResourceSet(pendingServiceResource.resourceSetId);
+ serviceResourceDao.deleteServiceResource(serviceInstanceId, ServiceStatus.Pending);
+ }
+ if (activeServiceResource != null) {
+ log.info("Releasing active resources: " + activeServiceResource.resourceSetId);
+
+ resourceManager.releaseResourceSet(activeServiceResource.resourceSetId);
+ serviceResourceDao.deleteServiceResource(serviceInstanceId, ServiceStatus.Active);
+ }
+ }
+
+ return QueryStatus.SUCCESS;
+ }
+
+ private QueryStatus allocateResourcesL3SDN(SvcLogicContext ctx, boolean checkOnly) throws SvcLogicException {
+ String aicSiteId = getAicSiteId(ctx);
+ Map<String, Object> service = getServiceData(ctx);
+
+ String requestTypeStr = ctx.getAttribute("tmp.resource-allocator.request-type");
+ if (requestTypeStr == null)
+ requestTypeStr = "New";
+
+ ReserveRequestType requestType = null;
+ try {
+ requestType = ReserveRequestType.convert(requestTypeStr);
+ } catch (IllegalArgumentException e) {
+ throw new SvcLogicException("Invalid tmp.resource-allocator.request-type: " + requestTypeStr +
+ ". Supported values are New, Change.");
+ }
+
+ String serviceInstanceId = String.valueOf(service.get("service-instance-id"));
+
+ ServiceResource activeServiceResource =
+ serviceResourceDao.getServiceResource(serviceInstanceId, ServiceStatus.Active);
+ ServiceResource pendingServiceResource =
+ serviceResourceDao.getServiceResource(serviceInstanceId, ServiceStatus.Pending);
+
+ log.info("Active ServiceResource: ");
+ StrUtil.info(log, activeServiceResource);
+ log.info("Pending ServiceResource: ");
+ StrUtil.info(log, pendingServiceResource);
+
+ ServiceResource sr = new ServiceResource();
+ sr.serviceInstanceId = serviceInstanceId;
+ sr.serviceStatus = ServiceStatus.Pending;
+ sr.serviceChangeNumber = 1;
+ if (pendingServiceResource != null)
+ sr.serviceChangeNumber = pendingServiceResource.serviceChangeNumber + 1;
+ else if (activeServiceResource != null)
+ sr.serviceChangeNumber = activeServiceResource.serviceChangeNumber + 1;
+ sr.resourceSetId = serviceInstanceId + "/" + sr.serviceChangeNumber;
+ sr.resourceUnionId = serviceInstanceId;
+
+ log.info("New ServiceResource: ");
+ StrUtil.info(log, sr);
+
+ List<Map<String, Object>> vpePortData = vpePortDao.getVpePortData(aicSiteId);
+ List<Map<String, Object>> vplspePortData = vplspePortDao.getVplspePortData(aicSiteId);
+ List<Map<String, Object>> serverData = serverDao.getServerData(aicSiteId);
+
+ long maxAvailableSpeedVpePort = 0;
+ boolean vpePortFound = false;
+
+ for (Map<String, Object> vpe : vpePortData) {
+ String vpeId = String.valueOf(vpe.get("vpe-id"));
+ String interfaceName = String.valueOf(vpe.get("physical-interface-name"));
+ String portId = vpeId + "/" + interfaceName;
+
+ log.info("Checking VPE port: " + portId);
+
+ String provStatus = String.valueOf(vpe.get("provisioning-status"));
+ if (!provStatus.equals("PROV")) {
+ log.info("Skipping port " + portId + ": Provisioning status is not PROV.");
+ continue;
+ }
+
+ String imageFile = String.valueOf(vpe.get("image-file-name"));
+ String endPointPosition = "VPE-Cust";
+ long maxPortSpeed = maxPortSpeedDao.getMaxPortSpeed(imageFile, endPointPosition, interfaceName);
+ vpe.put("max-port-speed", maxPortSpeed);
+
+ EquipmentData ed = new EquipmentData();
+ ed.data = vpe;
+ ed.equipmentId = portId;
+ ed.equipmentLevel = EquipmentLevel.Port;
+
+ ServiceData sd = new ServiceData();
+ sd.data = service;
+ sd.serviceModel = "L3SDN";
+ sd.endPointPosition = endPointPosition;
+ sd.resourceUnionId = sr.resourceUnionId;
+ sd.resourceSetId = sr.resourceSetId;
+
+ StrUtil.info(log, ed);
+ StrUtil.info(log, sd);
+
+ AllocationRequest ar = allocationRequestBuilder.buildAllocationRequest(sd, ed, checkOnly,
+ requestType == ReserveRequestType.Change);
+ AllocationOutcome ao = resourceManager.allocateResources(ar);
+
+ if (ao.status == AllocationStatus.Success) {
+ vpePortFound = true;
+ break;
+ }
+
+ if (ao instanceof LimitAllocationOutcome) {
+ LimitAllocationOutcome lao = (LimitAllocationOutcome) ao;
+ long available = lao.limit - lao.used;
+ if (available > maxAvailableSpeedVpePort)
+ maxAvailableSpeedVpePort = available;
+ }
+ }
+
+ long maxAvailableSpeedVplspePort = 0;
+ boolean vplspePortFound = false;
+
+ for (Map<String, Object> vplspe : vplspePortData) {
+ String vplspeId = String.valueOf(vplspe.get("vplspe-id"));
+ String interfaceName = String.valueOf(vplspe.get("physical-interface-name"));
+ String portId = vplspeId + "/" + interfaceName;
+
+ log.info("Checking VPLSPE port: " + portId);
+
+ String provStatus = String.valueOf(vplspe.get("provisioning-status"));
+ if (!provStatus.equals("PROV")) {
+ log.info("Skipping port " + portId + ": Provisioning status is not PROV.");
+ continue;
+ }
+
+ long physicalSpeed = (Long) vplspe.get("physical-interface-speed");
+ String physicalSpeedUnit = String.valueOf(vplspe.get("physical-interface-speed-unit"));
+ long maxPortSpeed = speedUtil.convertToKbps(physicalSpeed, physicalSpeedUnit);
+ vplspe.put("max-port-speed", maxPortSpeed);
+
+ EquipmentData ed = new EquipmentData();
+ ed.data = vplspe;
+ ed.equipmentId = portId;
+ ed.equipmentLevel = EquipmentLevel.Port;
+
+ ServiceData sd = new ServiceData();
+ sd.data = service;
+ sd.serviceModel = "L3SDN";
+ sd.endPointPosition = "IPAG-TOA";
+ sd.resourceUnionId = sr.resourceUnionId;
+ sd.resourceSetId = sr.resourceSetId;
+
+ StrUtil.info(log, ed);
+ StrUtil.info(log, sd);
+
+ AllocationRequest ar = allocationRequestBuilder.buildAllocationRequest(sd, ed, checkOnly,
+ requestType == ReserveRequestType.Change);
+ AllocationOutcome ao = resourceManager.allocateResources(ar);
+
+ if (ao.status == AllocationStatus.Success) {
+ vplspePortFound = true;
+ break;
+ }
+
+ if (ao instanceof LimitAllocationOutcome) {
+ LimitAllocationOutcome lao = (LimitAllocationOutcome) ao;
+ long available = lao.limit - lao.used;
+ if (available > maxAvailableSpeedVplspePort)
+ maxAvailableSpeedVplspePort = available;
+ }
+ }
+
+ long maxAvailableSpeedServer = 0;
+ boolean serverFound = false;
+
+ for (Map<String, Object> server : serverData) {
+ String serverId = String.valueOf(server.get("server-id"));
+ String serverModel = String.valueOf(server.get("server-model"));
+
+ log.info("Checking Server: " + serverId);
+
+ String endPointPosition = "VCE-Cust";
+
+ int serverCount = (Integer) server.get("server-count");
+ if (serverCount == 0)
+ serverCount = 1;
+ String ratioString = parameterDao.getParameter("homing.pserver.sparing.ratio");
+ if (ratioString == null || ratioString.length() == 0)
+ ratioString = "1:1";
+ int primaryServerCount = calculatePrimaryServerCount(serverCount, ratioString);
+ server.put("number-primary-servers", primaryServerCount);
+
+ int evcCount = getEvcCountOnServer(serverId);
+ int evcCountPerServer = (evcCount + primaryServerCount - 1) / primaryServerCount;
+ long maxServerSpeed = maxServerSpeedDao.getMaxServerSpeed(serverModel, evcCountPerServer);
+ server.put("max-server-speed", maxServerSpeed);
+ server.put("evc-count", evcCount);
+ server.put("evc-count-per-server", evcCountPerServer);
+
+ EquipmentData ed = new EquipmentData();
+ ed.data = server;
+ ed.equipmentId = serverId;
+ ed.equipmentLevel = EquipmentLevel.Server;
+
+ ServiceData sd = new ServiceData();
+ sd.data = service;
+ sd.serviceModel = "L3SDN";
+ sd.endPointPosition = endPointPosition;
+ sd.resourceUnionId = sr.resourceUnionId;
+ sd.resourceSetId = sr.resourceSetId;
+
+ StrUtil.info(log, ed);
+ StrUtil.info(log, sd);
+
+ AllocationRequest ar = allocationRequestBuilder.buildAllocationRequest(sd, ed, checkOnly,
+ requestType == ReserveRequestType.Change);
+ AllocationOutcome ao = resourceManager.allocateResources(ar);
+
+ if (ao.status == AllocationStatus.Success) {
+ serverFound = true;
+
+ if (ao instanceof MultiResourceAllocationOutcome) {
+ MultiResourceAllocationOutcome mrao = (MultiResourceAllocationOutcome) ao;
+ for (AllocationOutcome ao1 : mrao.allocationOutcomeList) {
+ if (ao1 instanceof LimitAllocationOutcome) {
+ LimitAllocationOutcome lao = (LimitAllocationOutcome) ao1;
+ if (lao.request.resourceName.equals("Bandwidth")) {
+ ThresholdStatus th = allocationRequestBuilder.getThresholdStatus(sd, ed, lao);
+ setThresholdData(ctx, th, sd, ed);
+ }
+ }
+ }
+ }
+
+ break;
+ }
+
+ if (ao instanceof MultiResourceAllocationOutcome) {
+ MultiResourceAllocationOutcome mrao = (MultiResourceAllocationOutcome) ao;
+ for (AllocationOutcome ao1 : mrao.allocationOutcomeList) {
+ if (ao1 instanceof LimitAllocationOutcome) {
+ LimitAllocationOutcome lao = (LimitAllocationOutcome) ao1;
+ if (lao.status == AllocationStatus.Failure && lao.request.resourceName.equals("Bandwidth")) {
+ long available = lao.limit - lao.used;
+ if (available > maxAvailableSpeedServer)
+ maxAvailableSpeedServer = available;
+ }
+ if (lao.status == AllocationStatus.Failure && lao.request.resourceName.equals("Connection")) {
+ maxAvailableSpeedServer = 0;
+ break;
+ }
+
+ ThresholdStatus th = allocationRequestBuilder.getThresholdStatus(sd, ed, lao);
+ setThresholdData(ctx, th, sd, ed);
+ }
+ }
+ }
+ }
+
+ if (vpePortFound && vplspePortFound && serverFound) {
+ if (!checkOnly)
+ if (pendingServiceResource == null) {
+ log.info("Adding the pending service resource record to DB.");
+ serviceResourceDao.addServiceResource(sr);
+ } else {
+ log.info("Releasing previously allocated resources for resource set id: " +
+ pendingServiceResource.resourceSetId);
+ resourceManager.releaseResourceSet(pendingServiceResource.resourceSetId);
+
+ log.info("Updating the pending service resource record in DB with service change number: " +
+ sr.serviceChangeNumber);
+ serviceResourceDao.updateServiceResource(sr);
+ }
+
+ return QueryStatus.SUCCESS;
+ }
+
+ log.info("Releasing allocated resources (if any) for resource set id: " + sr.resourceSetId);
+ resourceManager.releaseResourceSet(sr.resourceSetId);
+
+ long maxAvailableSpeed = Long.MAX_VALUE;
+ if (!vpePortFound && maxAvailableSpeedVpePort < maxAvailableSpeed)
+ maxAvailableSpeed = maxAvailableSpeedVpePort;
+ if (!vplspePortFound && maxAvailableSpeedVplspePort < maxAvailableSpeed)
+ maxAvailableSpeed = maxAvailableSpeedVplspePort;
+ if (!serverFound && maxAvailableSpeedServer < maxAvailableSpeed)
+ maxAvailableSpeed = maxAvailableSpeedServer;
+
+ setOutputContext(ctx, maxAvailableSpeed, "kbps");
+ return QueryStatus.NOT_FOUND;
+ }
+
+ private void setThresholdData(SvcLogicContext ctx, ThresholdStatus th, ServiceData sd, EquipmentData ed) {
+ if (th == null)
+ return;
+
+ String pp = "tmp.resource-allocator-output.threshold-notification-list.threshold-hotification[0].";
+ ctx.setAttribute("tmp.resource-allocator-output.threshold-notification-list.threshold-hotification_length",
+ "1");
+ ctx.setAttribute(pp + "message", th.resourceThreshold.message);
+ ctx.setAttribute(pp + "resource-rule.service-model", th.resourceRule.serviceModel);
+ ctx.setAttribute(pp + "resource-rule.endpoint-position", th.resourceRule.endPointPosition);
+ ctx.setAttribute(pp + "resource-rule.resource-name", th.resourceRule.resourceName);
+ ctx.setAttribute(pp + "resource-rule.equipment-level", th.resourceRule.equipmentLevel);
+ ctx.setAttribute(pp + "resource-rule.soft-limit-expression", th.resourceRule.softLimitExpression);
+ ctx.setAttribute(pp + "resource-rule.hard-limit-expression", th.resourceRule.hardLimitExpression);
+ ctx.setAttribute(pp + "resource-state.used", String.valueOf(th.used));
+ ctx.setAttribute(pp + "resource-state.limit-value", String.valueOf(th.limitValue));
+ ctx.setAttribute(pp + "resource-state.threshold-value", String.valueOf(th.thresholdValue));
+ ctx.setAttribute(pp + "resource-state.last-added", String.valueOf(th.lastAdded));
+ ctx.setAttribute(pp + "equipment-data.equipment-id", ed.equipmentId);
+ for (String edKey : ed.data.keySet())
+ ctx.setAttribute(pp + "equipment-data." + edKey, String.valueOf(ed.data.get(edKey)));
+ }
+
+ private QueryStatus allocateResources(String serviceModel, SvcLogicContext ctx, boolean checkOnly)
+ throws SvcLogicException {
+ Map<String, Object> service = getServiceData(ctx);
+ Map<String, Object> ec = getEquipConstraints(ctx);
+
+ String requestTypeStr = ctx.getAttribute("tmp.resource-allocator.request-type");
+ if (requestTypeStr == null)
+ requestTypeStr = "New";
+
+ ReserveRequestType requestType = null;
+ try {
+ requestType = ReserveRequestType.convert(requestTypeStr);
+ } catch (IllegalArgumentException e) {
+ throw new SvcLogicException("Invalid tmp.resource-allocator.request-type: " + requestTypeStr +
+ ". Supported values are New, Change.");
+ }
+
+ String serviceInstanceId = String.valueOf(service.get("service-instance-id"));
+
+ log.info("Starting reserve: " + requestType + ", service-instance-id: " + serviceInstanceId);
+
+ ServiceResource activeServiceResource =
+ serviceResourceDao.getServiceResource(serviceInstanceId, ServiceStatus.Active);
+ ServiceResource pendingServiceResource =
+ serviceResourceDao.getServiceResource(serviceInstanceId, ServiceStatus.Pending);
+
+ log.info("Active ServiceResource: ");
+ StrUtil.info(log, activeServiceResource);
+ log.info("Pending ServiceResource: ");
+ StrUtil.info(log, pendingServiceResource);
+
+ int changeNumber = 1;
+ if (pendingServiceResource != null)
+ changeNumber = pendingServiceResource.serviceChangeNumber + 1;
+ else if (activeServiceResource != null)
+ changeNumber = activeServiceResource.serviceChangeNumber + 1;
+
+ ServiceData sd = new ServiceData();
+ sd.data = service;
+ sd.serviceModel = serviceModel;
+ sd.serviceInstanceId = serviceInstanceId;
+
+ StrUtil.info(log, sd);
+
+ List<EndPointData> epList = endPointAllocator.allocateEndPoints(sd, ec, checkOnly,
+ requestType == ReserveRequestType.Change, changeNumber);
+
+ if (epList != null && !epList.isEmpty()) {
+ if (!checkOnly) {
+ EndPointData ep = epList.get(0);
+
+ ServiceResource sr = new ServiceResource();
+ sr.serviceInstanceId = serviceInstanceId;
+ sr.serviceStatus = ServiceStatus.Pending;
+ sr.serviceChangeNumber = changeNumber;
+ sr.resourceSetId = ep.resourceSetId;
+ sr.resourceUnionId = ep.resourceUnionId;
+
+ log.info("New ServiceResource: ");
+ StrUtil.info(log, sr);
+
+ if (pendingServiceResource == null) {
+ log.info("Adding the pending service resource record to DB.");
+ serviceResourceDao.addServiceResource(sr);
+ } else {
+ log.info("Releasing previously allocated resources for resource set id: " +
+ pendingServiceResource.resourceSetId);
+ resourceManager.releaseResourceSet(pendingServiceResource.resourceSetId);
+
+ log.info("Updating the pending service resource record in DB with service change number: " +
+ sr.serviceChangeNumber);
+ serviceResourceDao.updateServiceResource(sr);
+ }
+ }
+
+ return QueryStatus.SUCCESS;
+ }
+
+ log.info("Capacity not found for EVC: " + serviceInstanceId);
+
+ return QueryStatus.NOT_FOUND;
+ }
+
+ private int getEvcCountOnServer(String serverId) {
+ LimitResource l = (LimitResource) resourceManager.getResource("Connection", serverId);
+ if (l != null)
+ return (int) l.used;
+ return 0;
+ }
+
+ private String getAicSiteId(SvcLogicContext ctx) throws SvcLogicException {
+ String aicSiteId = ctx.getAttribute("tmp.resource-allocator.aic-site-id");
+ if (aicSiteId == null)
+ throw new SvcLogicException("tmp.resource-allocator.aic-site-id is required in ResourceAllocator");
+ return aicSiteId;
+ }
+
+ private Map<String, Object> getServiceData(SvcLogicContext ctx) throws SvcLogicException {
+ String serviceInstanceId = ctx.getAttribute("tmp.resource-allocator.service-instance-id");
+ if (serviceInstanceId == null)
+ serviceInstanceId = "checkServiceInstance";
+
+ String speedStr = ctx.getAttribute("tmp.resource-allocator.speed");
+ if (speedStr == null || speedStr.trim().length() == 0)
+ throw new SvcLogicException("tmp.resource-allocator.speed is required in ResourceAllocator");
+ long speed = 0;
+ try {
+ speed = Long.parseLong(speedStr);
+ } catch (NumberFormatException e) {
+ throw new SvcLogicException("Invalid tmp.resource-allocator.speed. Must be a number.");
+ }
+ String unit = ctx.getAttribute("tmp.resource-allocator.speed-unit");
+ if (unit == null || unit.trim().length() == 0)
+ throw new SvcLogicException("tmp.resource-allocator.speed-unit is required in ResourceAllocator");
+ long serviceSpeedKbps = speedUtil.convertToKbps(speed, unit);
+
+ Map<String, Object> sd = new HashMap<String, Object>();
+ sd.put("service-instance-id", serviceInstanceId);
+ sd.put("service-speed-kbps", serviceSpeedKbps);
+
+ String vpnId = ctx.getAttribute("tmp.resource-allocator.vpn-id");
+ if (vpnId != null && vpnId.trim().length() > 0)
+ sd.put("vpn-id", vpnId.trim());
+
+ String vpnIdList = ctx.getAttribute("tmp.resource-allocator.vpn-id-list");
+ if (vpnIdList != null && vpnIdList.trim().length() > 0)
+ sd.put("vpn-id-list", vpnIdList.trim());
+
+ String vrfName = ctx.getAttribute("tmp.resource-allocator.vrf-name");
+ if (vrfName != null && vrfName.trim().length() > 0)
+ sd.put("vrf-name", vrfName.trim());
+
+ String vrfNameList = ctx.getAttribute("tmp.resource-allocator.vrf-name-list");
+ if (vrfNameList != null && vrfNameList.trim().length() > 0)
+ sd.put("vrf-name-list", vrfNameList.trim());
+
+ String v4multicast = ctx.getAttribute("tmp.resource-allocator.v4-multicast");
+ if (v4multicast != null && v4multicast.trim().length() > 0)
+ sd.put("v4-multicast", v4multicast.trim());
+
+ String v6multicast = ctx.getAttribute("tmp.resource-allocator.v6-multicast");
+ if (v6multicast != null && v6multicast.trim().length() > 0)
+ sd.put("v6-multicast", v6multicast.trim());
+
+ String v4ServingSite = ctx.getAttribute("tmp.resource-allocator.v4-serving-site");
+ if (v4ServingSite != null && v4ServingSite.trim().length() > 0)
+ sd.put("v4-serving-site", v4ServingSite.trim());
+
+ String v6ServingSite = ctx.getAttribute("tmp.resource-allocator.v6-serving-site");
+ if (v6ServingSite != null && v6ServingSite.trim().length() > 0)
+ sd.put("v6-serving-site", v6ServingSite.trim());
+
+ return sd;
+ }
+
+ private Map<String, Object> getEquipConstraints(SvcLogicContext ctx) throws SvcLogicException {
+ Map<String, Object> mm = new HashMap<String, Object>();
+
+ String vrfRequired = ctx.getAttribute("tmp.resource-allocator.vrf-required");
+ if (vrfRequired != null && vrfRequired.trim().length() > 0)
+ mm.put("vrf-required", vrfRequired.trim());
+
+ String clli = ctx.getAttribute("tmp.resource-allocator.clli");
+ if (clli == null || clli.trim().length() == 0)
+ clli = ctx.getAttribute("tmp.resource-allocator.aic-site-id");
+ mm.put("clli", clli.trim());
+
+ String vpeName = ctx.getAttribute("tmp.resource-allocator.vpe-name");
+ if (vpeName != null && vpeName.trim().length() > 0)
+ mm.put("vpe-name", vpeName.trim());
+
+ String excludeVpeList = ctx.getAttribute("tmp.resource-allocator.exclude-vpe-list");
+ if (excludeVpeList != null && excludeVpeList.trim().length() > 0)
+ mm.put("exclude-vpe-list", excludeVpeList.trim());
+
+ return mm;
+ }
+
+ private void setOutputContext(SvcLogicContext ctx, long maxAvailableSpeed, String unit) {
+ ctx.setAttribute("tmp.resource-allocator-output.max-available-speed", String.valueOf(maxAvailableSpeed));
+ ctx.setAttribute("tmp.resource-allocator-output.speed-unit", unit);
+ }
+
+ private int calculatePrimaryServerCount(int serverCount, String ratioString) throws SvcLogicException {
+ String[] ss = ratioString.split(":");
+ if (ss.length != 2)
+ throw new SvcLogicException("Invalid value for homing.pserver.sparing.ratio: " + ratioString);
+
+ int n = 1, m = 1;
+ try {
+ n = Integer.parseInt(ss[0]);
+ m = Integer.parseInt(ss[1]);
+ } catch (Exception e) {
+ throw new SvcLogicException("Invalid value for homing.pserver.sparing.ratio: " + ratioString);
+ }
+
+ return (serverCount - 1) * n / (n + m) + 1;
+ }
+
+ public void setServerDao(ServerDao serverDao) {
+ this.serverDao = serverDao;
+ }
+
+ public void setVpePortDao(VpePortDao vpePortDao) {
+ this.vpePortDao = vpePortDao;
+ }
+
+ public void setVplspePortDao(VplspePortDao vplspePortDao) {
+ this.vplspePortDao = vplspePortDao;
+ }
+
+ public void setMaxPortSpeedDao(MaxPortSpeedDao maxPortSpeedDao) {
+ this.maxPortSpeedDao = maxPortSpeedDao;
+ }
+
+ public void setMaxServerSpeedDao(MaxServerSpeedDao maxServerSpeedDao) {
+ this.maxServerSpeedDao = maxServerSpeedDao;
+ }
+
+ public void setAllocationRequestBuilder(AllocationRequestBuilder allocationRequestBuilder) {
+ this.allocationRequestBuilder = allocationRequestBuilder;
+ }
+
+ public void setResourceManager(ResourceManager resourceManager) {
+ this.resourceManager = resourceManager;
+ }
+
+ public void setSpeedUtil(SpeedUtil speedUtil) {
+ this.speedUtil = speedUtil;
+ }
+
+ public void setServiceResourceDao(ServiceResourceDao serviceResourceDao) {
+ this.serviceResourceDao = serviceResourceDao;
+ }
+
+ public void setEndPointAllocator(EndPointAllocator endPointAllocator) {
+ this.endPointAllocator = endPointAllocator;
+ }
+
+ public void setParameterDao(ParameterDao parameterDao) {
+ this.parameterDao = parameterDao;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/AffinityAllocationRule.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/AffinityAllocationRule.java
new file mode 100644
index 0000000..d259d15
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/AffinityAllocationRule.java
@@ -0,0 +1,68 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.alloc;
+
+import org.openecomp.sdnc.ra.comp.AllocationRule;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.rm.data.AllocationAction;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+import org.openecomp.sdnc.rm.data.LimitAllocationRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AffinityAllocationRule implements AllocationRule {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(AffinityAllocationRule.class);
+
+ @Override
+ public AllocationRequest buildAllocationRequest(
+ String resourceUnionId,
+ String resourceSetId,
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ boolean checkOnly,
+ boolean change) {
+ String affinityLink = (String) equipmentData.data.get("affinity-link");
+ if (affinityLink == null)
+ affinityLink = "1";
+
+ long serviceSpeed = (Long) serviceData.data.get("service-speed-kbps");
+
+ LimitAllocationRequest ar = new LimitAllocationRequest();
+ ar.resourceSetId = resourceSetId;
+ ar.resourceUnionId = resourceUnionId;
+ ar.resourceShareGroupList = null;
+ ar.resourceName = "Bandwidth";
+ ar.assetId = equipmentData.equipmentId + "-" + affinityLink;
+ ar.missingResourceAction = AllocationAction.Succeed_Allocate;
+ ar.expiredResourceAction = AllocationAction.Succeed_Allocate;
+ ar.replace = true;
+ ar.strict = false;
+ ar.checkLimit = Long.MAX_VALUE;
+ ar.checkCount = 0;
+ ar.allocateCount = serviceSpeed;
+ return ar;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/DbAllocationRule.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/DbAllocationRule.java
new file mode 100644
index 0000000..8021a4a
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/DbAllocationRule.java
@@ -0,0 +1,148 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.alloc;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.openecomp.sdnc.ra.comp.AllocationRule;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.ra.rule.dao.RangeRuleDao;
+import org.openecomp.sdnc.ra.rule.dao.ResourceRuleDao;
+import org.openecomp.sdnc.ra.rule.data.RangeRule;
+import org.openecomp.sdnc.ra.rule.data.ResourceRule;
+import org.openecomp.sdnc.rm.data.AllocationAction;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+import org.openecomp.sdnc.rm.data.LimitAllocationRequest;
+import org.openecomp.sdnc.rm.data.MultiResourceAllocationRequest;
+import org.openecomp.sdnc.rm.data.RangeAllocationRequest;
+import org.openecomp.sdnc.util.expr.ExpressionEvaluator;
+import org.openecomp.sdnc.util.str.StrUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DbAllocationRule implements AllocationRule {
+
+ private static final Logger log = LoggerFactory.getLogger(DbAllocationRule.class);
+
+ private ResourceRuleDao resourceRuleDao;
+ private RangeRuleDao rangeRuleDao;
+
+ @Override
+ public AllocationRequest buildAllocationRequest(
+ String resourceUnionId,
+ String resourceSetId,
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ boolean checkOnly,
+ boolean change) {
+ List<ResourceRule> resourceRuleList = resourceRuleDao.getResourceRules(serviceData.serviceModel,
+ endPointPosition, equipmentData.equipmentLevel);
+ List<RangeRule> rangeRuleList =
+ rangeRuleDao.getRangeRules(serviceData.serviceModel, endPointPosition, equipmentData.equipmentLevel);
+ if (resourceRuleList.isEmpty() && rangeRuleList.isEmpty())
+ return null;
+ if (resourceRuleList.size() == 1 && rangeRuleList.isEmpty())
+ return buildAllocationRequest(resourceRuleList.get(0), resourceUnionId, resourceSetId, serviceData,
+ equipmentData, checkOnly, change);
+
+ if (resourceRuleList.isEmpty() && rangeRuleList.size() == 1)
+ return buildAllocationRequest(rangeRuleList.get(0), resourceUnionId, resourceSetId, serviceData,
+ equipmentData, checkOnly, change);
+
+ MultiResourceAllocationRequest ar = new MultiResourceAllocationRequest();
+ ar.stopOnFirstFailure = false;
+ ar.allocationRequestList = new ArrayList<AllocationRequest>();
+ for (ResourceRule rr : resourceRuleList) {
+ AllocationRequest ar1 = buildAllocationRequest(rr, resourceUnionId, resourceSetId, serviceData,
+ equipmentData, checkOnly, change);
+ ar.allocationRequestList.add(ar1);
+ }
+ for (RangeRule rr : rangeRuleList) {
+ AllocationRequest ar1 = buildAllocationRequest(rr, resourceUnionId, resourceSetId, serviceData,
+ equipmentData, checkOnly, change);
+ ar.allocationRequestList.add(ar1);
+ }
+ return ar;
+ }
+
+ private AllocationRequest buildAllocationRequest(
+ ResourceRule resourceRule,
+ String resourceUnionId,
+ String resourceSetId,
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ boolean checkOnly,
+ boolean change) {
+ StrUtil.info(log, resourceRule);
+
+ LimitAllocationRequest ar = new LimitAllocationRequest();
+ ar.resourceSetId = resourceSetId;
+ ar.resourceUnionId = resourceUnionId;
+ ar.resourceName = resourceRule.resourceName;
+ ar.assetId = equipmentData.equipmentId;
+ ar.missingResourceAction = AllocationAction.Succeed_Allocate;
+ ar.expiredResourceAction = AllocationAction.Succeed_Allocate;
+ ar.replace = true;
+ ar.strict = false;
+ ar.checkLimit = ExpressionEvaluator.evalLong(
+ change ? resourceRule.hardLimitExpression : resourceRule.softLimitExpression, equipmentData.data);;
+ ar.checkCount = ExpressionEvaluator.evalLong(resourceRule.allocationExpression, serviceData.data);
+ ar.allocateCount = checkOnly ? 0 : ar.checkCount;
+ return ar;
+ }
+
+ private AllocationRequest buildAllocationRequest(
+ RangeRule rangeRule,
+ String resourceUnionId,
+ String resourceSetId,
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ boolean checkOnly,
+ boolean change) {
+ StrUtil.info(log, rangeRule);
+
+ RangeAllocationRequest ar = new RangeAllocationRequest();
+ ar.resourceSetId = resourceSetId;
+ ar.resourceUnionId = resourceUnionId;
+ ar.resourceName = rangeRule.rangeName;
+ ar.assetId = equipmentData.equipmentId;
+ ar.missingResourceAction = AllocationAction.Succeed_Allocate;
+ ar.expiredResourceAction = AllocationAction.Succeed_Allocate;
+ ar.replace = true;
+ ar.check = true;
+ ar.allocate = !checkOnly;
+ ar.checkMin = rangeRule.minValue;
+ ar.checkMax = rangeRule.maxValue;
+ return ar;
+ }
+
+ public void setResourceRuleDao(ResourceRuleDao resourceRuleDao) {
+ this.resourceRuleDao = resourceRuleDao;
+ }
+
+ public void setRangeRuleDao(RangeRuleDao rangeRuleDao) {
+ this.rangeRuleDao = rangeRuleDao;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/ServingSiteAllocationRule.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/ServingSiteAllocationRule.java
new file mode 100644
index 0000000..8a6e87a
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/ServingSiteAllocationRule.java
@@ -0,0 +1,80 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.alloc;
+
+import org.openecomp.sdnc.ra.comp.AllocationRule;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.rm.data.AllocationAction;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+import org.openecomp.sdnc.rm.data.LimitAllocationRequest;
+import org.openecomp.sdnc.util.vrf.VpnParam;
+import org.openecomp.sdnc.util.vrf.VrfUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ServingSiteAllocationRule implements AllocationRule {
+
+ private static final Logger log = LoggerFactory.getLogger(ServingSiteAllocationRule.class);
+
+ @Override
+ public AllocationRequest buildAllocationRequest(
+ String resourceUnionId,
+ String resourceSetId,
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ boolean checkOnly,
+ boolean change) {
+ String vrfName = (String) serviceData.data.get("vrf-name");
+ if (vrfName == null)
+ return null;
+
+ log.info("vrfName: " + vrfName);
+
+ String v4ServingSiteStr = (String) serviceData.data.get("v4-serving-site");
+ String v6ServingSiteStr = (String) serviceData.data.get("v6-serving-site");
+ boolean v4ServingSite = v4ServingSiteStr != null &&
+ (v4ServingSiteStr.equalsIgnoreCase("Y") || v4ServingSiteStr.equalsIgnoreCase("true"));
+ boolean v6ServingSite = v6ServingSiteStr != null &&
+ (v6ServingSiteStr.equalsIgnoreCase("Y") || v6ServingSiteStr.equalsIgnoreCase("true"));
+ if (!v4ServingSite && !v6ServingSite)
+ return null;
+
+ VpnParam vpnp = VrfUtil.parseVrfInstanceName(vrfName);
+
+ LimitAllocationRequest ar = new LimitAllocationRequest();
+ ar.resourceSetId = resourceSetId;
+ ar.resourceUnionId = resourceUnionId;
+ ar.resourceName = "ServingSite";
+ ar.assetId = equipmentData.equipmentId + "-" + vpnp.vpnId;
+ ar.missingResourceAction = AllocationAction.Succeed_Allocate;
+ ar.expiredResourceAction = AllocationAction.Succeed_Allocate;
+ ar.replace = true;
+ ar.strict = false;
+ ar.checkLimit = 1;
+ ar.checkCount = 1;
+ ar.allocateCount = 1;
+
+ return ar;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/VrfAllocationRule.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/VrfAllocationRule.java
new file mode 100644
index 0000000..d7113bb
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/alloc/VrfAllocationRule.java
@@ -0,0 +1,111 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.alloc;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.openecomp.sdnc.ra.comp.AllocationRule;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.rm.data.AllocationAction;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+import org.openecomp.sdnc.rm.data.LimitAllocationRequest;
+import org.openecomp.sdnc.rm.data.MultiResourceAllocationRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class VrfAllocationRule implements AllocationRule {
+
+ private static final Logger log = LoggerFactory.getLogger(VrfAllocationRule.class);
+
+ @Override
+ public AllocationRequest buildAllocationRequest(
+ String resourceUnionId,
+ String resourceSetId,
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ boolean checkOnly,
+ boolean change) {
+ String vrfName = (String) serviceData.data.get("vrf-name");
+ if (vrfName == null)
+ return null;
+
+ log.info("vrfName: " + vrfName);
+
+ Set<String> resourceShareGroupList = new HashSet<>();
+ resourceShareGroupList.add(vrfName);
+
+ LimitAllocationRequest ar = new LimitAllocationRequest();
+ ar.resourceSetId = resourceSetId;
+ ar.resourceUnionId = resourceUnionId;
+ ar.resourceShareGroupList = resourceShareGroupList;
+ ar.resourceName = "VRF";
+ ar.assetId = equipmentData.equipmentId;
+ ar.missingResourceAction = AllocationAction.Succeed_Allocate;
+ ar.expiredResourceAction = AllocationAction.Succeed_Allocate;
+ ar.replace = true;
+ ar.strict = false;
+ ar.checkLimit = 999999999;
+ ar.checkCount = 1;
+ ar.allocateCount = 1;
+
+ String v4MulticastStr = (String) serviceData.data.get("v4-multicast");
+ String v6MulticastStr = (String) serviceData.data.get("v6-multicast");
+ boolean v4Multicast = v4MulticastStr != null &&
+ (v4MulticastStr.equalsIgnoreCase("Y") || v4MulticastStr.equalsIgnoreCase("true"));
+ boolean v6Multicast = v6MulticastStr != null &&
+ (v6MulticastStr.equalsIgnoreCase("Y") || v6MulticastStr.equalsIgnoreCase("true"));
+ if (v4Multicast || v6Multicast) {
+ LimitAllocationRequest ar2 = new LimitAllocationRequest();
+ ar2.resourceSetId = resourceSetId;
+ ar2.resourceUnionId = resourceUnionId;
+ ar2.resourceShareGroupList = resourceShareGroupList;
+ ar2.resourceName = "MVRF";
+ ar2.assetId = equipmentData.equipmentId;
+ ar2.missingResourceAction = AllocationAction.Succeed_Allocate;
+ ar2.expiredResourceAction = AllocationAction.Succeed_Allocate;
+ ar2.replace = true;
+ ar2.strict = false;
+ ar2.checkLimit = 999999999;
+ ar2.checkCount = 1;
+ ar2.allocateCount = 1;
+
+ MultiResourceAllocationRequest mar = new MultiResourceAllocationRequest();
+ mar.resourceSetId = resourceSetId;
+ mar.resourceUnionId = resourceUnionId;
+ mar.resourceShareGroupList = resourceShareGroupList;
+ mar.assetId = equipmentData.equipmentId;
+ mar.missingResourceAction = AllocationAction.Succeed_Allocate;
+ mar.expiredResourceAction = AllocationAction.Succeed_Allocate;
+ mar.allocationRequestList = new ArrayList<>();
+ mar.allocationRequestList.add(ar);
+ mar.allocationRequestList.add(ar2);
+
+ return mar;
+ }
+
+ return ar;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/AnyVrfPresentCheck.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/AnyVrfPresentCheck.java
new file mode 100644
index 0000000..4796d93
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/AnyVrfPresentCheck.java
@@ -0,0 +1,74 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.check;
+
+import java.util.Map;
+
+import org.openecomp.sdnc.ra.comp.EquipmentCheck;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.rm.comp.ResourceManager;
+import org.openecomp.sdnc.rm.data.AllocationItem;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AnyVrfPresentCheck implements EquipmentCheck {
+
+ private static final Logger log = LoggerFactory.getLogger(AnyVrfPresentCheck.class);
+
+ private ResourceManager resourceManager;
+
+ @Override
+ public boolean checkEquipment(
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipData,
+ Map<String, Object> equipmentConstraints) {
+ String vrfNameListStr = (String) serviceData.data.get("vrf-name-list");
+ if (vrfNameListStr == null)
+ vrfNameListStr = (String) serviceData.data.get("vrf-name");
+ if (vrfNameListStr == null)
+ return true;
+
+ String vrfRequiredStr = (String) equipmentConstraints.get("vrf-required");
+ if (vrfRequiredStr == null || !vrfRequiredStr.equalsIgnoreCase("true"))
+ return true;
+
+ String[] vrfNameList = vrfNameListStr.split(",");
+
+ Resource r = resourceManager.getResource("VRF", equipData.equipmentId);
+ if (r != null && r.allocationItems != null)
+ for (AllocationItem ai : r.allocationItems)
+ for (String vrfName : vrfNameList)
+ if (ai.resourceShareGroupList.contains(vrfName))
+ return true;
+
+ log.info("Skipping VPE " + equipData.equipmentId +
+ ": Existing VRF is required, but there is no existing VRF on the VPE for any of the requested VPNs.");
+ return false;
+ }
+
+ public void setResourceManager(ResourceManager resourceManager) {
+ this.resourceManager = resourceManager;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/ExcludeVpeCheck.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/ExcludeVpeCheck.java
new file mode 100644
index 0000000..f24686b
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/ExcludeVpeCheck.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.check;
+
+import java.util.Map;
+
+import org.openecomp.sdnc.ra.comp.EquipmentCheck;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ExcludeVpeCheck implements EquipmentCheck {
+
+ private static final Logger log = LoggerFactory.getLogger(ExcludeVpeCheck.class);
+
+ @Override
+ public boolean checkEquipment(
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipData,
+ Map<String, Object> equipmentConstraints) {
+ String excludeVpeListStr = (String) equipmentConstraints.get("exclude-vpe-list");
+ if (excludeVpeListStr == null)
+ return true;
+
+ String vpeName = (String) equipData.data.get("vpe-id");
+
+ String[] excludeVpeList = excludeVpeListStr.split(",");
+ for (String excludeVpe : excludeVpeList)
+ if (excludeVpe.equals(vpeName)) {
+ log.info("Skipping VPE " + equipData.equipmentId + ": Present in the exclude VPE list.");
+ return false;
+ }
+
+ return true;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/HubWithRgCheck.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/HubWithRgCheck.java
new file mode 100644
index 0000000..8520d29
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/HubWithRgCheck.java
@@ -0,0 +1,100 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.check;
+
+import java.util.Map;
+
+import org.openecomp.sdnc.ra.comp.EquipmentCheck;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.rm.comp.ResourceManager;
+import org.openecomp.sdnc.rm.data.AllocationItem;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.openecomp.sdnc.util.vrf.VpnParam;
+import org.openecomp.sdnc.util.vrf.VrfUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class HubWithRgCheck implements EquipmentCheck {
+
+ private static final Logger log = LoggerFactory.getLogger(HubWithRgCheck.class);
+
+ private ResourceManager resourceManager;
+
+ @Override
+ public boolean checkEquipment(
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipData,
+ Map<String, Object> equipmentConstraints) {
+ String vrfName = (String) serviceData.data.get("vrf-name");
+ if (vrfName == null)
+ return true;
+
+ // Check if this is HUB. If not, this check is not applicable
+ VpnParam vpnp = VrfUtil.parseVrfInstanceName(vrfName);
+ if (vpnp.siteType == null || !vpnp.siteType.equals("HUB"))
+ return true;
+
+ boolean rgPresent = vpnp.routeGroupName != null;
+
+ // First check if a new VRF would be required. If not, we are good
+ Resource r = resourceManager.getResource("VRF", equipData.equipmentId);
+ if (r != null && r.allocationItems != null) {
+ for (AllocationItem ai : r.allocationItems)
+ if (ai.resourceShareGroupList.contains(vrfName))
+ return true;
+
+ // Check if there is already another HUB VRF with RG presence that does not match the requested
+ for (AllocationItem ai : r.allocationItems) {
+ if (ai.resourceShareGroupList != null && ai.resourceShareGroupList.size() > 0) {
+ String vrfName2 = ai.resourceShareGroupList.iterator().next();
+ VpnParam vpnp2 = VrfUtil.parseVrfInstanceName(vrfName2);
+
+ if (vpnp2.siteType == null || !vpnp2.siteType.equals("HUB"))
+ continue;
+
+ boolean rgPresent2 = vpnp2.routeGroupName != null;
+
+ if (rgPresent && !rgPresent2) {
+ log.info("Skipping VPE " + equipData.equipmentId +
+ ": This request requires new HUB with RG VRF, " +
+ "but there is already another HUB VRF with no RG: " + vrfName2 + ".");
+ return false;
+ }
+ if (!rgPresent && rgPresent2) {
+ log.info("Skipping VPE " + equipData.equipmentId +
+ ": This request requires new HUB VRF with no RG, " +
+ "but there is already another HUB with RG VRF: " + vrfName2 + ".");
+ return false;
+ }
+ }
+ }
+ }
+
+ return true;
+ }
+
+ public void setResourceManager(ResourceManager resourceManager) {
+ this.resourceManager = resourceManager;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java
new file mode 100644
index 0000000..2babeeb
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/OneMVrfCheck.java
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.check;
+
+import java.util.Map;
+
+import org.openecomp.sdnc.ra.comp.EquipmentCheck;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.rm.comp.ResourceManager;
+import org.openecomp.sdnc.rm.data.AllocationItem;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.openecomp.sdnc.util.vrf.VpnParam;
+import org.openecomp.sdnc.util.vrf.VrfUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class OneMVrfCheck implements EquipmentCheck {
+
+ private static final Logger log = LoggerFactory.getLogger(OneMVrfCheck.class);
+
+ private ResourceManager resourceManager;
+
+ @Override
+ public boolean checkEquipment(
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipData,
+ Map<String, Object> equipmentConstraints) {
+ String vrfName = (String) serviceData.data.get("vrf-name");
+ if (vrfName == null)
+ return true;
+
+ String v4MulticastStr = (String) serviceData.data.get("v4-multicast");
+ String v6MulticastStr = (String) serviceData.data.get("v6-multicast");
+ boolean v4Multicast = v4MulticastStr != null &&
+ (v4MulticastStr.equalsIgnoreCase("Y") || v4MulticastStr.equalsIgnoreCase("true"));
+ boolean v6Multicast = v6MulticastStr != null &&
+ (v6MulticastStr.equalsIgnoreCase("Y") || v6MulticastStr.equalsIgnoreCase("true"));
+ if (!v4Multicast && !v6Multicast)
+ return true;
+
+ // First check if a new VRF would be required. If not, we are good
+ Resource r = resourceManager.getResource("VRF", equipData.equipmentId);
+ if (r != null && r.allocationItems != null)
+ for (AllocationItem ai : r.allocationItems)
+ if (ai.resourceShareGroupList.contains(vrfName))
+ return true;
+
+ // Check if there is already another multicast VRF for the same VPN
+ VpnParam vpnp = VrfUtil.parseVrfInstanceName(vrfName);
+ r = resourceManager.getResource("MVRF", equipData.equipmentId);
+ if (r != null && r.allocationItems != null)
+ for (AllocationItem ai : r.allocationItems) {
+ if (ai.resourceShareGroupList != null && ai.resourceShareGroupList.size() > 0) {
+ String vrfName2 = ai.resourceShareGroupList.iterator().next();
+ VpnParam vpnp2 = VrfUtil.parseVrfInstanceName(vrfName2);
+ if (vpnp.vpnId.equals(vpnp2.vpnId)) {
+ log.info("Skipping VPE " + equipData.equipmentId +
+ ": This request requires new multicast VRF, " +
+ "but there is already another multicast VRF for the same VPN: " + vrfName2 + ".");
+ return false;
+ }
+ }
+ }
+
+ return true;
+ }
+
+ public void setResourceManager(ResourceManager resourceManager) {
+ this.resourceManager = resourceManager;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/ProvStatusCheck.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/ProvStatusCheck.java
new file mode 100644
index 0000000..006bcbe
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/ProvStatusCheck.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.check;
+
+import java.util.Map;
+
+import org.openecomp.sdnc.ra.comp.EquipmentCheck;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ProvStatusCheck implements EquipmentCheck {
+
+ private static final Logger log = LoggerFactory.getLogger(ProvStatusCheck.class);
+
+ @Override
+ public boolean checkEquipment(
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipData,
+ Map<String, Object> equipmentConstraints) {
+ String provStatus = (String) equipData.data.get("provisioning-status");
+ if (provStatus == null || !provStatus.equals("PROV")) {
+ log.info("Skipping VPE " + equipData.equipmentId + ": Not in PROV status.");
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/VpeLockCheck.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/VpeLockCheck.java
new file mode 100644
index 0000000..ff000fe
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/check/VpeLockCheck.java
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.check;
+
+import java.util.Map;
+
+import org.openecomp.sdnc.ra.comp.EquipmentCheck;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.ra.rule.dao.VpeLockDao;
+import org.openecomp.sdnc.rm.comp.ResourceManager;
+import org.openecomp.sdnc.rm.data.AllocationItem;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class VpeLockCheck implements EquipmentCheck {
+
+ private static final Logger log = LoggerFactory.getLogger(VpeLockCheck.class);
+
+ private VpeLockDao vpeLockDao;
+ private ResourceManager resourceManager;
+
+ @Override
+ public boolean checkEquipment(
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipData,
+ Map<String, Object> equipmentConstraints) {
+ String vrfName = (String) serviceData.data.get("vrf-name");
+ if (vrfName == null)
+ return true;
+
+ String vpeName = (String) equipData.data.get("vpe-id");
+ String vpeLock = vpeLockDao.getVpeLock(vpeName);
+ if (vpeLock == null)
+ return true;
+
+ if (vpeLock.equals("vpe-vrf-lock") && requiresNewVrf(equipData.equipmentId, vrfName)) {
+ log.info("Skipping VPE " + vpeName + ": There is a " + vpeLock +
+ " on it and it requires a new VRF for VPN: " + vrfName + ".");
+ return false;
+ }
+
+ if (vpeLock.equals("vpe-total-lock")) {
+ log.info("Skipping VPE " + vpeName + ": There is a " + vpeLock + " on it.");
+ return false;
+ }
+
+ return true;
+ }
+
+ boolean requiresNewVrf(String equipmentId, String vrfName) {
+ Resource r = resourceManager.getResource("VRF", equipmentId);
+ if (r == null || r.allocationItems == null)
+ return true;
+
+ for (AllocationItem ai : r.allocationItems) {
+ if (ai.resourceShareGroupList.contains(vrfName))
+ return false;
+ }
+
+ return true;
+ }
+
+ public void setVpeLockDao(VpeLockDao vpeLockDao) {
+ this.vpeLockDao = vpeLockDao;
+ }
+
+ public void setResourceManager(ResourceManager resourceManager) {
+ this.resourceManager = resourceManager;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/AllocationRule.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/AllocationRule.java
new file mode 100644
index 0000000..00d8af4
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/AllocationRule.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.comp;
+
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+
+public interface AllocationRule {
+
+ AllocationRequest buildAllocationRequest(
+ String resourceUnionId,
+ String resourceSetId,
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ boolean checkOnly,
+ boolean change);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocationDefinition.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocationDefinition.java
new file mode 100644
index 0000000..43eb79f
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocationDefinition.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.comp;
+
+import java.util.List;
+
+import org.openecomp.sdnc.ra.equip.comp.EquipmentReader;
+
+public class EndPointAllocationDefinition {
+
+ public String serviceModel;
+ public String endPointPosition;
+ public EquipmentReader equipmentReader;
+ public List<EquipmentCheck> equipmentCheckList;
+ public List<PreferenceRule> preferenceRuleList;
+ public List<AllocationRule> allocationRuleList;
+
+ public void setServiceModel(String serviceModel) {
+ this.serviceModel = serviceModel;
+ }
+
+ public void setEndPointPosition(String endPointPosition) {
+ this.endPointPosition = endPointPosition;
+ }
+
+ public void setEquipmentReader(EquipmentReader equipmentReader) {
+ this.equipmentReader = equipmentReader;
+ }
+
+ public void setEquipmentCheckList(List<EquipmentCheck> equipmentCheckList) {
+ this.equipmentCheckList = equipmentCheckList;
+ }
+
+ public void setPreferenceRuleList(List<PreferenceRule> preferenceRuleList) {
+ this.preferenceRuleList = preferenceRuleList;
+ }
+
+ public void setAllocationRuleList(List<AllocationRule> allocationRuleList) {
+ this.allocationRuleList = allocationRuleList;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocator.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocator.java
new file mode 100644
index 0000000..1212612
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocator.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.comp;
+
+import java.util.List;
+import java.util.Map;
+
+public interface EndPointAllocator {
+
+ List<EndPointData> allocateEndPoints(
+ ServiceData serviceData,
+ Map<String, Object> equipmentConstraints,
+ boolean checkOnly,
+ boolean change,
+ int changeNumber);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocatorImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocatorImpl.java
new file mode 100644
index 0000000..7b042ea
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointAllocatorImpl.java
@@ -0,0 +1,184 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.comp;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang.NotImplementedException;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.rm.comp.ResourceManager;
+import org.openecomp.sdnc.rm.data.AllocationOutcome;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+import org.openecomp.sdnc.rm.data.AllocationStatus;
+import org.openecomp.sdnc.rm.data.RangeResource;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class EndPointAllocatorImpl implements EndPointAllocator {
+
+ private static final Logger log = LoggerFactory.getLogger(EndPointAllocatorImpl.class);
+
+ private Map<String, List<EndPointAllocationDefinition>> endPointAllocationDefinitionMap;
+
+ private ResourceManager resourceManager;
+
+ @Override
+ public List<EndPointData> allocateEndPoints(
+ ServiceData serviceData,
+ Map<String, Object> equipmentConstraints,
+ boolean checkOnly,
+ boolean change,
+ int changeNumber) {
+ List<EndPointAllocationDefinition> defList = endPointAllocationDefinitionMap.get(serviceData.serviceModel);
+ if (defList == null)
+ throw new NotImplementedException("Service model: " + serviceData.serviceModel + " not supported");
+
+ List<EndPointData> epList = new ArrayList<>();
+ for (EndPointAllocationDefinition def : defList) {
+ log.info(
+ "Starting allocation of end point: " + def.endPointPosition + ": " + serviceData.serviceInstanceId);
+
+ List<EquipmentData> equipList = def.equipmentReader.readEquipment(equipmentConstraints);
+ if (equipList == null || equipList.isEmpty()) {
+ log.info("Equipment not found for " + def.endPointPosition);
+ break;
+ }
+
+ if (def.equipmentCheckList != null) {
+ for (EquipmentCheck filter : def.equipmentCheckList) {
+ List<EquipmentData> newEquipList = new ArrayList<>();
+ for (EquipmentData equipData : equipList)
+ if (filter.checkEquipment(def.endPointPosition, serviceData, equipData, equipmentConstraints))
+ newEquipList.add(equipData);
+ equipList = newEquipList;
+ }
+ if (equipList.isEmpty()) {
+ log.info("No equipment meets the requiremets for the service for: " + def.endPointPosition);
+ break;
+ }
+ }
+
+ if (equipList.size() > 1 && def.preferenceRuleList != null && !def.preferenceRuleList.isEmpty()) {
+
+ List<PrefEquipment> prefEquipList = new ArrayList<>();
+ for (EquipmentData equipData : equipList) {
+ PrefEquipment prefEquip = new PrefEquipment();
+ prefEquip.equipData = equipData;
+ prefEquip.prefNumbers = new long[def.preferenceRuleList.size()];
+ prefEquipList.add(prefEquip);
+
+ int i = 0;
+ for (PreferenceRule prefRule : def.preferenceRuleList)
+ prefEquip.prefNumbers[i++] =
+ prefRule.assignOrderNumber(def.endPointPosition, serviceData, equipData);
+ }
+
+ Collections.sort(prefEquipList);
+
+ equipList = new ArrayList<>();
+ for (PrefEquipment prefEquip : prefEquipList)
+ equipList.add(prefEquip.equipData);
+ }
+
+ String resourceUnionId = serviceData.serviceInstanceId + '/' + def.endPointPosition;
+ String resourceSetId = resourceUnionId + '/' + changeNumber;
+
+ for (EquipmentData equipData : equipList) {
+ boolean allgood = true;
+ if (def.allocationRuleList != null)
+ for (AllocationRule allocationRule : def.allocationRuleList) {
+ AllocationRequest ar = allocationRule.buildAllocationRequest(resourceUnionId, resourceSetId,
+ def.endPointPosition, serviceData, equipData, checkOnly, change);
+ if (ar != null) {
+ AllocationOutcome ao = resourceManager.allocateResources(ar);
+ if (ao.status != AllocationStatus.Success) {
+ allgood = false;
+ break;
+ }
+ }
+ }
+ if (allgood) {
+ EndPointData ep = readEndPoint(resourceUnionId, resourceSetId);
+ epList.add(ep);
+ break;
+ }
+ }
+ }
+
+ return epList;
+ }
+
+ private EndPointData readEndPoint(String resourceUnionId, String resourceSetId) {
+ EndPointData ep = new EndPointData();
+ ep.resourceUnionId = resourceUnionId;
+ ep.resourceSetId = resourceSetId;
+
+ int i1 = resourceUnionId.indexOf('/');
+ if (i1 > 0)
+ ep.endPointPosition = resourceUnionId.substring(i1 + 1);
+
+ ep.data = new HashMap<>();
+
+ List<Resource> rlist = resourceManager.getResourceUnion(resourceUnionId);
+ for (Resource r : rlist) {
+ if (r instanceof RangeResource) {
+ RangeResource rr = (RangeResource) r;
+ ep.data.put(rr.resourceKey.resourceName, rr.used.first());
+
+ ep.equipmentId = r.resourceKey.assetId;
+ }
+ }
+
+ return ep;
+ }
+
+ private static class PrefEquipment implements Comparable<PrefEquipment> {
+
+ public long[] prefNumbers;
+ public EquipmentData equipData;
+
+ @Override
+ public int compareTo(PrefEquipment o) {
+ for (int i = 0; i < prefNumbers.length; i++) {
+ if (prefNumbers[i] < o.prefNumbers[i])
+ return -1;
+ if (prefNumbers[i] > o.prefNumbers[i])
+ return 1;
+ }
+ return 0;
+ }
+ }
+
+ public void setEndPointAllocationDefinitionMap(
+ Map<String, List<EndPointAllocationDefinition>> endPointAllocationDefinitionMap) {
+ this.endPointAllocationDefinitionMap = endPointAllocationDefinitionMap;
+ }
+
+ public void setResourceManager(ResourceManager resourceManager) {
+ this.resourceManager = resourceManager;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointData.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointData.java
new file mode 100644
index 0000000..900075b
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EndPointData.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.comp;
+
+import java.util.Map;
+
+public class EndPointData {
+
+ public String resourceSetId;
+ public String resourceUnionId;
+ public String endPointPosition;
+ public String equipmentId;
+ public Map<String, Object> data;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EquipmentCheck.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EquipmentCheck.java
new file mode 100644
index 0000000..5bc2018
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/EquipmentCheck.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.comp;
+
+import java.util.Map;
+
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+
+public interface EquipmentCheck {
+
+ boolean checkEquipment(
+ String endPointPosition,
+ ServiceData serviceData,
+ EquipmentData equipData,
+ Map<String, Object> equipmentConstraints);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/PreferenceRule.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/PreferenceRule.java
new file mode 100644
index 0000000..490dbb1
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/PreferenceRule.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.comp;
+
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+
+public interface PreferenceRule {
+
+ // Smaller order number is preferred
+ int assignOrderNumber(String endPointPosition, ServiceData serviceData, EquipmentData equipData);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/ServiceData.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/ServiceData.java
new file mode 100644
index 0000000..46da423
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/comp/ServiceData.java
@@ -0,0 +1,34 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.comp;
+
+import java.util.Map;
+
+public class ServiceData {
+
+ public String serviceModel;
+ public String serviceInstanceId;
+ public String resourceSetId;
+ public String resourceUnionId;
+ public String endPointPosition;
+ public Map<String, Object> data;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/comp/EquipmentReader.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/comp/EquipmentReader.java
new file mode 100644
index 0000000..1361af0
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/comp/EquipmentReader.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.equip.comp;
+
+import java.util.List;
+import java.util.Map;
+
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+
+public interface EquipmentReader {
+
+ List<EquipmentData> readEquipment(Map<String, Object> equipmentConstraints);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/ServerDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/ServerDao.java
new file mode 100644
index 0000000..3a44f72
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/ServerDao.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.equip.dao;
+
+import java.util.List;
+import java.util.Map;
+
+public interface ServerDao {
+
+ List<Map<String, Object>> getServerData(String aicSiteId);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/ServerDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/ServerDaoImpl.java
new file mode 100644
index 0000000..191109a
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/ServerDaoImpl.java
@@ -0,0 +1,64 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.equip.dao;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+public class ServerDaoImpl implements ServerDao {
+
+ private static final Logger log = LoggerFactory.getLogger(ServerDaoImpl.class);
+
+ private static final String GET_SERVER_COUNT_SQL = "SELECT count(*) FROM PSERVER WHERE aic_site_id = ?";
+
+ private JdbcTemplate jdbcTemplate;
+
+ @Override
+ public List<Map<String, Object>> getServerData(String aicSiteId) {
+ List<Map<String, Object>> ll = new ArrayList<Map<String, Object>>();
+ Map<String, Object> sd = new HashMap<String, Object>();
+ sd.put("aic-site-id", aicSiteId);
+ sd.put("server-id", aicSiteId + "/Server1");
+ sd.put("server-model", "Unknown");
+ sd.put("server-count", getServerCount(aicSiteId));
+ ll.add(sd);
+ return ll;
+ }
+
+ private int getServerCount(String aicSiteId) {
+ int n = jdbcTemplate.queryForInt(GET_SERVER_COUNT_SQL, aicSiteId);
+
+ log.info("Number of servers in " + aicSiteId + ": " + n);
+
+ return n;
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VpePortDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VpePortDao.java
new file mode 100644
index 0000000..859c1ee
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VpePortDao.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.equip.dao;
+
+import java.util.List;
+import java.util.Map;
+
+public interface VpePortDao {
+
+ List<Map<String, Object>> getVpePortData(String aicSiteId);
+
+ List<Map<String, Object>> getVpePortData(String aicSiteId, String vpeName);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VpePortDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VpePortDaoImpl.java
new file mode 100644
index 0000000..6b19d44
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VpePortDaoImpl.java
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.equip.dao;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.RowMapper;
+
+public class VpePortDaoImpl implements VpePortDao {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(VpePortDaoImpl.class);
+
+ private static final String GET_SQL = "SELECT * FROM VPE_POOL WHERE aic_site_id = ?";
+ private static final String GET2_SQL = "SELECT * FROM VPE_POOL WHERE vpe_name = ?";
+ private static final String GET3_SQL =
+ "SELECT * FROM VPE_POOL WHERE substring(aic_site_id, 1, 8) = substring(?, 1, 8)";
+
+ private JdbcTemplate jdbcTemplate;
+
+ @Override
+ public List<Map<String, Object>> getVpePortData(String aicSiteId) {
+ return jdbcTemplate.query(GET_SQL, new Object[] { aicSiteId }, new VpePortRowMapper());
+ }
+
+ @Override
+ public List<Map<String, Object>> getVpePortData(String aicSiteId, String vpeName) {
+ String sql = vpeName != null ? GET2_SQL : GET3_SQL;
+ Object[] param = new Object[] { vpeName != null ? vpeName : aicSiteId };
+
+ return jdbcTemplate.query(sql, param, new VpePortRowMapper());
+ }
+
+ private static class VpePortRowMapper implements RowMapper<Map<String, Object>> {
+
+ @Override
+ public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
+ Map<String, Object> mm = new HashMap<String, Object>();
+ mm.put("vpe-id", rs.getString("vpe_name"));
+ mm.put("aic-site-id", rs.getString("aic_site_id"));
+ mm.put("availability-zone", rs.getString("availability_zone"));
+ mm.put("image-file-name", rs.getString("image_filename"));
+ mm.put("vendor", rs.getString("vendor"));
+ mm.put("provisioning-status", rs.getString("provisioning_status"));
+ mm.put("physical-interface-name", rs.getString("physical_intf_name"));
+ mm.put("physical-interface-speed", rs.getLong("physical_intf_speed"));
+ mm.put("physical-interface-speed-unit", rs.getString("physical_intf_units"));
+ return mm;
+ }
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VplspePortDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VplspePortDao.java
new file mode 100644
index 0000000..1847a6e
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VplspePortDao.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.equip.dao;
+
+import java.util.List;
+import java.util.Map;
+
+public interface VplspePortDao {
+
+ List<Map<String, Object>> getVplspePortData(String aicSiteId);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VplspePortDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VplspePortDaoImpl.java
new file mode 100644
index 0000000..35c2138
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/dao/VplspePortDaoImpl.java
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.equip.dao;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.RowMapper;
+
+public class VplspePortDaoImpl implements VplspePortDao {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(VplspePortDaoImpl.class);
+
+ private static final String GET_SQL = "SELECT * FROM VPLSPE_POOL WHERE aic_site_id = ?";
+
+ private JdbcTemplate jdbcTemplate;
+
+ @Override
+ public List<Map<String, Object>> getVplspePortData(String aicSiteId) {
+ List<Map<String, Object>> ll =
+ jdbcTemplate.query(GET_SQL, new Object[] { aicSiteId }, new RowMapper<Map<String, Object>>() {
+
+ @Override
+ public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
+ Map<String, Object> mm = new HashMap<String, Object>();
+ mm.put("vplspe-id", rs.getString("vplspe_name"));
+ mm.put("aic-site-id", rs.getString("aic_site_id"));
+ mm.put("availability-zone", rs.getString("availability_zone"));
+ mm.put("image-file-name", rs.getString("image_filename"));
+ mm.put("vendor", rs.getString("vendor"));
+ mm.put("provisioning-status", rs.getString("provisioning_status"));
+ mm.put("physical-interface-name", rs.getString("physical_intf_name"));
+ mm.put("physical-interface-speed", rs.getLong("physical_intf_speed"));
+ mm.put("physical-interface-speed-unit", rs.getString("physical_intf_units"));
+ return mm;
+ }
+ });
+ return ll;
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/data/EquipmentData.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/data/EquipmentData.java
new file mode 100644
index 0000000..76f961d
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/data/EquipmentData.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.equip.data;
+
+import java.util.Map;
+
+public class EquipmentData {
+
+ public String equipmentId;
+ public EquipmentLevel equipmentLevel;
+ public Map<String, Object> data;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/data/EquipmentLevel.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/data/EquipmentLevel.java
new file mode 100644
index 0000000..61ff865
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/equip/data/EquipmentLevel.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.equip.data;
+
+public enum EquipmentLevel {
+ Port, Device, Server, Site
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/pref/AffinityLinkPref.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/pref/AffinityLinkPref.java
new file mode 100644
index 0000000..89c8ffa
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/pref/AffinityLinkPref.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.pref;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.openecomp.sdnc.ra.comp.PreferenceRule;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.rm.comp.ResourceManager;
+import org.openecomp.sdnc.rm.data.LimitResource;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AffinityLinkPref implements PreferenceRule {
+
+ private static final Logger log = LoggerFactory.getLogger(AffinityLinkPref.class);
+
+ private ResourceManager resourceManager;
+ private List<String> affinityLinkIdList;
+
+ public AffinityLinkPref() {
+ // Set default values for affinity link ids (can be overridden by the spring config)
+ affinityLinkIdList = new ArrayList<>();
+ affinityLinkIdList.add("1");
+ affinityLinkIdList.add("2");
+ }
+
+ @Override
+ public int assignOrderNumber(String endPointPosition, ServiceData serviceData, EquipmentData equipData) {
+
+ // This class does not really assign order number, but instead sets the affinity link with the lowest
+ // assigned bandwidth in the equipment data
+
+ String preferedAffinityLinkId = "1";
+ long lowestAssignedBw = Long.MAX_VALUE;
+ for (String affinityLinkId : affinityLinkIdList) {
+ String assetId = equipData.equipmentId + "-" + affinityLinkId;
+ Resource r = resourceManager.getResource("Bandwidth", assetId);
+ if (r != null) {
+ LimitResource ll = (LimitResource) r;
+ if (ll.used < lowestAssignedBw) {
+ lowestAssignedBw = ll.used;
+ preferedAffinityLinkId = affinityLinkId;
+ }
+ log.info("Assigned bandwidth on affinity link: " + assetId + ": " + ll.used);
+ }
+ }
+
+ equipData.data.put("affinity-link", preferedAffinityLinkId);
+
+ log.info("Prefered affinity link for " + equipData.equipmentId + ": " + preferedAffinityLinkId);
+
+ return 0;
+ }
+
+ public void setResourceManager(ResourceManager resourceManager) {
+ this.resourceManager = resourceManager;
+ }
+
+ public void setAffinityLinkIdList(List<String> affinityLinkIdList) {
+ this.affinityLinkIdList = affinityLinkIdList;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/pref/EvcExistingVrfPref.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/pref/EvcExistingVrfPref.java
new file mode 100644
index 0000000..09f7558
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/pref/EvcExistingVrfPref.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.pref;
+
+import org.openecomp.sdnc.ra.comp.PreferenceRule;
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.rm.comp.ResourceManager;
+import org.openecomp.sdnc.rm.data.AllocationItem;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class EvcExistingVrfPref implements PreferenceRule {
+
+ private static final Logger log = LoggerFactory.getLogger(EvcExistingVrfPref.class);
+
+ private ResourceManager resourceManager;
+
+ @Override
+ public int assignOrderNumber(String endPointPosition, ServiceData serviceData, EquipmentData equipData) {
+ String vrfName = (String) serviceData.data.get("vrf-name");
+ if (vrfName == null)
+ return 0;
+
+ Resource r = resourceManager.getResource("VRF", equipData.equipmentId);
+ if (r != null && r.allocationItems != null)
+ for (AllocationItem ai : r.allocationItems)
+ if (ai.resourceShareGroupList.contains(vrfName)) {
+ log.info("VRF for VPN: " + vrfName + " found on VPE: " + equipData.equipmentId);
+ return 1;
+ }
+
+ log.info("VRF for VPN: " + vrfName + " NOT found on VPE: " + equipData.equipmentId);
+ return 2;
+ }
+
+ public void setResourceManager(ResourceManager resourceManager) {
+ this.resourceManager = resourceManager;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/reader/VpePortReader.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/reader/VpePortReader.java
new file mode 100644
index 0000000..aaae12e
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/reader/VpePortReader.java
@@ -0,0 +1,60 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.reader;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.openecomp.sdnc.ra.equip.comp.EquipmentReader;
+import org.openecomp.sdnc.ra.equip.dao.VpePortDao;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentLevel;
+
+public class VpePortReader implements EquipmentReader {
+
+ private VpePortDao vpePortDao;
+
+ @Override
+ public List<EquipmentData> readEquipment(Map<String, Object> equipmentConstraints) {
+ String clli = (String) equipmentConstraints.get("clli");
+ String vpeName = (String) equipmentConstraints.get("vpe-name");
+ List<Map<String, Object>> vpeDataList = vpePortDao.getVpePortData(clli, vpeName);
+
+ List<EquipmentData> equipList = new ArrayList<>();
+ for (Map<String, Object> vpeData : vpeDataList) {
+ EquipmentData equipData = new EquipmentData();
+ equipData.equipmentLevel = EquipmentLevel.Port;
+ equipData.equipmentId =
+ (String) vpeData.get("vpe-id") + '/' + (String) vpeData.get("physical-interface-name");
+ equipData.data = vpeData;
+
+ equipList.add(equipData);
+ }
+
+ return equipList;
+ }
+
+ public void setVpePortDao(VpePortDao vpePortDao) {
+ this.vpePortDao = vpePortDao;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/comp/AllocationRequestBuilder.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/comp/AllocationRequestBuilder.java
new file mode 100644
index 0000000..0cfcab1
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/comp/AllocationRequestBuilder.java
@@ -0,0 +1,42 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.comp;
+
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.ra.rule.data.ThresholdStatus;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+import org.openecomp.sdnc.rm.data.LimitAllocationOutcome;
+
+public interface AllocationRequestBuilder {
+
+ AllocationRequest buildAllocationRequest(
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ boolean checkOnly,
+ boolean change);
+
+ ThresholdStatus getThresholdStatus(
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ LimitAllocationOutcome limitAllocationOutcome);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/comp/AllocationRequestBuilderImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/comp/AllocationRequestBuilderImpl.java
new file mode 100644
index 0000000..50aac75
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/comp/AllocationRequestBuilderImpl.java
@@ -0,0 +1,172 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.comp;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.openecomp.sdnc.ra.comp.ServiceData;
+import org.openecomp.sdnc.ra.equip.data.EquipmentData;
+import org.openecomp.sdnc.ra.rule.dao.RangeRuleDao;
+import org.openecomp.sdnc.ra.rule.dao.ResourceRuleDao;
+import org.openecomp.sdnc.ra.rule.data.RangeRule;
+import org.openecomp.sdnc.ra.rule.data.ResourceRule;
+import org.openecomp.sdnc.ra.rule.data.ResourceThreshold;
+import org.openecomp.sdnc.ra.rule.data.ThresholdStatus;
+import org.openecomp.sdnc.rm.data.AllocationAction;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+import org.openecomp.sdnc.rm.data.LimitAllocationOutcome;
+import org.openecomp.sdnc.rm.data.LimitAllocationRequest;
+import org.openecomp.sdnc.rm.data.MultiResourceAllocationRequest;
+import org.openecomp.sdnc.rm.data.RangeAllocationRequest;
+import org.openecomp.sdnc.util.expr.ExpressionEvaluator;
+import org.openecomp.sdnc.util.str.StrUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class AllocationRequestBuilderImpl implements AllocationRequestBuilder {
+
+ private static final Logger log = LoggerFactory.getLogger(AllocationRequestBuilderImpl.class);
+
+ private ResourceRuleDao resourceRuleDao;
+ private RangeRuleDao rangeRuleDao;
+
+ @Override
+ public AllocationRequest buildAllocationRequest(
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ boolean checkOnly,
+ boolean change) {
+ List<ResourceRule> resourceRuleList = resourceRuleDao.getResourceRules(serviceData.serviceModel,
+ serviceData.endPointPosition, equipmentData.equipmentLevel);
+ List<RangeRule> rangeRuleList = rangeRuleDao.getRangeRules(serviceData.serviceModel,
+ serviceData.endPointPosition, equipmentData.equipmentLevel);
+ if (resourceRuleList.isEmpty() && rangeRuleList.isEmpty())
+ return null;
+ if (resourceRuleList.size() == 1 && rangeRuleList.isEmpty())
+ return buildAllocationRequest(resourceRuleList.get(0), serviceData, equipmentData, checkOnly, change);
+
+ if (resourceRuleList.isEmpty() && rangeRuleList.size() == 1)
+ return buildAllocationRequest(rangeRuleList.get(0), serviceData, equipmentData, checkOnly, change);
+
+ MultiResourceAllocationRequest ar = new MultiResourceAllocationRequest();
+ ar.stopOnFirstFailure = false;
+ ar.allocationRequestList = new ArrayList<AllocationRequest>();
+ for (ResourceRule rr : resourceRuleList) {
+ AllocationRequest ar1 = buildAllocationRequest(rr, serviceData, equipmentData, checkOnly, change);
+ ar.allocationRequestList.add(ar1);
+ }
+ for (RangeRule rr : rangeRuleList) {
+ AllocationRequest ar1 = buildAllocationRequest(rr, serviceData, equipmentData, checkOnly, change);
+ ar.allocationRequestList.add(ar1);
+ }
+ return ar;
+ }
+
+ private AllocationRequest buildAllocationRequest(
+ ResourceRule resourceRule,
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ boolean checkOnly,
+ boolean change) {
+ StrUtil.info(log, resourceRule);
+
+ LimitAllocationRequest ar = new LimitAllocationRequest();
+ ar.resourceSetId = serviceData.resourceSetId;
+ ar.resourceUnionId = serviceData.resourceUnionId;
+ ar.resourceName = resourceRule.resourceName;
+ ar.assetId = equipmentData.equipmentId;
+ ar.missingResourceAction = AllocationAction.Succeed_Allocate;
+ ar.expiredResourceAction = AllocationAction.Succeed_Allocate;
+ ar.replace = true;
+ ar.strict = false;
+ ar.checkLimit = ExpressionEvaluator.evalLong(
+ change ? resourceRule.hardLimitExpression : resourceRule.softLimitExpression, equipmentData.data);
+ ar.checkCount = ExpressionEvaluator.evalLong(resourceRule.allocationExpression, serviceData.data);
+ ar.allocateCount = checkOnly ? 0 : ar.checkCount;
+ return ar;
+ }
+
+ private AllocationRequest buildAllocationRequest(
+ RangeRule rangeRule,
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ boolean checkOnly,
+ boolean change) {
+ StrUtil.info(log, rangeRule);
+
+ RangeAllocationRequest ar = new RangeAllocationRequest();
+ ar.resourceSetId = serviceData.resourceSetId;
+ ar.resourceUnionId = serviceData.resourceUnionId;
+ ar.resourceName = rangeRule.rangeName;
+ ar.assetId = equipmentData.equipmentId;
+ ar.missingResourceAction = AllocationAction.Succeed_Allocate;
+ ar.expiredResourceAction = AllocationAction.Succeed_Allocate;
+ ar.replace = true;
+ ar.check = true;
+ ar.allocate = !checkOnly;
+ ar.checkMin = rangeRule.minValue;
+ ar.checkMax = rangeRule.maxValue;
+ return ar;
+ }
+
+ @Override
+ public ThresholdStatus getThresholdStatus(
+ ServiceData serviceData,
+ EquipmentData equipmentData,
+ LimitAllocationOutcome limitAllocationOutcome) {
+ ResourceRule rr = resourceRuleDao.getResourceRule(serviceData.serviceModel, serviceData.endPointPosition,
+ equipmentData.equipmentLevel, limitAllocationOutcome.request.resourceName);
+ if (rr == null || rr.thresholdList == null || rr.thresholdList.isEmpty())
+ return null;
+
+ ThresholdStatus thresholdStatus = null;
+ long maxThresholdValue = 0;
+ for (ResourceThreshold th : rr.thresholdList) {
+ long thresholdValue = ExpressionEvaluator.evalLong(th.expression, equipmentData.data);
+
+ if (thresholdValue > maxThresholdValue) {
+ maxThresholdValue = thresholdValue;
+
+ if (limitAllocationOutcome.used >= thresholdValue) {
+ thresholdStatus = new ThresholdStatus();
+ thresholdStatus.resourceRule = rr;
+ thresholdStatus.resourceThreshold = th;
+ thresholdStatus.limitValue = limitAllocationOutcome.limit;
+ thresholdStatus.thresholdValue = thresholdValue;
+ thresholdStatus.used = limitAllocationOutcome.used;
+ thresholdStatus.lastAdded = limitAllocationOutcome.allocatedCount;
+ }
+ }
+ }
+
+ return thresholdStatus;
+ }
+
+ public void setResourceRuleDao(ResourceRuleDao resourceRuleDao) {
+ this.resourceRuleDao = resourceRuleDao;
+ }
+
+ public void setRangeRuleDao(RangeRuleDao rangeRuleDao) {
+ this.rangeRuleDao = rangeRuleDao;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDao.java
new file mode 100644
index 0000000..1f027af
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDao.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+public interface MaxPortSpeedDao {
+
+ // Returns max speed in kbps
+ long getMaxPortSpeed(String imageFile, String endPointPosition, String interfaceName);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDaoImpl.java
new file mode 100644
index 0000000..4195892
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxPortSpeedDaoImpl.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.List;
+
+import org.openecomp.sdnc.util.speed.SpeedUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.RowMapper;
+
+public class MaxPortSpeedDaoImpl implements MaxPortSpeedDao {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(MaxPortSpeedDaoImpl.class);
+
+ private final static String GET_SQL =
+ "SELECT * FROM MAX_PORT_SPEED WHERE image_file_name = ? AND end_point_position = ? AND interface_name = ?";
+
+ private JdbcTemplate jdbcTemplate;
+ private long defaultMaxPortSpeed = 5000000;
+ private SpeedUtil speedUtil;
+
+ @Override
+ public long getMaxPortSpeed(String imageFile, String endPointPosition, String interfaceName) {
+ List<MaxPortSpeed> maxPortSpeedList =
+ jdbcTemplate.query(GET_SQL, new Object[] { imageFile, endPointPosition, interfaceName },
+ new RowMapper<MaxPortSpeed>() {
+
+ @Override
+ public MaxPortSpeed mapRow(ResultSet rs, int rowNum) throws SQLException {
+ MaxPortSpeed mps = new MaxPortSpeed();
+ mps.maxSpeed = rs.getLong("max_speed");
+ mps.unit = rs.getString("unit");
+ return mps;
+ }
+ });
+
+ if (maxPortSpeedList.isEmpty())
+ return defaultMaxPortSpeed;
+
+ MaxPortSpeed mps = maxPortSpeedList.get(0);
+ return speedUtil.convertToKbps(mps.maxSpeed, mps.unit);
+ }
+
+ private static class MaxPortSpeed {
+
+ public long maxSpeed;
+ public String unit;
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+
+ public void setDefaultMaxPortSpeed(long defaultMaxPortSpeed) {
+ this.defaultMaxPortSpeed = defaultMaxPortSpeed;
+ }
+
+ public void setSpeedUtil(SpeedUtil speedUtil) {
+ this.speedUtil = speedUtil;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxServerSpeedDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxServerSpeedDao.java
new file mode 100644
index 0000000..d0473aa
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxServerSpeedDao.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+public interface MaxServerSpeedDao {
+
+ // Returns max speed in kbps
+ long getMaxServerSpeed(String serverModel, int evcCount);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxServerSpeedDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxServerSpeedDaoImpl.java
new file mode 100644
index 0000000..25898bd
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/MaxServerSpeedDaoImpl.java
@@ -0,0 +1,86 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.List;
+
+import org.openecomp.sdnc.util.speed.SpeedUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.RowMapper;
+
+public class MaxServerSpeedDaoImpl implements MaxServerSpeedDao {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(MaxServerSpeedDaoImpl.class);
+
+ private final static String GET_SQL =
+ "SELECT * FROM MAX_SERVER_SPEED\n" +
+ "WHERE (server_model = ? OR server_model = 'ALL') AND evc_count >= ?\n" +
+ "ORDER BY evc_count";
+
+ private JdbcTemplate jdbcTemplate;
+ private long defaultMaxServerSpeed = 1600000;
+ private SpeedUtil speedUtil;
+
+ @Override
+ public long getMaxServerSpeed(String serverModel, int evcCount) {
+ List<MaxServerSpeed> maxServerSpeedList =
+ jdbcTemplate.query(GET_SQL, new Object[] { serverModel, evcCount }, new RowMapper<MaxServerSpeed>() {
+
+ @Override
+ public MaxServerSpeed mapRow(ResultSet rs, int rowNum) throws SQLException {
+ MaxServerSpeed mps = new MaxServerSpeed();
+ mps.maxSpeed = rs.getLong("max_speed");
+ mps.unit = rs.getString("unit");
+ return mps;
+ }
+ });
+
+ if (maxServerSpeedList.isEmpty())
+ return defaultMaxServerSpeed;
+
+ MaxServerSpeed mps = maxServerSpeedList.get(0);
+ return speedUtil.convertToKbps(mps.maxSpeed, mps.unit);
+ }
+
+ private static class MaxServerSpeed {
+
+ public long maxSpeed;
+ public String unit;
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+
+ public void setDefaultMaxServerSpeed(long defaultMaxServerSpeed) {
+ this.defaultMaxServerSpeed = defaultMaxServerSpeed;
+ }
+
+ public void setSpeedUtil(SpeedUtil speedUtil) {
+ this.speedUtil = speedUtil;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ParameterDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ParameterDao.java
new file mode 100644
index 0000000..4af9aab
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ParameterDao.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+public interface ParameterDao {
+
+ String getParameter(String name);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ParameterDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ParameterDaoImpl.java
new file mode 100644
index 0000000..6fa10ea
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ParameterDaoImpl.java
@@ -0,0 +1,57 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+import java.util.List;
+import java.util.Map;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+public class ParameterDaoImpl implements ParameterDao {
+
+ private static final Logger log = LoggerFactory.getLogger(ParameterDaoImpl.class);
+
+ private final static String GET_SQL = "SELECT * FROM PARAMETERS WHERE name = ?";
+
+ private JdbcTemplate jdbcTemplate;
+
+ @Override
+ public String getParameter(String name) {
+ List<Map<String, Object>> ll = jdbcTemplate.queryForList(GET_SQL, name);
+
+ if (ll == null || ll.isEmpty()) {
+ log.info("Parameter: " + name + " not found in DB");
+ return null;
+ }
+
+ String v = (String) ll.get(0).get("value");
+ log.info("Parameter from DB: " + name + "='" + v + "'");
+
+ return v;
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/RangeRuleDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/RangeRuleDao.java
new file mode 100644
index 0000000..66dd0a7
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/RangeRuleDao.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+import java.util.List;
+
+import org.openecomp.sdnc.ra.equip.data.EquipmentLevel;
+import org.openecomp.sdnc.ra.rule.data.RangeRule;
+
+public interface RangeRuleDao {
+
+ List<RangeRule> getRangeRules(String serviceModel, String endPointPosition, EquipmentLevel equipLevel);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/RangeRuleDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/RangeRuleDaoImpl.java
new file mode 100644
index 0000000..5e01bd1
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/RangeRuleDaoImpl.java
@@ -0,0 +1,70 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.List;
+
+import org.openecomp.sdnc.ra.equip.data.EquipmentLevel;
+import org.openecomp.sdnc.ra.rule.data.RangeRule;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.RowMapper;
+
+public class RangeRuleDaoImpl implements RangeRuleDao {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(RangeRuleDaoImpl.class);
+
+ private static final String GET_SQL =
+ "SELECT * FROM RANGE_RULE WHERE service_model = ? AND end_point_position = ? AND equipment_level = ?";
+
+ private JdbcTemplate jdbcTemplate;
+
+ @Override
+ public List<RangeRule> getRangeRules(String serviceModel, String endPointPosition, EquipmentLevel equipLevel) {
+ List<RangeRule> rangeRuleList =
+ jdbcTemplate.query(GET_SQL, new Object[] { serviceModel, endPointPosition, equipLevel.toString() },
+ new RowMapper<RangeRule>() {
+
+ @Override
+ public RangeRule mapRow(ResultSet rs, int rowNum) throws SQLException {
+ RangeRule rl = new RangeRule();
+ rl.id = rs.getLong("range_rule_id");
+ rl.rangeName = rs.getString("range_name");
+ rl.serviceModel = rs.getString("service_model");
+ rl.endPointPosition = rs.getString("end_point_position");
+ rl.equipmentLevel = rs.getString("equipment_level");
+ rl.minValue = rs.getInt("min_value");
+ rl.maxValue = rs.getInt("max_value");
+ return rl;
+ }
+ });
+ return rangeRuleList;
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ResourceRuleDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ResourceRuleDao.java
new file mode 100644
index 0000000..b869cf8
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ResourceRuleDao.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+import java.util.List;
+
+import org.openecomp.sdnc.ra.equip.data.EquipmentLevel;
+import org.openecomp.sdnc.ra.rule.data.ResourceRule;
+
+public interface ResourceRuleDao {
+
+ List<ResourceRule> getResourceRules(String serviceModel, String endPointPosition, EquipmentLevel equipLevel);
+
+ ResourceRule getResourceRule(
+ String serviceModel,
+ String endPointPosition,
+ EquipmentLevel equipLevel,
+ String resourceName);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ResourceRuleDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ResourceRuleDaoImpl.java
new file mode 100644
index 0000000..337d251
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/ResourceRuleDaoImpl.java
@@ -0,0 +1,117 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.List;
+
+import org.openecomp.sdnc.ra.equip.data.EquipmentLevel;
+import org.openecomp.sdnc.ra.rule.data.ResourceRule;
+import org.openecomp.sdnc.ra.rule.data.ResourceThreshold;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.RowMapper;
+
+public class ResourceRuleDaoImpl implements ResourceRuleDao {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(ResourceRuleDaoImpl.class);
+
+ private static final String GET1_SQL =
+ "SELECT * FROM RESOURCE_RULE WHERE service_model = ? AND end_point_position = ? AND equipment_level = ?";
+ private static final String GET2_SQL =
+ "SELECT * FROM RESOURCE_RULE WHERE service_model = ? AND end_point_position = ? AND equipment_level = ? AND resource_name = ?";
+ private static final String THRESHOLD_SQL = "SELECT * FROM RESOURCE_THRESHOLD WHERE resource_rule_id = ?";
+
+ private JdbcTemplate jdbcTemplate;
+ ResourceRuleRowMapper resourceRuleRowMapper = new ResourceRuleRowMapper();
+ ResourceThresholdRowMapper resourceThresholdRowMapper = new ResourceThresholdRowMapper();
+
+ @Override
+ public List<ResourceRule> getResourceRules(
+ String serviceModel,
+ String endPointPosition,
+ EquipmentLevel equipLevel) {
+ List<ResourceRule> resourceRuleList = jdbcTemplate.query(GET1_SQL,
+ new Object[] { serviceModel, endPointPosition, equipLevel.toString() }, resourceRuleRowMapper);
+
+ for (ResourceRule rr : resourceRuleList)
+ rr.thresholdList = jdbcTemplate.query(THRESHOLD_SQL, new Object[] { rr.id }, resourceThresholdRowMapper);
+
+ return resourceRuleList;
+ }
+
+ @Override
+ public ResourceRule getResourceRule(
+ String serviceModel,
+ String endPointPosition,
+ EquipmentLevel equipLevel,
+ String resourceName) {
+ List<ResourceRule> resourceRuleList = jdbcTemplate.query(GET2_SQL,
+ new Object[] { serviceModel, endPointPosition, equipLevel.toString(), resourceName },
+ resourceRuleRowMapper);
+
+ if (resourceRuleList == null || resourceRuleList.isEmpty())
+ return null;
+
+ ResourceRule rr = resourceRuleList.get(0);
+ rr.thresholdList = jdbcTemplate.query(THRESHOLD_SQL, new Object[] { rr.id }, resourceThresholdRowMapper);
+
+ return rr;
+ }
+
+ private static class ResourceRuleRowMapper implements RowMapper<ResourceRule> {
+
+ @Override
+ public ResourceRule mapRow(ResultSet rs, int rowNum) throws SQLException {
+ ResourceRule rl = new ResourceRule();
+ rl.id = rs.getLong("resource_rule_id");
+ rl.resourceName = rs.getString("resource_name");
+ rl.serviceModel = rs.getString("service_model");
+ rl.endPointPosition = rs.getString("end_point_position");
+ rl.serviceExpression = rs.getString("service_expression");
+ rl.equipmentLevel = rs.getString("equipment_level");
+ rl.equipmentExpression = rs.getString("equipment_expression");
+ rl.allocationExpression = rs.getString("allocation_expression");
+ rl.softLimitExpression = rs.getString("soft_limit_expression");
+ rl.hardLimitExpression = rs.getString("hard_limit_expression");
+ return rl;
+ }
+ }
+
+ private static class ResourceThresholdRowMapper implements RowMapper<ResourceThreshold> {
+
+ @Override
+ public ResourceThreshold mapRow(ResultSet rs, int rowNum) throws SQLException {
+ ResourceThreshold th = new ResourceThreshold();
+ th.expression = rs.getString("threshold_expression");
+ th.message = rs.getString("threshold_message");
+ return th;
+ }
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/VpeLockDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/VpeLockDao.java
new file mode 100644
index 0000000..161f5a2
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/VpeLockDao.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+public interface VpeLockDao {
+
+ String getVpeLock(String vpeName);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/VpeLockDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/VpeLockDaoImpl.java
new file mode 100644
index 0000000..e86c64c
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/dao/VpeLockDaoImpl.java
@@ -0,0 +1,48 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.dao;
+
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+
+public class VpeLockDaoImpl implements VpeLockDao {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(VpeLockDaoImpl.class);
+
+ private final static String GET_SQL = "SELECT vpn_lock FROM VPE_LOCK WHERE vpe_name = ?";
+
+ private JdbcTemplate jdbcTemplate;
+
+ @Override
+ public String getVpeLock(String vpeName) {
+ List<String> ll = jdbcTemplate.queryForList(GET_SQL, String.class, vpeName);
+ return ll != null && !ll.isEmpty() ? ll.get(0) : null;
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/RangeRule.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/RangeRule.java
new file mode 100644
index 0000000..23e9c82
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/RangeRule.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.data;
+
+public class RangeRule {
+
+ public long id;
+ public String rangeName;
+ public String serviceModel;
+ public String endPointPosition;
+ public String equipmentLevel;
+ public int minValue;
+ public int maxValue;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ResourceRule.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ResourceRule.java
new file mode 100644
index 0000000..b1efc4f
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ResourceRule.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.data;
+
+import java.util.List;
+
+public class ResourceRule {
+
+ public long id;
+ public String resourceName;
+ public String serviceModel;
+ public String endPointPosition;
+ public String serviceExpression;
+ public String equipmentLevel;
+ public String equipmentExpression;
+ public String allocationExpression;
+ public String softLimitExpression;
+ public String hardLimitExpression;
+ public List<ResourceThreshold> thresholdList;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ResourceThreshold.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ResourceThreshold.java
new file mode 100644
index 0000000..499cd9e
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ResourceThreshold.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.data;
+
+public class ResourceThreshold {
+
+ public String expression;
+ public String message;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ThresholdStatus.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ThresholdStatus.java
new file mode 100644
index 0000000..850efc0
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/rule/data/ThresholdStatus.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.rule.data;
+
+public class ThresholdStatus {
+
+ public ResourceRule resourceRule;
+ public ResourceThreshold resourceThreshold;
+ public long limitValue;
+ public long thresholdValue;
+ public long used;
+ public long lastAdded;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/dao/ServiceResourceDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/dao/ServiceResourceDao.java
new file mode 100644
index 0000000..3de3457
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/dao/ServiceResourceDao.java
@@ -0,0 +1,38 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.service.dao;
+
+import org.openecomp.sdnc.ra.service.data.ServiceResource;
+import org.openecomp.sdnc.ra.service.data.ServiceStatus;
+
+public interface ServiceResourceDao {
+
+ ServiceResource getServiceResource(String serviceInstanceId, ServiceStatus serviceStatus);
+
+ void addServiceResource(ServiceResource serviceResource);
+
+ void updateServiceResource(ServiceResource serviceResource);
+
+ void deleteServiceResource(String serviceInstanceId, ServiceStatus serviceStatus);
+
+ void updateServiceStatus(String serviceInstanceId, ServiceStatus serviceStatus, ServiceStatus newServiceStatus);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/dao/ServiceResourceDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/dao/ServiceResourceDaoImpl.java
new file mode 100644
index 0000000..a8c0db4
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/dao/ServiceResourceDaoImpl.java
@@ -0,0 +1,110 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.service.dao;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.List;
+
+import org.openecomp.sdnc.ra.service.data.ServiceResource;
+import org.openecomp.sdnc.ra.service.data.ServiceStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.RowMapper;
+
+public class ServiceResourceDaoImpl implements ServiceResourceDao {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(ServiceResourceDaoImpl.class);
+
+ private static final String GET_SQL =
+ "SELECT * FROM SERVICE_RESOURCE WHERE service_instance_id = ? AND service_status = ?";
+
+ private static final String ADD_SQL = "INSERT INTO SERVICE_RESOURCE (\n"
+ + " service_instance_id, service_status, service_change_number, resource_set_id, resource_union_id)\n"
+ + "VALUES (?, ?, ?, ?, ?)";
+
+ private static final String UPDATE_SQL =
+ "UPDATE SERVICE_RESOURCE SET service_change_number = ?, resource_set_id = ?\n"
+ + "WHERE service_instance_id = ? AND service_status = ?";
+
+ private static final String DELETE_SQL =
+ "DELETE FROM SERVICE_RESOURCE WHERE service_instance_id = ? AND service_status = ?";
+
+ private static final String UPDATE_STATUS_SQL =
+ "UPDATE SERVICE_RESOURCE SET service_status = ? WHERE service_instance_id = ? AND service_status = ?";
+
+ private JdbcTemplate jdbcTemplate;
+
+ @Override
+ public ServiceResource getServiceResource(final String serviceInstanceId, final ServiceStatus serviceStatus) {
+ List<ServiceResource> serviceResourceList =
+ jdbcTemplate.query(GET_SQL, new Object[] { serviceInstanceId, serviceStatus.toString() },
+ new RowMapper<ServiceResource>() {
+
+ @Override
+ public ServiceResource mapRow(ResultSet rs, int rowNum) throws SQLException {
+ ServiceResource sr = new ServiceResource();
+ sr.id = rs.getLong("service_resource_id");
+ sr.serviceInstanceId = serviceInstanceId;
+ sr.serviceStatus = serviceStatus;
+ sr.serviceChangeNumber = rs.getInt("service_change_number");
+ sr.resourceSetId = rs.getString("resource_set_id");
+ sr.resourceUnionId = rs.getString("resource_union_id");
+ return sr;
+ }
+ });
+ if (serviceResourceList.isEmpty())
+ return null;
+ return serviceResourceList.get(0);
+ }
+
+ @Override
+ public void addServiceResource(ServiceResource serviceResource) {
+ jdbcTemplate.update(ADD_SQL, serviceResource.serviceInstanceId, serviceResource.serviceStatus.toString(),
+ serviceResource.serviceChangeNumber, serviceResource.resourceSetId, serviceResource.resourceUnionId);
+ }
+
+ @Override
+ public void updateServiceResource(ServiceResource serviceResource) {
+ jdbcTemplate.update(UPDATE_SQL, serviceResource.serviceChangeNumber, serviceResource.resourceSetId,
+ serviceResource.serviceInstanceId, serviceResource.serviceStatus.toString());
+ }
+
+ @Override
+ public void deleteServiceResource(String serviceInstanceId, ServiceStatus serviceStatus) {
+ jdbcTemplate.update(DELETE_SQL, serviceInstanceId, serviceStatus.toString());
+ }
+
+ @Override
+ public void updateServiceStatus(
+ String serviceInstanceId,
+ ServiceStatus serviceStatus,
+ ServiceStatus newServiceStatus) {
+ jdbcTemplate.update(UPDATE_STATUS_SQL, newServiceStatus.toString(), serviceInstanceId, serviceStatus.toString());
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/data/ServiceResource.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/data/ServiceResource.java
new file mode 100644
index 0000000..9ce2d75
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/data/ServiceResource.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.service.data;
+
+public class ServiceResource {
+
+ public long id;
+ public String serviceInstanceId;
+ public ServiceStatus serviceStatus;
+ public int serviceChangeNumber;
+ public String resourceSetId;
+ public String resourceUnionId;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/data/ServiceStatus.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/data/ServiceStatus.java
new file mode 100644
index 0000000..45f433f
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/ra/service/data/ServiceStatus.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.ra.service.data;
+
+public enum ServiceStatus {
+
+ Active, Pending
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/AllocationFunction.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/AllocationFunction.java
new file mode 100644
index 0000000..d8577b9
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/AllocationFunction.java
@@ -0,0 +1,330 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.comp;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.openecomp.sdnc.lock.comp.LockHelper;
+import org.openecomp.sdnc.lock.comp.ResourceLockedException;
+import org.openecomp.sdnc.lock.comp.SynchronizedFunction;
+import org.openecomp.sdnc.rm.dao.ResourceDao;
+import org.openecomp.sdnc.rm.data.AllocationOutcome;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+import org.openecomp.sdnc.rm.data.AllocationStatus;
+import org.openecomp.sdnc.rm.data.LabelAllocationOutcome;
+import org.openecomp.sdnc.rm.data.LabelAllocationRequest;
+import org.openecomp.sdnc.rm.data.LabelResource;
+import org.openecomp.sdnc.rm.data.LimitAllocationOutcome;
+import org.openecomp.sdnc.rm.data.LimitAllocationRequest;
+import org.openecomp.sdnc.rm.data.LimitResource;
+import org.openecomp.sdnc.rm.data.MultiAssetAllocationOutcome;
+import org.openecomp.sdnc.rm.data.MultiAssetAllocationRequest;
+import org.openecomp.sdnc.rm.data.MultiResourceAllocationOutcome;
+import org.openecomp.sdnc.rm.data.MultiResourceAllocationRequest;
+import org.openecomp.sdnc.rm.data.RangeAllocationOutcome;
+import org.openecomp.sdnc.rm.data.RangeAllocationRequest;
+import org.openecomp.sdnc.rm.data.RangeResource;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.openecomp.sdnc.rm.data.ResourceKey;
+import org.openecomp.sdnc.rm.data.ResourceType;
+import org.openecomp.sdnc.rm.util.LabelUtil;
+import org.openecomp.sdnc.rm.util.LimitUtil;
+import org.openecomp.sdnc.rm.util.RangeUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class AllocationFunction extends SynchronizedFunction {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(AllocationFunction.class);
+
+ private ResourceDao resourceDao;
+
+ private String applicationId;
+ private AllocationRequest request;
+ private AllocationOutcome outcome;
+
+ private List<Resource> updateList = new ArrayList<Resource>();
+
+ public AllocationFunction(LockHelper lockHelper, ResourceDao resourceDao, String applicationId,
+ AllocationRequest request, int lockTimeout) {
+ super(lockHelper, getLockNames(request), lockTimeout);
+ this.applicationId = applicationId;
+ this.resourceDao = resourceDao;
+ this.request = request;
+ }
+
+ private static Collection<String> getLockNames(AllocationRequest request) {
+ Set<String> lockResourceNames = new HashSet<String>();
+ addLockNames(lockResourceNames, request);
+ return lockResourceNames;
+ }
+
+ private static void addLockNames(Set<String> lockResourceNames, AllocationRequest request) {
+ if (request instanceof MultiAssetAllocationRequest) {
+ MultiAssetAllocationRequest req = (MultiAssetAllocationRequest) request;
+ if (req.assetIdList != null)
+ lockResourceNames.addAll(req.assetIdList);
+ } else if (request instanceof MultiResourceAllocationRequest) {
+ MultiResourceAllocationRequest req = (MultiResourceAllocationRequest) request;
+ if (req.allocationRequestList != null)
+ for (AllocationRequest request1 : req.allocationRequestList)
+ addLockNames(lockResourceNames, request1);
+ } else if (request.assetId != null)
+ lockResourceNames.add(request.assetId);
+ }
+
+ @Override
+ public void _exec() throws ResourceLockedException {
+ outcome = allocate(request);
+ if (outcome.status == AllocationStatus.Success)
+ for (Resource r : updateList)
+ resourceDao.saveResource(r);
+ }
+
+ private AllocationOutcome allocate(AllocationRequest allocationRequest) throws ResourceLockedException {
+ if (allocationRequest instanceof MultiAssetAllocationRequest)
+ return allocateMultiAsset((MultiAssetAllocationRequest) allocationRequest);
+ if (allocationRequest instanceof MultiResourceAllocationRequest)
+ return allocateMultiResource((MultiResourceAllocationRequest) allocationRequest);
+ if (allocationRequest instanceof LimitAllocationRequest)
+ return allocateLimit((LimitAllocationRequest) allocationRequest);
+ if (allocationRequest instanceof LabelAllocationRequest)
+ return allocateLabel((LabelAllocationRequest) allocationRequest);
+ if (allocationRequest instanceof RangeAllocationRequest)
+ return allocateRange((RangeAllocationRequest) allocationRequest);
+ return null;
+ }
+
+ private MultiAssetAllocationOutcome allocateMultiAsset(MultiAssetAllocationRequest req) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ private MultiResourceAllocationOutcome allocateMultiResource(MultiResourceAllocationRequest req) {
+ MultiResourceAllocationOutcome out = new MultiResourceAllocationOutcome();
+ out.request = req;
+ out.allocationOutcomeList = new ArrayList<AllocationOutcome>();
+ out.status = AllocationStatus.Success;
+
+ if (req.allocationRequestList != null)
+ for (AllocationRequest req1 : req.allocationRequestList) {
+ AllocationOutcome out1 = allocate(req1);
+ out.allocationOutcomeList.add(out1);
+ if (out1.status != AllocationStatus.Success)
+ out.status = AllocationStatus.Failure;
+ }
+
+ return out;
+ }
+
+ private LimitAllocationOutcome allocateLimit(LimitAllocationRequest req) {
+ LimitAllocationOutcome out = new LimitAllocationOutcome();
+ out.request = req;
+
+ Resource r = resourceDao.getResource(req.assetId, req.resourceName);
+ if (r == null) {
+ r = new LimitResource();
+ r.resourceKey = new ResourceKey();
+ r.resourceKey.assetId = req.assetId;
+ r.resourceKey.resourceName = req.resourceName;
+ r.resourceType = ResourceType.Limit;
+ } else {
+ if (r.resourceType != ResourceType.Limit) {
+ out.status = AllocationStatus.ResourceNotFound;
+ return out;
+ }
+ LimitUtil.recalculate((LimitResource) r);
+ }
+
+ LimitResource l = (LimitResource) r;
+ if (LimitUtil.checkLimit(l, req)) {
+ out.status = AllocationStatus.Success;
+ if (req.allocateCount > 0) {
+ out.allocatedCount = LimitUtil.allocateLimit(l, req, applicationId);
+ updateList.add(l);
+ }
+ } else
+ out.status = AllocationStatus.Failure;
+
+ out.used = l.used;
+ out.limit = req.checkLimit;
+
+ return out;
+ }
+
+ private LabelAllocationOutcome allocateLabel(LabelAllocationRequest req) {
+ LabelAllocationOutcome out = new LabelAllocationOutcome();
+
+ out.request = req;
+
+ Resource r = resourceDao.getResource(req.assetId, req.resourceName);
+ if (r == null) {
+ r = new LabelResource();
+ r.resourceKey = new ResourceKey();
+ r.resourceKey.assetId = req.assetId;
+ r.resourceKey.resourceName = req.resourceName;
+ r.resourceType = ResourceType.Label;
+ } else {
+ if (r.resourceType != ResourceType.Label) {
+ out.status = AllocationStatus.ResourceNotFound;
+ return out;
+ }
+ LabelUtil.recalculate((LabelResource) r);
+ }
+
+ LabelResource l = (LabelResource) r;
+ if (LabelUtil.checkLabel(l, req)) {
+ out.status = AllocationStatus.Success;
+ out.currentLabel = l.label;
+ if (req.allocate) {
+ out.allocatedLabel = LabelUtil.allocateLabel(l, req, applicationId);
+ updateList.add(l);
+ }
+ } else
+ out.status = AllocationStatus.Failure;
+
+ return out;
+ }
+
+ private RangeAllocationOutcome allocateRange(RangeAllocationRequest req) {
+ RangeAllocationOutcome out = new RangeAllocationOutcome();
+
+ out.request = req;
+
+ Resource r = resourceDao.getResource(req.assetId, req.resourceName);
+ if (r == null) {
+ r = new RangeResource();
+ r.resourceKey = new ResourceKey();
+ r.resourceKey.assetId = req.assetId;
+ r.resourceKey.resourceName = req.resourceName;
+ r.resourceType = ResourceType.Range;
+ } else {
+ if (r.resourceType != ResourceType.Range) {
+ out.status = AllocationStatus.ResourceNotFound;
+ return out;
+ }
+ RangeUtil.recalculate((RangeResource) r);
+ }
+
+ RangeResource rr = (RangeResource) r;
+ SortedSet<Integer> foundNumbers = null;
+ if (!req.check) {
+ out.status = AllocationStatus.Success;
+ foundNumbers = req.requestedNumbers;
+ } else {
+ if (req.requestedNumbers != null && req.requestedNumbers.size() > 0) {
+ foundNumbers = req.requestedNumbers;
+ out.status = AllocationStatus.Success;
+ for (int n : foundNumbers)
+ if (!RangeUtil.checkRange(rr, req, n)) {
+ out.status = AllocationStatus.Failure;
+ break;
+ }
+ } else {
+ foundNumbers = new TreeSet<Integer>();
+ int foundCount = 0;
+
+ // First try to reuse the numbers already taken by the same resource union
+ SortedSet<Integer> uu = RangeUtil.getUsed(rr, req.resourceUnionId);
+ if (uu != null && !uu.isEmpty()) {
+ if (uu.size() >= req.requestedCount) {
+ // Just take the first req.requestedCount numbers from uu
+ Iterator<Integer> i = uu.iterator();
+ while (foundCount < req.requestedCount) {
+ foundNumbers.add(i.next());
+ foundCount++;
+ }
+ } else {
+ // Additional numbers are requested. Try to find them starting from
+ // the minimum we have in uu (the first element) towards the min
+ // parameter, and then starting from the maximum in uu (the last
+ // element) towards the max parameter.
+ // NOTE: In case of request for sequential numbers, the parameters
+ // alignBlockSize and alignModulus are ignored. It would be harder
+ // to take them into account, and currently it is not needed.
+
+ int uumin = uu.first() - 1;
+ int uumax = uu.last() + 1;
+ foundNumbers.addAll(uu);
+ foundCount = uu.size();
+ for (int n = uumin; foundCount < req.requestedCount && n >= req.checkMin; n--) {
+ if (RangeUtil.checkRange(rr, req, n)) {
+ foundNumbers.add(n);
+ foundCount++;
+ } else if (req.sequential)
+ break;
+ }
+ for (int n = uumax; foundCount < req.requestedCount && n <= req.checkMax; n++) {
+ if (RangeUtil.checkRange(rr, req, n)) {
+ foundNumbers.add(n);
+ foundCount++;
+ } else if (req.sequential)
+ break;
+ }
+
+ // If we could not find enough numbers trying to reuse currently
+ // allocated, reset foundNumbers and foundCount, continue with
+ // the normal allocation of new numbers.
+ if (foundCount < req.requestedCount) {
+ foundNumbers = new TreeSet<Integer>();
+ foundCount = 0;
+ }
+ }
+ }
+
+ for (int n = req.checkMin; foundCount < req.requestedCount && n <= req.checkMax; n++)
+ if (RangeUtil.checkRange(rr, req, n)) {
+ foundNumbers.add(n);
+ foundCount++;
+ } else if (req.sequential)
+ foundCount = 0;
+
+ out.status = foundCount == req.requestedCount ? AllocationStatus.Success : AllocationStatus.Failure;
+ }
+ }
+
+ if (out.status == AllocationStatus.Success) {
+ out.allocated = foundNumbers;
+ if (req.allocate) {
+ RangeUtil.allocateRange(rr, out.allocated, req, applicationId);
+ updateList.add(rr);
+ }
+ } else
+ out.allocated = new TreeSet<Integer>();
+
+ out.used = rr.used;
+
+ return out;
+ }
+
+ public AllocationOutcome getAllocationOutcome() {
+ return outcome;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ReleaseFunction.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ReleaseFunction.java
new file mode 100644
index 0000000..0d3caaa
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ReleaseFunction.java
@@ -0,0 +1,88 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.comp;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import org.openecomp.sdnc.lock.comp.LockHelper;
+import org.openecomp.sdnc.lock.comp.ResourceLockedException;
+import org.openecomp.sdnc.lock.comp.SynchronizedFunction;
+import org.openecomp.sdnc.rm.dao.ResourceDao;
+import org.openecomp.sdnc.rm.data.AllocationItem;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.openecomp.sdnc.rm.util.ResourceUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+class ReleaseFunction extends SynchronizedFunction {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(ReleaseFunction.class);
+
+ private ResourceDao resourceDao;
+
+ private String resourceSetId, resourceUnionId;
+
+ public ReleaseFunction(LockHelper lockHelper, ResourceDao resourceDao, String resourceSetId,
+ String resourceUnionId, Collection<String> lockNames, int lockTimeout) {
+ super(lockHelper, lockNames, lockTimeout);
+ this.resourceDao = resourceDao;
+ this.resourceSetId = resourceSetId;
+ this.resourceUnionId = resourceUnionId;
+ }
+
+ @Override
+ public void _exec() throws ResourceLockedException {
+ List<Resource> resourceList =
+ resourceSetId != null
+ ? resourceDao.getResourceSet(resourceSetId) : resourceDao.getResourceUnion(resourceUnionId);
+ for (Resource r : resourceList) {
+ boolean updated = false;
+ if (r.allocationItems != null) {
+ Iterator<AllocationItem> i = r.allocationItems.iterator();
+ while (i.hasNext()) {
+ AllocationItem ai = i.next();
+ if (resourceSetId != null) {
+ if (resourceSetId.equals(ai.resourceSetId)) {
+ i.remove();
+ updated = true;
+ }
+
+ } else if (resourceUnionId != null) {
+
+ if (resourceUnionId.equals(ai.resourceUnionId)) {
+ i.remove();
+ updated = true;
+ }
+
+ }
+ }
+ }
+ if (updated) {
+ ResourceUtil.recalculate(r);
+ resourceDao.saveResource(r);
+ }
+ }
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceLoader.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceLoader.java
new file mode 100644
index 0000000..a31b66c
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceLoader.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.comp;
+
+import java.util.Collection;
+
+import org.openecomp.sdnc.rm.data.Resource;
+
+public interface ResourceLoader {
+
+ void loadResource(String applicationId, Resource resource, boolean force);
+
+ void loadResources(String applicationId, Collection<Resource> resourceList, boolean force);
+
+ void loadResourcesForAsset(String applicationId, String assetId, Collection<Resource> resourceList, boolean force);
+
+ void deleteResource(String applicationId, String assetId, String resourceName);
+
+ void deleteResourcesForAsset(String applicationId, String assetId);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceManager.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceManager.java
new file mode 100644
index 0000000..cafb6e0
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceManager.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.comp;
+
+import java.util.List;
+
+import org.openecomp.sdnc.rm.data.AllocationOutcome;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+import org.openecomp.sdnc.rm.data.Resource;
+
+public interface ResourceManager {
+
+ Resource getResource(String resourceName, String assetId);
+
+ List<Resource> getResourceUnion(String resourceUnionId);
+
+ AllocationOutcome allocateResources(AllocationRequest allocationRequest);
+
+ void releaseResourceSet(String resourceSetId);
+
+ void releaseResourceUnion(String resourceUnionId);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceManagerImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceManagerImpl.java
new file mode 100644
index 0000000..3ab4775
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/comp/ResourceManagerImpl.java
@@ -0,0 +1,128 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.comp;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.openecomp.sdnc.lock.comp.LockHelper;
+import org.openecomp.sdnc.rm.dao.ResourceDao;
+import org.openecomp.sdnc.rm.data.AllocationOutcome;
+import org.openecomp.sdnc.rm.data.AllocationRequest;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.openecomp.sdnc.rm.util.ResourceUtil;
+import org.openecomp.sdnc.util.str.StrUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ResourceManagerImpl implements ResourceManager {
+
+ private static final Logger log = LoggerFactory.getLogger(ResourceManagerImpl.class);
+
+ private LockHelper lockHelper;
+ private ResourceDao resourceDao;
+
+ private String applicationId;
+ private int lockTimeout = 10 * 60; // Default 10 min
+
+ public ResourceManagerImpl() {
+ log.info("ResourceManager created.");
+ }
+
+ @Override
+ public Resource getResource(String resourceName, String assetId) {
+ Resource r = resourceDao.getResource(assetId, resourceName);
+ ResourceUtil.recalculate(r);
+ return r;
+ }
+
+ @Override
+ public List<Resource> getResourceUnion(String resourceUnionId) {
+ List<Resource> rlist = resourceDao.getResourceUnion(resourceUnionId);
+ for (Resource r : rlist)
+ ResourceUtil.recalculate(r);
+ return rlist;
+ }
+
+ @Override
+ public AllocationOutcome allocateResources(AllocationRequest allocationRequest) {
+ if (allocationRequest == null)
+ throw new IllegalArgumentException("allocateResources called with null argument");
+
+ AllocationFunction allocationFunction =
+ new AllocationFunction(lockHelper, resourceDao, applicationId, allocationRequest, lockTimeout);
+ allocationFunction.exec();
+ AllocationOutcome allocationOutcome = allocationFunction.getAllocationOutcome();
+
+ StrUtil.info(log, allocationOutcome);
+
+ return allocationOutcome;
+ }
+
+ @Override
+ public void releaseResourceSet(String resourceSetId) {
+ List<Resource> resourceList = resourceDao.getResourceSet(resourceSetId);
+ if (resourceList == null || resourceList.isEmpty())
+ return;
+
+ Set<String> lockNames = getLockNames(resourceList);
+ ReleaseFunction releaseFunction =
+ new ReleaseFunction(lockHelper, resourceDao, resourceSetId, null, lockNames, lockTimeout);
+ releaseFunction.exec();
+ }
+
+ @Override
+ public void releaseResourceUnion(String resourceUnionId) {
+ List<Resource> resourceList = resourceDao.getResourceUnion(resourceUnionId);
+ if (resourceList == null || resourceList.isEmpty())
+ return;
+
+ Set<String> lockNames = getLockNames(resourceList);
+ ReleaseFunction releaseFunction =
+ new ReleaseFunction(lockHelper, resourceDao, null, resourceUnionId, lockNames, lockTimeout);
+ releaseFunction.exec();
+ }
+
+ private Set<String> getLockNames(List<Resource> resourceList) {
+ Set<String> lockNames = new HashSet<String>();
+ for (Resource r : resourceList)
+ lockNames.add(r.resourceKey.assetId);
+ return lockNames;
+ }
+
+ public void setResourceDao(ResourceDao resourceDao) {
+ this.resourceDao = resourceDao;
+ }
+
+ public void setLockTimeout(int lockTimeout) {
+ this.lockTimeout = lockTimeout;
+ }
+
+ public void setApplicationId(String applicationId) {
+ this.applicationId = applicationId;
+ }
+
+ public void setLockHelper(LockHelper lockHelper) {
+ this.lockHelper = lockHelper;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/ResourceDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/ResourceDao.java
new file mode 100644
index 0000000..0c4bb13
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/ResourceDao.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.dao;
+
+import java.util.List;
+
+import org.openecomp.sdnc.rm.data.Resource;
+
+public interface ResourceDao {
+
+ Resource getResource(String assetId, String resourceName);
+
+ void saveResource(Resource resource);
+
+ void deleteResource(String assetId, String resourceName);
+
+ List<Resource> getResourceSet(String resourceSetId);
+
+ List<Resource> getResourceUnion(String resourceUnionId);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItem.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItem.java
new file mode 100644
index 0000000..274fd08
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItem.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.dao.jdbc;
+
+import java.util.Date;
+
+public class AllocationItem {
+
+ public long id;
+ public long resourceId;
+ public String applicationId;
+ public String resourceSetId, resourceUnionId;
+ public String resourceShareGroupList;
+ public long ltUsed;
+ public String llLabel;
+ public String rrUsed;
+ public Date allocationTime;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItemJdbcDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItemJdbcDao.java
new file mode 100644
index 0000000..9ed1eb2
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItemJdbcDao.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.dao.jdbc;
+
+import java.util.List;
+
+public interface AllocationItemJdbcDao {
+
+ void add(AllocationItem ai);
+
+ List<AllocationItem> getAllocationItems(long resourceId);
+
+ void update(AllocationItem ai);
+
+ void delete(long id);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItemJdbcDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItemJdbcDaoImpl.java
new file mode 100644
index 0000000..5087163
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/AllocationItemJdbcDaoImpl.java
@@ -0,0 +1,126 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.dao.jdbc;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Timestamp;
+import java.util.Collections;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.PreparedStatementCreator;
+import org.springframework.jdbc.core.RowMapper;
+import org.springframework.jdbc.support.GeneratedKeyHolder;
+import org.springframework.jdbc.support.KeyHolder;
+
+public class AllocationItemJdbcDaoImpl implements AllocationItemJdbcDao {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(ResourceJdbcDaoImpl.class);
+
+ private static final String INSERT_SQL = "INSERT INTO ALLOCATION_ITEM (\n"
+ + " resource_id, application_id, resource_set_id, resource_union_id, resource_share_group_list,\n"
+ + " lt_used, ll_label, rr_used, allocation_time)\nVALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)";
+
+ private static final String UPDATE_SQL = "UPDATE ALLOCATION_ITEM SET\n"
+ + " resource_share_group_list = ?, lt_used = ?, ll_label = ?, rr_used = ?, allocation_time = ?\n"
+ + "WHERE allocation_item_id = ?";
+
+ private static final String DELETE_SQL = "DELETE FROM ALLOCATION_ITEM WHERE allocation_item_id = ?";
+
+ private static final String GET_SQL = "SELECT * FROM ALLOCATION_ITEM WHERE resource_id = ?";
+
+ private JdbcTemplate jdbcTemplate;
+ private AllocationItemRowMapper allocationItemRowMapper = new AllocationItemRowMapper();
+
+ @Override
+ public void add(final AllocationItem ai) {
+ PreparedStatementCreator psc = new PreparedStatementCreator() {
+
+ @Override
+ public PreparedStatement createPreparedStatement(Connection dbc) throws SQLException {
+ PreparedStatement ps = dbc.prepareStatement(INSERT_SQL, new String[] { "allocation_item_id" });
+ ps.setLong(1, ai.resourceId);
+ ps.setString(2, ai.applicationId);
+ ps.setString(3, ai.resourceSetId);
+ ps.setString(4, ai.resourceUnionId);
+ ps.setString(5, ai.resourceShareGroupList);
+ ps.setLong(6, ai.ltUsed);
+ ps.setString(7, ai.llLabel);
+ ps.setString(8, ai.rrUsed);
+ ps.setTimestamp(9, new Timestamp(ai.allocationTime.getTime()));
+ return ps;
+ }
+ };
+ KeyHolder keyHolder = new GeneratedKeyHolder();
+ jdbcTemplate.update(psc, keyHolder);
+ ai.id = keyHolder.getKey().longValue();
+ }
+
+ @Override
+ public void update(AllocationItem ai) {
+ Long ltUsed = ai.ltUsed <= 0 ? null : ai.ltUsed;
+ jdbcTemplate.update(UPDATE_SQL, ai.resourceShareGroupList, ltUsed, ai.llLabel, ai.rrUsed, ai.allocationTime,
+ ai.id);
+ }
+
+ @Override
+ public void delete(long id) {
+ jdbcTemplate.update(DELETE_SQL, id);
+ }
+
+ @Override
+ public List<AllocationItem> getAllocationItems(long resourceId) {
+ if (resourceId <= 0)
+ return Collections.emptyList();
+
+ return jdbcTemplate.query(GET_SQL, new Object[] { resourceId }, allocationItemRowMapper);
+ }
+
+ private static class AllocationItemRowMapper implements RowMapper<AllocationItem> {
+
+ @Override
+ public AllocationItem mapRow(ResultSet rs, int n) throws SQLException {
+ AllocationItem ai = new AllocationItem();
+ ai.id = rs.getLong("allocation_item_id");
+ ai.resourceId = rs.getLong("resource_id");
+ ai.applicationId = rs.getString("application_id");
+ ai.resourceSetId = rs.getString("resource_set_id");
+ ai.resourceUnionId = rs.getString("resource_union_id");
+ ai.resourceShareGroupList = rs.getString("resource_share_group_list");
+ ai.ltUsed = rs.getLong("lt_used");
+ ai.llLabel = rs.getString("ll_label");
+ ai.rrUsed = rs.getString("rr_used");
+ ai.allocationTime = rs.getTimestamp("allocation_time");
+ return ai;
+ }
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/Resource.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/Resource.java
new file mode 100644
index 0000000..5d24b71
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/Resource.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.dao.jdbc;
+
+public class Resource {
+
+ public long id;
+ public String assetId, name, type;
+ public long ltUsed;
+ public String llLabel;
+ public int llReferenceCount;
+ public String rrUsed;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceDaoImpl.java
new file mode 100644
index 0000000..15c53d2
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceDaoImpl.java
@@ -0,0 +1,370 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.dao.jdbc;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+import org.openecomp.sdnc.rm.dao.ResourceDao;
+import org.openecomp.sdnc.rm.data.LabelAllocationItem;
+import org.openecomp.sdnc.rm.data.LabelResource;
+import org.openecomp.sdnc.rm.data.LimitAllocationItem;
+import org.openecomp.sdnc.rm.data.LimitResource;
+import org.openecomp.sdnc.rm.data.RangeAllocationItem;
+import org.openecomp.sdnc.rm.data.RangeResource;
+import org.openecomp.sdnc.rm.data.ResourceKey;
+import org.openecomp.sdnc.rm.data.ResourceType;
+import org.openecomp.sdnc.util.str.StrUtil;
+
+public class ResourceDaoImpl implements ResourceDao {
+
+ private ResourceJdbcDao resourceJdbcDao;
+ private ResourceLoadJdbcDao resourceLoadJdbcDao;
+ private AllocationItemJdbcDao allocationItemJdbcDao;
+
+ @Override
+ public org.openecomp.sdnc.rm.data.Resource getResource(String assetId, String resourceName) {
+ Resource rEntity = resourceJdbcDao.getResource(assetId, resourceName);
+ org.openecomp.sdnc.rm.data.Resource r = createResource(rEntity);
+
+ if (r != null) {
+ List<AllocationItem> aiEntityList = allocationItemJdbcDao.getAllocationItems(rEntity.id);
+ r.allocationItems = new ArrayList<org.openecomp.sdnc.rm.data.AllocationItem>();
+ for (AllocationItem aiEntity : aiEntityList) {
+ org.openecomp.sdnc.rm.data.AllocationItem ai = createAllocationItem(r, aiEntity);
+ r.allocationItems.add(ai);
+ }
+
+ List<ResourceLoad> rlEntityList = resourceLoadJdbcDao.getResourceLoads(rEntity.id);
+ r.resourceLoadList = new ArrayList<org.openecomp.sdnc.rm.data.ResourceLoad>();
+ for (ResourceLoad rlEntity : rlEntityList) {
+ org.openecomp.sdnc.rm.data.ResourceLoad rl = createResourceLoad(r, rlEntity);
+ r.resourceLoadList.add(rl);
+ }
+ }
+
+ return r;
+ }
+
+ @Override
+ public void saveResource(org.openecomp.sdnc.rm.data.Resource resource) {
+ if (resource == null)
+ return;
+
+ org.openecomp.sdnc.rm.dao.jdbc.Resource resourceEntity =
+ resourceJdbcDao.getResource(resource.resourceKey.assetId, resource.resourceKey.resourceName);
+ if (resourceEntity == null) {
+ resourceEntity = createResourceEntity(resource);
+ resourceJdbcDao.add(resourceEntity);
+ if (resource.allocationItems != null)
+ for (org.openecomp.sdnc.rm.data.AllocationItem ai : resource.allocationItems) {
+ AllocationItem aiEntity = createAllocationItemEntity(resourceEntity.id, ai);
+ allocationItemJdbcDao.add(aiEntity);
+ }
+ if (resource.resourceLoadList != null)
+ for (org.openecomp.sdnc.rm.data.ResourceLoad rl : resource.resourceLoadList) {
+ ResourceLoad rlEntity = createResourceLoadEntity(resourceEntity.id, rl);
+ resourceLoadJdbcDao.add(rlEntity);
+ }
+ } else {
+ updateResourceEntity(resourceEntity, resource);
+ resourceJdbcDao.update(resourceEntity);
+
+ List<AllocationItem> oldAiEntityList = allocationItemJdbcDao.getAllocationItems(resourceEntity.id);
+ if (resource.allocationItems != null)
+ for (org.openecomp.sdnc.rm.data.AllocationItem newai : resource.allocationItems) {
+ AllocationItem foundAiEntity = null;
+ for (AllocationItem oldAiEntity : oldAiEntityList)
+ if (oldAiEntity.resourceSetId.equals(newai.resourceSetId)) {
+ foundAiEntity = oldAiEntity;
+ break;
+ }
+ if (foundAiEntity != null) {
+ updateAllocationItemEntity(foundAiEntity, newai);
+ allocationItemJdbcDao.update(foundAiEntity);
+ } else {
+ AllocationItem newAiEntity = createAllocationItemEntity(resourceEntity.id, newai);
+ allocationItemJdbcDao.add(newAiEntity);
+ }
+ }
+ for (AllocationItem oldAiEntity : oldAiEntityList) {
+ boolean found = false;
+ if (resource.allocationItems != null)
+ for (org.openecomp.sdnc.rm.data.AllocationItem newai : resource.allocationItems)
+ if (oldAiEntity.resourceSetId.equals(newai.resourceSetId)) {
+ found = true;
+ break;
+ }
+ if (!found)
+ allocationItemJdbcDao.delete(oldAiEntity.id);
+ }
+
+ List<ResourceLoad> oldRlEntityList = resourceLoadJdbcDao.getResourceLoads(resourceEntity.id);
+ if (resource.resourceLoadList != null)
+ for (org.openecomp.sdnc.rm.data.ResourceLoad newrl : resource.resourceLoadList) {
+ ResourceLoad foundRlEntity = null;
+ for (ResourceLoad oldRlEntity : oldRlEntityList)
+ if (oldRlEntity.applicationId.equals(newrl.applicationId)) {
+ foundRlEntity = oldRlEntity;
+ break;
+ }
+ if (foundRlEntity != null) {
+ updateResourceLoadEntity(foundRlEntity, newrl);
+ resourceLoadJdbcDao.update(foundRlEntity);
+ } else {
+ ResourceLoad newRlEntity = createResourceLoadEntity(resourceEntity.id, newrl);
+ resourceLoadJdbcDao.add(newRlEntity);
+ }
+ }
+ for (ResourceLoad oldRlEntity : oldRlEntityList) {
+ boolean found = false;
+ if (resource.resourceLoadList != null)
+ for (org.openecomp.sdnc.rm.data.ResourceLoad newrl : resource.resourceLoadList)
+ if (oldRlEntity.applicationId.equals(newrl.applicationId)) {
+ found = true;
+ break;
+ }
+ if (!found)
+ resourceLoadJdbcDao.delete(oldRlEntity.id);
+ }
+ }
+ }
+
+ @Override
+ public void deleteResource(String assetId, String resourceName) {
+ org.openecomp.sdnc.rm.dao.jdbc.Resource resourceEntity = resourceJdbcDao.getResource(assetId, resourceName);
+ if (resourceEntity != null)
+ resourceJdbcDao.delete(resourceEntity.id);
+ }
+
+ @Override
+ public List<org.openecomp.sdnc.rm.data.Resource> getResourceSet(String resourceSetId) {
+ List<Resource> rEntityList = resourceJdbcDao.getResourceSet(resourceSetId);
+ List<org.openecomp.sdnc.rm.data.Resource> rlist = new ArrayList<org.openecomp.sdnc.rm.data.Resource>();
+ for (Resource rEntity : rEntityList) {
+ org.openecomp.sdnc.rm.data.Resource r = createResource(rEntity);
+ rlist.add(r);
+
+ List<AllocationItem> aiEntityList = allocationItemJdbcDao.getAllocationItems(rEntity.id);
+ r.allocationItems = new ArrayList<org.openecomp.sdnc.rm.data.AllocationItem>();
+ for (AllocationItem aiEntity : aiEntityList) {
+ org.openecomp.sdnc.rm.data.AllocationItem ai = createAllocationItem(r, aiEntity);
+ r.allocationItems.add(ai);
+ }
+
+ List<ResourceLoad> rlEntityList = resourceLoadJdbcDao.getResourceLoads(rEntity.id);
+ r.resourceLoadList = new ArrayList<org.openecomp.sdnc.rm.data.ResourceLoad>();
+ for (ResourceLoad rlEntity : rlEntityList) {
+ org.openecomp.sdnc.rm.data.ResourceLoad rl = createResourceLoad(r, rlEntity);
+ r.resourceLoadList.add(rl);
+ }
+ }
+ return rlist;
+ }
+
+ @Override
+ public List<org.openecomp.sdnc.rm.data.Resource> getResourceUnion(String resourceUnionId) {
+ List<Resource> rEntityList = resourceJdbcDao.getResourceUnion(resourceUnionId);
+ List<org.openecomp.sdnc.rm.data.Resource> rlist = new ArrayList<org.openecomp.sdnc.rm.data.Resource>();
+ for (Resource rEntity : rEntityList) {
+ org.openecomp.sdnc.rm.data.Resource r = createResource(rEntity);
+ rlist.add(r);
+
+ List<AllocationItem> aiEntityList = allocationItemJdbcDao.getAllocationItems(rEntity.id);
+ r.allocationItems = new ArrayList<org.openecomp.sdnc.rm.data.AllocationItem>();
+ for (AllocationItem aiEntity : aiEntityList) {
+ org.openecomp.sdnc.rm.data.AllocationItem ai = createAllocationItem(r, aiEntity);
+ r.allocationItems.add(ai);
+ }
+
+ List<ResourceLoad> rlEntityList = resourceLoadJdbcDao.getResourceLoads(rEntity.id);
+ r.resourceLoadList = new ArrayList<org.openecomp.sdnc.rm.data.ResourceLoad>();
+ for (ResourceLoad rlEntity : rlEntityList) {
+ org.openecomp.sdnc.rm.data.ResourceLoad rl = createResourceLoad(r, rlEntity);
+ r.resourceLoadList.add(rl);
+ }
+ }
+ return rlist;
+ }
+
+ private Resource createResourceEntity(org.openecomp.sdnc.rm.data.Resource resource) {
+ Resource resourceEntity = new Resource();
+ resourceEntity.assetId = resource.resourceKey.assetId;
+ resourceEntity.name = resource.resourceKey.resourceName;
+ resourceEntity.type = resource.resourceType.toString();
+ if (resource.resourceType == ResourceType.Limit)
+ resourceEntity.ltUsed = ((LimitResource) resource).used;
+ else if (resource.resourceType == ResourceType.Label) {
+ resourceEntity.llLabel = ((LabelResource) resource).label;
+ resourceEntity.llReferenceCount = ((LabelResource) resource).referenceCount;
+ } else if (resource.resourceType == ResourceType.Range)
+ resourceEntity.rrUsed = StrUtil.listInt(((RangeResource) resource).used);
+
+ return resourceEntity;
+ }
+
+ private ResourceLoad createResourceLoadEntity(long resourceId, org.openecomp.sdnc.rm.data.ResourceLoad rl) {
+ ResourceLoad rlEntity = new ResourceLoad();
+ rlEntity.resourceId = resourceId;
+ rlEntity.applicationId = rl.applicationId;
+ rlEntity.loadTime = rl.resourceLoadTime;
+ rlEntity.expirationTime = rl.resourceExpirationTime;
+ return rlEntity;
+ }
+
+ private void updateResourceLoadEntity(ResourceLoad rlEntity, org.openecomp.sdnc.rm.data.ResourceLoad rl) {
+ rlEntity.loadTime = rl.resourceLoadTime;
+ rlEntity.expirationTime = rl.resourceExpirationTime;
+ }
+
+ private AllocationItem createAllocationItemEntity(long resourceId, org.openecomp.sdnc.rm.data.AllocationItem ai) {
+ AllocationItem aiEntity = new AllocationItem();
+ aiEntity.resourceId = resourceId;
+ aiEntity.resourceSetId = ai.resourceSetId;
+ aiEntity.resourceUnionId = ai.resourceUnionId;
+ aiEntity.resourceShareGroupList = StrUtil.listStr(ai.resourceShareGroupList);
+ aiEntity.applicationId = ai.applicationId;
+ aiEntity.allocationTime = ai.allocationTime;
+ if (ai.resourceType == ResourceType.Limit)
+ aiEntity.ltUsed = ((LimitAllocationItem) ai).used;
+ else if (ai.resourceType == ResourceType.Label)
+ aiEntity.llLabel = ((LabelAllocationItem) ai).label;
+ else if (ai.resourceType == ResourceType.Range)
+ aiEntity.rrUsed = StrUtil.listInt(((RangeAllocationItem) ai).used);
+ return aiEntity;
+ }
+
+ private void updateAllocationItemEntity(AllocationItem aiEntity, org.openecomp.sdnc.rm.data.AllocationItem ai) {
+ aiEntity.resourceShareGroupList = StrUtil.listStr(ai.resourceShareGroupList);
+ aiEntity.allocationTime = ai.allocationTime;
+ if (ai.resourceType == ResourceType.Limit)
+ aiEntity.ltUsed = ((LimitAllocationItem) ai).used;
+ else if (ai.resourceType == ResourceType.Label)
+ aiEntity.llLabel = ((LabelAllocationItem) ai).label;
+ else if (ai.resourceType == ResourceType.Range)
+ aiEntity.rrUsed = StrUtil.listInt(((RangeAllocationItem) ai).used);
+ }
+
+ private void updateResourceEntity(Resource resourceEntity, org.openecomp.sdnc.rm.data.Resource resource) {
+ if (resource.resourceType == ResourceType.Limit)
+ resourceEntity.ltUsed = ((LimitResource) resource).used;
+ else if (resource.resourceType == ResourceType.Label) {
+ resourceEntity.llLabel = ((LabelResource) resource).label;
+ resourceEntity.llReferenceCount = ((LabelResource) resource).referenceCount;
+ } else if (resource.resourceType == ResourceType.Range)
+ resourceEntity.rrUsed = StrUtil.listInt(((RangeResource) resource).used);
+ }
+
+ private org.openecomp.sdnc.rm.data.Resource createResource(Resource resourceEntity) {
+ if (resourceEntity == null)
+ return null;
+
+ org.openecomp.sdnc.rm.data.Resource r = null;
+ ResourceType type = ResourceType.valueOf(resourceEntity.type);
+ if (type == ResourceType.Limit) {
+ LimitResource l = new LimitResource();
+ l.used = resourceEntity.ltUsed;
+ r = l;
+ } else if (type == ResourceType.Label) {
+ LabelResource l = new LabelResource();
+ l.label = resourceEntity.llLabel;
+ l.referenceCount = resourceEntity.llReferenceCount;
+ r = l;
+ } else if (type == ResourceType.Range) {
+ RangeResource rr = new RangeResource();
+ rr.used =
+ StrUtil.listInt(resourceEntity.rrUsed, "Invalid data found in DB in for Resource Id: " +
+ resourceEntity.id + ": RESOURCE.RR_USED: " + resourceEntity.rrUsed);
+ r = rr;
+ }
+
+ r.resourceType = type;
+ r.resourceKey = new ResourceKey();
+ r.resourceKey.assetId = resourceEntity.assetId;
+ r.resourceKey.resourceName = resourceEntity.name;
+
+ return r;
+ }
+
+ private org.openecomp.sdnc.rm.data.AllocationItem createAllocationItem(
+ org.openecomp.sdnc.rm.data.Resource r,
+ AllocationItem aiEntity) {
+ if (r == null || aiEntity == null)
+ return null;
+
+ org.openecomp.sdnc.rm.data.AllocationItem ai = null;
+ if (r.resourceType == ResourceType.Limit) {
+ LimitAllocationItem lai = new LimitAllocationItem();
+ lai.used = aiEntity.ltUsed;
+ ai = lai;
+ } else if (r.resourceType == ResourceType.Label) {
+ LabelAllocationItem lai = new LabelAllocationItem();
+ lai.label = aiEntity.llLabel;
+ ai = lai;
+ } else if (r.resourceType == ResourceType.Range) {
+ RangeAllocationItem rai = new RangeAllocationItem();
+ rai.used =
+ StrUtil.listInt(aiEntity.rrUsed, "Invalid data found in DB in for Allocation Item Id: " +
+ aiEntity.id + ": ALLOCATION_ITEM.RR_USED: " + aiEntity.rrUsed);
+ ai = rai;
+ }
+
+ ai.resourceType = r.resourceType;
+ ai.resourceKey = r.resourceKey;
+ ai.resourceSetId = aiEntity.resourceSetId;
+ ai.resourceUnionId = aiEntity.resourceUnionId;
+ if (aiEntity.resourceShareGroupList != null)
+ ai.resourceShareGroupList = new HashSet<String>(StrUtil.listStr(aiEntity.resourceShareGroupList));
+ ai.applicationId = aiEntity.applicationId;
+ ai.allocationTime = aiEntity.allocationTime;
+
+ return ai;
+ }
+
+ private org.openecomp.sdnc.rm.data.ResourceLoad createResourceLoad(
+ org.openecomp.sdnc.rm.data.Resource r,
+ ResourceLoad rlEntity) {
+ if (rlEntity == null)
+ return null;
+
+ org.openecomp.sdnc.rm.data.ResourceLoad rl = new org.openecomp.sdnc.rm.data.ResourceLoad();
+ rl.resourceKey = r.resourceKey;
+ rl.applicationId = rlEntity.applicationId;
+ rl.resourceLoadTime = rlEntity.loadTime;
+ rl.resourceExpirationTime = rlEntity.expirationTime;
+
+ return rl;
+ }
+
+ public void setResourceJdbcDao(ResourceJdbcDao resourceJdbcDao) {
+ this.resourceJdbcDao = resourceJdbcDao;
+ }
+
+ public void setResourceLoadJdbcDao(ResourceLoadJdbcDao resourceLoadJdbcDao) {
+ this.resourceLoadJdbcDao = resourceLoadJdbcDao;
+ }
+
+ public void setAllocationItemJdbcDao(AllocationItemJdbcDao allocationItemJdbcDao) {
+ this.allocationItemJdbcDao = allocationItemJdbcDao;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceJdbcDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceJdbcDao.java
new file mode 100644
index 0000000..e2c3456
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceJdbcDao.java
@@ -0,0 +1,39 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.dao.jdbc;
+
+import java.util.List;
+
+public interface ResourceJdbcDao {
+
+ Resource getResource(String assetId, String resourceName);
+
+ List<Resource> getResourceSet(String resourceSetId);
+
+ List<Resource> getResourceUnion(String resourceUnionId);
+
+ void add(Resource r);
+
+ void delete(long id);
+
+ void update(Resource r);
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceJdbcDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceJdbcDaoImpl.java
new file mode 100644
index 0000000..3dee596
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceJdbcDaoImpl.java
@@ -0,0 +1,144 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.dao.jdbc;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Collections;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.PreparedStatementCreator;
+import org.springframework.jdbc.core.RowMapper;
+import org.springframework.jdbc.support.GeneratedKeyHolder;
+import org.springframework.jdbc.support.KeyHolder;
+
+public class ResourceJdbcDaoImpl implements ResourceJdbcDao {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(ResourceJdbcDaoImpl.class);
+
+ private static final String RESOURCE_SQL = "SELECT * FROM RESOURCE WHERE asset_id = ? AND resource_name = ?";
+
+ private static final String RESOURCE_SET_SQL = "SELECT * FROM RESOURCE WHERE resource_id IN (\n"
+ + "SELECT DISTINCT resource_id FROM ALLOCATION_ITEM WHERE resource_set_id = ?)";
+
+ private static final String RESOURCE_UNION_SQL = "SELECT * FROM RESOURCE WHERE resource_id IN (\n"
+ + "SELECT DISTINCT resource_id FROM ALLOCATION_ITEM WHERE resource_union_id = ?)";
+
+ private static final String INSERT_SQL = "INSERT INTO RESOURCE (\n"
+ + " asset_id, resource_name, resource_type, lt_used, ll_label, ll_reference_count, rr_used)\n"
+ + "VALUES (?, ?, ?, ?, ?, ?, ?)";
+
+ private static final String UPDATE_SQL = "UPDATE RESOURCE SET\n"
+ + " lt_used = ?, ll_label = ?, ll_reference_count = ?, rr_used = ?\nWHERE resource_id = ?";
+
+ private static final String DELETE_SQL = "DELETE FROM RESOURCE WHERE resource_id = ?";
+
+ private JdbcTemplate jdbcTemplate;
+ private ResourceRowMapper resourceRowMapper = new ResourceRowMapper();
+
+ @Override
+ public Resource getResource(String assetId, String resourceName) {
+ if (assetId == null || assetId.trim().length() == 0 || resourceName == null ||
+ resourceName.trim().length() == 0)
+ return null;
+
+ List<Resource> ll = jdbcTemplate.query(RESOURCE_SQL, new Object[] { assetId, resourceName }, resourceRowMapper);
+ return ll.isEmpty() ? null : ll.get(0);
+ }
+
+ @Override
+ public List<Resource> getResourceSet(String resourceSetId) {
+ if (resourceSetId == null)
+ return Collections.emptyList();
+
+ return jdbcTemplate.query(RESOURCE_SET_SQL, new Object[] { resourceSetId }, resourceRowMapper);
+ }
+
+ @Override
+ public List<Resource> getResourceUnion(String resourceUnionId) {
+ if (resourceUnionId == null)
+ return Collections.emptyList();
+
+ return jdbcTemplate.query(RESOURCE_UNION_SQL, new Object[] { resourceUnionId }, resourceRowMapper);
+ }
+
+ @Override
+ public void add(final Resource r) {
+ PreparedStatementCreator psc = new PreparedStatementCreator() {
+
+ @Override
+ public PreparedStatement createPreparedStatement(Connection dbc) throws SQLException {
+ PreparedStatement ps = dbc.prepareStatement(INSERT_SQL, new String[] { "resource_id" });
+ ps.setString(1, r.assetId);
+ ps.setString(2, r.name);
+ ps.setString(3, r.type);
+ ps.setLong(4, r.ltUsed);
+ ps.setString(5, r.llLabel);
+ ps.setInt(6, r.llReferenceCount);
+ ps.setString(7, r.rrUsed);
+ return ps;
+ }
+ };
+ KeyHolder keyHolder = new GeneratedKeyHolder();
+ jdbcTemplate.update(psc, keyHolder);
+ r.id = keyHolder.getKey().longValue();
+ }
+
+ @Override
+ public void update(Resource r) {
+ Long ltUsed = r.ltUsed <= 0 ? null : r.ltUsed;
+ Integer llRefCount = r.llReferenceCount <= 0 ? null : r.llReferenceCount;
+ jdbcTemplate.update(UPDATE_SQL, ltUsed, r.llLabel, llRefCount, r.rrUsed, r.id);
+ }
+
+ @Override
+ public void delete(long id) {
+ jdbcTemplate.update(DELETE_SQL, id);
+ }
+
+ private static class ResourceRowMapper implements RowMapper<Resource> {
+
+ @Override
+ public Resource mapRow(ResultSet rs, int arg1) throws SQLException {
+ Resource r = new Resource();
+ r.id = rs.getLong("resource_id");
+ r.assetId = rs.getString("asset_id");
+ r.name = rs.getString("resource_name");
+ r.type = rs.getString("resource_type");
+ r.ltUsed = rs.getLong("lt_used");
+ r.llLabel = rs.getString("ll_label");
+ r.llReferenceCount = rs.getInt("ll_reference_count");
+ r.rrUsed = rs.getString("rr_used");
+ return r;
+ }
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoad.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoad.java
new file mode 100644
index 0000000..ede82ec
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoad.java
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.dao.jdbc;
+
+import java.util.Date;
+
+public class ResourceLoad {
+
+ public long id;
+ public long resourceId;
+ public String applicationId;
+ public Date loadTime;
+ public Date expirationTime;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoadJdbcDao.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoadJdbcDao.java
new file mode 100644
index 0000000..7a167db
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoadJdbcDao.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.dao.jdbc;
+
+import java.util.List;
+
+public interface ResourceLoadJdbcDao {
+
+ void add(ResourceLoad rl);
+
+ List<ResourceLoad> getResourceLoads(long resourceId);
+
+ void update(ResourceLoad rl);
+
+ void delete(long id);
+
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoadJdbcDaoImpl.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoadJdbcDaoImpl.java
new file mode 100644
index 0000000..f41edc3
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/dao/jdbc/ResourceLoadJdbcDaoImpl.java
@@ -0,0 +1,112 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.dao.jdbc;
+
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Timestamp;
+import java.util.Collections;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.core.PreparedStatementCreator;
+import org.springframework.jdbc.core.RowMapper;
+import org.springframework.jdbc.support.GeneratedKeyHolder;
+import org.springframework.jdbc.support.KeyHolder;
+
+public class ResourceLoadJdbcDaoImpl implements ResourceLoadJdbcDao {
+
+ @SuppressWarnings("unused")
+ private static final Logger log = LoggerFactory.getLogger(ResourceJdbcDaoImpl.class);
+
+ private static final String INSERT_SQL = "INSERT INTO RESOURCE_LOAD (\n"
+ + " resource_id, application_id, resource_load_time, resource_expiration_time)\nVALUES (?, ?, ?, ?)";
+
+ private static final String UPDATE_SQL = "UPDATE RESOURCE_LOAD SET\n"
+ + " resource_load_time = ?, resource_expiration_time = ?\nWHERE resource_id = ?";
+
+ private static final String DELETE_SQL = "DELETE FROM RESOURCE_LOAD WHERE resource_load_id = ?";
+
+ private static final String GET_SQL = "SELECT * FROM RESOURCE_LOAD WHERE resource_id = ?";
+
+ private JdbcTemplate jdbcTemplate;
+ private ResourceLoadRowMapper resourceLoadRowMapper = new ResourceLoadRowMapper();
+
+ @Override
+ public void add(final ResourceLoad rl) {
+ PreparedStatementCreator psc = new PreparedStatementCreator() {
+
+ @Override
+ public PreparedStatement createPreparedStatement(Connection dbc) throws SQLException {
+ PreparedStatement ps = dbc.prepareStatement(INSERT_SQL, new String[] { "resource_load_id" });
+ ps.setLong(1, rl.resourceId);
+ ps.setString(2, rl.applicationId);
+ ps.setTimestamp(3, new Timestamp(rl.loadTime.getTime()));
+ ps.setTimestamp(4, new Timestamp(rl.expirationTime.getTime()));
+ return ps;
+ }
+ };
+ KeyHolder keyHolder = new GeneratedKeyHolder();
+ jdbcTemplate.update(psc, keyHolder);
+ rl.id = keyHolder.getKey().longValue();
+ }
+
+ @Override
+ public void update(ResourceLoad rl) {
+ jdbcTemplate.update(UPDATE_SQL, rl.loadTime, rl.expirationTime, rl.id);
+ }
+
+ @Override
+ public void delete(long id) {
+ jdbcTemplate.update(DELETE_SQL, id);
+ }
+
+ @Override
+ public List<ResourceLoad> getResourceLoads(long resourceId) {
+ if (resourceId <= 0)
+ return Collections.emptyList();
+
+ return jdbcTemplate.query(GET_SQL, new Object[] { resourceId }, resourceLoadRowMapper);
+ }
+
+ private static class ResourceLoadRowMapper implements RowMapper<ResourceLoad> {
+
+ @Override
+ public ResourceLoad mapRow(ResultSet rs, int n) throws SQLException {
+ ResourceLoad rl = new ResourceLoad();
+ rl.id = rs.getLong("allocation_item_id");
+ rl.resourceId = rs.getLong("resource_id");
+ rl.applicationId = rs.getString("application_id");
+ rl.loadTime = rs.getTimestamp("resource_load_time");
+ rl.expirationTime = rs.getTimestamp("resource_expiration_time");
+ return rl;
+ }
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationAction.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationAction.java
new file mode 100644
index 0000000..97ba4d0
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationAction.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public enum AllocationAction {
+ Fail, Succeed_DoNothing, Succeed_Allocate
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationItem.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationItem.java
new file mode 100644
index 0000000..75881dd
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationItem.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.Date;
+import java.util.Set;
+
+public abstract class AllocationItem {
+
+ public ResourceKey resourceKey;
+ public ResourceType resourceType;
+ public String resourceSetId;
+ public String resourceUnionId;
+ public Set<String> resourceShareGroupList;
+ public String applicationId;
+ public Date allocationTime;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationOutcome.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationOutcome.java
new file mode 100644
index 0000000..7bcee6d
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationOutcome.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public class AllocationOutcome {
+
+ public AllocationStatus status = null;
+ public AllocationRequest request = null;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationRequest.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationRequest.java
new file mode 100644
index 0000000..ef347bc
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationRequest.java
@@ -0,0 +1,35 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.Set;
+
+public class AllocationRequest {
+
+ public String resourceUnionId = null;
+ public String resourceSetId = null;
+ public Set<String> resourceShareGroupList = null;
+ public String resourceName = null;
+ public String assetId = null;
+ public AllocationAction missingResourceAction = AllocationAction.Succeed_Allocate;
+ public AllocationAction expiredResourceAction = AllocationAction.Succeed_Allocate;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationStatus.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationStatus.java
new file mode 100644
index 0000000..af39b26
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/AllocationStatus.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public enum AllocationStatus {
+
+ Success, Failure, NotTried, ResourceNotFound, ResourceExpired
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/InitAction.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/InitAction.java
new file mode 100644
index 0000000..ca946dc
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/InitAction.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public enum InitAction {
+ CheckInit("Initialize if needed"), ForceInit("Always Initialize"), NoInit("No initialization");
+
+ private String str;
+
+ private InitAction(String str) {
+ this.str = str;
+ }
+
+ public String getInitActionStr() {
+ return str;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationItem.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationItem.java
new file mode 100644
index 0000000..bc8f2db
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationItem.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public class LabelAllocationItem extends AllocationItem {
+
+ public String label;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationOutcome.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationOutcome.java
new file mode 100644
index 0000000..605825d
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationOutcome.java
@@ -0,0 +1,28 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public class LabelAllocationOutcome extends AllocationOutcome {
+
+ public String allocatedLabel = null;
+ public String currentLabel = null;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationRequest.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationRequest.java
new file mode 100644
index 0000000..188b31f
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelAllocationRequest.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public class LabelAllocationRequest extends AllocationRequest {
+
+ public String label = null;
+ public boolean check = false;
+ public boolean allocate = false;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelResource.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelResource.java
new file mode 100644
index 0000000..29e1062
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LabelResource.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public class LabelResource extends Resource {
+
+ public static final String BLOCKED = "__BLOCKED__";
+
+ public String label;
+ public int referenceCount;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationItem.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationItem.java
new file mode 100644
index 0000000..d037ea2
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationItem.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public class LimitAllocationItem extends AllocationItem {
+
+ public long used;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationOutcome.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationOutcome.java
new file mode 100644
index 0000000..336770f
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationOutcome.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public class LimitAllocationOutcome extends AllocationOutcome {
+
+ public long allocatedCount = 0;
+ public long used = 0;
+ public long limit = 0;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationRequest.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationRequest.java
new file mode 100644
index 0000000..e12f09a
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitAllocationRequest.java
@@ -0,0 +1,31 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public class LimitAllocationRequest extends AllocationRequest {
+
+ public long checkCount = 0;
+ public long allocateCount = 0;
+ public long checkLimit = -1;
+ public boolean replace = false;
+ public boolean strict = false;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitResource.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitResource.java
new file mode 100644
index 0000000..14ffa22
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/LimitResource.java
@@ -0,0 +1,27 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public class LimitResource extends Resource {
+
+ public long used = 0;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiAssetAllocationOutcome.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiAssetAllocationOutcome.java
new file mode 100644
index 0000000..51c9760
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiAssetAllocationOutcome.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.List;
+
+public class MultiAssetAllocationOutcome extends AllocationOutcome {
+
+ public List<String> goodAssetIdList;
+ public List<AllocationOutcome> allocationOutcomeList;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiAssetAllocationRequest.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiAssetAllocationRequest.java
new file mode 100644
index 0000000..f7806c6
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiAssetAllocationRequest.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.List;
+
+public class MultiAssetAllocationRequest extends AllocationRequest {
+
+ public List<String> assetIdList = null;
+ public AllocationRequest allocationRequest = null;
+ public int requestedCount = 0;
+ public boolean sequential = false;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiResourceAllocationOutcome.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiResourceAllocationOutcome.java
new file mode 100644
index 0000000..5dffd7a
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiResourceAllocationOutcome.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.List;
+
+public class MultiResourceAllocationOutcome extends AllocationOutcome {
+
+ public List<AllocationOutcome> allocationOutcomeList;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiResourceAllocationRequest.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiResourceAllocationRequest.java
new file mode 100644
index 0000000..66bc7a6
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/MultiResourceAllocationRequest.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.List;
+
+public class MultiResourceAllocationRequest extends AllocationRequest {
+
+ public List<AllocationRequest> allocationRequestList = null;
+ public boolean stopOnFirstFailure = true;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationItem.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationItem.java
new file mode 100644
index 0000000..fb1e4fa
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationItem.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.SortedSet;
+
+public class RangeAllocationItem extends AllocationItem {
+
+ public SortedSet<Integer> used;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationOutcome.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationOutcome.java
new file mode 100644
index 0000000..6e9b82c
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationOutcome.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.SortedSet;
+
+public class RangeAllocationOutcome extends AllocationOutcome {
+
+ public SortedSet<Integer> allocated = null;
+ public SortedSet<Integer> used = null;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationRequest.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationRequest.java
new file mode 100644
index 0000000..c8894d8
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeAllocationRequest.java
@@ -0,0 +1,36 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.SortedSet;
+
+public class RangeAllocationRequest extends AllocationRequest {
+
+ public int checkMin = 0;
+ public int checkMax = 0;
+ public boolean check = false;
+ public boolean allocate = false;
+ public boolean replace = false;
+ public SortedSet<Integer> requestedNumbers = null;
+ public int requestedCount = 1;
+ public boolean sequential = false;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeResource.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeResource.java
new file mode 100644
index 0000000..d1104dc
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/RangeResource.java
@@ -0,0 +1,29 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.SortedSet;
+
+public class RangeResource extends Resource {
+
+ public SortedSet<Integer> used;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/Resource.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/Resource.java
new file mode 100644
index 0000000..9d48a53
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/Resource.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.Collection;
+
+public abstract class Resource {
+
+ public ResourceKey resourceKey;
+ public ResourceType resourceType;
+ public Collection<AllocationItem> allocationItems;
+ public Collection<ResourceLoad> resourceLoadList;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceKey.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceKey.java
new file mode 100644
index 0000000..4a4794a
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceKey.java
@@ -0,0 +1,50 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public class ResourceKey {
+
+ public String assetId;
+ public String resourceName;
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || !(o instanceof ResourceKey))
+ return false;
+ ResourceKey rk = (ResourceKey) o;
+ if (assetId == null || resourceName == null)
+ return false;
+ return assetId.equals(rk.assetId) && resourceName.equals(rk.resourceName);
+ }
+
+ @Override
+ public int hashCode() {
+ return (int) ((long) System.identityHashCode(assetId) + (long) System.identityHashCode(resourceName));
+ }
+
+ @Override
+ public String toString() {
+ return "(" + assetId + ", " + resourceName + ")";
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceLoad.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceLoad.java
new file mode 100644
index 0000000..0ca35fa
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceLoad.java
@@ -0,0 +1,32 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+import java.util.Date;
+
+public class ResourceLoad {
+
+ public ResourceKey resourceKey;
+ public String applicationId;
+ public Date resourceLoadTime;
+ public Date resourceExpirationTime;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceType.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceType.java
new file mode 100644
index 0000000..dabbf78
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/data/ResourceType.java
@@ -0,0 +1,26 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.data;
+
+public enum ResourceType {
+ Limit, Label, Range
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/LabelUtil.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/LabelUtil.java
new file mode 100644
index 0000000..aac6c90
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/LabelUtil.java
@@ -0,0 +1,95 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.util;
+
+import java.util.ArrayList;
+import java.util.Date;
+
+import org.openecomp.sdnc.rm.data.AllocationItem;
+import org.openecomp.sdnc.rm.data.LabelAllocationItem;
+import org.openecomp.sdnc.rm.data.LabelAllocationRequest;
+import org.openecomp.sdnc.rm.data.LabelResource;
+import org.openecomp.sdnc.rm.data.ResourceKey;
+import org.openecomp.sdnc.rm.data.ResourceType;
+
+public class LabelUtil {
+
+ public static boolean checkLabel(LabelResource l, LabelAllocationRequest req) {
+ if (req.check && req.label != null && l.allocationItems != null && !l.allocationItems.isEmpty()) {
+ for (AllocationItem ai : l.allocationItems) {
+ LabelAllocationItem lai = (LabelAllocationItem) ai;
+ if (!eq(req.resourceUnionId, lai.resourceUnionId) && !eq(req.label, lai.label))
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public static String allocateLabel(LabelResource l, LabelAllocationRequest req, String applicationId) {
+ if (!req.allocate)
+ return null;
+
+ LabelAllocationItem lai = (LabelAllocationItem) ResourceUtil.getAllocationItem(l, req.resourceSetId);
+ if (lai == null) {
+ lai = new LabelAllocationItem();
+ lai.resourceType = ResourceType.Label;
+ lai.resourceKey = new ResourceKey();
+ lai.resourceKey.assetId = req.assetId;
+ lai.resourceKey.resourceName = req.resourceName;
+ lai.applicationId = applicationId;
+ lai.resourceSetId = req.resourceSetId;
+ lai.resourceUnionId = req.resourceUnionId;
+ lai.resourceShareGroupList = req.resourceShareGroupList;
+
+ if (l.allocationItems == null)
+ l.allocationItems = new ArrayList<AllocationItem>();
+ l.allocationItems.add(lai);
+ }
+
+ lai.label = req.label;
+ lai.allocationTime = new Date();
+
+ recalculate(l);
+
+ return lai.label;
+ }
+
+ public static void recalculate(LabelResource l) {
+ l.label = null;
+ l.referenceCount = 0;
+ if (l.allocationItems != null)
+ for (AllocationItem ai : l.allocationItems) {
+ LabelAllocationItem lai = (LabelAllocationItem) ai;
+ if (lai.label != null) {
+ l.referenceCount++;
+ if (l.label == null)
+ l.label = lai.label;
+ else if (!l.label.equals(lai.label))
+ l.label = "__BLOCKED__";
+ }
+ }
+ }
+
+ private static boolean eq(Object o1, Object o2) {
+ return o1 == null ? o2 == null : o1.equals(o2);
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/LimitUtil.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/LimitUtil.java
new file mode 100644
index 0000000..89d9809
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/LimitUtil.java
@@ -0,0 +1,334 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.util;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.openecomp.sdnc.rm.data.AllocationItem;
+import org.openecomp.sdnc.rm.data.LimitAllocationItem;
+import org.openecomp.sdnc.rm.data.LimitAllocationRequest;
+import org.openecomp.sdnc.rm.data.LimitResource;
+import org.openecomp.sdnc.rm.data.ResourceKey;
+import org.openecomp.sdnc.rm.data.ResourceType;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class LimitUtil {
+
+ private static final Logger log = LoggerFactory.getLogger(LimitUtil.class);
+
+ public static boolean checkLimit(LimitResource l, LimitAllocationRequest req) {
+ if (req.checkCount <= 0)
+ return true;
+
+ long checkCount = req.checkCount;
+ long currentUsage = 0;
+ if (req.resourceSetId != null) {
+ LimitAllocationItem lai = (LimitAllocationItem) ResourceUtil.getAllocationItem(l, req.resourceSetId);
+ if (lai != null)
+ currentUsage = lai.used;
+ }
+ if (!req.replace)
+ checkCount += currentUsage;
+
+ long used = calculateLimitUsage(l, 0, null, null);
+ long wouldUse = calculateLimitUsage(l, checkCount, req.resourceUnionId, req.resourceShareGroupList);
+
+ // If usage is not increasing by this request, only check the limit if
+ // strictCheck is true.
+ if (wouldUse <= used && !req.strict)
+ return true;
+
+ return wouldUse <= req.checkLimit;
+ }
+
+ private static long calculateLimitUsage(
+ LimitResource l,
+ long checkCount,
+ String resourceUnionId,
+ Set<String> resourceShareGroupList) {
+ if ((l.allocationItems == null || l.allocationItems.isEmpty()) &&
+ (resourceUnionId == null || resourceUnionId.length() == 0))
+ return 0;
+
+ long t1 = System.currentTimeMillis();
+ boolean logit = false;
+ String rn = "Resource: " + l.resourceKey.resourceName + " - " + l.resourceKey.assetId;
+
+ // In order to best utilize the resource, we need to take not the sum of all allocation items, but
+ // instead the maximum usage that could happen at any moment of time (given not all allocation items are active
+ // at the same time), also taking into account possible resource sharing.
+ // Thus we need to find all combinations of allocation items that can be active at the same time (allocation
+ // items with the same first union cannot be active at the same time), compute the usage for each (again,
+ // taking into account resource sharing), and take the maximum.
+ //
+ // Example:
+ // Let's have the following allocation items:
+ // ai1: sdid1, vrf1 - usage 5
+ // ai2: sdid2, vrf1 - usage 10
+ // ai3: sdid3, vrf2 - usage 15
+ // ai4: sdid1, vrf3 - usage 20
+ // ai5: sdid3, vrf1 - usage 25
+ // The following combinations of active allocation items are possible:
+ // 1) ai1, ai2, ai3
+ // 2) ai1, ai2, ai5
+ // 3) ai2, ai3, ai4
+ // 4) ai2, ai3, ai5
+ // Here is how we calculate the usage for combination 1:
+ // ai1 and ai2 contain the same resource union vrf1, so they share the resource - we take the max of usage,
+ // so we have:
+ // max(5, 10) + 15 = 25
+ // Similarly, we calculate the usage of the other combinations:
+ // 2) max(5, 10, 25) = 25
+ // 3) 10 + 15 + 20 = 45
+ // 4) max(10, 25) + 15 = 40
+ // So, the result in this case is:
+ // max(25, 25, 45, 40) = 45
+ //
+ // We might have a problem with this approach, if we have a lot of combinations. Assuming we have at most 2
+ // allocation items with the same resource union (sdid), the number of combinations would be
+ // 2 ^ n
+ // where n is the number of allocation items that have the same resource union (sdid). That would be
+ // the number of change orders currently in progress.
+ //
+ // Here is one optimization that we can do:
+ // If we have allocation items that have all resource unions the same, we don't need to generate combinations
+ // with each of them, we can just take the one of them with the maximum usage, as it is clear that the others
+ // will not lead to a bigger usage.
+ // For example, if we had the following allocation items:
+ // ai1: sdid1, vrf1 - usage 10
+ // ai2: sdid1, vrf1 - usage 20
+ // We only need to take the combinations with ai2, as they will always lead to bigger usage than the remaining
+ // combinations with ai1.
+
+ // First, group the allocation items by the first resource union, using the LimitUsage structure
+ int regularChangeCount = 0;
+ Map<String/* resourceUnionId */, List<LimitUsage>> limitUsageMap = new HashMap<String, List<LimitUsage>>();
+ if (l.allocationItems != null)
+ for (AllocationItem ai : l.allocationItems) {
+ LimitAllocationItem lai = (LimitAllocationItem) ai;
+ boolean regularChange =
+ addLimitUsage(limitUsageMap, lai.resourceUnionId, lai.resourceShareGroupList, lai.used);
+ if (regularChange)
+ regularChangeCount++;
+ }
+ if (checkCount > 0 && resourceUnionId != null) {
+ boolean regularChange = addLimitUsage(limitUsageMap, resourceUnionId, resourceShareGroupList, checkCount);
+ if (regularChange)
+ regularChangeCount++;
+ }
+
+ // Generate all the combinations, containing one LimitUsage object for each firstResourceUnion
+ int significantChangeCount = 0;
+ List<List<LimitUsage>> allCombinations = new ArrayList<List<LimitUsage>>();
+ for (String firstResourceUnion : limitUsageMap.keySet()) {
+ List<LimitUsage> limitUsageList = limitUsageMap.get(firstResourceUnion);
+ if (limitUsageList.size() > 1)
+ significantChangeCount++;
+ if (allCombinations.isEmpty()) {
+ for (LimitUsage limitUsage : limitUsageList) {
+ List<LimitUsage> newCombination = new ArrayList<LimitUsage>();
+ newCombination.add(limitUsage);
+ allCombinations.add(newCombination);
+ }
+ } else {
+ if (limitUsageList.size() == 1) {
+ // No new combinations are generated - just add this one to all combinations we have until now
+ for (List<LimitUsage> combination : allCombinations)
+ combination.add(limitUsageList.get(0));
+ } else {
+ // We have to duplicate each of the current combinations for each element of limitUsageList
+ List<List<LimitUsage>> newAllCombinations = new ArrayList<List<LimitUsage>>();
+ for (List<LimitUsage> combination : allCombinations)
+ for (LimitUsage limitUsage : limitUsageList) {
+ List<LimitUsage> newCombination = new ArrayList<LimitUsage>(combination);
+ newCombination.add(limitUsage);
+ newAllCombinations.add(newCombination);
+ }
+ allCombinations = newAllCombinations;
+ }
+ }
+ }
+
+ // Now, go through all combinations and calculate its usage, get the maximum
+ long maxUsage = 0;
+ for (List<LimitUsage> combination : allCombinations) {
+ long usage = calculateUsage(combination);
+ if (usage > maxUsage)
+ maxUsage = usage;
+ }
+
+ long t2 = System.currentTimeMillis();
+ if (logit) {
+ log.debug(rn + ": Calculating usage completed:");
+ log.debug(rn + ": Regular changes: " + regularChangeCount);
+ log.debug(rn + ": Significant changes: " + significantChangeCount);
+ log.debug(rn + ": Combinations: " + allCombinations.size());
+ log.debug(rn + ": Usage: " + maxUsage);
+ log.debug(rn + ": Time: " + (t2 - t1));
+ }
+
+ return maxUsage;
+ }
+
+ private static boolean addLimitUsage(
+ Map<String/* resourceUnionId */, List<LimitUsage>> limitUsageMap,
+ String resourceUnionId,
+ Set<String> resourceShareGroupList,
+ long used) {
+ List<LimitUsage> limitUsageList = limitUsageMap.get(resourceUnionId);
+ if (limitUsageList == null) {
+ limitUsageList = new ArrayList<LimitUsage>();
+ limitUsageMap.put(resourceUnionId, limitUsageList);
+ }
+ // See if we already have the same shareResourceUnionSet in the list. In such case just update the usage
+ // to the bigger value.
+ LimitUsage limitUsage = null;
+ for (LimitUsage limitUsage1 : limitUsageList) {
+ if ((limitUsage1.resourceShareGroupList == null || limitUsage1.resourceShareGroupList.isEmpty()) &&
+ (resourceShareGroupList == null || resourceShareGroupList.isEmpty())) {
+ limitUsage = limitUsage1;
+ break;
+ }
+ if (limitUsage1.resourceShareGroupList != null &&
+ limitUsage1.resourceShareGroupList.equals(resourceShareGroupList)) {
+ limitUsage = limitUsage1;
+ break;
+ }
+ }
+ if (limitUsage != null) {
+ if (limitUsage.usage < used)
+ limitUsage.usage = used;
+ return true;
+ }
+
+ limitUsage = new LimitUsage();
+ limitUsage.resourceUnion = resourceUnionId;
+ limitUsage.resourceShareGroupList = resourceShareGroupList;
+ limitUsage.usage = used;
+ limitUsageList.add(limitUsage);
+ return false;
+ }
+
+ private static class LimitUsage {
+
+ @SuppressWarnings("unused")
+ public String resourceUnion;
+ public Set<String> resourceShareGroupList;
+ public long usage;
+ }
+
+ private static boolean hasCommonSharedResource(LimitUsage limitUsage1, LimitUsage limitUsage2) {
+ if (limitUsage1.resourceShareGroupList == null || limitUsage1.resourceShareGroupList.isEmpty())
+ return false;
+ if (limitUsage2.resourceShareGroupList == null || limitUsage2.resourceShareGroupList.isEmpty())
+ return false;
+
+ for (String resourceUnion : limitUsage1.resourceShareGroupList)
+ if (limitUsage2.resourceShareGroupList.contains(resourceUnion))
+ return true;
+
+ return false;
+ }
+
+ private static long calculateUsage(List<LimitUsage> combination) {
+ // All LimitUsage objects that have a common value in their sharedResourceUnionSet reuse the resource, so
+ // split the combination in sets that have common value. Then the usage of each set will be the maximum of
+ // the usages of the LimitUsage objects in the set. The usage of the combination will be the sum of the usages
+ // of all sets.
+ List<List<LimitUsage>> sharedSets = new ArrayList<List<LimitUsage>>();
+ for (LimitUsage limitUsage : combination) {
+ // See if we can put limitUsage in any of the existing sets - is it has a common resource union with
+ // any of the LimitUsage objects in a set.
+ boolean found = false;
+ for (List<LimitUsage> sharedSet : sharedSets) {
+ for (LimitUsage limitUsage1 : sharedSet) {
+ if (hasCommonSharedResource(limitUsage, limitUsage1)) {
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ sharedSet.add(limitUsage);
+ break;
+ }
+ }
+ if (!found) {
+ // Start a new set
+ List<LimitUsage> newSharedSet = new ArrayList<LimitUsage>();
+ newSharedSet.add(limitUsage);
+ sharedSets.add(newSharedSet);
+ }
+ }
+
+ long sum = 0;
+ for (List<LimitUsage> sharedSet : sharedSets) {
+ float max = 0;
+ for (LimitUsage limitUsage : sharedSet)
+ if (max < limitUsage.usage)
+ max = limitUsage.usage;
+ sum += max;
+ }
+
+ return sum;
+ }
+
+ public static long allocateLimit(LimitResource l, LimitAllocationRequest req, String applicationId) {
+ if (req.allocateCount <= 0)
+ return 0;
+ long uu = l.used;
+
+ LimitAllocationItem lai = (LimitAllocationItem) ResourceUtil.getAllocationItem(l, req.resourceSetId);
+ if (lai == null) {
+ lai = new LimitAllocationItem();
+ lai.resourceType = ResourceType.Limit;
+ lai.resourceKey = new ResourceKey();
+ lai.resourceKey.assetId = req.assetId;
+ lai.resourceKey.resourceName = req.resourceName;
+ lai.applicationId = applicationId;
+ lai.resourceSetId = req.resourceSetId;
+ lai.resourceUnionId = req.resourceUnionId;
+ lai.resourceShareGroupList = req.resourceShareGroupList;
+ lai.used = req.allocateCount;
+
+ if (l.allocationItems == null)
+ l.allocationItems = new ArrayList<AllocationItem>();
+ l.allocationItems.add(lai);
+ } else
+ lai.used = req.replace ? req.allocateCount : lai.used + req.allocateCount;
+
+ lai.allocationTime = new Date();
+
+ recalculate(l);
+
+ return l.used - uu;
+ }
+
+ public static void recalculate(LimitResource l) {
+ l.used = calculateLimitUsage(l, 0, null, null);
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/RangeUtil.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/RangeUtil.java
new file mode 100644
index 0000000..8c6cf8d
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/RangeUtil.java
@@ -0,0 +1,110 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.util;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.openecomp.sdnc.rm.data.AllocationItem;
+import org.openecomp.sdnc.rm.data.RangeAllocationItem;
+import org.openecomp.sdnc.rm.data.RangeAllocationRequest;
+import org.openecomp.sdnc.rm.data.RangeResource;
+import org.openecomp.sdnc.rm.data.ResourceKey;
+import org.openecomp.sdnc.rm.data.ResourceType;
+
+public class RangeUtil {
+
+ public static void recalculate(RangeResource r) {
+ r.used = new TreeSet<Integer>();
+ if (r.allocationItems != null)
+ for (AllocationItem ai : r.allocationItems) {
+ RangeAllocationItem rai = (RangeAllocationItem) ai;
+ if (rai.used != null)
+ r.used.addAll(rai.used);
+ }
+ }
+
+ public static boolean checkRange(RangeResource r, RangeAllocationRequest req, int num) {
+ if (num < req.checkMin || num > req.checkMax)
+ return false;
+
+ if (r.allocationItems != null)
+ for (AllocationItem ai : r.allocationItems) {
+ RangeAllocationItem rai = (RangeAllocationItem) ai;
+ if (!eq(req.resourceUnionId, rai.resourceUnionId) && rai.used != null && rai.used.contains(num))
+ return false;
+ }
+
+ return true;
+ }
+
+ private static boolean eq(Object o1, Object o2) {
+ return o1 == null ? o2 == null : o1.equals(o2);
+ }
+
+ public static SortedSet<Integer> getUsed(RangeResource r, String resourceUnionId) {
+ SortedSet<Integer> used = new TreeSet<Integer>();
+ if (r.allocationItems != null)
+ for (AllocationItem ai : r.allocationItems) {
+ RangeAllocationItem rai = (RangeAllocationItem) ai;
+ if (eq(resourceUnionId, rai.resourceUnionId) && rai.used != null)
+ used.addAll(rai.used);
+ }
+ return used;
+ }
+
+ public static void allocateRange(
+ RangeResource rr,
+ SortedSet<Integer> requestedNumbers,
+ RangeAllocationRequest req,
+ String applicationId) {
+ if (!req.allocate)
+ return;
+
+ RangeAllocationItem rai = (RangeAllocationItem) ResourceUtil.getAllocationItem(rr, req.resourceSetId);
+ if (rai == null) {
+ rai = new RangeAllocationItem();
+ rai.resourceType = ResourceType.Range;
+ rai.resourceKey = new ResourceKey();
+ rai.resourceKey.assetId = req.assetId;
+ rai.resourceKey.resourceName = req.resourceName;
+ rai.applicationId = applicationId;
+ rai.resourceSetId = req.resourceSetId;
+ rai.resourceUnionId = req.resourceUnionId;
+ rai.resourceShareGroupList = req.resourceShareGroupList;
+ rai.used = requestedNumbers;
+
+ if (rr.allocationItems == null)
+ rr.allocationItems = new ArrayList<AllocationItem>();
+ rr.allocationItems.add(rai);
+ } else if (req.replace)
+ rai.used = requestedNumbers;
+ else
+ rai.used.addAll(requestedNumbers);
+
+ rai.allocationTime = new Date();
+
+ recalculate(rr);
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/ResourceUtil.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/ResourceUtil.java
new file mode 100644
index 0000000..120474d
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/rm/util/ResourceUtil.java
@@ -0,0 +1,49 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.rm.util;
+
+import org.openecomp.sdnc.rm.data.AllocationItem;
+import org.openecomp.sdnc.rm.data.LabelResource;
+import org.openecomp.sdnc.rm.data.LimitResource;
+import org.openecomp.sdnc.rm.data.Resource;
+import org.openecomp.sdnc.rm.data.ResourceType;
+
+public class ResourceUtil {
+
+ public static AllocationItem getAllocationItem(Resource r, String resourceSetId) {
+ if (r.allocationItems != null)
+ for (AllocationItem ai : r.allocationItems)
+ if (ai.resourceSetId != null && ai.resourceSetId.equals(resourceSetId))
+ return ai;
+ return null;
+ }
+
+ public static void recalculate(Resource r) {
+ if (r == null)
+ return;
+
+ if (r.resourceType == ResourceType.Limit)
+ LimitUtil.recalculate((LimitResource) r);
+ else if (r.resourceType == ResourceType.Label)
+ LabelUtil.recalculate((LabelResource) r);
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/db/DataSourceWrap.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/db/DataSourceWrap.java
new file mode 100644
index 0000000..0ed2a72
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/db/DataSourceWrap.java
@@ -0,0 +1,98 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.util.db;
+
+import java.io.PrintWriter;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.SQLFeatureNotSupportedException;
+
+import javax.sql.DataSource;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataSourceWrap implements DataSource {
+
+ private static final Logger log = LoggerFactory.getLogger(DataSourceWrap.class);
+
+ private DataSource dataSource;
+
+ @Override
+ public PrintWriter getLogWriter() throws SQLException {
+ return dataSource.getLogWriter();
+ }
+
+ @Override
+ public void setLogWriter(PrintWriter out) throws SQLException {
+ dataSource.setLogWriter(out);
+ }
+
+ @Override
+ public void setLoginTimeout(int seconds) throws SQLException {
+ dataSource.setLoginTimeout(seconds);
+ }
+
+ @Override
+ public int getLoginTimeout() throws SQLException {
+ return dataSource.getLoginTimeout();
+ }
+
+ @Override
+ public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException {
+ return dataSource.getParentLogger();
+ }
+
+ @Override
+ public <T> T unwrap(Class<T> iface) throws SQLException {
+ return dataSource.unwrap(iface);
+ }
+
+ @Override
+ public boolean isWrapperFor(Class<?> iface) throws SQLException {
+ return dataSource.isWrapperFor(iface);
+ }
+
+ @Override
+ public Connection getConnection() throws SQLException {
+ Connection c = dataSource.getConnection();
+
+ log.debug("getConnection: " + c.getClass().getName());
+
+ c.setAutoCommit(true);
+ return c;
+ }
+
+ @Override
+ public Connection getConnection(String username, String password) throws SQLException {
+ Connection c = dataSource.getConnection(username, password);
+
+ log.debug("getConnection: " + c.getClass().getName());
+
+ c.setAutoCommit(true);
+ return c;
+ }
+
+ public void setDataSource(DataSource dataSource) {
+ this.dataSource = dataSource;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/expr/ExpressionEvaluator.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/expr/ExpressionEvaluator.java
new file mode 100644
index 0000000..a6e8902
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/expr/ExpressionEvaluator.java
@@ -0,0 +1,207 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.util.expr;
+
+import java.util.Map;
+
+public class ExpressionEvaluator {
+
+ public static long evalLong(String expr, Map<String, Object> vars) {
+ return (long) evalFloat(expr, vars);
+ }
+
+ public static float evalFloat(String expr, Map<String, Object> vars) {
+ expr = expr.trim();
+ int sl = expr.length();
+ if (sl == 0)
+ throw new IllegalArgumentException("Cannot interpret empty string.");
+
+ // Remove parentheses if any
+ if (expr.charAt(0) == '(' && expr.charAt(sl - 1) == ')')
+ return evalFloat(expr.substring(1, sl - 1), vars);
+
+ // Look for operators in the order of least priority
+ String[] sss = findOperator(expr, "-", true);
+ if (sss != null)
+ return evalFloat(sss[0], vars) - evalFloat(sss[1], vars);
+
+ sss = findOperator(expr, "+", true);
+ if (sss != null)
+ return evalFloat(sss[0], vars) + evalFloat(sss[1], vars);
+
+ sss = findOperator(expr, "/", true);
+ if (sss != null)
+ return evalFloat(sss[0], vars) / evalFloat(sss[1], vars);
+
+ sss = findOperator(expr, "*", true);
+ if (sss != null)
+ return evalFloat(sss[0], vars) * evalFloat(sss[1], vars);
+
+ // Check if expr is a number
+ try {
+ return Float.valueOf(expr);
+ } catch (Exception e) {
+ }
+
+ // Must be a variable
+ Object v = vars.get(expr);
+ if (v != null) {
+ if (v instanceof Float)
+ return (Float) v;
+ if (v instanceof Long)
+ return (Long) v;
+ if (v instanceof Integer)
+ return (Integer) v;
+ }
+ return 0;
+ }
+
+ public static boolean evalBoolean(String expr, Map<String, Object> vars) {
+ expr = expr.trim();
+ int sl = expr.length();
+ if (sl == 0)
+ throw new IllegalArgumentException("Cannot interpret empty string.");
+
+ if (expr.equalsIgnoreCase("true"))
+ return true;
+
+ if (expr.equalsIgnoreCase("false"))
+ return false;
+
+ // Remove parentheses if any
+ if (expr.charAt(0) == '(' && expr.charAt(sl - 1) == ')')
+ return evalBoolean(expr.substring(1, sl - 1), vars);
+
+ // Look for operators in the order of least priority
+ String[] sss = findOperator(expr, "or", true);
+ if (sss != null)
+ return evalBoolean(sss[0], vars) || evalBoolean(sss[1], vars);
+
+ sss = findOperator(expr, "and", true);
+ if (sss != null)
+ return evalBoolean(sss[0], vars) && evalBoolean(sss[1], vars);
+
+ sss = findOperator(expr, "not", true);
+ if (sss != null)
+ return !evalBoolean(sss[1], vars);
+
+ sss = findOperator(expr, "!=", false);
+ if (sss == null)
+ sss = findOperator(expr, "<>", false);
+ if (sss != null)
+ return evalLong(sss[0], vars) != evalLong(sss[1], vars);
+
+ sss = findOperator(expr, "==", false);
+ if (sss == null)
+ sss = findOperator(expr, "=", false);
+ if (sss != null)
+ return evalLong(sss[0], vars) == evalLong(sss[1], vars);
+
+ sss = findOperator(expr, ">=", false);
+ if (sss != null)
+ return evalLong(sss[0], vars) >= evalLong(sss[1], vars);
+
+ sss = findOperator(expr, ">", false);
+ if (sss != null)
+ return evalLong(sss[0], vars) > evalLong(sss[1], vars);
+
+ sss = findOperator(expr, "<=", false);
+ if (sss != null)
+ return evalLong(sss[0], vars) <= evalLong(sss[1], vars);
+
+ sss = findOperator(expr, "<", false);
+ if (sss != null)
+ return evalLong(sss[0], vars) < evalLong(sss[1], vars);
+
+ throw new IllegalArgumentException("Cannot interpret '" + expr + "': Invalid expression.");
+ }
+
+ private static String[] findOperator(String s, String op, boolean delimiterRequired) {
+ int opl = op.length();
+ int sl = s.length();
+ String delimiters = " \0\t\r\n()";
+ int pcount = 0, qcount = 0;
+ for (int i = 0; i < sl; i++) {
+ char c = s.charAt(i);
+ if (c == '(' && qcount == 0)
+ pcount++;
+ else if (c == ')' && qcount == 0) {
+ pcount--;
+ if (pcount < 0)
+ throw new IllegalArgumentException("Cannot interpret '" + s + "': Parentheses do not match.");
+ } else if (c == '\'')
+ qcount = (qcount + 1) % 2;
+ else if (i <= sl - opl && pcount == 0 && qcount == 0) {
+ String ss = s.substring(i, i + opl);
+ if (ss.equalsIgnoreCase(op)) {
+ boolean found = true;
+ if (delimiterRequired) {
+ // Check for delimiter before and after to make sure it is not part of another word
+ char chbefore = '\0';
+ if (i > 0)
+ chbefore = s.charAt(i - 1);
+ char chafter = '\0';
+ if (i < sl - opl)
+ chafter = s.charAt(i + opl);
+ found = delimiters.indexOf(chbefore) >= 0 && delimiters.indexOf(chafter) >= 0;
+ }
+ if (found) {
+ // We've found the operator, split the string
+ String[] sss = new String[2];
+ sss[0] = s.substring(0, i);
+ sss[1] = s.substring(i + opl);
+ return sss;
+ }
+ }
+ }
+ }
+ if (pcount > 0)
+ throw new IllegalArgumentException("Cannot interpret '" + s + "': Parentheses do not match.");
+ if (qcount > 0)
+ throw new IllegalArgumentException("Cannot interpret '" + s + "': No closing '.");
+ return null;
+ }
+
+ private static Object parseObject(String s) {
+ s = s.trim();
+ int sl = s.length();
+ if (sl == 0)
+ throw new IllegalArgumentException("Cannot interpret empty string.");
+ if (s.equalsIgnoreCase("null"))
+ return null;
+ if (s.charAt(0) == '\'') {
+ if (sl < 2 || s.charAt(sl - 1) != '\'')
+ throw new IllegalArgumentException("Cannot interpret '" + s + "': No closing '.");
+ return s.substring(1, sl - 1);
+ }
+ // Not in quotes - must be a number
+ try {
+ return Long.valueOf(s);
+ } catch (Exception e) {
+ }
+ try {
+ return Double.valueOf(s);
+ } catch (Exception e) {
+ throw new IllegalArgumentException("Cannot interpret '" + s + "': Invalid number.");
+ }
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/speed/SpeedUtil.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/speed/SpeedUtil.java
new file mode 100644
index 0000000..b4c800e
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/speed/SpeedUtil.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.util.speed;
+
+public class SpeedUtil {
+
+ private long unitFactor = 1000;
+
+ public long convertToKbps(long maxSpeed, String unit) {
+ if (unit.equalsIgnoreCase("kbps"))
+ return maxSpeed;
+ if (unit.equalsIgnoreCase("Mbps"))
+ return maxSpeed * unitFactor;
+ if (unit.equalsIgnoreCase("Gbps"))
+ return maxSpeed * unitFactor * unitFactor;
+ return 0;
+ }
+
+ public void setUnitFactor(long unitFactor) {
+ this.unitFactor = unitFactor;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/str/StrUtil.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/str/StrUtil.java
new file mode 100644
index 0000000..7d7f013
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/str/StrUtil.java
@@ -0,0 +1,305 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.util.str;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Field;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class StrUtil {
+
+ private static final Logger log = LoggerFactory.getLogger(StrUtil.class);
+
+ public static final String INDENT_STR = " ";
+
+ public static void indent(StringBuilder ss, int ind) {
+ for (int i = 0; i < ind; i++)
+ ss.append(INDENT_STR);
+ }
+
+ public static void info(Logger log, Object o) {
+ if (log.isInfoEnabled()) {
+ StringBuilder ss = new StringBuilder();
+ struct(ss, o);
+ log.info(ss.toString());
+ }
+ }
+
+ public static void debug(Logger log, Object o) {
+ if (log.isDebugEnabled()) {
+ StringBuilder ss = new StringBuilder();
+ struct(ss, o);
+ log.debug(ss.toString());
+ }
+ }
+
+ public static void struct(StringBuilder ss, Object o) {
+ struct(ss, o, 0);
+ }
+
+ public static void struct(StringBuilder ss, Object o, int ind) {
+ if (o == null) {
+ ss.append("null");
+ return;
+ }
+
+ if (isSimple(o)) {
+ ss.append(o);
+ return;
+ }
+
+ Class<? extends Object> cls = o.getClass();
+
+ if (cls.isEnum()) {
+ ss.append(o);
+ return;
+ }
+
+ if (cls.isArray()) {
+ int n = Array.getLength(o);
+ if (n == 0) {
+ ss.append("[]");
+ return;
+ }
+
+ Object o1 = Array.get(o, 0);
+ if (isSimple(o1)) {
+ ss.append('[').append(o1);
+ for (int i = 1; i < n; i++) {
+ o1 = Array.get(o, i);
+ ss.append(", ").append(o1);
+ }
+ ss.append(']');
+ return;
+ }
+
+ ss.append('\n');
+ indent(ss, ind + 1);
+ ss.append('[');
+ struct(ss, o1, ind + 1);
+ for (int i = 1; i < n; i++) {
+ o1 = Array.get(o, i);
+ struct(ss, o1, ind + 1);
+ }
+ ss.append('\n');
+ indent(ss, ind + 1);
+ ss.append(']');
+ return;
+ }
+
+ if (o instanceof Collection<?>) {
+ Collection<?> ll = (Collection<?>) o;
+
+ int n = ll.size();
+ if (n == 0) {
+ ss.append("[]");
+ return;
+ }
+
+ Iterator<?> ii = ll.iterator();
+ Object o1 = ii.next();
+ if (isSimple(o1)) {
+ ss.append('[').append(o1);
+ while (ii.hasNext()) {
+ o1 = ii.next();
+ ss.append(", ").append(o1);
+ }
+ ss.append(']');
+ return;
+ }
+
+ ss.append('\n');
+ indent(ss, ind + 1);
+ ss.append('[');
+ struct(ss, o1, ind + 1);
+ while (ii.hasNext()) {
+ o1 = ii.next();
+ struct(ss, o1, ind + 1);
+ }
+ ss.append('\n');
+ indent(ss, ind + 1);
+ ss.append(']');
+ return;
+
+ }
+
+ if (o instanceof Map<?, ?>) {
+ Map<?, ?> mm = (Map<?, ?>) o;
+
+ int n = mm.size();
+ if (n == 0) {
+ ss.append("{}");
+ return;
+ }
+
+ ss.append('{');
+
+ for (Object k : mm.keySet()) {
+ ss.append('\n');
+ indent(ss, ind + 1);
+ ss.append(k).append(": ");
+
+ Object o1 = mm.get(k);
+ struct(ss, o1, ind + 2);
+ }
+
+ ss.append('\n');
+ indent(ss, ind);
+ ss.append('}');
+
+ return;
+ }
+
+ Field[] fields = cls.getFields();
+
+ if (fields.length == 0) {
+ ss.append(o);
+ return;
+ }
+
+ ss.append('\n');
+ indent(ss, ind + 1);
+ ss.append('<').append(cls.getSimpleName()).append("> {");
+ for (Field f : fields) {
+ ss.append('\n');
+ indent(ss, ind + 2);
+ ss.append(f.getName()).append(": ");
+ Object v = null;
+ try {
+ v = f.get(o);
+ } catch (IllegalAccessException e) {
+ v = "*** Cannot obtain value *** : " + e.getMessage();
+ }
+ struct(ss, v, ind + 2);
+ }
+ ss.append('\n');
+ indent(ss, ind + 1);
+ ss.append('}');
+ }
+
+ public static SortedSet<Integer> listInt(String ss, String warning) {
+ if (ss == null || ss.length() == 0)
+ return null;
+
+ SortedSet<Integer> ll = new TreeSet<Integer>();
+ String[] str = ss.split(",");
+ for (String s : str) {
+ try {
+ int i1 = s.indexOf('-');
+ int start, end;
+ if (i1 > 0) {
+ String s1 = s.substring(0, i1);
+ String s2 = s.substring(i1 + 1);
+ start = Integer.parseInt(s1);
+ end = Integer.parseInt(s2);
+ } else
+ start = end = Integer.parseInt(s);
+ for (int i = start; i <= end; i++)
+ ll.add(i);
+ } catch (NumberFormatException e) {
+ // Skip this - bad data in DB
+ log.warn(warning + " [" + s + "].", e);
+ }
+ }
+ return ll;
+ }
+
+ public static String listInt(SortedSet<Integer> ll) {
+ if (ll == null || ll.size() == 0)
+ return null;
+
+ StringBuilder sb = new StringBuilder(2000);
+ Iterator<Integer> i = ll.iterator();
+ int n = i.next();
+ int start = n;
+ int end = n;
+ boolean first = true;
+ while (i.hasNext()) {
+ n = i.next();
+ if (n != end + 1) {
+ if (!first)
+ sb.append(',');
+ first = false;
+
+ if (start == end)
+ sb.append(start);
+ else if (start == end - 1)
+ sb.append(start).append(',').append(end);
+ else
+ sb.append(start).append('-').append(end);
+
+ start = n;
+ }
+ end = n;
+ }
+
+ if (!first)
+ sb.append(',');
+
+ if (start == end)
+ sb.append(start);
+ else if (start == end - 1)
+ sb.append(start).append(',').append(end);
+ else
+ sb.append(start).append('-').append(end);
+
+ return sb.toString();
+ }
+
+ public static List<String> listStr(String s) {
+ if (s == null || s.length() == 0)
+ return null;
+ String[] ss = s.split(",");
+ return Arrays.asList(ss);
+ }
+
+ public static String listStr(Collection<String> ll) {
+ if (ll == null || ll.isEmpty())
+ return null;
+ StringBuilder ss = new StringBuilder(1000);
+ Iterator<String> i = ll.iterator();
+ ss.append(i.next());
+ while (i.hasNext())
+ ss.append(',').append(i.next());
+ return ss.toString();
+ }
+
+ private static boolean isSimple(Object o) {
+ if (o == null)
+ return true;
+
+ if (o instanceof Number || o instanceof String || o instanceof Boolean || o instanceof Date)
+ return true;
+
+ return false;
+ }
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/vrf/VpnParam.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/vrf/VpnParam.java
new file mode 100644
index 0000000..0731cc0
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/vrf/VpnParam.java
@@ -0,0 +1,30 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.util.vrf;
+
+public class VpnParam {
+
+ public String vpnId;
+ public String siteType;
+ public String spokeServiceInstanceId;
+ public String routeGroupName;
+}
diff --git a/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/vrf/VrfUtil.java b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/vrf/VrfUtil.java
new file mode 100644
index 0000000..0ce7206
--- /dev/null
+++ b/resource-assignment/provider/src/main/java/org/openecomp/sdnc/util/vrf/VrfUtil.java
@@ -0,0 +1,76 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.util.vrf;
+
+public class VrfUtil {
+
+ public static String createVrfInstanceName(
+ String serviceInstanceId,
+ String vpnId,
+ String siteType,
+ String routeGroup) {
+ if (vpnId == null || vpnId.trim().length() == 0)
+ return null;
+
+ String ss = "VPN-" + vpnId;
+ if (siteType != null && siteType.equalsIgnoreCase("hub"))
+ ss += "-HUB";
+ if (siteType != null && siteType.equalsIgnoreCase("spoke"))
+ ss += "-SP-" + serviceInstanceId;
+ if (routeGroup != null && routeGroup.trim().length() > 0)
+ ss += "-RG-" + routeGroup;
+
+ return ss;
+ }
+
+ public static VpnParam parseVrfInstanceName(String vrfInstanceName) {
+ VpnParam vpnParam = new VpnParam();
+
+ int i1 = vrfInstanceName.indexOf("-HUB");
+ if (i1 > 0)
+ vpnParam.siteType = "HUB";
+
+ int i2 = vrfInstanceName.indexOf("-SP-");
+ if (i2 > 0)
+ vpnParam.siteType = "SPOKE";
+
+ int i3 = vrfInstanceName.indexOf("-RG-");
+ if (i3 > 0)
+ vpnParam.routeGroupName = vrfInstanceName.substring(i3 + 4);
+
+ int i4 = vrfInstanceName.length();
+ if (i1 > 0)
+ i4 = i1;
+ else if (i2 > 0)
+ i4 = i2;
+ else if (i3 > 0)
+ i4 = i3;
+ vpnParam.vpnId = vrfInstanceName.substring(4, i4);
+
+ if (i2 > 0 && i3 < 0)
+ vpnParam.spokeServiceInstanceId = vrfInstanceName.substring(i2 + 4);
+ if (i2 > 0 && i3 > 0)
+ vpnParam.spokeServiceInstanceId = vrfInstanceName.substring(i2 + 4, i3);
+
+ return vpnParam;
+ }
+}
diff --git a/resource-assignment/provider/src/main/resources/META-INF/spring/resource-assignment-context.xml b/resource-assignment/provider/src/main/resources/META-INF/spring/resource-assignment-context.xml
new file mode 100644
index 0000000..85d8acc
--- /dev/null
+++ b/resource-assignment/provider/src/main/resources/META-INF/spring/resource-assignment-context.xml
@@ -0,0 +1,275 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR 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">
+
+ <!-- JDBC setup -->
+
+ <bean id="rm.dataSource" class="org.openecomp.sdnc.util.db.DataSourceWrap">
+ <property name="dataSource" ref="dblib.dataSource" />
+ </bean>
+
+ <bean id="rm.jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
+ <property name="dataSource" ref="rm.dataSource" />
+ </bean>
+
+ <!-- Utils Configuration -->
+
+ <bean id="speedUtil" class="org.openecomp.sdnc.util.speed.SpeedUtil">
+ <property name="unitFactor" value="1000" />
+ </bean>
+
+ <!-- Resource Lock Configuration -->
+
+ <bean id="resourceLockDao" class="org.openecomp.sdnc.lock.dao.ResourceLockDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="lockHelper" class="org.openecomp.sdnc.lock.comp.LockHelperImpl">
+ <property name="resourceLockDao" ref="resourceLockDao" />
+ <property name="retryCount" value="10" />
+ <property name="lockWait" value="5" /> <!-- Seconds -->
+ </bean>
+
+ <!-- RM Configuration -->
+
+ <bean id="resourceJdbcDao" class="org.openecomp.sdnc.rm.dao.jdbc.ResourceJdbcDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="allocationItemJdbcDao" class="org.openecomp.sdnc.rm.dao.jdbc.AllocationItemJdbcDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="resourceLoadJdbcDao" class="org.openecomp.sdnc.rm.dao.jdbc.ResourceLoadJdbcDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="resourceDao" class="org.openecomp.sdnc.rm.dao.jdbc.ResourceDaoImpl">
+ <property name="resourceJdbcDao" ref="resourceJdbcDao" />
+ <property name="allocationItemJdbcDao" ref="allocationItemJdbcDao" />
+ <property name="resourceLoadJdbcDao" ref="resourceLoadJdbcDao" />
+ </bean>
+
+ <bean id="resourceManager" class="org.openecomp.sdnc.rm.comp.ResourceManagerImpl">
+ <property name="lockHelper" ref="lockHelper" />
+ <property name="resourceDao" ref="resourceDao" />
+ <property name="applicationId" value="SDNC" />
+ <property name="lockTimeout" value="600" /> <!-- Seconds -->
+ </bean>
+
+ <!-- Equipment DAO Configuration -->
+
+ <bean id="serverDao" class="org.openecomp.sdnc.ra.equip.dao.ServerDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="vpePortDao" class="org.openecomp.sdnc.ra.equip.dao.VpePortDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="vplspePortDao" class="org.openecomp.sdnc.ra.equip.dao.VplspePortDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <!-- Rule DAO Configuration -->
+
+ <bean id="parameterDao" class="org.openecomp.sdnc.ra.rule.dao.ParameterDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="maxPortSpeedDao" class="org.openecomp.sdnc.ra.rule.dao.MaxPortSpeedDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ <property name="speedUtil" ref="speedUtil" />
+ </bean>
+
+ <bean id="maxServerSpeedDao" class="org.openecomp.sdnc.ra.rule.dao.MaxServerSpeedDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ <property name="speedUtil" ref="speedUtil" />
+ </bean>
+
+ <bean id="resourceRuleDao" class="org.openecomp.sdnc.ra.rule.dao.ResourceRuleDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="rangeRuleDao" class="org.openecomp.sdnc.ra.rule.dao.RangeRuleDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="vpeLockDao" class="org.openecomp.sdnc.ra.rule.dao.VpeLockDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <!-- Service DAO Configuration -->
+
+ <bean id="serviceResourceDao" class="org.openecomp.sdnc.ra.service.dao.ServiceResourceDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <!-- ResourceAllocator Configuration -->
+
+ <bean id="allocationRequestBuilder"
+ class="org.openecomp.sdnc.ra.rule.comp.AllocationRequestBuilderImpl">
+ <property name="resourceRuleDao" ref="resourceRuleDao" />
+ <property name="rangeRuleDao" ref="rangeRuleDao" />
+ </bean>
+
+ <bean id="resourceAllocator" class="org.openecomp.sdnc.ra.ResourceAllocator">
+ <property name="speedUtil" ref="speedUtil" />
+ <property name="parameterDao" ref="parameterDao" />
+ <property name="serverDao" ref="serverDao" />
+ <property name="vpePortDao" ref="vpePortDao" />
+ <property name="vplspePortDao" ref="vplspePortDao" />
+ <property name="maxPortSpeedDao" ref="maxPortSpeedDao" />
+ <property name="maxServerSpeedDao" ref="maxServerSpeedDao" />
+ <property name="serviceResourceDao" ref="serviceResourceDao" />
+ <property name="allocationRequestBuilder" ref="allocationRequestBuilder" />
+ <property name="resourceManager" ref="resourceManager" />
+ <property name="endPointAllocator" ref="endPointAllocator" />
+ </bean>
+
+ <!-- EndPointAllocator Configuration -->
+
+ <bean id="endPointAllocator" class="org.openecomp.sdnc.ra.comp.EndPointAllocatorImpl">
+ <property name="resourceManager" ref="resourceManager" />
+ <property name="endPointAllocationDefinitionMap">
+ <map>
+ <entry key="L3AVPN-PORT">
+ <list>
+ <bean class="org.openecomp.sdnc.ra.comp.EndPointAllocationDefinition">
+ <property name="serviceModel" value="L3AVPN-PORT" />
+ <property name="endPointPosition" value="VPE-Cust" />
+ <property name="equipmentReader" ref="vpePortReader" />
+ <property name="equipmentCheckList">
+ <list>
+ <ref bean="provStatusCheck" />
+ <ref bean="excludeVpeCheck" />
+ <ref bean="anyVrfPresentCheck" />
+ </list>
+ </property>
+ <property name="preferenceRuleList">
+ <list>
+ <ref bean="affinityLinkPref" />
+ </list>
+ </property>
+ <property name="allocationRuleList">
+ <list>
+ <ref bean="dbAllocationRule" />
+ <ref bean="affinityAllocationRule" />
+ </list>
+ </property>
+ </bean>
+ </list>
+ </entry>
+ <entry key="L3AVPN-EVC">
+ <list>
+ <bean class="org.openecomp.sdnc.ra.comp.EndPointAllocationDefinition">
+ <property name="serviceModel" value="L3AVPN-EVC" />
+ <property name="endPointPosition" value="VPE-Cust" />
+ <property name="equipmentReader" ref="vpePortReader" />
+ <property name="equipmentCheckList">
+ <list>
+ <ref bean="provStatusCheck" />
+ <ref bean="excludeVpeCheck" />
+ <ref bean="vpeLockCheck" />
+ <ref bean="anyVrfPresentCheck" />
+ <ref bean="oneMVrfCheck" />
+ <ref bean="hubWithRgCheck" />
+ </list>
+ </property>
+ <property name="preferenceRuleList">
+ <list>
+ <ref bean="affinityLinkPref" />
+ </list>
+ </property>
+ <property name="allocationRuleList">
+ <list>
+ <ref bean="dbAllocationRule" />
+ <ref bean="vrfAllocationRule" />
+ <ref bean="servingSiteAllocationRule" />
+ <ref bean="affinityAllocationRule" />
+ </list>
+ </property>
+ </bean>
+ </list>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!-- Equipment Readers Configuration -->
+
+ <bean id="vpePortReader" class="org.openecomp.sdnc.ra.reader.VpePortReader">
+ <property name="vpePortDao" ref="vpePortDao" />
+ </bean>
+
+ <!-- Equipment Checks Configuration -->
+
+ <bean id="provStatusCheck" class="org.openecomp.sdnc.ra.check.ProvStatusCheck">
+ </bean>
+
+ <bean id="excludeVpeCheck" class="org.openecomp.sdnc.ra.check.ExcludeVpeCheck">
+ </bean>
+
+ <bean id="vpeLockCheck" class="org.openecomp.sdnc.ra.check.VpeLockCheck">
+ <property name="vpeLockDao" ref="vpeLockDao" />
+ <property name="resourceManager" ref="resourceManager" />
+ </bean>
+
+ <bean id="anyVrfPresentCheck" class="org.openecomp.sdnc.ra.check.AnyVrfPresentCheck">
+ <property name="resourceManager" ref="resourceManager" />
+ </bean>
+
+ <bean id="oneMVrfCheck" class="org.openecomp.sdnc.ra.check.OneMVrfCheck">
+ <property name="resourceManager" ref="resourceManager" />
+ </bean>
+
+ <bean id="hubWithRgCheck" class="org.openecomp.sdnc.ra.check.HubWithRgCheck">
+ <property name="resourceManager" ref="resourceManager" />
+ </bean>
+
+ <!-- Preference Rule Configuration -->
+
+ <bean id="affinityLinkPref" class="org.openecomp.sdnc.ra.pref.AffinityLinkPref">
+ <property name="resourceManager" ref="resourceManager" />
+ </bean>
+
+ <!-- Resource Allocation Rule Configuration -->
+
+ <bean id="dbAllocationRule" class="org.openecomp.sdnc.ra.alloc.DbAllocationRule">
+ <property name="resourceRuleDao" ref="resourceRuleDao" />
+ <property name="rangeRuleDao" ref="rangeRuleDao" />
+ </bean>
+
+ <bean id="vrfAllocationRule" class="org.openecomp.sdnc.ra.alloc.VrfAllocationRule">
+ </bean>
+
+ <bean id="servingSiteAllocationRule" class="org.openecomp.sdnc.ra.alloc.ServingSiteAllocationRule">
+ </bean>
+
+ <bean id="affinityAllocationRule" class="org.openecomp.sdnc.ra.alloc.AffinityAllocationRule">
+ </bean>
+
+</beans>
diff --git a/resource-assignment/provider/src/main/resources/META-INF/spring/resource-assignment-osgi-context.xml b/resource-assignment/provider/src/main/resources/META-INF/spring/resource-assignment-osgi-context.xml
new file mode 100644
index 0000000..6dacef1
--- /dev/null
+++ b/resource-assignment/provider/src/main/resources/META-INF/spring/resource-assignment-osgi-context.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR 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:beans xmlns="http://www.springframework.org/schema/osgi"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
+ xsi:schemaLocation="http://www.springframework.org/schema/osgi
+ http://www.springframework.org/schema/osgi/spring-osgi.xsd
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+ <reference id="dblib.dataSource">
+ <interfaces>
+ <beans:value>javax.sql.DataSource</beans:value>
+ <beans:value>org.openecomp.sdnc.sli.resource.dblib.DbLibService</beans:value>
+ </interfaces>
+ </reference>
+
+ <service ref="resourceAllocator" interface="org.openecomp.sdnc.ra.ResourceAllocator" />
+
+</beans:beans>
diff --git a/resource-assignment/provider/src/main/resources/resource-allocator.properties b/resource-assignment/provider/src/main/resources/resource-allocator.properties
new file mode 100644
index 0000000..0045534
--- /dev/null
+++ b/resource-assignment/provider/src/main/resources/resource-allocator.properties
@@ -0,0 +1,26 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+org.openecomp.sdnc.sli.dbtype = jdbc
+org.openecomp.sdnc.sli.jdbc.url = jdbc:mysql://dbhost:3306/sdnctl
+org.openecomp.sdnc.sli.jdbc.database = sdnctl
+org.openecomp.sdnc.sli.jdbc.user = sdnctl
+org.openecomp.sdnc.sli.jdbc.password = gamma
diff --git a/resource-assignment/provider/src/main/resources/sql/001_resource_rule_ddl.sql b/resource-assignment/provider/src/main/resources/sql/001_resource_rule_ddl.sql
new file mode 100644
index 0000000..cfbb518
--- /dev/null
+++ b/resource-assignment/provider/src/main/resources/sql/001_resource_rule_ddl.sql
@@ -0,0 +1,32 @@
+---
+-- ============LICENSE_START=======================================================
+-- openECOMP : SDN-C
+-- ================================================================================
+-- Copyright (C) 2017 AT&T Intellectual Property. All rights
+-- reserved.
+-- ================================================================================
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-- ============LICENSE_END=========================================================
+---
+
+CREATE TABLE resource_rule (
+ resource_rule_id SERIAL PRIMARY KEY,
+ resource_name VARCHAR(50) NOT NULL,
+ end_point_position VARCHAR(50) NOT NULL,
+ service_expression VARCHAR(2000) NOT NULL,
+ equipment_level VARCHAR(50) NOT NULL,
+ equipment_expression VARCHAR(2000) NOT NULL,
+ allocation_expression VARCHAR(2000) NOT NULL,
+ soft_limit_expression VARCHAR(2000) NOT NULL,
+ hard_limit_expression VARCHAR(2000) NOT NULL
+);
diff --git a/resource-assignment/provider/src/main/resources/sql/002_max_port_speed_ddl.sql b/resource-assignment/provider/src/main/resources/sql/002_max_port_speed_ddl.sql
new file mode 100644
index 0000000..068f1b8
--- /dev/null
+++ b/resource-assignment/provider/src/main/resources/sql/002_max_port_speed_ddl.sql
@@ -0,0 +1,29 @@
+---
+-- ============LICENSE_START=======================================================
+-- openECOMP : SDN-C
+-- ================================================================================
+-- Copyright (C) 2017 AT&T Intellectual Property. All rights
+-- reserved.
+-- ================================================================================
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-- ============LICENSE_END=========================================================
+---
+
+CREATE TABLE max_port_speed (
+ max_port_speed_id SERIAL PRIMARY KEY,
+ image_file_name VARCHAR(50) NOT NULL,
+ end_point_position VARCHAR(50) NOT NULL,
+ interface_name VARCHAR(100) NOT NULL,
+ max_speed BIGINT NOT NULL,
+ unit VARCHAR(10) NOT NULL
+);
diff --git a/resource-assignment/provider/src/main/resources/sql/003_max_server_speed_ddl.sql b/resource-assignment/provider/src/main/resources/sql/003_max_server_speed_ddl.sql
new file mode 100644
index 0000000..c81284e
--- /dev/null
+++ b/resource-assignment/provider/src/main/resources/sql/003_max_server_speed_ddl.sql
@@ -0,0 +1,28 @@
+---
+-- ============LICENSE_START=======================================================
+-- openECOMP : SDN-C
+-- ================================================================================
+-- Copyright (C) 2017 AT&T Intellectual Property. All rights
+-- reserved.
+-- ================================================================================
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-- ============LICENSE_END=========================================================
+---
+
+CREATE TABLE max_server_speed (
+ max_server_speed_id SERIAL PRIMARY KEY,
+ server_model VARCHAR(50) NOT NULL,
+ evc_count SMALLINT NOT NULL,
+ max_speed BIGINT NOT NULL,
+ unit VARCHAR(10) NOT NULL
+);
diff --git a/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/DataSetup.java b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/DataSetup.java
new file mode 100644
index 0000000..f46a71a
--- /dev/null
+++ b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/DataSetup.java
@@ -0,0 +1,261 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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 jtest.org.openecomp.sdnc.ra;
+
+import java.util.Date;
+
+import jtest.util.org.openecomp.sdnc.ra.TestDb;
+import jtest.util.org.openecomp.sdnc.ra.TestTable;
+
+public class DataSetup {
+
+ private TestDb testDb;
+
+ private TestTable vpePool = null;
+ private TestTable vplspePool = null;
+ private TestTable pserver = null;
+ private TestTable serviceResource = null;
+ private TestTable resource = null;
+ private TestTable allocationItem = null;
+
+ private static final String[] VPE_POOL_COLUMNS = {
+ "vpe_name", "ipv4_oam_address", "loopback0_ipv4_address", "provisioning_status", "aic_site_id",
+ "availability_zone", "vlan_id_outer", "vendor", "physical_intf_name", "physical_intf_speed",
+ "physical_intf_units", "vpe_uuid", "vpe_id", "image_filename" };
+
+ private static final String[] VPLSPE_POOL_COLUMNS = {
+ "vplspe_name", "aic_site_id", "availability_zone", "physical_intf_name", "physical_intf_speed",
+ "physical_intf_units", "loopback0_ipv4_address", "vlan_id_outer", "vplspe_uuid", "image_filename",
+ "provisioning_status", "vendor" };
+
+ private static final String[] PSERVER_COLUMNS = {
+ "hostname", "ptnii_equip_name", "number_of_cpus", "disk_in_gigabytes", "ram_in_megabytes", "equip_type",
+ "equip_vendor", "equip_model", "fqdn", "pserver_selflink", "ipv4_oam_address", "serial_number",
+ "pserver_id", "internet_topology", "aic_site_id", "in_maint", "pserver_name2", "purpose" };
+
+ private static final String[] SERVICE_RESOURCE_COLUMNS = {
+ "service_instance_id", "service_status", "service_change_number", "resource_set_id", "resource_union_id" };
+
+ private static final String[] RESOURCE_COLUMNS = { "asset_id", "resource_name", "resource_type", "lt_used" };
+
+ private static final String[] ALLOCATION_ITEM_COLUMNS = {
+ "resource_id", "application_id", "resource_set_id", "resource_union_id", "resource_share_group_list",
+ "lt_used", "allocation_time" };
+
+ private void initTables() {
+ if (vpePool == null)
+ vpePool = testDb.table("VPE_POOL", "vpe_name", VPE_POOL_COLUMNS);
+ if (vplspePool == null)
+ vplspePool = testDb.table("VPLSPE_POOL", "vplspe_name", VPLSPE_POOL_COLUMNS);
+ if (pserver == null)
+ pserver = testDb.table("PSERVER", "hostname", PSERVER_COLUMNS);
+ if (serviceResource == null)
+ serviceResource = testDb.table("SERVICE_RESOURCE", "service_resource_id", SERVICE_RESOURCE_COLUMNS);
+ if (resource == null)
+ resource = testDb.table("RESOURCE", "resource_id", RESOURCE_COLUMNS);
+ if (allocationItem == null)
+ allocationItem = testDb.table("ALLOCATION_ITEM", "allocation_item_id", ALLOCATION_ITEM_COLUMNS);
+ }
+
+ public void cleanup() {
+ initTables();
+ vpePool.delete("true");
+ vplspePool.delete("true");
+ pserver.delete("true");
+ serviceResource.delete("true");
+ allocationItem.delete("true");
+ resource.delete("true");
+ }
+
+ public void setupVpePort(
+ String aicSiteId,
+ String vpeId,
+ String interfaceName,
+ String provStatus,
+ String imageFileName) {
+ initTables();
+ vpePool.add(vpeId, "127.0.0.1", "107.134.152.139", provStatus, aicSiteId, "mtanj-esx-az01", "3501",
+ "JUNIPER", interfaceName, "1", "GBPS", "vpe002", "VPESAT-auttx200me6", imageFileName);
+ }
+
+ public void setupVplspePort(
+ String aicSiteId,
+ String vplspeId,
+ String interfaceName,
+ String provStatus,
+ String imageFileName) {
+ initTables();
+ vplspePool.add(vplspeId, aicSiteId, "mtanj-esx-az01", interfaceName, "100", "GBPS", "192.168.119.32", "3501",
+ "vpls002", imageFileName, provStatus, "JUNIPER");
+ }
+
+ public void setupPserver(String hostname, String aicSiteId) {
+ initTables();
+ pserver.add(hostname, hostname + "srv1", 4, 1000, 16000, "equip_type", "equip_vendor", "equip_model", "fqdn",
+ "pserver_selflink", "123.123.123.123", "serial_number", "pserver_id", "internet_topology", aicSiteId,
+ "N", hostname, "purpose");
+ }
+
+ public void setupService(
+ String serviceInstanceId,
+ String status,
+ int changeNumber,
+ long speedKbps,
+ String vpeId,
+ String vplspeId,
+ String serverId) {
+ initTables();
+
+ String resourceSetId = serviceInstanceId + "/" + changeNumber;
+ String resourceUnionId = serviceInstanceId;
+
+ serviceResource.add(serviceInstanceId, status, changeNumber, resourceSetId, resourceUnionId);
+
+ Long rid = resource.getId("asset_id = '" + vpeId + "/ae0' AND resource_name = 'Bandwidth'");
+ if (rid == null) {
+ resource.add(vpeId + "/ae0", "Bandwidth", "Limit", 1);
+ rid = resource.getLastId();
+ }
+ allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, speedKbps, new Date());
+
+ rid = resource.getId("asset_id = '" + vplspeId + "' AND resource_name = 'Bandwidth'");
+ if (rid == null) {
+ resource.add(vplspeId, "Bandwidth", "Limit", 1);
+ rid = resource.getLastId();
+ }
+ allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, speedKbps, new Date());
+
+ rid = resource.getId("asset_id = '" + serverId + "' AND resource_name = 'Bandwidth'");
+ if (rid == null) {
+ resource.add(serverId, "Bandwidth", "Limit", 1);
+ rid = resource.getLastId();
+ }
+ allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, speedKbps, new Date());
+
+ rid = resource.getId("asset_id = '" + serverId + "' AND resource_name = 'Connection'");
+ if (rid == null) {
+ resource.add(serverId, "Connection", "Limit", 1);
+ rid = resource.getLastId();
+ }
+ allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, 1, new Date());
+ }
+
+ public boolean serviceNotInDb(String serviceInstanceId, String status, Integer changeNumber) {
+ String where = "service_instance_id = '" + serviceInstanceId + "'";
+ if (status != null)
+ where += " AND service_status = '" + status + "'";
+ if (changeNumber != null)
+ where += " AND service_change_number = " + changeNumber;
+
+ if (serviceResource.exists(where))
+ return false;
+
+ where = "resource_union_id = '" + serviceInstanceId + "'";
+ if (changeNumber != null)
+ where += " AND resource_set_id = '" + serviceInstanceId + "/" + changeNumber + "'";
+
+ if (allocationItem.exists(where))
+ return false;
+
+ return true;
+ }
+
+ public boolean serviceCorrectInDb(String serviceInstanceId, String status, int changeNumber, long speedKbps) {
+ String where = "service_instance_id = '" + serviceInstanceId + "' AND service_status = '" + status +
+ "' AND service_change_number = " + changeNumber;
+ if (!serviceResource.exists(where))
+ return false;
+
+ where = "resource_union_id = '" + serviceInstanceId + "' AND resource_set_id = '" + serviceInstanceId + "/" +
+ changeNumber + "' AND lt_used = " + speedKbps;
+ if (!allocationItem.exists(where))
+ return false;
+
+ return true;
+ }
+
+ public boolean serviceCorrectInDb(
+ String vpeId,
+ String aicSiteId,
+ String serviceInstanceId,
+ String status,
+ int changeNumber,
+ long speedKbps) {
+
+ String where = "service_instance_id = '" + serviceInstanceId + "' AND service_status = '" + status +
+ "' AND service_change_number = " + changeNumber;
+ if (!serviceResource.exists(where))
+ return false;
+
+ Long vpebwrid = resource.getId("asset_id = '" + vpeId + "/ae0' AND resource_name = 'Bandwidth'");
+ if (vpebwrid == null)
+ return false;
+
+ where = "resource_id = " + vpebwrid + " AND resource_union_id = '" + serviceInstanceId +
+ "' AND resource_set_id = '" + serviceInstanceId + "/" + changeNumber + "' AND lt_used = " + speedKbps;
+ if (!allocationItem.exists(where))
+ return false;
+
+ Long srvbwrid = resource.getId("asset_id = '" + aicSiteId + "/Server1' AND resource_name = 'Bandwidth'");
+ if (srvbwrid == null)
+ return false;
+
+ where = "resource_id = " + srvbwrid + " AND resource_union_id = '" + serviceInstanceId +
+ "' AND resource_set_id = '" + serviceInstanceId + "/" + changeNumber + "' AND lt_used = " + speedKbps;
+ if (!allocationItem.exists(where))
+ return false;
+
+ Long srvconrid = resource.getId("asset_id = '" + aicSiteId + "/Server1' AND resource_name = 'Connection'");
+ if (srvconrid == null)
+ return false;
+
+ where = "resource_id = " + srvconrid + " AND resource_union_id = '" + serviceInstanceId +
+ "' AND resource_set_id = '" + serviceInstanceId + "/" + changeNumber + "' AND lt_used = 1";
+ if (!allocationItem.exists(where))
+ return false;
+
+ return true;
+ }
+
+ public boolean serviceCorrectInDb(
+ String serviceInstanceId,
+ String endPointPosition,
+ String status,
+ int changeNumber,
+ long speedKbps) {
+ String where = "service_instance_id = '" + serviceInstanceId + "' AND service_status = '" + status +
+ "' AND service_change_number = " + changeNumber;
+ if (!serviceResource.exists(where))
+ return false;
+
+ where = "resource_union_id = '" + serviceInstanceId + "/" + endPointPosition + "' AND resource_set_id = '" +
+ serviceInstanceId + "/" + endPointPosition + "/" + changeNumber + "' AND lt_used = " + speedKbps;
+ if (!allocationItem.exists(where))
+ return false;
+
+ return true;
+ }
+
+ public void setTestDb(TestDb testDb) {
+ this.testDb = testDb;
+ }
+}
diff --git a/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestIsAvailable.java b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestIsAvailable.java
new file mode 100644
index 0000000..44da208
--- /dev/null
+++ b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestIsAvailable.java
@@ -0,0 +1,424 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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 jtest.org.openecomp.sdnc.ra;
+
+import org.junit.Assert;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+import org.openecomp.sdnc.ra.ResourceAllocator;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = { "classpath:test-context.xml" })
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class TestIsAvailable {
+
+ private static final Logger log = LoggerFactory.getLogger(TestIsAvailable.class);
+
+ @Autowired(required = true)
+ private ResourceAllocator resourceAllocator;
+
+ @Autowired(required = true)
+ private DataSetup dataSetup;
+
+ @Test
+ public void test001() throws Exception {
+ String t = "001";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test successful response - all resources available");
+
+ String service1 = "isAvailable" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test002() throws Exception {
+ String t = "002";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test capacity not found - request very big number that is above the limits");
+
+ String service1 = "isAvailable" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Gbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+
+ String maxAvailableSpeed = ctx.getAttribute("tmp.resource-allocator-output.max-available-speed");
+ String speedUnit = ctx.getAttribute("tmp.resource-allocator-output.speed-unit");
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " + maxAvailableSpeed);
+ log.info(" tmp.resource-allocator-output.speed-unit: " + speedUnit);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(maxAvailableSpeed.equals("960000"));
+ Assert.assertTrue(speedUnit.equals("kbps"));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test003() throws Exception {
+ String t = "003";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test capacity not found - PROV check for VPE");
+
+ String service1 = "isAvailable" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "---", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+
+ String maxAvailableSpeed = ctx.getAttribute("tmp.resource-allocator-output.max-available-speed");
+ String speedUnit = ctx.getAttribute("tmp.resource-allocator-output.speed-unit");
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " + maxAvailableSpeed);
+ log.info(" tmp.resource-allocator-output.speed-unit: " + speedUnit);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(maxAvailableSpeed.equals("0"));
+ Assert.assertTrue(speedUnit.equals("kbps"));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test004() throws Exception {
+ String t = "004";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test capacity not found - PROV check for VPLSPE");
+
+ String service1 = "isAvailable" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "---", null);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+
+ String maxAvailableSpeed = ctx.getAttribute("tmp.resource-allocator-output.max-available-speed");
+ String speedUnit = ctx.getAttribute("tmp.resource-allocator-output.speed-unit");
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " + maxAvailableSpeed);
+ log.info(" tmp.resource-allocator-output.speed-unit: " + speedUnit);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(maxAvailableSpeed.equals("0"));
+ Assert.assertTrue(speedUnit.equals("kbps"));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test005() throws Exception {
+ String t = "005";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test capacity not found - VPE not found in DB");
+
+ String service1 = "isAvailable" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+
+ String maxAvailableSpeed = ctx.getAttribute("tmp.resource-allocator-output.max-available-speed");
+ String speedUnit = ctx.getAttribute("tmp.resource-allocator-output.speed-unit");
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " + maxAvailableSpeed);
+ log.info(" tmp.resource-allocator-output.speed-unit: " + speedUnit);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(maxAvailableSpeed.equals("0"));
+ Assert.assertTrue(speedUnit.equals("kbps"));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test006() throws Exception {
+ String t = "006";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test capacity not found - VPLSPE not found in DB");
+
+ String service1 = "isAvailable" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+
+ String maxAvailableSpeed = ctx.getAttribute("tmp.resource-allocator-output.max-available-speed");
+ String speedUnit = ctx.getAttribute("tmp.resource-allocator-output.speed-unit");
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " + maxAvailableSpeed);
+ log.info(" tmp.resource-allocator-output.speed-unit: " + speedUnit);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(maxAvailableSpeed.equals("0"));
+ Assert.assertTrue(speedUnit.equals("kbps"));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test007() throws Exception {
+ String t = "007";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test capacity not found - test max available speed calculation");
+
+ String service1 = "isAvailable" + t + "/service1";
+ String existingService1 = "isAvailable" + t + "/existing-service1";
+ String existingService2 = "isAvailable" + t + "/existing-service2";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv127", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(existingService1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1",
+ "MTSNJA4LCP1/Server1");
+ dataSetup.setupService(existingService2, "Active", 3, 100000, "mtanjrsv127", "mtsnj303vr1",
+ "MTSNJA4LCP1/Server1");
+ dataSetup.setupService(existingService2, "Pending", 4, 500000, "mtanjrsv127", "mtsnj303vr1",
+ "MTSNJA4LCP1/Server1");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Gbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+
+ String maxAvailableSpeed = ctx.getAttribute("tmp.resource-allocator-output.max-available-speed");
+ String speedUnit = ctx.getAttribute("tmp.resource-allocator-output.speed-unit");
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " + maxAvailableSpeed);
+ log.info(" tmp.resource-allocator-output.speed-unit: " + speedUnit);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(maxAvailableSpeed.equals("260000"));
+ Assert.assertTrue(speedUnit.equals("kbps"));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test008() throws Exception {
+ String t = "008";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test capacity not found - test server limit depending on number of connections");
+
+ String service1 = "isAvailable" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv127", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ for (int i = 1; i <= 13; i++)
+ dataSetup.setupService("isAvailable" + t + "/existing-service" + i, "Active", 2, 20000, "mtanjrsv126",
+ "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Gbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+
+ String maxAvailableSpeed = ctx.getAttribute("tmp.resource-allocator-output.max-available-speed");
+ String speedUnit = ctx.getAttribute("tmp.resource-allocator-output.speed-unit");
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " + maxAvailableSpeed);
+ log.info(" tmp.resource-allocator-output.speed-unit: " + speedUnit);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(maxAvailableSpeed.equals("340000"));
+ Assert.assertTrue(speedUnit.equals("kbps"));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test009() throws Exception {
+ String t = "009";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test successful response - no service instance id in input - all resources available");
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " +
+ ctx.getAttribute("tmp.resource-allocator-output.max-available-speed"));
+ log.info(" tmp.resource-allocator-output.speed-unit: " +
+ ctx.getAttribute("tmp.resource-allocator-output.speed-unit"));
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ }
+
+ @Test
+ public void test010() throws Exception {
+ String t = "010";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test input validations - no aic-site-id in input");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Gbps");
+
+ try {
+ resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+ } catch (SvcLogicException e) {
+ Assert.assertTrue(e.getMessage().equals(
+ "tmp.resource-allocator.aic-site-id is required in ResourceAllocator"));
+ return;
+ }
+ Assert.fail("SvcLogicException expected");
+ }
+
+ @Test
+ public void test011() throws Exception {
+ String t = "011";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test input validations - no speed in input");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Gbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ try {
+ resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+ } catch (SvcLogicException e) {
+ Assert.assertTrue(e.getMessage().equals("tmp.resource-allocator.speed is required in ResourceAllocator"));
+ return;
+ }
+ Assert.fail("SvcLogicException expected");
+ }
+
+ @Test
+ public void test012() throws Exception {
+ String t = "012";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test input validations - speed not a number in input");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.speed", "nnnnn");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Gbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ try {
+ resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+ } catch (SvcLogicException e) {
+ Assert.assertTrue(e.getMessage().equals("Invalid tmp.resource-allocator.speed. Must be a number."));
+ return;
+ }
+ Assert.fail("SvcLogicException expected");
+ }
+
+ @Test
+ public void test013() throws Exception {
+ String t = "013";
+ log.info("============== isAvailable " + t + " ================================");
+ log.info("=== Test input validations - speed-unit missing in input");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ try {
+ resourceAllocator.isAvailable("NetworkCapacity", null, null, ctx);
+ } catch (SvcLogicException e) {
+ Assert.assertTrue(e.getMessage().equals(
+ "tmp.resource-allocator.speed-unit is required in ResourceAllocator"));
+ return;
+ }
+ Assert.fail("SvcLogicException expected");
+ }
+}
diff --git a/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestQuery.java b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestQuery.java
new file mode 100644
index 0000000..2877adf
--- /dev/null
+++ b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestQuery.java
@@ -0,0 +1,85 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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 jtest.org.openecomp.sdnc.ra;
+
+import org.junit.Assert;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+import org.openecomp.sdnc.ra.ResourceAllocator;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = { "classpath:test-context.xml" })
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class TestQuery {
+
+ private static final Logger log = LoggerFactory.getLogger(TestQuery.class);
+
+ @Autowired(required = true)
+ private ResourceAllocator resourceAllocator;
+
+ @Autowired(required = true)
+ private DataSetup dataSetup;
+
+ @Test
+ public void test001() throws Exception {
+ String t = "001";
+ log.info("============== query " + t + " ================================");
+ log.info("=== Test reading assigned resources (subinterface-id, vlan-id-inner)");
+
+ String service1 = "ICOREPVC" + t + "-1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "New");
+ ctx.setAttribute("tmp.resource-allocator.service-model", "L3AVPN-EVC");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+ ctx.setAttribute("tmp.resource-allocator.vpn-id", "123");
+ ctx.setAttribute("tmp.resource-allocator.vrf-required", "false");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "VPE-Cust", "Pending", 1, 300000));
+
+ st = resourceAllocator.query("NetworkCapacity", true, null, service1, "end-point", null, ctx);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertEquals(ctx.getAttribute("end-point.subinterface-id"), "100");
+ Assert.assertEquals(ctx.getAttribute("end-point.vlan-id-inner"), "2");
+ Assert.assertEquals(ctx.getAttribute("end-point.vpe-name"), "mtanjrsv126");
+ Assert.assertEquals(ctx.getAttribute("end-point.affinity-link"), "1");
+ }
+}
diff --git a/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestRelease.java b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestRelease.java
new file mode 100644
index 0000000..a86f8c5
--- /dev/null
+++ b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestRelease.java
@@ -0,0 +1,430 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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 jtest.org.openecomp.sdnc.ra;
+
+import org.junit.Assert;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+import org.openecomp.sdnc.ra.ResourceAllocator;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = { "classpath:test-context.xml" })
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class TestRelease {
+
+ private static final Logger log = LoggerFactory.getLogger(TestRelease.class);
+
+ @Autowired(required = true)
+ private ResourceAllocator resourceAllocator;
+
+ @Autowired(required = true)
+ private DataSetup dataSetup;
+
+ @Test
+ public void test001() throws Exception {
+ String t = "001";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - cancel - new start");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Pending", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Pending", 2, 200000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Cancel");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test002() throws Exception {
+ String t = "002";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - cancel - change");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+ dataSetup.setupService(service1, "Pending", 3, 400000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Active", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Pending", 3, 400000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Cancel");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Active", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, 3));
+ }
+
+ @Test
+ public void test003() throws Exception {
+ String t = "003";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - cancel - active there, but no pending - should do nothing and return success");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Active", 2, 200000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Cancel");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Active", 2, 200000));
+ }
+
+ @Test
+ public void test004() throws Exception {
+ String t = "004";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - cancel - nothing in DB - should return success");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Cancel");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test005() throws Exception {
+ String t = "005";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - activate - new start");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Pending", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Pending", 2, 200000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Activate");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Active", 2, 200000));
+ }
+
+ @Test
+ public void test006() throws Exception {
+ String t = "006";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - actovate - change");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+ dataSetup.setupService(service1, "Pending", 3, 400000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Active", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Pending", 3, 400000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Activate");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Active", 3, 400000));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, 2));
+ }
+
+ @Test
+ public void test007() throws Exception {
+ String t = "007";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - activate - active there, but no pending - should do nothing and return success");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Active", 2, 200000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Activate");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Active", 2, 200000));
+ }
+
+ @Test
+ public void test008() throws Exception {
+ String t = "008";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - activate - nothing in DB - should return success");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Activate");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test009() throws Exception {
+ String t = "009";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - disconnect - only pending in DB");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Pending", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Pending", 2, 200000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Disconnect");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test010() throws Exception {
+ String t = "010";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - disconnect - only active in DB");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Active", 2, 200000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Disconnect");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test011() throws Exception {
+ String t = "011";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - disconnect - both active and pending in DB");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+ dataSetup.setupService(service1, "Pending", 3, 400000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Active", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "Pending", 3, 400000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Disconnect");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test012() throws Exception {
+ String t = "012";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test release - disconnect - nothing in DB - should return success");
+
+ String service1 = "release" + t + "/service1";
+
+ dataSetup.cleanup();
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Disconnect");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ QueryStatus st = resourceAllocator.release("NetworkCapacity", null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test013() throws Exception {
+ String t = "013";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test input validations - request-type missing in input");
+
+ String service1 = "release" + t + "/service1";
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ try {
+ resourceAllocator.release("NetworkCapacity", null, ctx);
+ } catch (SvcLogicException e) {
+ Assert.assertTrue(e.getMessage().equals(
+ "tmp.resource-allocator.request-type is required in ResourceAllocator"));
+ return;
+ }
+ Assert.fail("SvcLogicException expected");
+ }
+
+ @Test
+ public void test014() throws Exception {
+ String t = "014";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test input validations - invalid request-type in input");
+
+ String service1 = "release" + t + "/service1";
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "xxxxx");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+
+ try {
+ resourceAllocator.release("NetworkCapacity", null, ctx);
+ } catch (SvcLogicException e) {
+ Assert.assertTrue(e.getMessage().equals(
+ "Invalid tmp.resource-allocator.request-type: xxxxx. Supported values are Cancel, Activate, Disconnect."));
+ return;
+ }
+ Assert.fail("SvcLogicException expected");
+ }
+
+ @Test
+ public void test015() throws Exception {
+ String t = "015";
+ log.info("============== release " + t + " ================================");
+ log.info("=== Test input validations - missing service-instance-id in input");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Cancel");
+
+ try {
+ resourceAllocator.release("NetworkCapacity", null, ctx);
+ } catch (SvcLogicException e) {
+ Assert.assertTrue(e.getMessage().equals(
+ "tmp.resource-allocator.service-instance-id is required in ResourceAllocator"));
+ return;
+ }
+ Assert.fail("SvcLogicException expected");
+ }
+}
diff --git a/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestReserve.java b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestReserve.java
new file mode 100644
index 0000000..9aa7e3e
--- /dev/null
+++ b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestReserve.java
@@ -0,0 +1,681 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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 jtest.org.openecomp.sdnc.ra;
+
+import org.junit.Assert;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+import org.openecomp.sdnc.ra.ResourceAllocator;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = { "classpath:test-context.xml" })
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class TestReserve {
+
+ private static final Logger log = LoggerFactory.getLogger(TestReserve.class);
+
+ @Autowired(required = true)
+ private ResourceAllocator resourceAllocator;
+
+ @Autowired(required = true)
+ private DataSetup dataSetup;
+
+ @Test
+ public void test001() throws Exception {
+ String t = "001";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test successful response - new start - all resources available");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupPserver("server1", "MTSNJA4LCP1");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "New");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " +
+ ctx.getAttribute("tmp.resource-allocator-output.max-available-speed"));
+ log.info(" tmp.resource-allocator-output.speed-unit: " +
+ ctx.getAttribute("tmp.resource-allocator-output.speed-unit"));
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 1, 300000));
+ }
+
+ @Test
+ public void test002() throws Exception {
+ String t = "002";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test successful response - new start supp - all resources available");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Pending", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 2, 200000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ // ctx.setAttribute("tmp.resource-allocator.request-type", "New"); - Default is New
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "400");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " +
+ ctx.getAttribute("tmp.resource-allocator-output.max-available-speed"));
+ log.info(" tmp.resource-allocator-output.speed-unit: " +
+ ctx.getAttribute("tmp.resource-allocator-output.speed-unit"));
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 3, 400000));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, 2));
+ }
+
+ @Test
+ public void test003() throws Exception {
+ String t = "003";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test successful response - change - all resources available");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 200000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Change");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "400");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " +
+ ctx.getAttribute("tmp.resource-allocator-output.max-available-speed"));
+ log.info(" tmp.resource-allocator-output.speed-unit: " +
+ ctx.getAttribute("tmp.resource-allocator-output.speed-unit"));
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 3, 400000));
+ }
+
+ @Test
+ public void test004() throws Exception {
+ String t = "004";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test successful response - change supp - all resources available");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+ dataSetup.setupService(service1, "Pending", 3, 400000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 3, 400000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Change");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "500");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " +
+ ctx.getAttribute("tmp.resource-allocator-output.max-available-speed"));
+ log.info(" tmp.resource-allocator-output.speed-unit: " +
+ ctx.getAttribute("tmp.resource-allocator-output.speed-unit"));
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 4, 500000));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, 3));
+ }
+
+ @Test
+ public void test005() throws Exception {
+ String t = "005";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test successful response - change - check that hard limits are applied, not soft for change");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 200000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Change");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "1200000");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "kbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " +
+ ctx.getAttribute("tmp.resource-allocator-output.max-available-speed"));
+ log.info(" tmp.resource-allocator-output.speed-unit: " +
+ ctx.getAttribute("tmp.resource-allocator-output.speed-unit"));
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 3, 1200000));
+ }
+
+ @Test
+ public void test006() throws Exception {
+ String t = "006";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test capacity not found - new start");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "New");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Gbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test007() throws Exception {
+ String t = "007";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test capacity not found - new start supp");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Pending", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 2, 200000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "New");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "2000");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, 3));
+ }
+
+ @Test
+ public void test008() throws Exception {
+ String t = "008";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test capacity not found - change");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 200000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Change");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "2000");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, 3));
+ }
+
+ @Test
+ public void test009() throws Exception {
+ String t = "009";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test capacity not found - change supp");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupService(service1, "Active", 2, 200000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+ dataSetup.setupService(service1, "Pending", 3, 400000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 3, 400000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Change");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "2000");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 200000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 3, 400000));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, 4));
+ }
+
+ @Test
+ public void test010() throws Exception {
+ String t = "010";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test border condition - connection limit - new start - adding connection " +
+ "when we are on the limit should fail");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ for (int i = 1; i <= 40; i++)
+ dataSetup.setupService("reserve" + t + "/existing-service" + i, "Active", 2, 1000, "mtanjrsv126",
+ "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+ for (int i = 1; i <= 40; i += 4)
+ dataSetup.setupService("reserve" + t + "/existing-service" + i, "Pending", 3, 1000, "mtanjrsv126",
+ "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Change");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "1");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+
+ @Test
+ public void test011() throws Exception {
+ String t = "011";
+ log.info("============== reserve " + t + " ================================");
+ log.info(
+ "=== Test border condition - connection limit - new start supp should succeed as no new connection being added");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ for (int i = 1; i <= 39; i++)
+ dataSetup.setupService("reserve" + t + "/existing-service" + i, "Active", 2, 1000, "mtanjrsv126",
+ "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+ for (int i = 1; i <= 39; i += 4)
+ dataSetup.setupService("reserve" + t + "/existing-service" + i, "Pending", 3, 1000, "mtanjrsv126",
+ "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ dataSetup.setupService(service1, "Pending", 2, 1000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 2, 1000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Change");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "5");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 3, 5000));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, 2));
+ }
+
+ @Test
+ public void test012() throws Exception {
+ String t = "012";
+ log.info("============== reserve " + t + " ================================");
+ log.info(
+ "=== Test border condition - connection limit - change should succeed as no new connection being added");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ for (int i = 1; i <= 39; i++)
+ dataSetup.setupService("reserve" + t + "/existing-service" + i, "Active", 2, 1000, "mtanjrsv126",
+ "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+ for (int i = 1; i <= 39; i += 4)
+ dataSetup.setupService("reserve" + t + "/existing-service" + i, "Pending", 3, 1000, "mtanjrsv126",
+ "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ dataSetup.setupService(service1, "Active", 2, 1000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 1000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Change");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "5");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 1000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 3, 5000));
+ }
+
+ @Test
+ public void test013() throws Exception {
+ String t = "013";
+ log.info("============== reserve " + t + " ================================");
+ log.info(
+ "=== Test border condition - connection limit - change supp should succeed as no new connection being added");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ for (int i = 1; i <= 39; i++)
+ dataSetup.setupService("reserve" + t + "/existing-service" + i, "Active", 2, 1000, "mtanjrsv126",
+ "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+ for (int i = 1; i <= 39; i += 4)
+ dataSetup.setupService("reserve" + t + "/existing-service" + i, "Pending", 3, 1000, "mtanjrsv126",
+ "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ dataSetup.setupService(service1, "Active", 2, 1000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+ dataSetup.setupService(service1, "Pending", 3, 5000, "mtanjrsv126", "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 1000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 3, 5000));
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "Change");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "10");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Active", 2, 1000));
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 4, 10000));
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, 3));
+ }
+
+ @Test
+ public void test014() throws Exception {
+ String t = "014";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test input validations - invalid request-type in input");
+
+ String service1 = "reserve" + t + "/service1";
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "xxxxx");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "10");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ try {
+ resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+ } catch (SvcLogicException e) {
+ Assert.assertTrue(e.getMessage().equals(
+ "Invalid tmp.resource-allocator.request-type: xxxxx. Supported values are New, Change."));
+ return;
+ }
+ Assert.fail("SvcLogicException expected");
+ }
+
+ @Test
+ public void test015() throws Exception {
+ String t = "015";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test server bw limit depends on number of servers - limit is 960Mbps for 1 server, 1920 for 2");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupPserver("server1", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server2", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server3", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server4", "MTSNJA4LCP1");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "New");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "1200");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " +
+ ctx.getAttribute("tmp.resource-allocator-output.max-available-speed"));
+ log.info(" tmp.resource-allocator-output.speed-unit: " +
+ ctx.getAttribute("tmp.resource-allocator-output.speed-unit"));
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 1, 1200000));
+ }
+
+ @Test
+ public void test016() throws Exception {
+ String t = "016";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test resource threshold output");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupPserver("server1", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server2", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server3", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server4", "MTSNJA4LCP1");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "New");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "1605");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+ for (String key : ctx.getAttributeKeySet())
+ if (key.startsWith("tmp.resource-allocator-output"))
+ log.info(" " + key + ": " + ctx.getAttribute(key));
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 1, 1605000));
+ }
+
+ @Test
+ public void test017() throws Exception {
+ String t = "017";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test if evc_count lookup in MAX_SERVER_SPEED depends on the number of primary servers.");
+ log.info("=== For 10 existing EVC, it should take the first row, not the second (see data.sql).");
+ log.info("=== Applied limit should be 1920Mbps, not 1680Mbps.");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupPserver("server1", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server2", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server3", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server4", "MTSNJA4LCP1");
+
+ for (int i = 1; i <= 10; i++)
+ dataSetup.setupService("reserve" + t + "/existing-service" + i, "Active", 2, 100000, "mtanjrsv126",
+ "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "New");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "800"); // 10*100Mbps existing + 800 = 1800
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " +
+ ctx.getAttribute("tmp.resource-allocator-output.max-available-speed"));
+ log.info(" tmp.resource-allocator-output.speed-unit: " +
+ ctx.getAttribute("tmp.resource-allocator-output.speed-unit"));
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb("mtanjrsv126", "MTSNJA4LCP1", service1, "Pending", 1, 800000));
+ }
+
+ @Test
+ public void test018() throws Exception {
+ String t = "018";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test if evc_count lookup in MAX_SERVER_SPEED depends on the number of primary servers.");
+ log.info("=== For 11 existing EVC, it should take the second row (see data.sql).");
+ log.info("=== Applied limit should be 1680Mbps. We have 11*100 + 700, so this should fail.");
+
+ String service1 = "reserve" + t + "/service1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+ dataSetup.setupVplspePort("MTSNJA4LCP1", "mtsnj303vr1", "xe-0/0/2", "PROV", null);
+ dataSetup.setupPserver("server1", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server2", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server3", "MTSNJA4LCP1");
+ dataSetup.setupPserver("server4", "MTSNJA4LCP1");
+
+ for (int i = 1; i <= 11; i++)
+ dataSetup.setupService("reserve" + t + "/existing-service" + i, "Active", 2, 100000, "mtanjrsv126",
+ "mtsnj303vr1", "MTSNJA4LCP1/Server1");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "New");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "700"); // 11*100Mbps existing + 700 = 1800
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ log.info("Result: " + st);
+ log.info(" tmp.resource-allocator-output.max-available-speed: " +
+ ctx.getAttribute("tmp.resource-allocator-output.max-available-speed"));
+ log.info(" tmp.resource-allocator-output.speed-unit: " +
+ ctx.getAttribute("tmp.resource-allocator-output.speed-unit"));
+
+ log.info("Result: " + st);
+
+ Assert.assertTrue(st == QueryStatus.NOT_FOUND);
+ Assert.assertTrue(dataSetup.serviceNotInDb(service1, null, null));
+ }
+}
diff --git a/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestReserve2.java b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestReserve2.java
new file mode 100644
index 0000000..e1890ca
--- /dev/null
+++ b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/ra/TestReserve2.java
@@ -0,0 +1,77 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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 jtest.org.openecomp.sdnc.ra;
+
+import org.junit.Assert;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.MethodSorters;
+import org.openecomp.sdnc.ra.ResourceAllocator;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(locations = { "classpath:test-context.xml" })
+@FixMethodOrder(MethodSorters.NAME_ASCENDING)
+public class TestReserve2 {
+
+ private static final Logger log = LoggerFactory.getLogger(TestReserve2.class);
+
+ @Autowired(required = true)
+ private ResourceAllocator resourceAllocator;
+
+ @Autowired(required = true)
+ private DataSetup dataSetup;
+
+ @Test
+ public void test001() throws Exception {
+ String t = "001";
+ log.info("============== reserve " + t + " ================================");
+ log.info("=== Test successful response - new start - all resources available");
+
+ String service1 = "ICOREPVC" + t + "-1";
+
+ dataSetup.cleanup();
+ dataSetup.setupVpePort("MTSNJA4LCP1", "mtanjrsv126", "ae0", "PROV", "juniper-vpe-image");
+
+ SvcLogicContext ctx = new SvcLogicContext();
+ ctx.setAttribute("tmp.resource-allocator.request-type", "New");
+ ctx.setAttribute("tmp.resource-allocator.service-model", "L3AVPN-EVC");
+ ctx.setAttribute("tmp.resource-allocator.service-instance-id", service1);
+ ctx.setAttribute("tmp.resource-allocator.speed", "300");
+ ctx.setAttribute("tmp.resource-allocator.speed-unit", "Mbps");
+ ctx.setAttribute("tmp.resource-allocator.aic-site-id", "MTSNJA4LCP1");
+ ctx.setAttribute("tmp.resource-allocator.vpn-id", "123");
+ ctx.setAttribute("tmp.resource-allocator.vrf-required", "false");
+
+ QueryStatus st = resourceAllocator.reserve("NetworkCapacity", null, null, null, ctx);
+
+ Assert.assertTrue(st == QueryStatus.SUCCESS);
+ Assert.assertTrue(dataSetup.serviceCorrectInDb(service1, "VPE-Cust", "Pending", 1, 300000));
+ }
+}
diff --git a/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/rm/DataSetup.java b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/rm/DataSetup.java
new file mode 100644
index 0000000..a12149e
--- /dev/null
+++ b/resource-assignment/provider/src/test/java/jtest/org/openecomp/sdnc/rm/DataSetup.java
@@ -0,0 +1,106 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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 jtest.org.openecomp.sdnc.rm;
+
+import java.util.Date;
+
+import jtest.util.org.openecomp.sdnc.ra.TestDb;
+import jtest.util.org.openecomp.sdnc.ra.TestTable;
+
+public class DataSetup {
+
+ private TestDb testDb;
+
+ private TestTable resource = null;
+ private TestTable allocationItem = null;
+
+ private static final String[] RESOURCE_COLUMNS =
+ { "asset_id", "resource_name", "resource_type", "lt_used", "ll_label", "ll_reference_count", "rr_used" };
+
+ private static final String[] ALLOCATION_ITEM_COLUMNS = {
+ "resource_id", "application_id", "resource_set_id", "resource_union_id", "resource_share_group_list",
+ "lt_used", "ll_label", "rr_used", "allocation_time" };
+
+ private void initTables() {
+ if (resource == null)
+ resource = testDb.table("RESOURCE", "resource_id", RESOURCE_COLUMNS);
+ if (allocationItem == null)
+ allocationItem = testDb.table("ALLOCATION_ITEM", "allocation_item_id", ALLOCATION_ITEM_COLUMNS);
+ }
+
+ public void cleanup() {
+ allocationItem.delete("true");
+ resource.delete("true");
+ }
+
+ public void setupLimitItem(
+ String resourceName,
+ String assetId,
+ String resourceSetId,
+ String resourceUnionId,
+ long used) {
+ initTables();
+
+ Long rid = resource.getId("asset_id = '" + assetId + "' AND resource_name = '" + resourceName + "'");
+ if (rid == null) {
+ resource.add(assetId, resourceName, "Limit", 1, null, null, null);
+ rid = resource.getLastId();
+ }
+ allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, used, null, null, new Date());
+ }
+
+ public void setupRangeItem(
+ String resourceName,
+ String assetId,
+ String resourceSetId,
+ String resourceUnionId,
+ String used) {
+ initTables();
+
+ Long rid = resource.getId("asset_id = '" + assetId + "' AND resource_name = '" + resourceName + "'");
+ if (rid == null) {
+ resource.add(assetId, resourceName, "Range", null, null, null, used);
+ rid = resource.getLastId();
+ }
+ allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, null, null, used, new Date());
+ }
+
+ public void setupLabelItem(
+ String resourceName,
+ String assetId,
+ String resourceSetId,
+ String resourceUnionId,
+ String label) {
+ initTables();
+
+ Long rid = resource.getId("asset_id = '" + assetId + "' AND resource_name = '" + resourceName + "'");
+ if (rid == null) {
+ resource.add(assetId, resourceName, "Label", null, label, 1, null);
+ rid = resource.getLastId();
+ }
+ allocationItem.add(rid, "SDNC", resourceSetId, resourceUnionId, null, null, label, null, new Date());
+ }
+
+ public void setTestDb(TestDb testDb) {
+ this.testDb = testDb;
+ }
+}
diff --git a/resource-assignment/provider/src/test/java/jtest/util/org/openecomp/sdnc/ra/TestDb.java b/resource-assignment/provider/src/test/java/jtest/util/org/openecomp/sdnc/ra/TestDb.java
new file mode 100644
index 0000000..006715f
--- /dev/null
+++ b/resource-assignment/provider/src/test/java/jtest/util/org/openecomp/sdnc/ra/TestDb.java
@@ -0,0 +1,37 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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 jtest.util.org.openecomp.sdnc.ra;
+
+import org.springframework.jdbc.core.JdbcTemplate;
+
+public class TestDb {
+
+ private JdbcTemplate jdbcTemplate;
+
+ public TestTable table(String tableName, String idName, String... columnList) {
+ return new TestTable(jdbcTemplate, tableName, idName, columnList);
+ }
+
+ public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
+ this.jdbcTemplate = jdbcTemplate;
+ }
+}
diff --git a/resource-assignment/provider/src/test/java/jtest/util/org/openecomp/sdnc/ra/TestTable.java b/resource-assignment/provider/src/test/java/jtest/util/org/openecomp/sdnc/ra/TestTable.java
new file mode 100644
index 0000000..7dcfcd5
--- /dev/null
+++ b/resource-assignment/provider/src/test/java/jtest/util/org/openecomp/sdnc/ra/TestTable.java
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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 jtest.util.org.openecomp.sdnc.ra;
+
+import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.support.rowset.SqlRowSet;
+
+public class TestTable {
+
+ private String tableName;
+ private String[] columnList;
+ private String idName;
+
+ private String insertSql;
+
+ private JdbcTemplate jdbcTemplate;
+
+ public TestTable(JdbcTemplate jdbcTemplate, String tableName, String idName, String... columnList) {
+ this.jdbcTemplate = jdbcTemplate;
+ this.tableName = tableName;
+ this.idName = idName;
+ this.columnList = columnList;
+ createInsertSql();
+ }
+
+ private void createInsertSql() {
+ StringBuilder ss = new StringBuilder();
+ ss.append("INSERT INTO ").append(tableName).append(" (");
+ for (String s : columnList)
+ ss.append(s).append(", ");
+ ss.setLength(ss.length() - 2);
+ ss.append(") VALUES (");
+ for (int i = 0; i < columnList.length; i++)
+ ss.append("?, ");
+ ss.setLength(ss.length() - 2);
+ ss.append(")");
+ insertSql = ss.toString();
+ }
+
+ public void add(Object... values) {
+ jdbcTemplate.update(insertSql, values);
+ }
+
+ public long getLastId() {
+ return jdbcTemplate.queryForObject("SELECT max(" + idName + ") FROM " + tableName, Long.class);
+ }
+
+ public Long getId(String where) {
+ String selectSql = "SELECT " + idName + " FROM " + tableName + " WHERE " + where;
+ SqlRowSet rs = jdbcTemplate.queryForRowSet(selectSql);
+ if (rs.first())
+ return rs.getLong(idName);
+ return null;
+ }
+
+ public boolean exists(String where) {
+ String selectSql = "SELECT * FROM " + tableName + " WHERE " + where;
+ SqlRowSet rs = jdbcTemplate.queryForRowSet(selectSql);
+ return rs.first();
+ }
+
+ public void delete(String where) {
+ jdbcTemplate.update("DELETE FROM " + tableName + " WHERE " + where);
+ }
+}
diff --git a/resource-assignment/provider/src/test/resources/homing-req.json b/resource-assignment/provider/src/test/resources/homing-req.json
new file mode 100644
index 0000000..48ec701
--- /dev/null
+++ b/resource-assignment/provider/src/test/resources/homing-req.json
@@ -0,0 +1,46 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+{
+ "input":{
+ "sdnc-homing-header":{
+ "svc-request-id":"omx-123",
+ "svc-action":"homing"
+ },
+ "request-information":{
+ "request-id":"mso-1234",
+ "request-action":"GetAicNodesRequest",
+ "source":"OMX",
+ "list-length":1
+ },
+ "homing-request-information":{
+ "service-type":"SDN-ETHERNET-INTERNET",
+ "global-customer-id":"custid-123",
+ "customer-location":{
+ "lata":332
+ }
+ },
+ "homing-other-information":{
+ "bandwidth-value":150,
+ "bandwidth-units":"Mbps"
+ }
+ }
+}
diff --git a/resource-assignment/provider/src/test/resources/log4j.properties b/resource-assignment/provider/src/test/resources/log4j.properties
new file mode 100644
index 0000000..4017e75
--- /dev/null
+++ b/resource-assignment/provider/src/test/resources/log4j.properties
@@ -0,0 +1,26 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+log4j.rootLogger=INFO, A1
+log4j.appender.A1=org.apache.log4j.ConsoleAppender
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} %5p %t %X{UUID} %c{3}:%L - %m%n
+log4j.logger.org.hibernate=INFO
diff --git a/resource-assignment/provider/src/test/resources/param.txt b/resource-assignment/provider/src/test/resources/param.txt
new file mode 100755
index 0000000..d1aac47
--- /dev/null
+++ b/resource-assignment/provider/src/test/resources/param.txt
@@ -0,0 +1,44 @@
+isAvailable:
+ Input in ctx:
+ tmp.resource-allocator.aic-site-id
+ tmp.resource-allocator.speed
+ tmp.resource-allocator.speed-unit
+ Output in ctx:
+ tmp.resource-allocator.max-available-speed
+ tmp.resource-allocator.speed-unit
+ Return:
+ SUCCESS – capacity available
+ NOT_FOUND – capacity not available
+ Error message in: error-message, error-code
+ FAILURE – the check has failed (data error, code defect, etc)
+ Error message in: error-message, error-code
+
+Reserve:
+ Input in ctx:
+ tmp.resource-allocator.aic-site-id
+ tmp.resource-allocator.speed
+ tmp.resource-allocator.speed-unit
+ tmp.resource-allocator.service-instance-id
+ tmp.resource-allocator.request-type { New, Change }
+ Output in ctx:
+ tmp.resource-allocator-output.max-available-speed
+ tmp.resource-allocator-output.speed-unit
+ Return:
+ SUCCESS – capacity available
+ NOT_FOUND – capacity not available
+ Error message in: error-message, error-code
+ FAILURE – the check has failed (data error, code defect, etc)
+ Error message in: error-message, error-code
+
+Release:
+ Input in ctx:
+ tmp.resource-allocator.service-instance-id
+ tmp.resource-allocator.request-type { Activate, Cancel, Disconnect }
+ Return:
+ SUCCESS – capacity available
+ FAILURE – the check has failed (data error, code defect, etc)
+ Error message in: error-message, error-code
+
+
+Plugin name: org.openecomp.sdnc.ra.ResourceAllocator
+Resource: NetworkCapacity
diff --git a/resource-assignment/provider/src/test/resources/sql/data.sql b/resource-assignment/provider/src/test/resources/sql/data.sql
new file mode 100644
index 0000000..e587013
--- /dev/null
+++ b/resource-assignment/provider/src/test/resources/sql/data.sql
@@ -0,0 +1,120 @@
+---
+-- ============LICENSE_START=======================================================
+-- openECOMP : SDN-C
+-- ================================================================================
+-- Copyright (C) 2017 AT&T Intellectual Property. All rights
+-- reserved.
+-- ================================================================================
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-- ============LICENSE_END=========================================================
+---
+
+INSERT INTO RESOURCE_RULE (
+ resource_name, service_model, end_point_position, service_expression, equipment_level, equipment_expression,
+ allocation_expression, soft_limit_expression, hard_limit_expression)
+VALUES (
+ 'Bandwidth', 'L3SDN', 'IPAG-TOA', 'true', 'Port', 'true',
+ 'service-speed-kbps', '0.5 * max-port-speed', '0.9 * max-port-speed');
+
+INSERT INTO RESOURCE_RULE (
+ resource_name, service_model, end_point_position, service_expression, equipment_level, equipment_expression,
+ allocation_expression, soft_limit_expression, hard_limit_expression)
+VALUES (
+ 'Bandwidth', 'L3SDN', 'VCE-Cust', 'true', 'Server', 'true',
+ 'service-speed-kbps', '0.6 * max-server-speed * number-primary-servers', 'max-server-speed * number-primary-servers');
+
+INSERT INTO RESOURCE_RULE (
+ resource_name, service_model, end_point_position, service_expression, equipment_level,
+ equipment_expression, allocation_expression, soft_limit_expression, hard_limit_expression)
+VALUES (
+ 'Connection', 'L3SDN', 'VCE-Cust', 'true', 'Server',
+ 'true', '1', '40', '40');
+
+INSERT INTO RESOURCE_RULE (
+ resource_name, service_model, end_point_position, service_expression, equipment_level, equipment_expression,
+ allocation_expression, soft_limit_expression, hard_limit_expression)
+VALUES (
+ 'Bandwidth', 'L3SDN', 'VPE-Cust', 'true', 'Port', 'true',
+ 'service-speed-kbps', '0.5 * max-port-speed', '0.9 * max-port-speed');
+
+INSERT INTO RESOURCE_RULE (
+ resource_name, service_model, end_point_position, service_expression,
+ equipment_level, equipment_expression, allocation_expression, soft_limit_expression, hard_limit_expression)
+VALUES (
+ 'Bandwidth', 'L3AVPN-EVC', 'VPE-Cust', 'true', 'Port', 'true', 'service-speed-kbps', '8000000', '8000000');
+
+INSERT INTO RESOURCE_RULE (
+ resource_name, service_model, end_point_position, service_expression,
+ equipment_level, equipment_expression, allocation_expression, soft_limit_expression, hard_limit_expression)
+VALUES (
+ 'Connection', 'L3AVPN-EVC', 'VPE-Cust', 'true', 'Port', 'true', '1', '200', '200');
+
+INSERT INTO RESOURCE_RULE (
+ resource_name, service_model, end_point_position, service_expression,
+ equipment_level, equipment_expression, allocation_expression, soft_limit_expression, hard_limit_expression)
+VALUES (
+ 'Bandwidth', 'L3AVPN-PORT', 'VPE-Cust', 'true', 'Port', 'true', 'service-speed-kbps', '8000000', '8000000');
+
+insert into RESOURCE_THRESHOLD (
+ resource_rule_id, threshold_expression, threshold_message)
+values (
+ (select resource_rule_id from RESOURCE_RULE where resource_name = 'Bandwidth' and equipment_level = 'Server'),
+ '0.5 * max-server-speed * number-primary-servers',
+ 'The provisioned access bandwidth is at or exceeds 50% of the total server capacity.');
+
+insert into RESOURCE_THRESHOLD (
+ resource_rule_id, threshold_expression, threshold_message)
+values (
+ (select resource_rule_id from RESOURCE_RULE where resource_name = 'Bandwidth' and equipment_level = 'Server'),
+ '0.7 * max-server-speed * number-primary-servers',
+ 'The provisioned access bandwidth is at or exceeds 70% of the total server capacity.');
+
+INSERT INTO RANGE_RULE (
+ range_name, service_model, end_point_position, equipment_level, min_value, max_value)
+VALUES (
+ 'subinterface-id', 'L3AVPN-EVC', 'VPE-Cust', 'Port', 100, 3999);
+
+INSERT INTO RANGE_RULE (
+ range_name, service_model, end_point_position, equipment_level, min_value, max_value)
+VALUES (
+ 'vlan-id-inner', 'L3AVPN-EVC', 'VPE-Cust', 'Port', 2, 4091);
+
+INSERT INTO RANGE_RULE (
+ range_name, service_model, end_point_position, equipment_level, min_value, max_value)
+VALUES (
+ 'bundle-id', 'L3AVPN-PORT', 'VPE-Cust', 'Port', 1, 99999);
+
+INSERT INTO MAX_PORT_SPEED (
+ image_file_name, end_point_position, interface_name, max_speed, unit)
+VALUES (
+ 'JUNIPER_VPE_IMAGE_FILENAME', 'VPE-Cust', 'ae0', 5000, 'Mpbs');
+
+INSERT INTO MAX_SERVER_SPEED (server_model, evc_count, max_speed, unit, description)
+VALUES ('ALL', 5, 1600, 'Mbps', 'Max speed, when there are <=5 EVC on server');
+
+INSERT INTO MAX_SERVER_SPEED (server_model, evc_count, max_speed, unit, description)
+VALUES ('ALL', 10, 1400, 'Mbps', 'Max speed, when there are 6 to 10 (including 10) EVC on server');
+
+INSERT INTO MAX_SERVER_SPEED (server_model, evc_count, max_speed, unit, description)
+VALUES ('ALL', 15, 1000, 'Mbps', 'Max speed, when there are 11 to 15 (including 15) EVC on server');
+
+INSERT INTO MAX_SERVER_SPEED (server_model, evc_count, max_speed, unit, description)
+VALUES ('ALL', 20, 700, 'Mbps', 'Max speed, when there are 16 to 20 (including 20) EVC on server');
+
+INSERT INTO MAX_SERVER_SPEED (server_model, evc_count, max_speed, unit, description)
+VALUES ('ALL', 10000, 500, 'Mbps', 'Max speed, when there are 21 or more EVC on server');
+
+INSERT INTO PARAMETERS (name, value, category, memo)
+VALUES ('homing.pserver.sparing.ratio', '1:1', 'homing',
+ 'Ratio of primary to backup servers within any of the AIC sites. Used in RA to calculate the max allowed bw in an AIC site.');
+
diff --git a/resource-assignment/provider/src/test/resources/sql/schema.sql b/resource-assignment/provider/src/test/resources/sql/schema.sql
new file mode 100644
index 0000000..3e785f2
--- /dev/null
+++ b/resource-assignment/provider/src/test/resources/sql/schema.sql
@@ -0,0 +1,201 @@
+---
+-- ============LICENSE_START=======================================================
+-- openECOMP : SDN-C
+-- ================================================================================
+-- Copyright (C) 2017 AT&T Intellectual Property. All rights
+-- reserved.
+-- ================================================================================
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-- ============LICENSE_END=========================================================
+---
+
+CREATE TABLE RESOURCE_LOCK (
+ resource_lock_id SERIAL PRIMARY KEY,
+ resource_name VARCHAR(50) NOT NULL UNIQUE,
+ lock_holder VARCHAR(100) NOT NULL,
+ lock_count SMALLINT NOT NULL,
+ lock_time DATETIME NOT NULL,
+ expiration_time DATETIME NOT NULL
+);
+
+CREATE TABLE RESOURCE (
+ resource_id SERIAL PRIMARY KEY,
+ asset_id VARCHAR(50) NOT NULL,
+ resource_name VARCHAR(50) NOT NULL,
+ resource_type VARCHAR(10) NOT NULL,
+ lt_used BIGINT,
+ ll_label VARCHAR(50),
+ ll_reference_count SMALLINT,
+ rr_used VARCHAR(4000)
+);
+
+ALTER TABLE RESOURCE ADD CONSTRAINT c1_resource CHECK (resource_type IN ('Limit', 'Label', 'Range'));
+CREATE UNIQUE INDEX ak1_resource ON RESOURCE (asset_id, resource_name);
+
+CREATE TABLE RESOURCE_LOAD (
+ resource_load_id SERIAL PRIMARY KEY,
+ resource_id BIGINT NOT NULL REFERENCES resource (resource_id),
+ application_id VARCHAR(20) NOT NULL,
+ resource_load_time DATETIME NOT NULL,
+ resource_expiration_time DATETIME
+);
+
+CREATE INDEX i1_resource_load ON RESOURCE_LOAD (resource_id);
+CREATE UNIQUE INDEX ak1_resource_load ON RESOURCE_LOAD (resource_id, application_id);
+
+CREATE TABLE ALLOCATION_ITEM (
+ allocation_item_id SERIAL PRIMARY KEY,
+ resource_id BIGINT NOT NULL REFERENCES resource (resource_id),
+ application_id VARCHAR(50) NOT NULL,
+ resource_set_id VARCHAR(50) NOT NULL,
+ resource_union_id VARCHAR(50) NOT NULL,
+ resource_share_group_list VARCHAR(200),
+ lt_used BIGINT,
+ ll_label VARCHAR(50),
+ rr_used VARCHAR(200),
+ allocation_time DATETIME NOT NULL
+);
+
+CREATE INDEX i1_allocation_item ON allocation_item (resource_id);
+CREATE UNIQUE INDEX ak1_allocation_item ON allocation_item (resource_id, resource_set_id);
+
+CREATE TABLE RESOURCE_RULE (
+ resource_rule_id SERIAL PRIMARY KEY,
+ resource_name VARCHAR(50) NOT NULL,
+ service_model VARCHAR(50) NOT NULL,
+ end_point_position VARCHAR(50) NOT NULL,
+ service_expression VARCHAR(2000) NOT NULL,
+ equipment_level VARCHAR(50) NOT NULL,
+ equipment_expression VARCHAR(2000) NOT NULL,
+ allocation_expression VARCHAR(2000) NOT NULL,
+ soft_limit_expression VARCHAR(2000) NOT NULL,
+ hard_limit_expression VARCHAR(2000) NOT NULL
+);
+
+CREATE TABLE RESOURCE_THRESHOLD (
+ resource_threshold_id bigint(20) unsigned NOT NULL AUTO_INCREMENT,
+ resource_rule_id bigint(20) NOT NULL,
+ threshold_expression varchar(2000) NOT NULL,
+ threshold_message varchar(2000) NOT NULL,
+ PRIMARY KEY (resource_threshold_id)
+);
+
+CREATE TABLE RANGE_RULE (
+ range_rule_id SERIAL PRIMARY KEY,
+ range_name VARCHAR(50) NOT NULL,
+ service_model VARCHAR(50) NOT NULL,
+ end_point_position VARCHAR(50) NOT NULL,
+ equipment_level VARCHAR(50) NOT NULL,
+ min_value INT NOT NULL,
+ max_value INT NOT NULL
+);
+
+CREATE TABLE MAX_PORT_SPEED (
+ max_port_speed_id SERIAL PRIMARY KEY,
+ image_file_name VARCHAR(50) NOT NULL,
+ end_point_position VARCHAR(50) NOT NULL,
+ interface_name VARCHAR(100) NOT NULL,
+ max_speed BIGINT NOT NULL,
+ unit VARCHAR(10) NOT NULL
+);
+
+CREATE TABLE MAX_SERVER_SPEED (
+ max_server_speed_id SERIAL PRIMARY KEY,
+ server_model VARCHAR(50) NOT NULL,
+ evc_count SMALLINT NOT NULL,
+ max_speed BIGINT NOT NULL,
+ unit VARCHAR(10) NOT NULL,
+ description VARCHAR(500)
+);
+
+CREATE TABLE SERVICE_RESOURCE (
+ service_resource_id SERIAL PRIMARY KEY,
+ service_instance_id VARCHAR(80) NOT NULL,
+ service_status VARCHAR(10) NOT NULL,
+ service_change_number SMALLINT NOT NULL,
+ resource_set_id VARCHAR(100) NOT NULL,
+ resource_union_id VARCHAR(100) NOT NULL,
+);
+
+ALTER TABLE SERVICE_RESOURCE ADD CONSTRAINT C1_SERVICE_RESOURCE CHECK (service_status IN ('Active', 'Pending'));
+CREATE INDEX i1_service_resource ON SERVICE_RESOURCE (service_instance_id);
+CREATE UNIQUE INDEX ak1_service_resource ON SERVICE_RESOURCE (service_instance_id, service_change_number);
+
+CREATE TABLE VPE_POOL (
+ vpe_name VARCHAR(20) NOT NULL,
+ ipv4_oam_address VARCHAR(20) NOT NULL,
+ loopback0_ipv4_address VARCHAR(20) NOT NULL,
+ provisioning_status VARCHAR(10) NOT NULL,
+ aic_site_id VARCHAR(100) NOT NULL,
+ availability_zone VARCHAR(100) NOT NULL,
+ vlan_id_outer VARCHAR(20) NOT NULL,
+ vendor VARCHAR(20) NOT NULL,
+ physical_intf_name VARCHAR(40) NOT NULL,
+ physical_intf_speed VARCHAR(20) NOT NULL,
+ physical_intf_units VARCHAR(20) NOT NULL,
+ vpe_uuid VARCHAR(80) DEFAULT NULL,
+ vpe_id VARCHAR(80) DEFAULT NULL,
+ image_filename VARCHAR(100) DEFAULT NULL,
+ PRIMARY KEY (aic_site_id, vpe_name, availability_zone)
+);
+
+CREATE TABLE VPLSPE_POOL (
+ vplspe_name varchar(20) NOT NULL,
+ aic_site_id varchar(100) NOT NULL,
+ availability_zone varchar(100) NOT NULL,
+ physical_intf_name varchar(40) NOT NULL,
+ physical_intf_speed varchar(20) NOT NULL,
+ physical_intf_units varchar(20) NOT NULL,
+ loopback0_ipv4_address varchar(20) NOT NULL,
+ vlan_id_outer varchar(20) NOT NULL,
+ vplspe_uuid varchar(80) DEFAULT NULL,
+ image_filename varchar(100) DEFAULT NULL,
+ provisioning_status varchar(10) DEFAULT NULL,
+ vendor varchar(20) DEFAULT NULL,
+ PRIMARY KEY (vplspe_name, aic_site_id, availability_zone, physical_intf_name)
+);
+
+CREATE TABLE VPE_LOCK (
+ vpe_name varchar(20) NOT NULL,
+ vpn_lock varchar(20) NOT NULL,
+ PRIMARY KEY (vpe_name)
+);
+
+CREATE TABLE PARAMETERS (
+ name varchar(100) PRIMARY KEY,
+ value varchar(24) NOT NULL,
+ category varchar(24) NOT NULL,
+ memo varchar(128)
+);
+
+CREATE TABLE PSERVER (
+ hostname varchar(255) NOT NULL,
+ ptnii_equip_name varchar(255),
+ number_of_cpus varchar(255),
+ disk_in_gigabytes varchar(255),
+ ram_in_megabytes varchar(255),
+ equip_type varchar(255),
+ equip_vendor varchar(255),
+ equip_model varchar(255),
+ fqdn varchar(255),
+ pserver_selflink varchar(255),
+ ipv4_oam_address varchar(15),
+ serial_number varchar(255),
+ pserver_id varchar(255),
+ internet_topology varchar(40),
+ aic_site_id varchar(100),
+ in_maint varchar(5),
+ pserver_name2 varchar(255),
+ purpose varchar(255),
+ PRIMARY KEY (hostname)
+);
diff --git a/resource-assignment/provider/src/test/resources/svc-topology-req.json b/resource-assignment/provider/src/test/resources/svc-topology-req.json
new file mode 100644
index 0000000..ab8afb6
--- /dev/null
+++ b/resource-assignment/provider/src/test/resources/svc-topology-req.json
@@ -0,0 +1,195 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+{
+ "input":{
+ "sdnc-request-header":{
+ "svc-request-id":"omx-123",
+ "svc-action":"assign"
+ },
+ "sdnc-topology-additional-data":{
+ "svc-vnf-type":"vce"
+ },
+ "request-information":{
+ "request-id":"mso-1234",
+ "request-action":"Layer3ServiceActivateRequest",
+ "source":"OMX"
+ },
+ "service-information":{
+ "service-type":"SDN-ETHERNET-INTERNET",
+ "service-instance-id":"service-instance-123",
+ "subscriber-name":"ssb-subscriber"
+ },
+ "l2-homing-information":{
+ "evc-name":"EVC-123",
+ "topology":"PointToPoint",
+ "preferred-aic-clli":"ATLNGATL001"
+ }
+ "internet-evc-access-information":{
+ "internet-evc-speed-value":"150",
+ "internet-evc-speed-units":"Mbps",
+ "ip-version":"v6"
+ }
+ "vr-lan":{
+ "routing-protocol":"none",
+ {
+ "v6-vr-lan-prefix":"string",
+ "v6-public-lan-prefixes":{
+ "t-provided-v6-lan-public-prefixes":[
+ {
+ "v6-lan-public-prefix-length":"integer",
+ "v6-lan-public-prefix":"string",
+ "request-index":"integer"
+ }
+ ]
+ },
+ "v6-vr-lan-prefix-length":"integer",
+ "v4-vr-lan-prefix-length":"integer",
+ "firewall-lite":{
+ "v6-firewall-packet-filters":[
+ {
+ "v6-firewall-prefix-length":"integer",
+ "udp-port-list":[
+ {
+ "port-number":"integer"
+ }
+ ],
+ "tcp-port-list":[
+ {
+ "port-number":"integer"
+ }
+ ],
+ "v6-firewall-prefix":"string"
+ }
+ ],
+ "v4-firewall-packet-filters":[
+ {
+ "v4-firewall-prefix-length":"integer",
+ "udp-port-list":[
+ {
+ "port-number":"integer"
+ }
+ ],
+ "tcp-port-list":[
+ {
+ "port-number":"integer"
+ }
+ ],
+ "v4-firewall-prefix":"string"
+ }
+ ]
+ },
+ "v6-vce-wan-address":"string",
+ "v4-public-lan-prefixes":{
+ "t-provided-v4-lan-public-prefixes":[
+ {
+ "v4-lan-public-prefix":"string",
+ "v4-lan-public-prefix-length":"integer",
+ "request-index":"integer"
+ }
+ ]
+ },
+ "pat":{
+ "v4-pat-default-pool-prefix-length":"integer",
+ "v4-pat-pools":[
+ {
+ "v4-pat-pool-next-hop-address":"string",
+ "v4-pat-pool-prefix-length":"integer",
+ "v4-pat-pool-prefix":"string"
+ }
+ ],
+ "v4-pat-default-pool-prefix":"string"
+ },
+ "v4-vce-loopback-address":"string",
+ "v4-vr-lan-prefix":"string",
+ "dhcp":{
+ "v4-dhcp-pools":[
+ {
+ "v4-dhcp-relay-next-hop-address":"string",
+ "excluded-v4-addresses":[
+ {
+ "excluded-v4-address":"string"
+ }
+ ],
+ "v4-dhcp-pool-prefix":"string",
+ "v4-dhcp-relay-gateway-address":"string",
+ "v4-dhcp-pool-prefix-length":"integer"
+ }
+ ],
+ "excluded-v4-dhcp-addresses-from-default-pool":[
+ {
+ "excluded-v4-address":"string"
+ }
+ ],
+ "v6-dhcp-pools":[
+ {
+ "v6-dhcp-relay-gateway-address":"string",
+ "excluded-v6-addresses":[
+ {
+ "excluded-v6-address":"string"
+ }
+ ],
+ "v6-dhcp-pool-prefix-length":"integer",
+ "v6-dhcp-relay-next-hop-address":"string",
+ "v6-dhcp-pool-prefix":"string"
+ }
+ ],
+ "v6-dhcp-default-pool-prefix":"string",
+ "v6-dhcp-default-pool-prefix-length":"integer",
+ "v4-dhcp-default-pool-prefix":"string",
+ "excluded-v6-dhcp-addresses-from-default-pool":[
+ {
+ "excluded-v6-address":"string"
+ }
+ ],
+ "v4-dhcp-default-pool-prefix-length":"integer"
+ },
+ "nat":{
+ "v4-nat-mapping-entries":[
+ {
+ "v4-nat-external":"string",
+ "v4-nat-next-hop-address":"string",
+ "v4-nat-internal":"string"
+ }
+ ]
+ },
+ "static-routes":{
+ "v6-static-routes":[
+ {
+ "v6-static-route-prefix-length":"integer",
+ "v6-next-hop-address":"string",
+ "v6-static-route-prefix":"string"
+ }
+ ],
+ "v4-static-routes":[
+ {
+ "v4-static-route-prefix-length":"integer",
+ "v4-static-route-prefix":"string",
+ "v4-next-hop-address":"string"
+ }
+ ]
+ }
+ }
+
+ }
+
+ }
+}
diff --git a/resource-assignment/provider/src/test/resources/test-context.xml b/resource-assignment/provider/src/test/resources/test-context.xml
new file mode 100644
index 0000000..af5283a
--- /dev/null
+++ b/resource-assignment/provider/src/test/resources/test-context.xml
@@ -0,0 +1,297 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR 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" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
+ http://www.springframework.org/schema/jdbc
+ http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context-3.1.xsd
+ ">
+
+ <context:annotation-config />
+
+ <!-- JDBC setup -->
+
+ <bean id="test.dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource" lazy-init="false">
+ <property name="driverClassName" value="org.h2.Driver" />
+ <property name="url" value="jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;MODE=MySQL" />
+ </bean>
+
+ <jdbc:initialize-database data-source="test.dataSource">
+ <jdbc:script location="sql/schema.sql" />
+ <jdbc:script location="sql/data.sql" />
+ </jdbc:initialize-database>
+
+ <bean id="rm.jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
+ <property name="dataSource" ref="test.dataSource" />
+ </bean>
+
+ <bean id="testDb" class="jtest.util.org.openecomp.sdnc.ra.TestDb">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="dataSetup" class="jtest.org.openecomp.sdnc.ra.DataSetup">
+ <property name="testDb" ref="testDb" />
+ </bean>
+
+ <!-- Utils Configuration -->
+
+ <bean id="speedUtil" class="org.openecomp.sdnc.util.speed.SpeedUtil">
+ <property name="unitFactor" value="1000" />
+ </bean>
+
+ <!-- Resource Lock Configuration -->
+
+ <bean id="resourceLockDao" class="org.openecomp.sdnc.lock.dao.ResourceLockDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ <property name="testing" value="true" />
+ </bean>
+
+ <bean id="lockHelper" class="org.openecomp.sdnc.lock.comp.LockHelperImpl">
+ <property name="resourceLockDao" ref="resourceLockDao" />
+ <property name="retryCount" value="10" />
+ <property name="lockWait" value="5" /> <!-- Seconds -->
+ </bean>
+
+ <!-- RM Configuration -->
+
+ <bean id="resourceJdbcDao" class="org.openecomp.sdnc.rm.dao.jdbc.ResourceJdbcDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="allocationItemJdbcDao" class="org.openecomp.sdnc.rm.dao.jdbc.AllocationItemJdbcDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="resourceLoadJdbcDao" class="org.openecomp.sdnc.rm.dao.jdbc.ResourceLoadJdbcDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="resourceDao" class="org.openecomp.sdnc.rm.dao.jdbc.ResourceDaoImpl">
+ <property name="resourceJdbcDao" ref="resourceJdbcDao" />
+ <property name="allocationItemJdbcDao" ref="allocationItemJdbcDao" />
+ <property name="resourceLoadJdbcDao" ref="resourceLoadJdbcDao" />
+ </bean>
+
+ <bean id="resourceManager" class="org.openecomp.sdnc.rm.comp.ResourceManagerImpl">
+ <property name="lockHelper" ref="lockHelper" />
+ <property name="resourceDao" ref="resourceDao" />
+ <property name="applicationId" value="SDNC" />
+ <property name="lockTimeout" value="600" /> <!-- Seconds -->
+ </bean>
+
+ <!-- Equipment DAO Configuration -->
+
+ <bean id="serverDao" class="org.openecomp.sdnc.ra.equip.dao.ServerDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="vpePortDao" class="org.openecomp.sdnc.ra.equip.dao.VpePortDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="vplspePortDao" class="org.openecomp.sdnc.ra.equip.dao.VplspePortDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <!-- Rule DAO Configuration -->
+
+ <bean id="maxPortSpeedDao" class="org.openecomp.sdnc.ra.rule.dao.MaxPortSpeedDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ <property name="speedUtil" ref="speedUtil" />
+ </bean>
+
+ <bean id="maxServerSpeedDao" class="org.openecomp.sdnc.ra.rule.dao.MaxServerSpeedDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ <property name="speedUtil" ref="speedUtil" />
+ </bean>
+
+ <bean id="resourceRuleDao" class="org.openecomp.sdnc.ra.rule.dao.ResourceRuleDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="rangeRuleDao" class="org.openecomp.sdnc.ra.rule.dao.RangeRuleDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="vpeLockDao" class="org.openecomp.sdnc.ra.rule.dao.VpeLockDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <bean id="parameterDao" class="org.openecomp.sdnc.ra.rule.dao.ParameterDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <!-- Service DAO Configuration -->
+
+ <bean id="serviceResourceDao" class="org.openecomp.sdnc.ra.service.dao.ServiceResourceDaoImpl">
+ <property name="jdbcTemplate" ref="rm.jdbcTemplate" />
+ </bean>
+
+ <!-- ResourceAllocator Configuration -->
+
+ <bean id="allocationRequestBuilder" class="org.openecomp.sdnc.ra.rule.comp.AllocationRequestBuilderImpl">
+ <property name="resourceRuleDao" ref="resourceRuleDao" />
+ <property name="rangeRuleDao" ref="rangeRuleDao" />
+ </bean>
+
+ <bean id="resourceAllocator" class="org.openecomp.sdnc.ra.ResourceAllocator">
+ <property name="speedUtil" ref="speedUtil" />
+ <property name="parameterDao" ref="parameterDao" />
+ <property name="serverDao" ref="serverDao" />
+ <property name="vpePortDao" ref="vpePortDao" />
+ <property name="vplspePortDao" ref="vplspePortDao" />
+ <property name="maxPortSpeedDao" ref="maxPortSpeedDao" />
+ <property name="maxServerSpeedDao" ref="maxServerSpeedDao" />
+ <property name="serviceResourceDao" ref="serviceResourceDao" />
+ <property name="allocationRequestBuilder" ref="allocationRequestBuilder" />
+ <property name="resourceManager" ref="resourceManager" />
+ <property name="endPointAllocator" ref="endPointAllocator" />
+ </bean>
+
+ <!-- EndPointAllocator Configuration -->
+
+ <bean id="endPointAllocator" class="org.openecomp.sdnc.ra.comp.EndPointAllocatorImpl">
+ <property name="resourceManager" ref="resourceManager" />
+ <property name="endPointAllocationDefinitionMap">
+ <map>
+ <entry key="L3AVPN-PORT">
+ <list>
+ <bean class="org.openecomp.sdnc.ra.comp.EndPointAllocationDefinition">
+ <property name="serviceModel" value="L3AVPN-PORT" />
+ <property name="endPointPosition" value="VPE-Cust" />
+ <property name="equipmentReader" ref="vpePortReader" />
+ <property name="equipmentCheckList">
+ <list>
+ <ref bean="provStatusCheck" />
+ <ref bean="excludeVpeCheck" />
+ <ref bean="anyVrfPresentCheck" />
+ </list>
+ </property>
+ <property name="preferenceRuleList">
+ <list>
+ <ref bean="affinityLinkPref" />
+ </list>
+ </property>
+ <property name="allocationRuleList">
+ <list>
+ <ref bean="dbAllocationRule" />
+ <ref bean="affinityAllocationRule" />
+ </list>
+ </property>
+ </bean>
+ </list>
+ </entry>
+ <entry key="L3AVPN-EVC">
+ <list>
+ <bean class="org.openecomp.sdnc.ra.comp.EndPointAllocationDefinition">
+ <property name="serviceModel" value="L3AVPN-EVC" />
+ <property name="endPointPosition" value="VPE-Cust" />
+ <property name="equipmentReader" ref="vpePortReader" />
+ <property name="equipmentCheckList">
+ <list>
+ <ref bean="provStatusCheck" />
+ <ref bean="excludeVpeCheck" />
+ <ref bean="vpeLockCheck" />
+ <ref bean="anyVrfPresentCheck" />
+ <ref bean="oneMVrfCheck" />
+ <ref bean="hubWithRgCheck" />
+ </list>
+ </property>
+ <property name="preferenceRuleList">
+ <list>
+ <ref bean="affinityLinkPref" />
+ </list>
+ </property>
+ <property name="allocationRuleList">
+ <list>
+ <ref bean="dbAllocationRule" />
+ <ref bean="vrfAllocationRule" />
+ <ref bean="servingSiteAllocationRule" />
+ <ref bean="affinityAllocationRule" />
+ </list>
+ </property>
+ </bean>
+ </list>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+ <!-- Equipment Readers Configuration -->
+
+ <bean id="vpePortReader" class="org.openecomp.sdnc.ra.reader.VpePortReader">
+ <property name="vpePortDao" ref="vpePortDao" />
+ </bean>
+
+ <!-- Equipment Checks Configuration -->
+
+ <bean id="provStatusCheck" class="org.openecomp.sdnc.ra.check.ProvStatusCheck">
+ </bean>
+
+ <bean id="excludeVpeCheck" class="org.openecomp.sdnc.ra.check.ExcludeVpeCheck">
+ </bean>
+
+ <bean id="vpeLockCheck" class="org.openecomp.sdnc.ra.check.VpeLockCheck">
+ <property name="vpeLockDao" ref="vpeLockDao" />
+ <property name="resourceManager" ref="resourceManager" />
+ </bean>
+
+ <bean id="anyVrfPresentCheck" class="org.openecomp.sdnc.ra.check.AnyVrfPresentCheck">
+ <property name="resourceManager" ref="resourceManager" />
+ </bean>
+
+ <bean id="oneMVrfCheck" class="org.openecomp.sdnc.ra.check.OneMVrfCheck">
+ <property name="resourceManager" ref="resourceManager" />
+ </bean>
+
+ <bean id="hubWithRgCheck" class="org.openecomp.sdnc.ra.check.HubWithRgCheck">
+ <property name="resourceManager" ref="resourceManager" />
+ </bean>
+
+ <!-- Preference Rule Configuration -->
+
+ <bean id="affinityLinkPref" class="org.openecomp.sdnc.ra.pref.AffinityLinkPref">
+ <property name="resourceManager" ref="resourceManager" />
+ </bean>
+
+ <!-- Resource Allocation Rule Configuration -->
+
+ <bean id="dbAllocationRule" class="org.openecomp.sdnc.ra.alloc.DbAllocationRule">
+ <property name="resourceRuleDao" ref="resourceRuleDao" />
+ <property name="rangeRuleDao" ref="rangeRuleDao" />
+ </bean>
+
+ <bean id="vrfAllocationRule" class="org.openecomp.sdnc.ra.alloc.VrfAllocationRule">
+ </bean>
+
+ <bean id="servingSiteAllocationRule" class="org.openecomp.sdnc.ra.alloc.ServingSiteAllocationRule">
+ </bean>
+
+ <bean id="affinityAllocationRule" class="org.openecomp.sdnc.ra.alloc.AffinityAllocationRule">
+ </bean>
+
+</beans>
diff --git a/sql-resource/.gitignore b/sql-resource/.gitignore
new file mode 100755
index 0000000..b73caf3
--- /dev/null
+++ b/sql-resource/.gitignore
@@ -0,0 +1,34 @@
+#####standard .git ignore entries#####
+
+## IDE Specific Files ##
+org.eclipse.core.resources.prefs
+.classpath
+.project
+.settings
+.idea
+.externalToolBuilders
+maven-eclipse.xml
+workspace
+
+## Compilation Files ##
+*.class
+**/target
+target
+target-ide
+MANIFEST.MF
+
+## Misc Ignores (OS specific etc) ##
+bin/
+dist
+*~
+*.ipr
+*.iml
+*.iws
+classes
+out/
+.DS_STORE
+.metadata
+
+## Folders which contain auto generated source code ##
+yang-gen-config
+yang-gen-sal
diff --git a/sql-resource/features/pom.xml b/sql-resource/features/pom.xml
new file mode 100755
index 0000000..92da9fe
--- /dev/null
+++ b/sql-resource/features/pom.xml
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>sql-resource</artifactId>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>sql-resource-features</artifactId>
+ <name>Sql Resource Adaptor - Features</name>
+
+ <packaging>jar</packaging>
+
+ <dependencies>
+
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sql-resource-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.6</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>features-mdsal</artifactId>
+ <version>${odl.mdsal.features.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+
+ <scope>runtime</scope>
+ </dependency>
+
+
+ <!-- dependency for opendaylight-karaf-empty for use by testing -->
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>opendaylight-karaf-empty</artifactId>
+ <version>${odl.karaf.empty.distro.version}</version>
+ <type>zip</type>
+ </dependency>
+
+
+ <dependency>
+ <!-- Required for launching the feature tests -->
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>features-test</artifactId>
+ <version>${odl.commons.opendaylight.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>features-yangtools</artifactId>
+ <version>${odl.yangtools.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <filtering>true</filtering>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>filter</id>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- launches the feature test, which validates that your karaf feature
+ can be installed inside of a karaf container. It doesn't validate that your
+ functionality works correctly, just that you have all of the dependent bundles
+ defined correctly.
+ <plugin>
+
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.16</version>
+ <configuration>
+ <systemPropertyVariables>
+ <karaf.distro.groupId>org.opendaylight.controller</karaf.distro.groupId>
+ <karaf.distro.artifactId>opendaylight-karaf-empty</karaf.distro.artifactId>
+ <karaf.distro.version>${odl.karaf.empty.distro.version}</karaf.distro.version>
+ </systemPropertyVariables>
+ <dependenciesToScan>
+ <dependency>org.opendaylight.yangtools:features-test</dependency>
+ </dependenciesToScan>
+ </configuration>
+ </plugin>
+ -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>${project.build.directory}/classes/${features.file}</file>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sql-resource/features/src/main/resources/features.xml b/sql-resource/features/src/main/resources/features.xml
new file mode 100644
index 0000000..310aa70
--- /dev/null
+++ b/sql-resource/features/src/main/resources/features.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+
+<features name="sdnc-sql-resource-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
+
+ <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features</repository>
+
+
+ <feature name='sdnc-sql-resource' description="sdnc-sql-resource" version='${project.version}'>
+ <!-- Most applications will have a dependency on the ODL MD-SAL Broker -->
+ <feature version="${odl.mdsal.version}">odl-mdsal-broker</feature>
+ <feature version="${sdnctl.sli.version}">sdnc-sli</feature>
+ <feature version="${sdnctl.dblib.version}">sdnc-dblib</feature>
+ <bundle>mvn:org.openecomp.sdnc.adaptors/sql-resource-provider/${project.version}</bundle>
+ </feature>
+
+</features>
diff --git a/sql-resource/installer/pom.xml b/sql-resource/installer/pom.xml
new file mode 100755
index 0000000..4100193
--- /dev/null
+++ b/sql-resource/installer/pom.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>sql-resource</artifactId>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>sql-resource-installer</artifactId>
+ <name>SQL Resource - Karaf Installer</name>
+ <packaging>pom</packaging>
+
+ <properties>
+ <application.name>sdnc-sql-resource</application.name>
+ <features.boot>sdnc-sql-resource</features.boot>
+ <features.repositories>mvn:org.openecomp.sdnc.adaptors/sql-resource-features/${project.version}/xml/features</features.repositories>
+ <include.transitive.dependencies>false</include.transitive.dependencies>
+ </properties>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sql-resource-features</artifactId>
+ <version>${project.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sql-resource-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>maven-repo-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>false</attach>
+ <finalName>stage/${application.name}-${project.version}</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_mvnrepo_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ <execution>
+ <id>installer-zip</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+ <attach>true</attach>
+ <finalName>${application.name}-${project.version}-installer</finalName>
+ <descriptors>
+ <descriptor>src/assembly/assemble_installer_zip.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-dependencies</id>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <phase>prepare-package</phase>
+ <configuration>
+ <transitive>false</transitive>
+ <outputDirectory>${project.build.directory}/assembly/system</outputDirectory>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <overWriteIfNewer>true</overWriteIfNewer>
+ <useRepositoryLayout>true</useRepositoryLayout>
+ <addParentPoms>false</addParentPoms>
+ <copyPom>false</copyPom>
+ <includeGroupIds>org.openecomp.sdnc</includeGroupIds>
+ <excludeArtifactIds>sli-common,sli-provider,dblib-provider</excludeArtifactIds>
+ <scope>provided</scope>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <id>copy-version</id>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals><!-- here the phase you need -->
+ <phase>validate</phase>
+ <configuration>
+ <outputDirectory>${basedir}/target/stage</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources/scripts</directory>
+ <includes>
+ <include>install-feature.sh</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+
+ </executions>
+ </plugin>
+
+ </plugins>
+ </build>
+
+</project>
diff --git a/sql-resource/installer/src/assembly/assemble_installer_zip.xml b/sql-resource/installer/src/assembly/assemble_installer_zip.xml
new file mode 100644
index 0000000..0ce9b1a
--- /dev/null
+++ b/sql-resource/installer/src/assembly/assemble_installer_zip.xml
@@ -0,0 +1,58 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- we want "system" and related files right at the root level
+ as this file is suppose to be unzip on top of a karaf
+ distro. -->
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target/stage/</directory>
+ <outputDirectory>${application.name}</outputDirectory>
+ <fileMode>755</fileMode>
+ <includes>
+ <include>*.sh</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>target/stage/</directory>
+ <outputDirectory>${application.name}</outputDirectory>
+ <fileMode>644</fileMode>
+ <excludes>
+ <exclude>*.sh</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+
+
+
+</assembly>
diff --git a/sql-resource/installer/src/assembly/assemble_mvnrepo_zip.xml b/sql-resource/installer/src/assembly/assemble_mvnrepo_zip.xml
new file mode 100644
index 0000000..ba21dda
--- /dev/null
+++ b/sql-resource/installer/src/assembly/assemble_mvnrepo_zip.xml
@@ -0,0 +1,48 @@
+<!--
+ ============LICENSE_START=======================================================
+ openECOMP : SDN-C
+ ================================================================================
+ Copyright (C) 2017 AT&T Intellectual Property. All rights
+ reserved.
+ ================================================================================
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ ============LICENSE_END=========================================================
+ -->
+
+<!-- Defines how we build the .zip file which is our distribution. -->
+
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <formats>
+ <format>zip</format>
+ </formats>
+
+ <!-- we want "system" and related files right at the root level
+ as this file is suppose to be unzip on top of a karaf
+ distro. -->
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <fileSets>
+ <fileSet>
+ <directory>target/assembly/</directory>
+ <outputDirectory>.</outputDirectory>
+ <excludes>
+ </excludes>
+ </fileSet>
+ </fileSets>
+
+
+
+</assembly>
diff --git a/sql-resource/installer/src/main/resources/scripts/install-feature.sh b/sql-resource/installer/src/main/resources/scripts/install-feature.sh
new file mode 100644
index 0000000..33e9b03
--- /dev/null
+++ b/sql-resource/installer/src/main/resources/scripts/install-feature.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+ODL_HOME=${ODL_HOME:-/opt/opendaylight/current}
+ODL_KARAF_CLIENT=${ODL_KARAF_CLIENT:-${ODL_HOME}/bin/client}
+ODL_KARAF_CLIENT_OPTS=${ODL_KARAF_CLIENT_OPTS:-"-u karaf"}
+INSTALLERDIR=$(dirname $0)
+
+REPOZIP=${INSTALLERDIR}/${features.boot}-${project.version}.zip
+
+if [ -f ${REPOZIP} ]
+then
+ unzip -d ${ODL_HOME} ${REPOZIP}
+else
+ echo "ERROR : repo zip ($REPOZIP) not found"
+ exit 1
+fi
+
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:repo-add ${features.repositories}
+${ODL_KARAF_CLIENT} ${ODL_KARAF_CLIENT_OPTS} feature:install ${features.boot}
diff --git a/sql-resource/pom.xml b/sql-resource/pom.xml
new file mode 100755
index 0000000..a20a393
--- /dev/null
+++ b/sql-resource/pom.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sdnc-adaptors</artifactId>
+ <version>1.0.0</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>pom</packaging>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sql-resource</artifactId>
+
+
+ <name>Sql Resource Adaptor</name>
+ <description>The Sql resource adaptor allows service logic to read/write data from a local database using direct SQL statements</description>
+
+ <version>1.0.0</version>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sql-resource-features</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ <version>${project.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sql-resource-provider</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <modules>
+ <module>provider</module>
+ <module>features</module>
+ <module>installer</module>
+ </modules>
+</project>
diff --git a/sql-resource/provider/pom.xml b/sql-resource/provider/pom.xml
new file mode 100755
index 0000000..dc73c37
--- /dev/null
+++ b/sql-resource/provider/pom.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.openecomp.sdnc.adaptors</groupId>
+ <artifactId>sql-resource</artifactId>
+ <version>1.0.0</version>
+ </parent>
+ <artifactId>sql-resource-provider</artifactId>
+ <packaging>bundle</packaging>
+ <name>Sql Resource Adaptor - Provider</name>
+ <url>http://maven.apache.org</url>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>sli-common</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>sli-provider</artifactId>
+ <version>${sdnctl.sli.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>equinoxSDK381</groupId>
+ <artifactId>org.eclipse.osgi</artifactId>
+ <version>${equinox.osgi.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>${slf4j.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>${slf4j.version}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.openecomp.sdnc.core</groupId>
+ <artifactId>dblib-provider</artifactId>
+ <version>${sdnctl.dblib.version}</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+<!-- <plugin>
+ <groupId>com.brocade.developer</groupId>
+ <artifactId>providermodule-plugin</artifactId>
+ <configuration>
+ <packageId>org.openecomp.sdnc</packageId>
+ <appName>sql-resource</appName>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin> -->
+
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <version>${bundle.plugin.version}</version>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>org.openecomp.sdnc.sli.resource.sql</Bundle-SymbolicName>
+ <Bundle-Activator>org.openecomp.sdnc.sli.resource.sql.SqlResourceActivator</Bundle-Activator>
+ <Export-Package>org.openecomp.sdnc.sli.resource.sql</Export-Package>
+ <Import-Package>*</Import-Package>
+ <DynamicImport-Package>*</DynamicImport-Package>
+ </instructions>
+
+
+ </configuration>
+
+ </plugin>
+
+
+ </plugins>
+ </build>
+</project>
diff --git a/sql-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/sql/SqlResource.java b/sql-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/sql/SqlResource.java
new file mode 100644
index 0000000..08a9ab3
--- /dev/null
+++ b/sql-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/sql/SqlResource.java
@@ -0,0 +1,447 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.resource.sql;
+
+import java.sql.ResultSetMetaData;
+import java.util.Map;
+
+import javax.sql.rowset.CachedRowSet;
+
+import org.apache.commons.lang3.StringUtils;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicException;
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.openecomp.sdnc.sli.resource.dblib.DBResourceManager;
+import org.openecomp.sdnc.sli.resource.dblib.DbLibService;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.ServiceReference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SqlResource implements SvcLogicResource {
+
+ private static final Logger LOG = LoggerFactory
+ .getLogger(SqlResource.class);
+
+ private static final String DBLIB_SERVICE =
+ "org.openecomp.sdnc.sli.resource.dblib.DBResourceManager";
+
+
+ private static String CRYPT_KEY = "";
+
+ public SqlResource() {
+ }
+
+
+ // For sql-resource, is-available is the same as exists
+ @Override
+ public QueryStatus isAvailable(String resource, String key, String prefix,
+ SvcLogicContext ctx) throws SvcLogicException {
+
+ return(exists(resource, key, prefix, ctx));
+
+ }
+
+ @Override
+ public QueryStatus exists(String resource, String key, String prefix,
+ SvcLogicContext ctx) throws SvcLogicException {
+
+ DbLibService dblibSvc = getDbLibService();
+ if (dblibSvc == null) {
+ return (QueryStatus.FAILURE);
+ }
+
+ String theStmt = resolveCtxVars(key, ctx);
+
+ try {
+ CachedRowSet results = dblibSvc.getData(theStmt, null, null);
+
+ if (!results.next()) {
+ return (QueryStatus.NOT_FOUND);
+ }
+
+ int numRows = results.getInt(1);
+
+ if (numRows > 0) {
+ return (QueryStatus.SUCCESS);
+ } else {
+ return (QueryStatus.NOT_FOUND);
+ }
+ } catch (Exception e) {
+ LOG.error("Caught SQL exception", e);
+ return (QueryStatus.FAILURE);
+ }
+ }
+
+// @Override
+ public QueryStatus query(String resource, boolean localOnly, String select, String key, String prefix, String orderBy, SvcLogicContext ctx) throws SvcLogicException {
+
+
+ DbLibService dblibSvc = getDbLibService();
+
+ if (dblibSvc == null) {
+ return (QueryStatus.FAILURE);
+ }
+
+ String sqlQuery = resolveCtxVars(key, ctx);
+
+ try {
+
+ CachedRowSet results = dblibSvc.getData(sqlQuery, null, null);
+
+ QueryStatus retval = QueryStatus.SUCCESS;
+
+ if (!results.next()) {
+ retval = QueryStatus.NOT_FOUND;
+ LOG.debug("No data found");
+ } else {
+ if (ctx != null) {
+
+
+ if ((prefix != null) && prefix.endsWith("[]")) {
+ // Return an array.
+ String pfx = prefix.substring(0, prefix.length()-2);
+ int idx = 0;
+ do {
+ ResultSetMetaData rsMeta = results.getMetaData();
+ int numCols = rsMeta.getColumnCount();
+
+ for (int i = 0; i < numCols; i++) {
+ String colValue = null;
+ String tableName = rsMeta.getTableName(i+1);
+ if (rsMeta.getColumnType(i+1) == java.sql.Types.VARBINARY) {
+ colValue = decryptColumn(tableName, rsMeta.getColumnName(i+1), results.getBytes(i+1), dblibSvc);
+ } else {
+ colValue = results.getString(i+1);
+ }
+ LOG.debug("Setting " + pfx
+ + "[" + idx + "]."
+ + rsMeta.getColumnLabel(i + 1)
+ .replaceAll("_", "-") + " = " +
+ colValue);
+ ctx.setAttribute(pfx
+ + "[" + idx + "]."
+ + rsMeta.getColumnLabel(i + 1)
+ .replaceAll("_", "-"),
+ colValue);
+ }
+ idx++;
+ } while (results.next());
+ LOG.debug("Setting "+ pfx + "_length = "+idx);
+ ctx.setAttribute(pfx + "_length", ""+idx);
+ } else {
+ ResultSetMetaData rsMeta = results.getMetaData();
+ int numCols = rsMeta.getColumnCount();
+
+ for (int i = 0; i < numCols; i++) {
+ String colValue =results.getString(i+1);
+
+ if (prefix != null) {
+
+ LOG.debug("Setting "+prefix
+ + "."
+ + rsMeta.getColumnLabel(i + 1)
+ .replaceAll("_", "-")+" = "+
+ colValue);
+ ctx.setAttribute(prefix
+ + "."
+ + rsMeta.getColumnLabel(i + 1)
+ .replaceAll("_", "-"),
+ colValue);
+ } else {
+
+ LOG.debug("Setting "+rsMeta.getColumnLabel(i + 1)
+ .replaceAll("_", "-")+" = "+colValue);
+
+ ctx.setAttribute(rsMeta.getColumnLabel(i + 1)
+ .replaceAll("_", "-"), colValue);
+ }
+ }
+ }
+ }
+ }
+
+ return (retval);
+
+ } catch (Exception e) {
+ LOG.error("Caught SQL exception", e);
+ return (QueryStatus.FAILURE);
+ }
+
+ }
+
+ // reserve is no-op
+ @Override
+ public QueryStatus reserve(String resource, String select, String key,
+ String prefix, SvcLogicContext ctx) throws SvcLogicException {
+
+ return(QueryStatus.SUCCESS);
+
+ }
+
+ // release is no-op
+ @Override
+ public QueryStatus release(String resource, String key, SvcLogicContext ctx)
+ throws SvcLogicException {
+
+ return(QueryStatus.SUCCESS);
+ }
+
+ private QueryStatus executeSqlWrite(String key, SvcLogicContext ctx)
+ throws SvcLogicException {
+ QueryStatus retval = QueryStatus.SUCCESS;
+
+ DbLibService dblibSvc = getDbLibService();
+
+ if (dblibSvc == null) {
+ return (QueryStatus.FAILURE);
+ }
+
+ String sqlStmt = resolveCtxVars(key, ctx);
+
+ LOG.debug("key = ["+key+"]; sqlStmt = ["+sqlStmt+"]");
+ try {
+
+ if (!dblibSvc.writeData(sqlStmt, null, null)) {
+ retval = QueryStatus.FAILURE;
+ }
+ } catch (Exception e) {
+ LOG.error("Caught SQL exception", e);
+ retval = QueryStatus.FAILURE;
+ }
+
+
+
+ return (retval);
+
+ }
+
+ private String resolveCtxVars(String key,
+ SvcLogicContext ctx) {
+ if (key == null) {
+ return (null);
+ }
+
+ if (key.startsWith("'") && key.endsWith("'")) {
+ key = key.substring(1, key.length() - 1);
+
+ LOG.debug("Stripped outer single quotes - key is now [" + key + "]");
+ }
+
+ String[] keyTerms = key.split("\\s+");
+
+ StringBuffer sqlBuffer = new StringBuffer();
+
+
+ for (int i = 0; i < keyTerms.length; i++) {
+ sqlBuffer.append(resolveTerm(keyTerms[i], ctx));
+ sqlBuffer.append(" ");
+ }
+
+
+ return (sqlBuffer.toString());
+ }
+
+
+ private String resolveTerm(String term, SvcLogicContext ctx) {
+ if (term == null) {
+ return (null);
+ }
+
+ LOG.debug("resolveTerm: term is " + term);
+
+ if (term.startsWith("$") && (ctx != null)) {
+ // Resolve any index variables.
+
+ return ("'" + resolveCtxVariable(term.substring(1), ctx) + "'");
+ } else {
+ return (term);
+ }
+
+ }
+
+ private String resolveCtxVariable(String ctxVarName, SvcLogicContext ctx) {
+
+ if (ctxVarName.indexOf('[') == -1) {
+ // Ctx variable contains no arrays
+ return (ctx.getAttribute(ctxVarName));
+ }
+
+ // Resolve any array references
+ StringBuffer sbuff = new StringBuffer();
+ String[] ctxVarParts = ctxVarName.split("\\[");
+ sbuff.append(ctxVarParts[0]);
+ for (int i = 1; i < ctxVarParts.length; i++) {
+ if (ctxVarParts[i].startsWith("$")) {
+ int endBracketLoc = ctxVarParts[i].indexOf("]");
+ if (endBracketLoc == -1) {
+ // Missing end bracket ... give up parsing
+ LOG.warn("Variable reference " + ctxVarName
+ + " seems to be missing a ']'");
+ return (ctx.getAttribute(ctxVarName));
+ }
+
+ String idxVarName = ctxVarParts[i].substring(1, endBracketLoc);
+ String remainder = ctxVarParts[i].substring(endBracketLoc);
+
+ sbuff.append("[");
+ sbuff.append(ctx.getAttribute(idxVarName));
+ sbuff.append(remainder);
+
+ } else {
+ // Index is not a variable reference
+ sbuff.append("[");
+ sbuff.append(ctxVarParts[i]);
+ }
+ }
+
+ return (ctx.getAttribute(sbuff.toString()));
+ }
+
+
+
+ @Override
+ public QueryStatus save(String resource, boolean force, boolean localOnly,
+ String key, Map<String, String> parms, String prefix,
+ SvcLogicContext ctx) throws SvcLogicException {
+
+ return(executeSqlWrite(key, ctx));
+ }
+
+ private DbLibService getDbLibService() {
+
+ // Try to get dblib as an OSGI service
+ DbLibService dblibSvc = null;
+ BundleContext bctx = null;
+ ServiceReference sref = null;
+
+ Bundle bundle = FrameworkUtil.getBundle(SqlResource.class);
+
+ if (bundle != null) {
+ bctx = bundle.getBundleContext();
+ }
+
+ if (bctx != null) {
+ sref = bctx.getServiceReference(DBLIB_SERVICE);
+ }
+
+ if (sref == null) {
+ LOG.warn("Could not find service reference for DBLIB service ("
+ + DBLIB_SERVICE + ")");
+ } else {
+ dblibSvc = (DbLibService) bctx.getService(sref);
+ if (dblibSvc == null) {
+
+ LOG.warn("Could not find service reference for DBLIB service ("
+ + DBLIB_SERVICE + ")");
+ }
+ }
+
+ if (dblibSvc == null) {
+ // Must not be running in an OSGI container. See if you can load it as a
+ // a POJO then.
+ try {
+ dblibSvc = DBResourceManager.create(System.getProperties());
+ } catch (Exception e) {
+ LOG.error("Caught exception trying to create dblib service", e);
+ }
+
+ if (dblibSvc == null) {
+ LOG.warn("Could not create new DBResourceManager");
+ }
+ }
+
+ return (dblibSvc);
+ }
+
+
+
+ @Override
+ public QueryStatus notify(String resource, String action, String key, SvcLogicContext ctx) throws SvcLogicException {
+ if(LOG.isDebugEnabled()) {
+ LOG.debug("SqlResource.notify called with resource="+resource+", action="+action);
+ }
+
+
+ return QueryStatus.SUCCESS;
+ }
+
+
+ @Override
+ public QueryStatus delete(String resource, String key, SvcLogicContext ctx)
+ throws SvcLogicException {
+
+ return(executeSqlWrite(key, ctx));
+ }
+
+
+ public QueryStatus update(String resource, String key,
+ Map<String, String> parms, String prefix, SvcLogicContext ctx)
+ throws SvcLogicException {
+
+ return(executeSqlWrite(key, ctx));
+ }
+
+ private String encryptColValue(String value) {
+ return("AES_ENCRYPT('"+value+"','"+CRYPT_KEY+"')");
+ }
+
+ private String decryptColumn(String tableName, String colName, byte[] colValue, DbLibService dblibSvc)
+ {
+ String strValue = new String(colValue);
+
+ if (StringUtils.isAsciiPrintable(strValue)) {
+
+ // If printable, not encrypted
+ return(strValue);
+ } else {
+ try {
+ CachedRowSet results = dblibSvc.getData("SELECT CAST(AES_DECRYPT('"+strValue+"','"+CRYPT_KEY+"') AS CHAR(50)) FROM DUAL", null, null);
+
+ if (results.next()) {
+ strValue = results.getString(1);
+ LOG.debug("Decrypted value is "+strValue);
+ } else {
+ LOG.warn("Cannot decrypt "+tableName+"."+colName);
+ }
+ } catch (Exception e) {
+ LOG.error("Caught exception trying to decrypt "+tableName+"."+colName, e);
+ }
+ }
+
+ return(strValue);
+ }
+
+ public static String getCryptKey() {
+ return(CRYPT_KEY);
+ }
+
+ public static String setCryptKey(String key) {
+ CRYPT_KEY = key;
+ return(CRYPT_KEY);
+ }
+
+
+}
diff --git a/sql-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/sql/SqlResourceActivator.java b/sql-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/sql/SqlResourceActivator.java
new file mode 100644
index 0000000..31bca31
--- /dev/null
+++ b/sql-resource/provider/src/main/java/org/openecomp/sdnc/sli/resource/sql/SqlResourceActivator.java
@@ -0,0 +1,67 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.resource.sql;
+
+import org.openecomp.sdnc.sli.SvcLogicResource;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SqlResourceActivator implements BundleActivator {
+
+ private static final String SVCLOGIC_PROP_PATH = "/svclogic.properties";
+
+ private ServiceRegistration registration = null;
+
+ private static final Logger LOG = LoggerFactory
+ .getLogger(SqlResourceActivator.class);
+
+ @Override
+ public void start(BundleContext ctx) throws Exception {
+
+
+
+ // Advertise Sql resource adaptor
+ SvcLogicResource impl = new SqlResource();
+ String regName = impl.getClass().getName();
+
+ if (registration == null)
+ {
+ LOG.debug("Registering SqlResource service "+regName);
+ registration =ctx.registerService(regName, impl, null);
+ }
+
+ }
+
+ @Override
+ public void stop(BundleContext ctx) throws Exception {
+
+ if (registration != null)
+ {
+ registration.unregister();
+ registration = null;
+ }
+ }
+
+}
diff --git a/sql-resource/provider/src/main/resources/svclogic.properties b/sql-resource/provider/src/main/resources/svclogic.properties
new file mode 100644
index 0000000..4513301
--- /dev/null
+++ b/sql-resource/provider/src/main/resources/svclogic.properties
@@ -0,0 +1,34 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+org.openecomp.sdnc.sli.dbtype=jdbc
+org.openecomp.sdnc.sli.jdbc.hosts=sdnctldb01,sdnctldb02
+org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://DBHOST:3306/sdnctl
+org.openecomp.sdnc.sli.jdbc.database=sdnctl
+org.openecomp.sdnc.sli.jdbc.user=sdnctl
+org.openecomp.sdnc.sli.jdbc.password=gamma
+org.openecomp.sdnc.sli.jdbc.connection.name=sdnctldb01
+
+org.openecomp.sdnc.sli.jdbc.connection.timeout=50
+org.openecomp.sdnc.sli.jdbc.request.timeout=100
+org.openecomp.sdnc.sli.jdbc.limit.init=10
+org.openecomp.sdnc.sli.jdbc.limit.min=10
+org.openecomp.sdnc.sli.jdbc.limit.max=20
diff --git a/sql-resource/provider/src/test/java/org/openecomp/sdnc/sli/resource/sql/SqlResourceTest.java b/sql-resource/provider/src/test/java/org/openecomp/sdnc/sli/resource/sql/SqlResourceTest.java
new file mode 100644
index 0000000..afed810
--- /dev/null
+++ b/sql-resource/provider/src/test/java/org/openecomp/sdnc/sli/resource/sql/SqlResourceTest.java
@@ -0,0 +1,218 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR 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.openecomp.sdnc.sli.resource.sql;
+
+import java.io.BufferedReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Enumeration;
+import java.util.Properties;
+
+import org.openecomp.sdnc.sli.SvcLogicContext;
+import org.openecomp.sdnc.sli.SvcLogicResource.QueryStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import junit.framework.TestCase;
+
+public class SqlResourceTest extends TestCase {
+
+ private static final Logger LOG = LoggerFactory
+ .getLogger(SqlResourceTest.class);
+
+
+ public void testExists() {
+
+
+ Properties props = new Properties();
+ InputStream propStr = getClass().getResourceAsStream("/svclogic.properties");
+ if (propStr == null) {
+ fail("src/test/resources/svclogic.properties missing");
+ }
+
+ try {
+ props.load(propStr);
+ propStr.close();
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Could not initialize properties");
+ }
+
+ // Add properties to global properties
+
+ Enumeration propNames = props.keys();
+
+ while (propNames.hasMoreElements()) {
+ String propName = (String) propNames.nextElement();
+
+ System.setProperty(propName, props.getProperty(propName));
+ }
+
+ SqlResource sqlResource = new SqlResource();
+
+
+
+ InputStream testStr = getClass().getResourceAsStream("/save.tests");
+ BufferedReader testsReader = new BufferedReader(new InputStreamReader(testStr));
+ SvcLogicContext ctx = new SvcLogicContext();
+
+ try {
+ String testExpr = null;
+
+ int testNum = 0;
+ while ((testExpr = testsReader.readLine()) != null) {
+ testExpr = testExpr.trim();
+
+ if (testExpr.startsWith("#")) {
+ testExpr = testExpr.substring(1).trim();
+ String[] nameValue = testExpr.split("=");
+ String name = nameValue[0].trim();
+ String value = nameValue[1].trim();
+
+ LOG.info("Setting context attribute " + name + " = "
+ + value);
+ ctx.setAttribute(name, value);
+
+ } else {
+
+ testNum++;
+ String sqlStmt = testExpr;
+ QueryStatus status = sqlResource.save("SQL", true, false, sqlStmt, null, "savetest"+testNum, ctx);
+
+ switch (status) {
+ case SUCCESS:
+ LOG.info("Found data for query [" + sqlStmt + "]");
+ break;
+ case NOT_FOUND:
+ LOG.info("Did not data for query [" + sqlStmt + "]");
+ break;
+ default:
+ fail("Failure executing query [" + sqlStmt + "]");
+
+ }
+ }
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Caught exception running tests");
+ }
+
+
+ testStr = getClass().getResourceAsStream("/query.tests");
+ testsReader = new BufferedReader(new InputStreamReader(testStr));
+
+ try {
+ String testExpr = null;
+
+ int testNum = 0;
+ while ((testExpr = testsReader.readLine()) != null) {
+ testExpr = testExpr.trim();
+ if (testExpr.startsWith("#")) {
+ testExpr = testExpr.substring(1).trim();
+ String[] nameValue = testExpr.split("=");
+ String name = nameValue[0].trim();
+ String value = nameValue[1].trim();
+
+ LOG.info("Setting context attribute " + name + " = "
+ + value);
+ ctx.setAttribute(name, value);
+
+ } else {
+
+ testNum++;
+
+ String sqlStmt = testExpr;
+ QueryStatus status = sqlResource.query("SQL", false, null,
+ sqlStmt, "querytest" + testNum, null, ctx);
+
+ switch (status) {
+ case SUCCESS:
+ LOG.info("Found data for query [" + sqlStmt + "]");
+ break;
+ case NOT_FOUND:
+ LOG.info("Did not data for query [" + sqlStmt + "]");
+ break;
+ default:
+ fail("Failure executing query [" + sqlStmt + "]");
+
+ }
+ }
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Caught exception running tests");
+ }
+
+
+ testStr = getClass().getResourceAsStream("/delete.tests");
+ testsReader = new BufferedReader(new InputStreamReader(testStr));
+
+ try {
+ String testExpr = null;
+
+ int testNum = 0;
+ while ((testExpr = testsReader.readLine()) != null) {
+ testExpr = testExpr.trim();
+ if (testExpr.startsWith("#")) {
+ testExpr = testExpr.substring(1).trim();
+ String[] nameValue = testExpr.split("=");
+ String name = nameValue[0].trim();
+ String value = nameValue[1].trim();
+
+ LOG.info("Setting context attribute " + name + " = "
+ + value);
+ ctx.setAttribute(name, value);
+
+ } else {
+
+ testNum++;
+
+ String sqlStmt = testExpr;
+ QueryStatus status = sqlResource.delete("SQL", sqlStmt, ctx);
+
+ switch (status) {
+ case SUCCESS:
+ LOG.info("Found data for query [" + sqlStmt + "]");
+ break;
+ case NOT_FOUND:
+ LOG.info("Did not data for query [" + sqlStmt + "]");
+ break;
+ default:
+ fail("Failure executing query [" + sqlStmt + "]");
+
+ }
+ }
+ }
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Caught exception running tests");
+ }
+
+ for (String attrName : ctx.getAttributeKeySet()) {
+ LOG.info("ctx.getAttribute("+attrName+") = "+ctx.getAttribute(attrName));
+ }
+ }
+
+}
diff --git a/sql-resource/provider/src/test/resources/delete.tests b/sql-resource/provider/src/test/resources/delete.tests
new file mode 100755
index 0000000..a60a3bc
--- /dev/null
+++ b/sql-resource/provider/src/test/resources/delete.tests
@@ -0,0 +1,2 @@
+DROP TABLE SQLRESOURCE_ORDER;
+DROP TABLE SQLRESOURCE_ORDER_ITEM;
diff --git a/sql-resource/provider/src/test/resources/query.tests b/sql-resource/provider/src/test/resources/query.tests
new file mode 100755
index 0000000..ec05c22
--- /dev/null
+++ b/sql-resource/provider/src/test/resources/query.tests
@@ -0,0 +1,5 @@
+# max-price = 100
+SELECT * FROM SQLRESOURCE_ORDER where placed_on < now();
+SELECT SQLRESOURCE_ORDER.order_number, clli, service, price FROM SQLRESOURCE_ORDER, SQLRESOURCE_ORDER_ITEM where SQLRESOURCE_ORDER.order_number = SQLRESOURCE_ORDER_ITEM.order_number and price > $max-price ;
+SELECT SQLRESOURCE_ORDER.order_number, clli, service, price FROM SQLRESOURCE_ORDER, SQLRESOURCE_ORDER_ITEM where SQLRESOURCE_ORDER.order_number = SQLRESOURCE_ORDER_ITEM.order_number and price < $max-price ;
+SELECT SQLRESOURCE_ORDER.order_number AS ordernum, clli, service, price FROM SQLRESOURCE_ORDER, SQLRESOURCE_ORDER_ITEM where SQLRESOURCE_ORDER.order_number = SQLRESOURCE_ORDER_ITEM.order_number and price < $max-price ;
diff --git a/sql-resource/provider/src/test/resources/save.tests b/sql-resource/provider/src/test/resources/save.tests
new file mode 100755
index 0000000..e2c4221
--- /dev/null
+++ b/sql-resource/provider/src/test/resources/save.tests
@@ -0,0 +1,13 @@
+# order-number = 1234
+# zero = 0
+# item[0].clli = MTJNJA14
+# item[0].service = NoD
+# item[0].price = 1000000
+# item[1].clli = MTJNJA14
+# item[1].service = Pizza
+# item[1].price = 10
+CREATE TABLE IF NOT EXISTS SQLRESOURCE_ORDER (order_number VARCHAR(40), placed_on TIMESTAMP);
+CREATE TABLE IF NOT EXISTS SQLRESOURCE_ORDER_ITEM (order_number VARCHAR(40), clli VARCHAR(40), service VARCHAR(40), price INTEGER(4));
+INSERT INTO SQLRESOURCE_ORDER VALUES ( $order-number , now());
+INSERT INTO SQLRESOURCE_ORDER_ITEM VALUES( $order-number , $item[$zero].clli , $item[0].service , $item[0].price );
+INSERT INTO SQLRESOURCE_ORDER_ITEM VALUES( $order-number , $item[1].clli , $item[1].service , $item[1].price );
diff --git a/sql-resource/provider/src/test/resources/simplelogger.properties b/sql-resource/provider/src/test/resources/simplelogger.properties
new file mode 100644
index 0000000..68ced84
--- /dev/null
+++ b/sql-resource/provider/src/test/resources/simplelogger.properties
@@ -0,0 +1,22 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+org.slf4j.simpleLogger.defaultLogLevel=debug
diff --git a/sql-resource/provider/src/test/resources/svclogic.properties b/sql-resource/provider/src/test/resources/svclogic.properties
new file mode 100644
index 0000000..a1b5fb7
--- /dev/null
+++ b/sql-resource/provider/src/test/resources/svclogic.properties
@@ -0,0 +1,34 @@
+###
+# ============LICENSE_START=======================================================
+# openECOMP : SDN-C
+# ================================================================================
+# Copyright (C) 2017 AT&T Intellectual Property. All rights
+# reserved.
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+###
+
+org.openecomp.sdnc.sli.dbtype=jdbc
+org.openecomp.sdnc.sli.jdbc.hosts=localhost
+org.openecomp.sdnc.sli.jdbc.url=jdbc:mysql://DBHOST:3306/sdnctl
+org.openecomp.sdnc.sli.jdbc.database=sdnctl
+org.openecomp.sdnc.sli.jdbc.user=sdnctl
+org.openecomp.sdnc.sli.jdbc.password=gamma
+org.openecomp.sdnc.sli.jdbc.connection.name=sdnctldb01
+
+org.openecomp.sdnc.sli.jdbc.connection.timeout=50
+org.openecomp.sdnc.sli.jdbc.request.timeout=100
+org.openecomp.sdnc.sli.jdbc.limit.init=10
+org.openecomp.sdnc.sli.jdbc.limit.min=10
+org.openecomp.sdnc.sli.jdbc.limit.max=20
diff --git a/version.properties b/version.properties
new file mode 100644
index 0000000..494186b
--- /dev/null
+++ b/version.properties
@@ -0,0 +1,14 @@
+###########################################################
+# Versioning variables
+# Note that these variables cannot be structured (e.g. : version.release or version.snapshot etc... )
+# because they are used in Jenkins, whose plug-in doesn't support
+
+release_name=0
+sprint_number=1
+feature_revision=2
+
+base_version=${release_name}.${sprint_number}.${feature_revision}
+
+release_version=${base_version}
+snapshot_version=${base_version}-SNAPSHOT
+