aboutsummaryrefslogtreecommitdiffstats
path: root/aai-traversal
diff options
context:
space:
mode:
authorVenkata Harish K Kajur <vk250x@att.com>2017-09-28 17:44:52 -0400
committerVenkata Harish K Kajur <vk250x@att.com>2017-09-28 17:44:57 -0400
commitbed3675b3616e089d8581b7cb755adb754e2f3f9 (patch)
treec9be7f3df10e18079a8e1e83330652086771fd8b /aai-traversal
parente76326c68fb9b1dff847275fde0f2cc78ce2f8a2 (diff)
Change all the packages from openecomp to onap
Issue-ID: AAI-61 AAI-82 Change-Id: Iba7de4bd0dea1398d8608c9c514d78ad69201d0a Signed-off-by: Venkata Harish K Kajur <vk250x@att.com>
Diffstat (limited to 'aai-traversal')
-rw-r--r--aai-traversal/ajsc-shared-config/etc/basic-logback_root_logger_level_off.xml23
-rw-r--r--aai-traversal/ajsc-shared-config/etc/localhost-access-logback.xml25
-rw-r--r--aai-traversal/ajsc-shared-config/etc/logback.xml47
-rw-r--r--aai-traversal/bundleconfig-local/etc/appprops/PostProcessorInterceptors.properties2
-rw-r--r--aai-traversal/bundleconfig-local/etc/appprops/PreProcessorInterceptors.properties2
-rw-r--r--aai-traversal/bundleconfig-local/etc/appprops/aaiconfig.properties22
-rw-r--r--aai-traversal/bundleconfig-local/etc/appprops/default-logback.xml23
-rw-r--r--aai-traversal/bundleconfig-local/etc/appprops/gremlin-server-config.yaml22
-rw-r--r--aai-traversal/bundleconfig-local/etc/appprops/titan-cached.properties25
-rw-r--r--aai-traversal/bundleconfig-local/etc/appprops/titan-realtime.properties25
-rw-r--r--aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/FileMonitorBeans.xml6
-rw-r--r--aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/jaxrsBeans.groovy10
-rw-r--r--aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/serviceBeans.xml16
-rw-r--r--aai-traversal/src/main/config/runner-web.xml2
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/ajsc_aai/JaxrsErrorMessageLookupService.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/JaxrsErrorMessageLookupService.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/ajsc_aai/JaxrsUserService.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/JaxrsUserService.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/ajsc_aai/filemonitor/ServicePropertiesListener.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/filemonitor/ServicePropertiesListener.java)14
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/ajsc_aai/filemonitor/ServicePropertiesMap.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/filemonitor/ServicePropertiesMap.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/ajsc_aai/filemonitor/ServicePropertyService.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/filemonitor/ServicePropertyService.java)14
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/ajsc_aai/util/ServicePropertiesMapBean.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/util/ServicePropertiesMapBean.java)19
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/config/DmaapConfig.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/config/DmaapConfig.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/dbgraphgen/ModelBasedProcessing.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessing.java)45
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/dbgraphgen/ResultSet.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/dbgraphgen/ResultSet.java)19
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/dbgraphmap/SearchGraph.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java)93
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/interceptors/AAIHeaderProperties.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAIHeaderProperties.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/interceptors/AAILogJAXRSInInterceptor.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java)31
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/interceptors/AAILogJAXRSOutInterceptor.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSOutInterceptor.java)27
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/interceptors/PostAaiAjscInterceptor.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/interceptors/PostAaiAjscInterceptor.java)21
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/interceptors/PreAaiAjscInterceptor.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/interceptors/PreAaiAjscInterceptor.java)19
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/ExceptionHandler.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/ExceptionHandler.java)21
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/QueryConsumer.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/QueryConsumer.java)53
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/retired/RetiredConsumer.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/retired/RetiredConsumer.java)25
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/retired/V3ThroughV7Consumer.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/retired/V3ThroughV7Consumer.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/retired/V7V8NamedQueries.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/retired/V7V8NamedQueries.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/search/GenericQueryProcessor.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/search/GenericQueryProcessor.java)23
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/search/GremlinGroovyShellSingleton.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/search/GremlinGroovyShellSingleton.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/search/GremlinServerImpl.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/search/GremlinServerImpl.java)19
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/search/GremlinServerSingleton.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/search/GremlinServerSingleton.java)21
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/search/GroovyQueryBuilderSingleton.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/search/GroovyQueryBuilderSingleton.java)25
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/search/GroovyShellImpl.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/search/GroovyShellImpl.java)19
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/search/ModelAndNamedQueryRestProvider.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/search/ModelAndNamedQueryRestProvider.java)31
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/search/QueryProcessorType.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/search/QueryProcessorType.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/search/SearchProvider.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java)47
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/util/EchoResponse.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/util/EchoResponse.java)23
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/util/LogFormatTools.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/util/LogFormatTools.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/rest/util/ValidateEncoding.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/rest/util/ValidateEncoding.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/transforms/Converter.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/transforms/Converter.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/transforms/LowerCamelToLowerHyphenConverter.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/transforms/LowerCamelToLowerHyphenConverter.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/transforms/LowerHyphenToLowerCamelConverter.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/transforms/LowerHyphenToLowerCamelConverter.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/transforms/MapTraverser.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/transforms/MapTraverser.java)17
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/util/AAIAppServletContextListener.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/util/AAIAppServletContextListener.java)29
-rw-r--r--aai-traversal/src/main/java/org/onap/aai/util/MakeNamedQuery.java (renamed from aai-traversal/src/main/java/org/openecomp/aai/util/MakeNamedQuery.java)33
-rw-r--r--aai-traversal/src/main/resources/docker/aai.sh16
-rw-r--r--aai-traversal/src/main/resources/docker/docker-entrypoint.sh21
-rw-r--r--aai-traversal/src/main/resources/docker/init-chef.sh35
-rw-r--r--aai-traversal/src/main/resources/schema/UebEventLogEntry.xsd23
-rw-r--r--aai-traversal/src/main/scripts/deleteNamedQuery.sh17
-rw-r--r--aai-traversal/src/main/scripts/deleteTool.sh17
-rw-r--r--aai-traversal/src/main/scripts/getTool.sh17
-rw-r--r--aai-traversal/src/main/scripts/install/instutils.sh17
-rw-r--r--aai-traversal/src/main/scripts/install/updateQueryData.sh17
-rw-r--r--aai-traversal/src/main/scripts/putTool.sh15
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/dbgraphgen/ModelBasedProcessingInvalidDataTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessingInvalidDataTest.java)1967
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/dbgraphgen/ModelBasedProcessingTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessingTest.java)1083
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/dbgraphmap/SearchGraphTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/dbgraphmap/SearchGraphTest.java)755
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/interceptors/AAILogJAXRSInInterceptorTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptorTest.java)13
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/interceptors/AAILogJAXRSOutInterceptorTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/interceptors/AAILogJAXRSOutInterceptorTest.java)13
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/interceptors/PostAaiAjscInterceptorTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/interceptors/PostAaiAjscInterceptorTest.java)15
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/interceptors/PreAaiAjscInterceptorTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/interceptors/PreAaiAjscInterceptorTest.java)13
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/ExceptionHandlerTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/ExceptionHandlerTest.java)13
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromNfTypeQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromNfTypeQueryTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromNfTypeVendorVersionTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromNfTypeVendorVersionTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromNfTypeVendorVersion_withOptionalTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromNfTypeVendorVersion_withOptionalTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromVnfTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromVnfTest.java)27
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionfromCountryCloudRegionVersionQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionfromCountryCloudRegionVersionQueryTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionfromCountryQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionfromCountryQueryTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/FirstNetTopology_LineOfBusinessTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/FirstNetTopology_LineOfBusinessTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/FirstNetTopology_ServiceInstanceTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/FirstNetTopology_ServiceInstanceTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/GremlinServerImplTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/GremlinServerImplTest.java)327
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/GroovyShellImplTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/GroovyShellImplTest.java)315
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/ImageFromCloudRegionNfTypeTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/ImageFromCloudRegionNfTypeTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/LinkedDevices_ComplicatedGVtoGV.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/LinkedDevices_ComplicatedGVtoGV.java)27
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/LinkedDevices_NewvceVserverTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/LinkedDevices_NewvceVserverTest.java)27
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/LinkedDevices_SimpleGVtoGVQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/LinkedDevices_SimpleGVtoGVQueryTest.java)27
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/LocationNetTypeNetRolefromCloudRegionQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/LocationNetTypeNetRolefromCloudRegionQueryTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/ModelAndNamedQueryRestProviderTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/ModelAndNamedQueryRestProviderTest.java)37
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/MsoRequestVfModuleTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/MsoRequestVfModuleTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/NetworkNameFromNetworkRoleQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/NetworkNameFromNetworkRoleQueryTest.java)27
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/NfTypefromCloudRegionQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/NfTypefromCloudRegionQueryTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/OwningEntityfromServiceInstance.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/OwningEntityfromServiceInstance.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/PendingTopologyDetailTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/PendingTopologyDetailTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/PserverfromConfigurationFilterInterfaceIdTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/PserverfromConfigurationFilterInterfaceIdTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/PserverfromConfigurationTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/PserverfromConfigurationTest.java)15
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/PserversFromVnfQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/PserversFromVnfQueryTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/QueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/QueryTest.java)37
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/QueryVnfFromModelByRegionTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/QueryVnfFromModelByRegionTest.java)27
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/SearchProviderTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/SearchProviderTest.java)37
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/ServiceFromPserverAndSubsNameTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/ServiceFromPserverAndSubsNameTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/SimpleFormatTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/SimpleFormatTest.java)47
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyDetailFromVserverQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyDetailFromVserverQueryTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyDetailsQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyDetailsQueryTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyFromCloudRegionIdAndServiceIdTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyFromCloudRegionIdAndServiceIdTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyFromSubscriberNameAndServiceTypeTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyFromSubscriberNameAndServiceTypeTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/VnfInstancesFromServiceInstancebyModelVersionTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfInstancesFromServiceInstancebyModelVersionTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/VnfTopologyFromServiceInstanceTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfTopologyFromServiceInstanceTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/VnfTopologyFromVfModuleTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfTopologyFromVfModuleTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/VnfTopologyFromVnfTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfTopologyFromVnfTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/VnfsFromPserverQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfsFromPserverQueryTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/VnfsFromServiceInstanceTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfsFromServiceInstanceTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/VserverFromVnfQueryTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/VserverFromVnfQueryTest.java)27
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/search/VserverLogicallinkFromPServerTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/search/VserverLogicallinkFromPServerTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/util/EchoResponseTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/util/EchoResponseTest.java)13
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/util/LogFormatToolsTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/util/LogFormatToolsTest.java)71
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/rest/util/ValidateEncodingTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/rest/util/ValidateEncodingTest.java)17
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/retiredcustomer/JaxrsUserServiceTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/JaxrsUserServiceTest.java)221
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/retiredcustomer/RetiredConsumerTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/RetiredConsumerTest.java)257
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/retiredcustomer/V3ThroughV7ConsumerTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/V3ThroughV7ConsumerTest.java)67
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/retiredcustomer/V7V8NamedQueriesTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/V7V8NamedQueriesTest.java)67
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/transforms/JoltTestUtil.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/transforms/JoltTestUtil.java)17
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/transforms/LowerHyphenToLowerCamelConverterTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/transforms/LowerHyphenToLowerCamelConverterTest.java)17
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/transforms/MapTraverserTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/transforms/MapTraverserTest.java)21
-rw-r--r--aai-traversal/src/test/java/org/onap/aai/util/AAIAppServletContextListenerTest.java (renamed from aai-traversal/src/test/java/org/openecomp/aai/util/AAIAppServletContextListenerTest.java)355
-rw-r--r--aai-traversal/src/test/resources/bundleconfig-local/etc/appprops/aaiconfig.properties16
-rw-r--r--aai-traversal/src/test/resources/config/etc/titan-cached.properties16
-rw-r--r--aai-traversal/src/test/resources/config/etc/titan-realtime.properties16
-rw-r--r--aai-traversal/src/test/resources/inmemory_titan.properties16
-rw-r--r--aai-traversal/src/test/resources/logback.xml45
-rw-r--r--aai-traversal/src/test/resources/test_aaiconfig.properties16
128 files changed, 4272 insertions, 3790 deletions
diff --git a/aai-traversal/ajsc-shared-config/etc/basic-logback_root_logger_level_off.xml b/aai-traversal/ajsc-shared-config/etc/basic-logback_root_logger_level_off.xml
index 326c8cb..047da14 100644
--- a/aai-traversal/ajsc-shared-config/etc/basic-logback_root_logger_level_off.xml
+++ b/aai-traversal/ajsc-shared-config/etc/basic-logback_root_logger_level_off.xml
@@ -1,3 +1,26 @@
+<!--
+
+ ============LICENSE_START=======================================================
+ org.onap.aai
+ ================================================================================
+ 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 is a trademark and service mark of AT&T Intellectual Property.
+
+-->
<configuration scan="true" scanPeriod="3 seconds" debug="true">
<property name="logDirectory" value="${AJSC_HOME}/log" />
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
diff --git a/aai-traversal/ajsc-shared-config/etc/localhost-access-logback.xml b/aai-traversal/ajsc-shared-config/etc/localhost-access-logback.xml
index cf37962..1ca6caf 100644
--- a/aai-traversal/ajsc-shared-config/etc/localhost-access-logback.xml
+++ b/aai-traversal/ajsc-shared-config/etc/localhost-access-logback.xml
@@ -1,3 +1,26 @@
+<!--
+
+ ============LICENSE_START=======================================================
+ org.onap.aai
+ ================================================================================
+ 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 is a trademark and service mark of AT&T Intellectual Property.
+
+-->
<configuration>
<appender name="ACCESS"
class="ch.qos.logback.core.rolling.RollingFileAppender">
@@ -6,7 +29,7 @@
<fileNamePattern>${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
- <encoder class="org.openecomp.aai.logging.CustomLogPatternLayoutEncoder">
+ <encoder class="org.onap.aai.logging.CustomLogPatternLayoutEncoder">
<Pattern>%a %u %z [%t] "%m %U" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D</Pattern>
</encoder>
</appender>
diff --git a/aai-traversal/ajsc-shared-config/etc/logback.xml b/aai-traversal/ajsc-shared-config/etc/logback.xml
index ee6726d..b855c37 100644
--- a/aai-traversal/ajsc-shared-config/etc/logback.xml
+++ b/aai-traversal/ajsc-shared-config/etc/logback.xml
@@ -1,3 +1,26 @@
+<!--
+
+ ============LICENSE_START=======================================================
+ org.onap.aai
+ ================================================================================
+ 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 is a trademark and service mark of AT&T Intellectual Property.
+
+-->
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<contextName>${module.ajsc.namespace.name}</contextName>
<jmxConfigurator />
@@ -47,7 +70,7 @@
<fileNamePattern>${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
- <encoder class="org.openecomp.aai.logging.EcompEncoder">
+ <encoder class="org.onap.aai.logging.EcompEncoder">
<pattern>${eelfMetricLogPattern}</pattern>
</encoder>
</appender>
@@ -69,7 +92,7 @@
<fileNamePattern>${logDirectory}/rest/debug.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
- <encoder class="org.openecomp.aai.logging.EcompEncoder">
+ <encoder class="org.onap.aai.logging.EcompEncoder">
<pattern>${eelfLogPattern}</pattern>
</encoder>
</appender>
@@ -90,7 +113,7 @@
<fileNamePattern>${logDirectory}/rest/error.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
- <encoder class="org.openecomp.aai.logging.EcompEncoder">
+ <encoder class="org.onap.aai.logging.EcompEncoder">
<pattern>${eelfLogPattern}</pattern>
</encoder>
</appender>
@@ -108,7 +131,7 @@
<fileNamePattern>${logDirectory}/rest/audit.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
- <encoder class="org.openecomp.aai.logging.EcompEncoder">
+ <encoder class="org.onap.aai.logging.EcompEncoder">
<pattern>${eelfAuditLogPattern}</pattern>
</encoder>
</appender>
@@ -131,7 +154,7 @@
<fileNamePattern>${logDirectory}/rest/translog.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
- <encoder class="org.openecomp.aai.logging.EcompEncoder">
+ <encoder class="org.onap.aai.logging.EcompEncoder">
<pattern>${eelfLogPattern}</pattern>
</encoder>
</appender>
@@ -152,7 +175,7 @@
<fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
- <encoder class="org.openecomp.aai.logging.EcompEncoder">
+ <encoder class="org.onap.aai.logging.EcompEncoder">
<pattern>${eelfLogPattern}</pattern>
</encoder>
</appender>
@@ -169,7 +192,7 @@
<fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
- <encoder class="org.openecomp.aai.logging.EcompEncoder">
+ <encoder class="org.onap.aai.logging.EcompEncoder">
<pattern>${eelfLogPattern}</pattern>
</encoder>
</appender>
@@ -185,7 +208,7 @@
<fileNamePattern>${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd}
</fileNamePattern>
</rollingPolicy>
- <encoder class="org.openecomp.aai.logging.EcompEncoder">
+ <encoder class="org.onap.aai.logging.EcompEncoder">
<pattern>${eelfLogPattern}</pattern>
</encoder>
</appender>
@@ -304,20 +327,20 @@
</logger>
<!-- logback jms appenders & loggers definition ends here -->
- <logger name="org.openecomp.aai.interceptors" level="DEBUG"
+ <logger name="org.onap.aai.interceptors" level="DEBUG"
additivity="false">
<appender-ref ref="asynctranslog" />
</logger>
- <logger name="org.openecomp.aai.interceptors.PreAaiAjscInterceptor" level="DEBUG">
+ <logger name="org.onap.aai.interceptors.PreAaiAjscInterceptor" level="DEBUG">
<appender-ref ref="asyncAUDIT"/>
</logger>
- <logger name="org.openecomp.aai.interceptors.PostAaiAjscInterceptor" level="DEBUG">
+ <logger name="org.onap.aai.interceptors.PostAaiAjscInterceptor" level="DEBUG">
<appender-ref ref="asyncAUDIT"/>
</logger>
- <logger name="org.openecomp.aai.dmaap" level="DEBUG" additivity="false">
+ <logger name="org.onap.aai.dmaap" level="DEBUG" additivity="false">
<appender-ref ref="dmaapAAIEventConsumer" />
<appender-ref ref="dmaapAAIEventConsumerDebug" />
<appender-ref ref="dmaapAAIEventConsumerMetric" />
diff --git a/aai-traversal/bundleconfig-local/etc/appprops/PostProcessorInterceptors.properties b/aai-traversal/bundleconfig-local/etc/appprops/PostProcessorInterceptors.properties
index 29f5f7c..ca31a26 100644
--- a/aai-traversal/bundleconfig-local/etc/appprops/PostProcessorInterceptors.properties
+++ b/aai-traversal/bundleconfig-local/etc/appprops/PostProcessorInterceptors.properties
@@ -1,3 +1,3 @@
#This properties file is for defining any PostProcessorInterceptors that have been created for your AJSC service.
-/**=org.openecomp.aai.interceptors.PostAaiAjscInterceptor
+/**=org.onap.aai.interceptors.PostAaiAjscInterceptor
diff --git a/aai-traversal/bundleconfig-local/etc/appprops/PreProcessorInterceptors.properties b/aai-traversal/bundleconfig-local/etc/appprops/PreProcessorInterceptors.properties
index e803374..1620bea 100644
--- a/aai-traversal/bundleconfig-local/etc/appprops/PreProcessorInterceptors.properties
+++ b/aai-traversal/bundleconfig-local/etc/appprops/PreProcessorInterceptors.properties
@@ -1,3 +1,3 @@
#This properties file is for defining any PreProcessorInterceptors that have been created for your AJSC service.
-/**=com.att.ajsc.csi.restmethodmap.RestMethodMapInterceptor,org.openecomp.aai.interceptors.PreAaiAjscInterceptor
+/**=com.att.ajsc.csi.restmethodmap.RestMethodMapInterceptor,org.onap.aai.interceptors.PreAaiAjscInterceptor
diff --git a/aai-traversal/bundleconfig-local/etc/appprops/aaiconfig.properties b/aai-traversal/bundleconfig-local/etc/appprops/aaiconfig.properties
index e1da8ed..217463d 100644
--- a/aai-traversal/bundleconfig-local/etc/appprops/aaiconfig.properties
+++ b/aai-traversal/bundleconfig-local/etc/appprops/aaiconfig.properties
@@ -1,3 +1,25 @@
+#
+# ============LICENSE_START=======================================================
+# org.onap.aai
+# ================================================================================
+# 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 is a trademark and service mark of AT&T Intellectual Property.
+#
+
####################################################################
# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE
# TEMPLATE AND *ALL* DATAFILES
diff --git a/aai-traversal/bundleconfig-local/etc/appprops/default-logback.xml b/aai-traversal/bundleconfig-local/etc/appprops/default-logback.xml
index 0dc841d..655157b 100644
--- a/aai-traversal/bundleconfig-local/etc/appprops/default-logback.xml
+++ b/aai-traversal/bundleconfig-local/etc/appprops/default-logback.xml
@@ -1,3 +1,26 @@
+<!--
+
+ ============LICENSE_START=======================================================
+ org.onap.aai
+ ================================================================================
+ 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 is a trademark and service mark of AT&T Intellectual Property.
+
+-->
<configuration debug="false">
<property name="defaultPattern" value="%d{MM/dd-HH:mm:ss.SSS}|%logger|%X{RequestId}|%X{ServiceInstanceId}|%thread|%X{ServiceName}|%X{InstanceUUID}|%.-5level|%X{AlertSeverity}|%X{ServerIPAddress}|%X{ServerFQDN}|%X{RemoteHost}|%X{Timer}|%msg%n" />
diff --git a/aai-traversal/bundleconfig-local/etc/appprops/gremlin-server-config.yaml b/aai-traversal/bundleconfig-local/etc/appprops/gremlin-server-config.yaml
index 19caebd..a9de31f 100644
--- a/aai-traversal/bundleconfig-local/etc/appprops/gremlin-server-config.yaml
+++ b/aai-traversal/bundleconfig-local/etc/appprops/gremlin-server-config.yaml
@@ -1,3 +1,25 @@
+#
+# ============LICENSE_START=======================================================
+# org.onap.aai
+# ================================================================================
+# 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 is a trademark and service mark of AT&T Intellectual Property.
+#
+
hosts: [localhost]
port: 8182
serializer: { className: org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0 } \ No newline at end of file
diff --git a/aai-traversal/bundleconfig-local/etc/appprops/titan-cached.properties b/aai-traversal/bundleconfig-local/etc/appprops/titan-cached.properties
index abaec9e..0106788 100644
--- a/aai-traversal/bundleconfig-local/etc/appprops/titan-cached.properties
+++ b/aai-traversal/bundleconfig-local/etc/appprops/titan-cached.properties
@@ -1,12 +1,35 @@
+#
+# ============LICENSE_START=======================================================
+# org.onap.aai
+# ================================================================================
+# 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 is a trademark and service mark of AT&T Intellectual Property.
+#
+
query.fast-property=true
# the following parameters are not reloaded automatically and require a manual bounce
+#storage.backend=inmemory
storage.backend=inmemory
storage.hostname=localhost
#schema.default=none
storage.lock.wait-time=300
storage.hbase.table=aaigraph-dev02
-storage.hbase.ext.zookeeper.znode.parent=/hbase
+storage.hbase.ext.zookeeper.znode.parent=/hbase-unsecure
#caching on
cache.db-cache = true
cache.db-cache-clean-wait = 20
diff --git a/aai-traversal/bundleconfig-local/etc/appprops/titan-realtime.properties b/aai-traversal/bundleconfig-local/etc/appprops/titan-realtime.properties
index 30d8b0a..ace08b3 100644
--- a/aai-traversal/bundleconfig-local/etc/appprops/titan-realtime.properties
+++ b/aai-traversal/bundleconfig-local/etc/appprops/titan-realtime.properties
@@ -1,12 +1,35 @@
+#
+# ============LICENSE_START=======================================================
+# org.onap.aai
+# ================================================================================
+# 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 is a trademark and service mark of AT&T Intellectual Property.
+#
+
query.fast-property=true
# the following parameters are not reloaded automatically and require a manual bounce
+#storage.backend=inmemory
storage.backend=inmemory
storage.hostname=localhost
#schema.default=none
storage.lock.wait-time=300
storage.hbase.table=aaigraph-dev02
-storage.hbase.ext.zookeeper.znode.parent=/hbase
+storage.hbase.ext.zookeeper.znode.parent=/hbase-unsecure
# Setting db-cache to false ensure the fastest propagation of changes across servers
cache.db-cache = false
diff --git a/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/FileMonitorBeans.xml b/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/FileMonitorBeans.xml
index 9e3e060..37e929d 100644
--- a/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/FileMonitorBeans.xml
+++ b/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/FileMonitorBeans.xml
@@ -6,11 +6,11 @@
<!--<bean-->
<!--class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor" />-->
<!---->
- <!--<bean id="ServicePropertiesListener" class="org.openecomp.aai.ajsc_aai.filemonitor.ServicePropertiesListener" />-->
+ <!--<bean id="ServicePropertiesListener" class="org.onap.aai.ajsc_aai.filemonitor.ServicePropertiesListener" />-->
<!---->
- <!--<bean id="ServicePropertiesMap" class="org.openecomp.aai.ajsc_aai.filemonitor.ServicePropertiesMap" />-->
+ <!--<bean id="ServicePropertiesMap" class="org.onap.aai.ajsc_aai.filemonitor.ServicePropertiesMap" />-->
- <!--<bean id="ServicePropertyService" class="org.openecomp.aai.ajsc_aai.filemonitor.ServicePropertyService">-->
+ <!--<bean id="ServicePropertyService" class="org.onap.aai.ajsc_aai.filemonitor.ServicePropertyService">-->
<!--<property name="loadOnStartup" value="false" />-->
<!--<property name="fileChangedListener" ref="ServicePropertiesListener" />-->
<!--<property name="filePropertiesMap" ref="ServicePropertiesMap" />-->
diff --git a/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/jaxrsBeans.groovy b/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/jaxrsBeans.groovy
index fe9493a..0749aa4 100644
--- a/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/jaxrsBeans.groovy
+++ b/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/jaxrsBeans.groovy
@@ -3,13 +3,13 @@ beans{
xmlns jaxrs: "http://cxf.apache.org/jaxrs"
xmlns util: "http://www.springframework.org/schema/util"
- SearchProvider(org.openecomp.aai.rest.search.SearchProvider)
- ModelAndNamedQueryRestProvider(org.openecomp.aai.rest.search.ModelAndNamedQueryRestProvider)
- QueryConsumer(org.openecomp.aai.rest.QueryConsumer)
+ SearchProvider(org.onap.aai.rest.search.SearchProvider)
+ ModelAndNamedQueryRestProvider(org.onap.aai.rest.search.ModelAndNamedQueryRestProvider)
+ QueryConsumer(org.onap.aai.rest.QueryConsumer)
- V3ThroughV7Retired(org.openecomp.aai.rest.retired.V3ThroughV7Consumer)
+ V3ThroughV7Retired(org.onap.aai.rest.retired.V3ThroughV7Consumer)
- EchoResponse(org.openecomp.aai.rest.util.EchoResponse)
+ EchoResponse(org.onap.aai.rest.util.EchoResponse)
util.list(id: 'jaxrsServices') {
diff --git a/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/serviceBeans.xml b/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/serviceBeans.xml
index 2b90c85..7dda68b 100644
--- a/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/serviceBeans.xml
+++ b/aai-traversal/src/main/ajsc/ajsc-aai_v1/ajsc-aai/v1/conf/serviceBeans.xml
@@ -20,11 +20,11 @@
<!-- <bean id="processRestletHeaders" name="processRestletHeaders" class="ajsc.restlet.ProcessRestletHeaders"
/> -->
<bean id="servicePropsBean" name="servicePropsBean"
- class="org.openecomp.aai.ajsc_aai.util.ServicePropertiesMapBean" />
- <bean id="jsonProvider" class="org.openecomp.aai.restcore.CustomJacksonJaxBJsonProvider" />
+ class="org.onap.aai.ajsc_aai.util.ServicePropertiesMapBean" />
+ <bean id="jsonProvider" class="org.onap.aai.restcore.CustomJacksonJaxBJsonProvider" />
- <bean id="inInterceptor" class="org.openecomp.aai.interceptors.AAILogJAXRSInInterceptor" />
- <bean id="outInterceptor" class="org.openecomp.aai.interceptors.AAILogJAXRSOutInterceptor" />
+ <bean id="inInterceptor" class="org.onap.aai.interceptors.AAILogJAXRSInInterceptor" />
+ <bean id="outInterceptor" class="org.onap.aai.interceptors.AAILogJAXRSOutInterceptor" />
<cxf:bus bus="cxfBus">
<cxf:inInterceptors>
<ref bean="inInterceptor" />
@@ -33,8 +33,8 @@
<ref bean="outInterceptor" />
</cxf:outInterceptors>
</cxf:bus>
- <context:component-scan base-package="org.openecomp.aai.tasks" />
- <context:component-scan base-package="org.openecomp.aai.config" />
+ <context:component-scan base-package="org.onap.aai.tasks" />
+ <context:component-scan base-package="org.onap.aai.config" />
<task:scheduler id="taskScheduler" pool-size="10" />
<task:executor id="taskExecutor" pool-size="10"
@@ -82,10 +82,10 @@
</bean>
<!-- Message Producer -->
- <bean id="messageProducer" class="org.openecomp.aai.dmaap.AAIDmaapEventJMSProducer" />
+ <bean id="messageProducer" class="org.onap.aai.dmaap.AAIDmaapEventJMSProducer" />
<!-- Message Consumer from Default Destination -->
- <bean id="messageDefaultConsumer" class="org.openecomp.aai.dmaap.AAIDmaapEventJMSConsumer" />
+ <bean id="messageDefaultConsumer" class="org.onap.aai.dmaap.AAIDmaapEventJMSConsumer" />
<!-- Message Consumer Container for Default Destination -->
<bean
diff --git a/aai-traversal/src/main/config/runner-web.xml b/aai-traversal/src/main/config/runner-web.xml
index d066ae9..8a3a316 100644
--- a/aai-traversal/src/main/config/runner-web.xml
+++ b/aai-traversal/src/main/config/runner-web.xml
@@ -78,7 +78,7 @@
<listener>
<listener-class>
- org.openecomp.aai.util.AAIAppServletContextListener
+ org.onap.aai.util.AAIAppServletContextListener
</listener-class>
</listener>
<security-constraint>
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/JaxrsErrorMessageLookupService.java b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/JaxrsErrorMessageLookupService.java
index 04a7a09..6aa1f29 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/JaxrsErrorMessageLookupService.java
+++ b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/JaxrsErrorMessageLookupService.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.ajsc_aai;
+package org.onap.aai.ajsc_aai;
//import java.util.HashMap;
//import java.util.Map;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/JaxrsUserService.java b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/JaxrsUserService.java
index 39c78f6..a1cc2ca 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/JaxrsUserService.java
+++ b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/JaxrsUserService.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.ajsc_aai;
+package org.onap.aai.ajsc_aai;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/filemonitor/ServicePropertiesListener.java b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/filemonitor/ServicePropertiesListener.java
index 22c1cb9..c806045 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/filemonitor/ServicePropertiesListener.java
+++ b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/filemonitor/ServicePropertiesListener.java
@@ -1,19 +1,21 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/filemonitor/ServicePropertiesMap.java b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/filemonitor/ServicePropertiesMap.java
index 656b290..7274c61 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/filemonitor/ServicePropertiesMap.java
+++ b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/filemonitor/ServicePropertiesMap.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.ajsc_aai.filemonitor;
+package org.onap.aai.ajsc_aai.filemonitor;
import java.io.File;
import java.io.FileInputStream;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/filemonitor/ServicePropertyService.java b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/filemonitor/ServicePropertyService.java
index 22c1cb9..c806045 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/filemonitor/ServicePropertyService.java
+++ b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/filemonitor/ServicePropertyService.java
@@ -1,19 +1,21 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/util/ServicePropertiesMapBean.java b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/util/ServicePropertiesMapBean.java
index 7577de7..71c290b 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/ajsc_aai/util/ServicePropertiesMapBean.java
+++ b/aai-traversal/src/main/java/org/onap/aai/ajsc_aai/util/ServicePropertiesMapBean.java
@@ -1,26 +1,27 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
+package org.onap.aai.ajsc_aai.util;
-package org.openecomp.aai.ajsc_aai.util;
-
-import org.openecomp.aai.ajsc_aai.filemonitor.ServicePropertiesMap;
+import org.onap.aai.ajsc_aai.filemonitor.ServicePropertiesMap;
public class ServicePropertiesMapBean {
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/config/DmaapConfig.java b/aai-traversal/src/main/java/org/onap/aai/config/DmaapConfig.java
index 45406ec..247ecf7 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/config/DmaapConfig.java
+++ b/aai-traversal/src/main/java/org/onap/aai/config/DmaapConfig.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.config;
+package org.onap.aai.config;
import org.apache.activemq.broker.BrokerService;
import org.springframework.context.annotation.Bean;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessing.java b/aai-traversal/src/main/java/org/onap/aai/dbgraphgen/ModelBasedProcessing.java
index 9b65ca1..5e7f9d9 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessing.java
+++ b/aai-traversal/src/main/java/org/onap/aai/dbgraphgen/ModelBasedProcessing.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.dbgraphgen;
+package org.onap.aai.dbgraphgen;
import java.util.ArrayList;
import java.util.Collection;
@@ -36,20 +37,20 @@ import java.util.concurrent.TimeUnit;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-import org.openecomp.aai.db.DbMethHelper;
-import org.openecomp.aai.db.props.AAIProperties;
-import org.openecomp.aai.dbgen.PropertyLimitDesc;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.introspection.Introspector;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException;
-import org.openecomp.aai.query.builder.QueryBuilder;
-import org.openecomp.aai.schema.enums.PropertyMetadata;
-import org.openecomp.aai.serialization.db.DBSerializer;
-import org.openecomp.aai.serialization.db.EdgeRules;
-import org.openecomp.aai.serialization.db.EdgeType;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.openecomp.aai.util.AAIConfig;
+import org.onap.aai.db.DbMethHelper;
+import org.onap.aai.db.props.AAIProperties;
+import org.onap.aai.dbgen.PropertyLimitDesc;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.introspection.Introspector;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.exceptions.AAIUnknownObjectException;
+import org.onap.aai.query.builder.QueryBuilder;
+import org.onap.aai.schema.enums.PropertyMetadata;
+import org.onap.aai.serialization.db.DBSerializer;
+import org.onap.aai.serialization.db.EdgeRules;
+import org.onap.aai.serialization.db.EdgeType;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.util.AAIConfig;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphgen/ResultSet.java b/aai-traversal/src/main/java/org/onap/aai/dbgraphgen/ResultSet.java
index c66772d..9759f23 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphgen/ResultSet.java
+++ b/aai-traversal/src/main/java/org/onap/aai/dbgraphgen/ResultSet.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.dbgraphgen;
+package org.onap.aai.dbgraphgen;
import java.util.ArrayList;
import java.util.HashMap;
@@ -26,7 +27,7 @@ import java.util.List;
import java.util.Map;
import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.openecomp.aai.dbgen.PropertyLimitDesc;
+import org.onap.aai.dbgen.PropertyLimitDesc;
public class ResultSet {
private Vertex vert;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java b/aai-traversal/src/main/java/org/onap/aai/dbgraphmap/SearchGraph.java
index 4b0f24d..ab986a2 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/dbgraphmap/SearchGraph.java
+++ b/aai-traversal/src/main/java/org/onap/aai/dbgraphmap/SearchGraph.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.dbgraphmap;
+package org.onap.aai.dbgraphmap;
import java.io.UnsupportedEncodingException;
import java.net.URI;
@@ -46,33 +47,33 @@ import org.eclipse.persistence.dynamic.DynamicEntity;
import org.eclipse.persistence.dynamic.DynamicType;
import org.eclipse.persistence.exceptions.DynamicException;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
-import org.openecomp.aai.db.DbMethHelper;
-import org.openecomp.aai.db.props.AAIProperties;
-import org.openecomp.aai.dbgen.PropertyLimitDesc;
-import org.openecomp.aai.dbgraphgen.ModelBasedProcessing;
-import org.openecomp.aai.dbgraphgen.ResultSet;
-import org.openecomp.aai.dbmap.DBConnectionType;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.extensions.AAIExtensionMap;
-import org.openecomp.aai.introspection.Introspector;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.LoaderFactory;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.MoxyLoader;
-import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException;
-import org.openecomp.aai.parsers.relationship.RelationshipToURI;
-import org.openecomp.aai.query.builder.QueryBuilder;
-import org.openecomp.aai.schema.enums.ObjectMetadata;
-import org.openecomp.aai.schema.enums.PropertyMetadata;
-import org.openecomp.aai.serialization.db.DBSerializer;
-import org.openecomp.aai.serialization.db.EdgeRule;
-import org.openecomp.aai.serialization.db.EdgeRules;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TitanDBEngine;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.openecomp.aai.serialization.queryformats.exceptions.AAIFormatVertexException;
-import org.openecomp.aai.serialization.queryformats.utils.UrlBuilder;
-import org.openecomp.aai.util.StoreNotificationEvent;
+import org.onap.aai.db.DbMethHelper;
+import org.onap.aai.db.props.AAIProperties;
+import org.onap.aai.dbgen.PropertyLimitDesc;
+import org.onap.aai.dbgraphgen.ModelBasedProcessing;
+import org.onap.aai.dbgraphgen.ResultSet;
+import org.onap.aai.dbmap.DBConnectionType;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.extensions.AAIExtensionMap;
+import org.onap.aai.introspection.Introspector;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.MoxyLoader;
+import org.onap.aai.introspection.exceptions.AAIUnknownObjectException;
+import org.onap.aai.parsers.relationship.RelationshipToURI;
+import org.onap.aai.query.builder.QueryBuilder;
+import org.onap.aai.schema.enums.ObjectMetadata;
+import org.onap.aai.schema.enums.PropertyMetadata;
+import org.onap.aai.serialization.db.DBSerializer;
+import org.onap.aai.serialization.db.EdgeRule;
+import org.onap.aai.serialization.db.EdgeRules;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TitanDBEngine;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.serialization.queryformats.exceptions.AAIFormatVertexException;
+import org.onap.aai.serialization.queryformats.utils.UrlBuilder;
+import org.onap.aai.util.StoreNotificationEvent;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
@@ -199,8 +200,8 @@ public class SearchGraph {
Introspector searchResults = createSearchResults(loader, urlBuilder, queryResults);
String outputMediaType = getMediaType(headers.getAcceptableMediaTypes());
- org.openecomp.aai.introspection.MarshallerProperties properties = new org.openecomp.aai.introspection.MarshallerProperties.Builder(
- org.openecomp.aai.restcore.MediaType.getEnum(outputMediaType)).build();
+ org.onap.aai.introspection.MarshallerProperties properties = new org.onap.aai.introspection.MarshallerProperties.Builder(
+ org.onap.aai.restcore.MediaType.getEnum(outputMediaType)).build();
result = searchResults.marshal(properties);
response = Response.ok().entity(result).build();
@@ -412,8 +413,8 @@ public class SearchGraph {
Introspector searchResults = createSearchResults(loader, urlBuilder, results);
String outputMediaType = getMediaType(headers.getAcceptableMediaTypes());
- org.openecomp.aai.introspection.MarshallerProperties properties = new org.openecomp.aai.introspection.MarshallerProperties.Builder(
- org.openecomp.aai.restcore.MediaType.getEnum(outputMediaType)).build();
+ org.onap.aai.introspection.MarshallerProperties properties = new org.onap.aai.introspection.MarshallerProperties.Builder(
+ org.onap.aai.restcore.MediaType.getEnum(outputMediaType)).build();
result = searchResults.marshal(properties);
response = Response.ok().entity(result).build();
@@ -530,10 +531,10 @@ public class SearchGraph {
ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
dbEngine.startTransaction();
- org.openecomp.aai.restcore.MediaType mediaType = org.openecomp.aai.restcore.MediaType.APPLICATION_JSON_TYPE;
+ org.onap.aai.restcore.MediaType mediaType = org.onap.aai.restcore.MediaType.APPLICATION_JSON_TYPE;
String contentType = aaiExtMap.getHttpServletRequest().getContentType();
if (contentType != null && contentType.contains("application/xml")) {
- mediaType = org.openecomp.aai.restcore.MediaType.APPLICATION_XML_TYPE;
+ mediaType = org.onap.aai.restcore.MediaType.APPLICATION_XML_TYPE;
}
if (queryParameters.length() == 0) {
@@ -651,10 +652,10 @@ public class SearchGraph {
dbEngine.startTransaction();
- org.openecomp.aai.restcore.MediaType mediaType = org.openecomp.aai.restcore.MediaType.APPLICATION_JSON_TYPE;
+ org.onap.aai.restcore.MediaType mediaType = org.onap.aai.restcore.MediaType.APPLICATION_JSON_TYPE;
String contentType = aaiExtMap.getHttpServletRequest().getContentType();
if (contentType != null && contentType.contains("application/xml")) {
- mediaType = org.openecomp.aai.restcore.MediaType.APPLICATION_XML_TYPE;
+ mediaType = org.onap.aai.restcore.MediaType.APPLICATION_XML_TYPE;
}
if (queryParameters.length() == 0) {
@@ -811,13 +812,13 @@ public class SearchGraph {
break;
}
}
- org.openecomp.aai.introspection.MarshallerProperties properties;
+ org.onap.aai.introspection.MarshallerProperties properties;
if (isJson) {
properties =
- new org.openecomp.aai.introspection.MarshallerProperties.Builder(org.openecomp.aai.restcore.MediaType.APPLICATION_JSON_TYPE).build();
+ new org.onap.aai.introspection.MarshallerProperties.Builder(org.onap.aai.restcore.MediaType.APPLICATION_JSON_TYPE).build();
} else {
properties =
- new org.openecomp.aai.introspection.MarshallerProperties.Builder(org.openecomp.aai.restcore.MediaType.APPLICATION_XML_TYPE).build();
+ new org.onap.aai.introspection.MarshallerProperties.Builder(org.onap.aai.restcore.MediaType.APPLICATION_XML_TYPE).build();
}
String marshalledObj = obj.marshal(properties);
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAIHeaderProperties.java b/aai-traversal/src/main/java/org/onap/aai/interceptors/AAIHeaderProperties.java
index 4798d90..733383a 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAIHeaderProperties.java
+++ b/aai-traversal/src/main/java/org/onap/aai/interceptors/AAIHeaderProperties.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.interceptors;
+package org.onap.aai.interceptors;
public class AAIHeaderProperties {
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java b/aai-traversal/src/main/java/org/onap/aai/interceptors/AAILogJAXRSInInterceptor.java
index 8a9362e..155d387 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptor.java
+++ b/aai-traversal/src/main/java/org/onap/aai/interceptors/AAILogJAXRSInInterceptor.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.interceptors;
+package org.onap.aai.interceptors;
import java.io.InputStream;
import java.util.ArrayList;
@@ -36,13 +37,13 @@ import org.apache.cxf.helpers.CastUtils;
import org.apache.cxf.interceptor.LoggingMessage;
import org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor;
import org.apache.cxf.message.Message;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.logging.ErrorLogHelper;
-import org.openecomp.aai.rest.util.EchoResponse;
-import org.openecomp.aai.util.AAIConfig;
-import org.openecomp.aai.util.AAIConstants;
-import org.openecomp.aai.util.FormatDate;
-import org.openecomp.aai.util.HbaseSaltPrefixer;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.logging.ErrorLogHelper;
+import org.onap.aai.rest.util.EchoResponse;
+import org.onap.aai.util.AAIConfig;
+import org.onap.aai.util.AAIConstants;
+import org.onap.aai.util.FormatDate;
+import org.onap.aai.util.HbaseSaltPrefixer;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSOutInterceptor.java b/aai-traversal/src/main/java/org/onap/aai/interceptors/AAILogJAXRSOutInterceptor.java
index a168ad9..a280023 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/AAILogJAXRSOutInterceptor.java
+++ b/aai-traversal/src/main/java/org/onap/aai/interceptors/AAILogJAXRSOutInterceptor.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.interceptors;
+package org.onap.aai.interceptors;
import java.io.OutputStream;
import java.util.Collections;
@@ -33,11 +34,11 @@ import org.apache.cxf.io.CachedOutputStream;
import org.apache.cxf.io.CachedOutputStreamCallback;
import org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor;
import org.apache.cxf.message.Message;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.logging.ErrorLogHelper;
-import org.openecomp.aai.util.AAIConfig;
-import org.openecomp.aai.util.AAIConstants;
-import org.openecomp.aai.util.FormatDate;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.logging.ErrorLogHelper;
+import org.onap.aai.util.AAIConfig;
+import org.onap.aai.util.AAIConstants;
+import org.onap.aai.util.FormatDate;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/PostAaiAjscInterceptor.java b/aai-traversal/src/main/java/org/onap/aai/interceptors/PostAaiAjscInterceptor.java
index 3a4f899..30382e4 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/PostAaiAjscInterceptor.java
+++ b/aai-traversal/src/main/java/org/onap/aai/interceptors/PostAaiAjscInterceptor.java
@@ -1,32 +1,33 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.interceptors;
+package org.onap.aai.interceptors;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.openecomp.aai.logging.LoggingContext;
-import org.openecomp.aai.logging.LoggingContext.StatusCode;
+import org.onap.aai.logging.LoggingContext;
+import org.onap.aai.logging.LoggingContext.StatusCode;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/PreAaiAjscInterceptor.java b/aai-traversal/src/main/java/org/onap/aai/interceptors/PreAaiAjscInterceptor.java
index a2c56d0..7d1ae73 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/interceptors/PreAaiAjscInterceptor.java
+++ b/aai-traversal/src/main/java/org/onap/aai/interceptors/PreAaiAjscInterceptor.java
@@ -1,31 +1,32 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.interceptors;
+package org.onap.aai.interceptors;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.openecomp.aai.logging.LoggingContext;
+import org.onap.aai.logging.LoggingContext;
import ajsc.beans.interceptors.AjscInterceptor;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/ExceptionHandler.java b/aai-traversal/src/main/java/org/onap/aai/rest/ExceptionHandler.java
index f1a6f47..c20a370 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/ExceptionHandler.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/ExceptionHandler.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest;
+package org.onap.aai.rest;
import java.util.ArrayList;
import java.util.List;
@@ -32,8 +33,8 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.logging.ErrorLogHelper;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.logging.ErrorLogHelper;
import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.sun.istack.SAXParseException2;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/QueryConsumer.java b/aai-traversal/src/main/java/org/onap/aai/rest/QueryConsumer.java
index 2264f24..8109f7e 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/QueryConsumer.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/QueryConsumer.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest;
+package org.onap.aai.rest;
import java.net.URI;
import java.util.ArrayList;
@@ -44,24 +45,24 @@ import javax.ws.rs.core.Response.Status;
import javax.ws.rs.core.UriInfo;
import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.openecomp.aai.dbmap.DBConnectionType;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.Version;
-import org.openecomp.aai.parsers.query.QueryParser;
-import org.openecomp.aai.rest.db.HttpEntry;
-import org.openecomp.aai.rest.search.GenericQueryProcessor;
-import org.openecomp.aai.rest.search.QueryProcessorType;
-import org.openecomp.aai.restcore.HttpMethod;
-import org.openecomp.aai.restcore.RESTAPI;
-import org.openecomp.aai.restcore.util.URITools;
-import org.openecomp.aai.serialization.db.DBSerializer;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.openecomp.aai.serialization.queryformats.Format;
-import org.openecomp.aai.serialization.queryformats.FormatFactory;
-import org.openecomp.aai.serialization.queryformats.Formatter;
-import org.openecomp.aai.serialization.queryformats.SubGraphStyle;
+import org.onap.aai.dbmap.DBConnectionType;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.Version;
+import org.onap.aai.parsers.query.QueryParser;
+import org.onap.aai.rest.db.HttpEntry;
+import org.onap.aai.rest.search.GenericQueryProcessor;
+import org.onap.aai.rest.search.QueryProcessorType;
+import org.onap.aai.restcore.HttpMethod;
+import org.onap.aai.restcore.RESTAPI;
+import org.onap.aai.restcore.util.URITools;
+import org.onap.aai.serialization.db.DBSerializer;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.serialization.queryformats.Format;
+import org.onap.aai.serialization.queryformats.FormatFactory;
+import org.onap.aai.serialization.queryformats.Formatter;
+import org.onap.aai.serialization.queryformats.SubGraphStyle;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/retired/RetiredConsumer.java b/aai-traversal/src/main/java/org/onap/aai/rest/retired/RetiredConsumer.java
index 99974ef..0188142 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/retired/RetiredConsumer.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/retired/RetiredConsumer.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.retired;
+package org.onap.aai.rest.retired;
import java.util.ArrayList;
@@ -36,10 +37,10 @@ import javax.ws.rs.core.UriInfo;
import org.apache.cxf.jaxrs.ext.PATCH;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.logging.ErrorLogHelper;
-import org.openecomp.aai.restcore.RESTAPI;
-import org.openecomp.aai.util.AAIConfig;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.logging.ErrorLogHelper;
+import org.onap.aai.restcore.RESTAPI;
+import org.onap.aai.util.AAIConfig;
/**
* The Class RetiredConsumer.
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/retired/V3ThroughV7Consumer.java b/aai-traversal/src/main/java/org/onap/aai/rest/retired/V3ThroughV7Consumer.java
index 55d9482..8e80a7b 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/retired/V3ThroughV7Consumer.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/retired/V3ThroughV7Consumer.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.retired;
+package org.onap.aai.rest.retired;
import javax.ws.rs.Path;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/retired/V7V8NamedQueries.java b/aai-traversal/src/main/java/org/onap/aai/rest/retired/V7V8NamedQueries.java
index 3f022a2..98be455 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/retired/V7V8NamedQueries.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/retired/V7V8NamedQueries.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.retired;
+package org.onap.aai.rest.retired;
import javax.ws.rs.Path;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GenericQueryProcessor.java b/aai-traversal/src/main/java/org/onap/aai/rest/search/GenericQueryProcessor.java
index e05ec7d..9f6f3aa 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GenericQueryProcessor.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/search/GenericQueryProcessor.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.io.FileNotFoundException;
import java.net.URI;
@@ -41,9 +42,9 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.javatuples.Pair;
-import org.openecomp.aai.restcore.util.URITools;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.openecomp.aai.serialization.queryformats.SubGraphStyle;
+import org.onap.aai.restcore.util.URITools;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.serialization.queryformats.SubGraphStyle;
import jersey.repackaged.com.google.common.base.Joiner;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GremlinGroovyShellSingleton.java b/aai-traversal/src/main/java/org/onap/aai/rest/search/GremlinGroovyShellSingleton.java
index 64159a4..69e08ff 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GremlinGroovyShellSingleton.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/search/GremlinGroovyShellSingleton.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.HashMap;
import java.util.Map;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GremlinServerImpl.java b/aai-traversal/src/main/java/org/onap/aai/rest/search/GremlinServerImpl.java
index a759b86..a05b3ae 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GremlinServerImpl.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/search/GremlinServerImpl.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.List;
import java.util.Map;
@@ -30,7 +31,7 @@ import org.apache.tinkerpop.gremlin.driver.ResultSet;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
-import org.openecomp.aai.util.AAIConfig;
+import org.onap.aai.util.AAIConfig;
public class GremlinServerImpl extends GenericQueryProcessor {
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GremlinServerSingleton.java b/aai-traversal/src/main/java/org/onap/aai/rest/search/GremlinServerSingleton.java
index c54b310..e4ac815 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GremlinServerSingleton.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/search/GremlinServerSingleton.java
@@ -1,27 +1,28 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
+package org.onap.aai.rest.search;
-package org.openecomp.aai.rest.search;
-
-import org.openecomp.aai.util.AAIConstants;
-import org.openecomp.aai.util.FileWatcher;
+import org.onap.aai.util.AAIConstants;
+import org.onap.aai.util.FileWatcher;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import org.apache.tinkerpop.gremlin.driver.Cluster;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GroovyQueryBuilderSingleton.java b/aai-traversal/src/main/java/org/onap/aai/rest/search/GroovyQueryBuilderSingleton.java
index 7e5909c..e4ddbfe 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GroovyQueryBuilderSingleton.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/search/GroovyQueryBuilderSingleton.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.HashMap;
import java.util.Map;
@@ -31,9 +32,9 @@ import org.codehaus.groovy.ast.expr.PropertyExpression;
import org.codehaus.groovy.control.CompilerConfiguration;
import org.codehaus.groovy.control.customizers.ASTTransformationCustomizer;
import org.codehaus.groovy.control.customizers.ImportCustomizer;
-import org.openecomp.aai.query.builder.QueryBuilder;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.query.builder.QueryBuilder;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
import groovy.lang.Binding;
import groovy.lang.GroovyShell;
@@ -62,7 +63,7 @@ public class GroovyQueryBuilderSingleton {
"org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__",
"org.apache.tinkerpop.gremlin.structure.T",
"org.apache.tinkerpop.gremlin.process.traversal.P",
- "org.openecomp.aai.serialization.db.EdgeType");
+ "org.onap.aai.serialization.db.EdgeType");
CompilerConfiguration config = new CompilerConfiguration();
config.addCompilationCustomizers(custom, imports);
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GroovyShellImpl.java b/aai-traversal/src/main/java/org/onap/aai/rest/search/GroovyShellImpl.java
index 1b64d21..272ccd0 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/GroovyShellImpl.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/search/GroovyShellImpl.java
@@ -1,30 +1,31 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
-import org.openecomp.aai.restcore.search.GremlinGroovyShellSingleton;
+import org.onap.aai.restcore.search.GremlinGroovyShellSingleton;
public class GroovyShellImpl extends GenericQueryProcessor {
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/ModelAndNamedQueryRestProvider.java b/aai-traversal/src/main/java/org/onap/aai/rest/search/ModelAndNamedQueryRestProvider.java
index b8c5cf9..49d9dc5 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/ModelAndNamedQueryRestProvider.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/search/ModelAndNamedQueryRestProvider.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.ArrayList;
@@ -33,13 +34,13 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
-import org.openecomp.aai.dbgraphmap.SearchGraph;
-import org.openecomp.aai.dbmap.DBConnectionType;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.extensions.AAIExtensionMap;
-import org.openecomp.aai.logging.ErrorLogHelper;
-import org.openecomp.aai.restcore.RESTAPI;
-import org.openecomp.aai.util.AAIApiVersion;
+import org.onap.aai.dbgraphmap.SearchGraph;
+import org.onap.aai.dbmap.DBConnectionType;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.extensions.AAIExtensionMap;
+import org.onap.aai.logging.ErrorLogHelper;
+import org.onap.aai.restcore.RESTAPI;
+import org.onap.aai.util.AAIApiVersion;
/**
* Implements the search subdomain in the REST API. All API calls must include
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/QueryProcessorType.java b/aai-traversal/src/main/java/org/onap/aai/rest/search/QueryProcessorType.java
index 33d7a90..832936a 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/QueryProcessorType.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/search/QueryProcessorType.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
public enum QueryProcessorType {
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java b/aai-traversal/src/main/java/org/onap/aai/rest/search/SearchProvider.java
index 4330db1..23bdaf0 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/search/SearchProvider.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/search/SearchProvider.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.ArrayList;
import java.util.List;
@@ -35,21 +36,21 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
-import org.openecomp.aai.db.props.AAIProperties;
-import org.openecomp.aai.dbgraphmap.SearchGraph;
-import org.openecomp.aai.dbmap.DBConnectionType;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.LoaderFactory;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.Version;
-import org.openecomp.aai.logging.ErrorLogHelper;
-import org.openecomp.aai.restcore.RESTAPI;
-import org.openecomp.aai.serialization.db.DBSerializer;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TitanDBEngine;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.openecomp.aai.serialization.queryformats.utils.UrlBuilder;
+import org.onap.aai.db.props.AAIProperties;
+import org.onap.aai.dbgraphmap.SearchGraph;
+import org.onap.aai.dbmap.DBConnectionType;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.Version;
+import org.onap.aai.logging.ErrorLogHelper;
+import org.onap.aai.restcore.RESTAPI;
+import org.onap.aai.serialization.db.DBSerializer;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TitanDBEngine;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.serialization.queryformats.utils.UrlBuilder;
/**
* Implements the search subdomain in the REST API. All API calls must include
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/util/EchoResponse.java b/aai-traversal/src/main/java/org/onap/aai/rest/util/EchoResponse.java
index 6d01435..55a07e4 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/util/EchoResponse.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/util/EchoResponse.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.util;
+package org.onap.aai.rest.util;
import java.util.ArrayList;
import java.util.HashMap;
@@ -34,9 +35,9 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.logging.ErrorLogHelper;
-import org.openecomp.aai.restcore.RESTAPI;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.logging.ErrorLogHelper;
+import org.onap.aai.restcore.RESTAPI;
/**
* The Class EchoResponse.
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/util/LogFormatTools.java b/aai-traversal/src/main/java/org/onap/aai/rest/util/LogFormatTools.java
index d6fcd67..cfda0c3 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/util/LogFormatTools.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/util/LogFormatTools.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.util;
+package org.onap.aai.rest.util;
import java.time.ZoneOffset;
import java.time.ZonedDateTime;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/rest/util/ValidateEncoding.java b/aai-traversal/src/main/java/org/onap/aai/rest/util/ValidateEncoding.java
index a09a317..7d4b314 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/rest/util/ValidateEncoding.java
+++ b/aai-traversal/src/main/java/org/onap/aai/rest/util/ValidateEncoding.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.util;
+package org.onap.aai.rest.util;
import java.io.UnsupportedEncodingException;
import java.net.URI;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/transforms/Converter.java b/aai-traversal/src/main/java/org/onap/aai/transforms/Converter.java
index 44a0222..cb7525f 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/transforms/Converter.java
+++ b/aai-traversal/src/main/java/org/onap/aai/transforms/Converter.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.transforms;
+package org.onap.aai.transforms;
public interface Converter {
String convert(String input);
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/transforms/LowerCamelToLowerHyphenConverter.java b/aai-traversal/src/main/java/org/onap/aai/transforms/LowerCamelToLowerHyphenConverter.java
index a31da05..df9ccc5 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/transforms/LowerCamelToLowerHyphenConverter.java
+++ b/aai-traversal/src/main/java/org/onap/aai/transforms/LowerCamelToLowerHyphenConverter.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.transforms;
+package org.onap.aai.transforms;
import com.google.common.base.CaseFormat;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/transforms/LowerHyphenToLowerCamelConverter.java b/aai-traversal/src/main/java/org/onap/aai/transforms/LowerHyphenToLowerCamelConverter.java
index 784adbe..e983dfb 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/transforms/LowerHyphenToLowerCamelConverter.java
+++ b/aai-traversal/src/main/java/org/onap/aai/transforms/LowerHyphenToLowerCamelConverter.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.transforms;
+package org.onap.aai.transforms;
/**
* <b>LowerHyphenToLowerCamelConverter</b> is the converter to use
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/transforms/MapTraverser.java b/aai-traversal/src/main/java/org/onap/aai/transforms/MapTraverser.java
index 7695240..983602e 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/transforms/MapTraverser.java
+++ b/aai-traversal/src/main/java/org/onap/aai/transforms/MapTraverser.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.transforms;
+package org.onap.aai.transforms;
import joptsimple.internal.Objects;
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/util/AAIAppServletContextListener.java b/aai-traversal/src/main/java/org/onap/aai/util/AAIAppServletContextListener.java
index 9edf857..49a77d8 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/util/AAIAppServletContextListener.java
+++ b/aai-traversal/src/main/java/org/onap/aai/util/AAIAppServletContextListener.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.util;
+package org.onap.aai.util;
import java.io.IOException;
@@ -27,10 +28,10 @@ import javax.servlet.ServletContextListener;
//import org.apache.activemq.broker.BrokerService;
-import org.openecomp.aai.dbmap.AAIGraph;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.introspection.ModelInjestor;
-import org.openecomp.aai.logging.ErrorLogHelper;
+import org.onap.aai.dbmap.AAIGraph;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.introspection.ModelInjestor;
+import org.onap.aai.logging.ErrorLogHelper;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
@@ -64,7 +65,7 @@ public class AAIAppServletContextListener implements ServletContextListener {
* @param arg0 the ServletContextEvent
*/
public void contextInitialized(ServletContextEvent arg0) {
- System.setProperty("org.openecomp.aai.serverStarted", "false");
+ System.setProperty("org.onap.aai.serverStarted", "false");
LOGGER.info("***AAI Server initialization started...");
try {
@@ -88,7 +89,7 @@ public class AAIAppServletContextListener implements ServletContextListener {
//broker.start();
LOGGER.info("AAI Server initialization succcessful.");
- System.setProperty("org.openecomp.aai.serverStarted", "true");
+ System.setProperty("org.onap.aai.serverStarted", "true");
} catch (AAIException e) {
ErrorLogHelper.logException(e);
diff --git a/aai-traversal/src/main/java/org/openecomp/aai/util/MakeNamedQuery.java b/aai-traversal/src/main/java/org/onap/aai/util/MakeNamedQuery.java
index c6ca599..fde25a7 100644
--- a/aai-traversal/src/main/java/org/openecomp/aai/util/MakeNamedQuery.java
+++ b/aai-traversal/src/main/java/org/onap/aai/util/MakeNamedQuery.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.util;
+package org.onap.aai.util;
import java.io.File;
import java.util.ArrayList;
@@ -29,14 +30,14 @@ import java.util.UUID;
import org.apache.commons.io.FileUtils;
-import org.openecomp.aai.introspection.Introspector;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.LoaderFactory;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.Version;
-import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException;
-import org.openecomp.aai.util.AAIConfig;
-import org.openecomp.aai.util.AAIConstants;
+import org.onap.aai.introspection.Introspector;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.Version;
+import org.onap.aai.introspection.exceptions.AAIUnknownObjectException;
+import org.onap.aai.util.AAIConfig;
+import org.onap.aai.util.AAIConstants;
public class MakeNamedQuery {
diff --git a/aai-traversal/src/main/resources/docker/aai.sh b/aai-traversal/src/main/resources/docker/aai.sh
index 741076f..a253775 100644
--- a/aai-traversal/src/main/resources/docker/aai.sh
+++ b/aai-traversal/src/main/resources/docker/aai.sh
@@ -1,22 +1,24 @@
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
PROJECT_HOME=/opt/app/aai-traversal
export PROJECT_HOME
diff --git a/aai-traversal/src/main/resources/docker/docker-entrypoint.sh b/aai-traversal/src/main/resources/docker/docker-entrypoint.sh
index 5823105..f69e468 100644
--- a/aai-traversal/src/main/resources/docker/docker-entrypoint.sh
+++ b/aai-traversal/src/main/resources/docker/docker-entrypoint.sh
@@ -1,22 +1,24 @@
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
# Set the current path to be the application home and common libs home
export APP_HOME=$(pwd);
@@ -41,7 +43,10 @@ fi;
chown -R aaiadmin:aaiadmin /opt/app /var/chef /opt/aai/logroot
-gosu aaiadmin ./init-chef.sh
+gosu aaiadmin ./init-chef.sh || {
+ echo "Unable to run init chef script, please check logs";
+ exit 1;
+}
httpPort=8086;
httpsPort=8446;
diff --git a/aai-traversal/src/main/resources/docker/init-chef.sh b/aai-traversal/src/main/resources/docker/init-chef.sh
index 0e10055..52c35e3 100644
--- a/aai-traversal/src/main/resources/docker/init-chef.sh
+++ b/aai-traversal/src/main/resources/docker/init-chef.sh
@@ -1,24 +1,25 @@
#!/bin/bash
-
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
##############################################################################
# Script to initialize the chef-repo branch and.chef
@@ -34,10 +35,15 @@ if [ ! -d "aai-config" ]; then
exit;
}
+fi
+
+if [ -d "aai-config/cookbooks/aai-traversal" ]; then
+
(cd aai-config/cookbooks/aai-traversal/ && \
for f in $(ls); do mv $f ../; done && \
cd ../ && rmdir aai-traversal);
-fi
+
+fi;
if [ ! -d "aai-data" ]; then
@@ -46,9 +52,10 @@ if [ ! -d "aai-data" ]; then
exit;
}
- chef-solo \
- -c /var/chef/aai-data/chef-config/dev/.knife/solo.rb \
- -j /var/chef/aai-config/cookbooks/runlist-aai-traversal.json \
- -E ${AAI_CHEF_ENV};
-
fi
+
+chef-solo \
+ -c /var/chef/aai-data/chef-config/dev/.knife/solo.rb \
+ -j /var/chef/aai-config/cookbooks/runlist-aai-traversal.json \
+ -E ${AAI_CHEF_ENV};
+
diff --git a/aai-traversal/src/main/resources/schema/UebEventLogEntry.xsd b/aai-traversal/src/main/resources/schema/UebEventLogEntry.xsd
index c679fd2..edc8924 100644
--- a/aai-traversal/src/main/resources/schema/UebEventLogEntry.xsd
+++ b/aai-traversal/src/main/resources/schema/UebEventLogEntry.xsd
@@ -1,3 +1,26 @@
+<!--
+
+ ============LICENSE_START=======================================================
+ org.onap.aai
+ ================================================================================
+ 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 is a trademark and service mark of AT&T Intellectual Property.
+
+-->
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="UebEventLogEntry">
<xs:sequence>
diff --git a/aai-traversal/src/main/scripts/deleteNamedQuery.sh b/aai-traversal/src/main/scripts/deleteNamedQuery.sh
index 70faddf..16b20a7 100644
--- a/aai-traversal/src/main/scripts/deleteNamedQuery.sh
+++ b/aai-traversal/src/main/scripts/deleteNamedQuery.sh
@@ -1,24 +1,25 @@
#!/bin/ksh
-
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
#
# This script deletes the named query in bundleconfig/etc/scriptdata/named-query-json directory
diff --git a/aai-traversal/src/main/scripts/deleteTool.sh b/aai-traversal/src/main/scripts/deleteTool.sh
index 02b72b0..60c3e1c 100644
--- a/aai-traversal/src/main/scripts/deleteTool.sh
+++ b/aai-traversal/src/main/scripts/deleteTool.sh
@@ -1,24 +1,25 @@
#!/bin/ksh
-
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
#
# The script is called with a resource to be deleted.
diff --git a/aai-traversal/src/main/scripts/getTool.sh b/aai-traversal/src/main/scripts/getTool.sh
index 38f96c5..39d4e87 100644
--- a/aai-traversal/src/main/scripts/getTool.sh
+++ b/aai-traversal/src/main/scripts/getTool.sh
@@ -1,24 +1,25 @@
#!/bin/ksh
-
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
#
# The script is called with a resource.
diff --git a/aai-traversal/src/main/scripts/install/instutils.sh b/aai-traversal/src/main/scripts/install/instutils.sh
index a512606..ab94a9c 100644
--- a/aai-traversal/src/main/scripts/install/instutils.sh
+++ b/aai-traversal/src/main/scripts/install/instutils.sh
@@ -1,24 +1,25 @@
#!/bin/ksh
-
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
ECHO=${ECHO:-echo}
diff --git a/aai-traversal/src/main/scripts/install/updateQueryData.sh b/aai-traversal/src/main/scripts/install/updateQueryData.sh
index 798d5b8..3c7f1bf 100644
--- a/aai-traversal/src/main/scripts/install/updateQueryData.sh
+++ b/aai-traversal/src/main/scripts/install/updateQueryData.sh
@@ -1,24 +1,25 @@
#!/bin/ksh
-
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
PROGNAME=$(basename $0)
PROJECT_HOME=/opt/app/aai-traversal
diff --git a/aai-traversal/src/main/scripts/putTool.sh b/aai-traversal/src/main/scripts/putTool.sh
index bc89e86..ea529f1 100644
--- a/aai-traversal/src/main/scripts/putTool.sh
+++ b/aai-traversal/src/main/scripts/putTool.sh
@@ -1,22 +1,25 @@
#!/bin/ksh
-
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
#
# The script is called with a resource, filepath and an optional argument to
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessingInvalidDataTest.java b/aai-traversal/src/test/java/org/onap/aai/dbgraphgen/ModelBasedProcessingInvalidDataTest.java
index b255916..bd3705e 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessingInvalidDataTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/dbgraphgen/ModelBasedProcessingInvalidDataTest.java
@@ -1,983 +1,984 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.openecomp.aai
- * ================================================================================
- * 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.aai.dbgraphgen;
-
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyMap;
-import static org.mockito.Matchers.anyMapOf;
-import static org.mockito.Mockito.*;
-
-import com.bazaarvoice.jolt.modifier.DataType;
-import com.google.common.collect.ArrayListMultimap;
-import com.google.common.collect.LinkedListMultimap;
-import com.google.common.collect.Multimap;
-import com.thinkaurelius.titan.graphdb.olap.computer.VertexMapJob;
-import com.thinkaurelius.titan.graphdb.types.VertexLabelVertex;
-import com.thinkaurelius.titan.graphdb.types.system.BaseVertexLabel;
-import com.thinkaurelius.titan.graphdb.types.system.EmptyVertex;
-import com.thinkaurelius.titan.graphdb.types.vertices.EdgeLabelVertex;
-import com.thinkaurelius.titan.graphdb.types.vertices.PropertyKeyVertex;
-import org.apache.commons.lang.ObjectUtils;
-import org.apache.openjpa.kernel.exps.Exp;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.structure.T;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.*;
-import org.mockito.runners.MockitoJUnitRunner;
-import org.openecomp.aai.db.DbMethHelper;
-import org.openecomp.aai.db.props.AAIProperties;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.LoaderFactory;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException;
-import org.openecomp.aai.serialization.db.DBSerializer;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-
-import javax.inject.Inject;
-import java.util.*;
-@RunWith(MockitoJUnitRunner.class)
-public class ModelBasedProcessingInvalidDataTest {
-
- @Mock
- private static TransactionalGraphEngine dbEngine;
- private static Loader loader;
- @Mock
- private static DBSerializer serializer;
- ModelBasedProcessing processor;
-
- @Mock
- private ModelBasedProcessing mockProcessor;
-
-
- @Mock
- private DbMethHelper dbMethHelper;
-
- @BeforeClass
- public static void configure() throws Exception {
- System.setProperty("AJSC_HOME", ".");
- System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local");
- loader = LoaderFactory.createLoaderForVersion(ModelType.MOXY, AAIProperties.LATEST);
-
-
- }
-
- @Before
- public void init() {
- MockitoAnnotations.initMocks(this);
- processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- dbMethHelper = new DbMethHelper(loader, dbEngine);
-
- }
-
- @Test
- public void getStartNodesAndModVersionIdsTest() throws AAIException {
-
-
- List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("test", new Object());
- startNodeFilterArrayOfHashes.add(map);
- Map<String, String> result=new HashMap<>();
-
- Map<String, String> result1 = mockProcessor.getStartNodesAndModVersionIds("test", "test",
- "test", "test", "test",
- "test", startNodeFilterArrayOfHashes,
- "test");
- assertNotNull(result);
-
- }
-
-
- @Test(expected = NullPointerException.class)
- public void getStartNodesAndModVersionIdsTest2() throws AAIException {
- List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("test", new Object());
- startNodeFilterArrayOfHashes.add(map);
- Map<String, String> result1 = processor.getStartNodesAndModVersionIds("test", "test",
- "", "test", "test",
- "test", startNodeFilterArrayOfHashes,
- "test");
- assertNotNull(result1);
- }
-
-
- @Test(expected = NullPointerException.class)
- public void getStartNodesAndModVersionIdsTest3() throws AAIException {
- List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("test", new Object());
- startNodeFilterArrayOfHashes.add(map);
- Map<String, String> result1 = processor.getStartNodesAndModVersionIds("test", "test",
- "", "", "test",
- "test", startNodeFilterArrayOfHashes,
- "test");
- assertNotNull(result1);
- }
-
-
- @Test(expected = AAIException.class)
- public void getStartNodesAndModVersionIdsTest4() throws AAIException {
- List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("test", new Object());
- startNodeFilterArrayOfHashes.add(map);
- Map<String, String> result1 = processor.getStartNodesAndModVersionIds("test", "test",
- "", "", "",
- "test", startNodeFilterArrayOfHashes,
- "test");
- assertNotNull(result1);
- }
-
-
- @Test(expected = AAIException.class)
- public void getStartNodesAndModVersionIdsTest5() throws AAIException {
- List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("test", new Object());
- startNodeFilterArrayOfHashes.add(map);
- Map<String, String> result1 = processor.getStartNodesAndModVersionIds("test", "test",
- "", "", "",
- "", startNodeFilterArrayOfHashes,
- "test");
- assertNotNull(result1);
- }
-
-
- @Test(expected = AAIException.class)
- public void getStartNodesAndModVersionIdsNullTest() throws AAIException {
- List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
-
- Map<String, String> result = null;
- result = processor.getStartNodesAndModVersionIds("test", "test",
- "", "", "",
- "", startNodeFilterArrayOfHashes,
- "test");
-
- assertNotNull(result);
- }
-
-
- @Test(expected = NullPointerException.class)
- public void getStartNodesAndModVersionIdsNullTest1() throws AAIException {
- List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
-
- Map<String, String> result = null;
- result = processor.getStartNodesAndModVersionIds("test", "test",
- "Test", "", "",
- "", startNodeFilterArrayOfHashes,
- "test");
-
- assertNotNull(result);
- }
-
- @Test(expected = NullPointerException.class)
- public void getStartNodesAndModVersionIdsNullTest2() throws AAIException {
- List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
-
- Map<String, String> result = null;
- result = processor.getStartNodesAndModVersionIds("test", "test",
- "", "test", "",
- "", startNodeFilterArrayOfHashes,
- "test");
- assertNotNull(result);
- }
-
-
- @Test(expected = NullPointerException.class)
- public void getStartNodesAndModVersionIdsNullTest3() throws AAIException {
- List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
-
- Map<String, String> result = null;
- result = processor.getStartNodesAndModVersionIds("test", "test",
- "", "", "test",
- "", startNodeFilterArrayOfHashes,
- "test");
- assertNotNull(result);
- }
-
- @Test(expected = NullPointerException.class)
- public void getModelVerTopWidgetTypeTest() throws AAIException {
- Vertex vertex = new EmptyVertex();
- //Mockito.when(mockProcessor.getModelVerTopWidgetType(Mockito.any(Vertex.class), Mockito.any(String.class))).thenReturn("Sucess");
- String result = processor.getModelVerTopWidgetType(vertex, "test");
- assertEquals("result has -local tacked on the end as it should", "Sucess", result
- );
-
- }
-
- @Test(expected = NullPointerException.class)
- public void getModelVerTopWidgetType() throws AAIException {
- /*Mockito.when(mockProcessor.getModelVerTopWidgetType(Mockito.any(String.class),
- Mockito.any(String.class), Mockito.any(String.class),
- Mockito.any(String.class), Mockito.any(String.class))
- ).thenReturn("Sucess");*/
- String result = processor.getModelVerTopWidgetType("test", "test", "test", "Test", "test");
- assertEquals("result has -local tacked on the end as it should", "Sucess", result
- );
-
- }
-
- @Test(expected = AAIException.class)
- public void queryByModel() throws AAIException {
- /*Mockito.when(mockProcessor.getModelVerTopWidgetType(Mockito.any(String.class),
- Mockito.any(String.class), Mockito.any(String.class),
- Mockito.any(String.class), Mockito.any(String.class))
- ).thenReturn("Sucess");*/
- List<ResultSet> result = processor.queryByModel("test", "test",
- "test", "test", "test",
- "generic-vnf", null,
- "test");
- assertEquals("result has -local tacked on the end as it should", 0, result.size());
-
-
- }
-
-
- @Test(expected = NullPointerException.class)
- public void queryByModel_Timed() throws AAIException {
- List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("test", new Object());
- startNodeFilterArrayOfHashes.add(map);
- List<ResultSet> result = processor.queryByModel_Timed("test", "test",
- "test", "test", "test",
- "test", startNodeFilterArrayOfHashes,
- "test");
- assertEquals("result has -local tacked on the end as it should", 0, result.size());
-
-
- }
-
- @Mock
- Map<String, Object> startNodeFilterHash;
-
- @Test(expected = NullPointerException.class)
- public void runDeleteByModel() throws AAIException {
- Map<String, String> resultMock = new HashMap<String, String>();
-
- // when(mockProcessor.getNodeUsingUniqueId(any(String.class),any(String.class),any(String.class),any(String.class),any(String.class))).thenReturn(vertex);
- when(mockProcessor.runDeleteByModel(any(String.class),
- any(String.class), any(String.class),
- any(String.class), anyMapOf(String.class, Object.class), any(String.class), any(String.class))
- ).thenReturn(resultMock);
- Map<String, String> result = processor.runDeleteByModel("test", "test",
- "test", "test", startNodeFilterHash,
- "test",
- "test");
- assertEquals("result has -local tacked on the end as it should", result.size(), resultMock.size());
-
-
- }
-
- Optional<Vertex> vertext = Optional.empty();
-
- @Test(expected = AAIException.class)
- public void runDeleteByModelWithNullParams() throws AAIException {
- Map<String, String> resultMock = new HashMap<String, String>();
-
-
- Map<String, String> result = processor.runDeleteByModel("test", "test",
- null, null, null,
- "test",
- "test");
-
- assertNotNull(result);
-
- }
-
- @Test(expected = NullPointerException.class)
- public void runDeleteByModelWithNullParams1() throws AAIException {
-
- Map<String, String> result1 = processor.runDeleteByModel("test", "test",
- null, "unknown", null,
- "test",
- "test");
- assertNotNull(result1);
-
- }
-
-
- @Test(expected = NullPointerException.class)
- public void runDeleteByModelWithNullParams2() throws AAIException {
-
- Map<String, String> result1 = processor.runDeleteByModel("test", "test",
- null, "unknown", null,
- "test",
- "test");
- assertNotNull(result1);
-
- }
-
- @Test(expected = AAIException.class)
- public void queryByNamedQuery() throws AAIException{
- String transId="test";
- String fromAppId="test";
- String namedQueryUuid="test";
- ArrayList <Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<Map<String,Object>>();
- String apiVer="test";
- List<ResultSet> result=processor.queryByNamedQuery(transId,fromAppId,namedQueryUuid,startNodeFilterArrayOfHashes,apiVer);
- assertNotNull(result);
- }
-
- @Test(expected = AAIException.class)
- public void queryByNamedQuery1() throws AAIException{
- String transId="teet";
- String fromAppId="test";
- String namedQueryUuid="test";
- String secondaryFilterCutPoint="test";
- List <Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<Map<String,Object>>();
- String apiVer="test";
- Map<String,Object> secondaryFilterHash=new HashMap<String,Object>();
- List<ResultSet> result=processor.queryByNamedQuery(transId,fromAppId,namedQueryUuid,startNodeFilterArrayOfHashes,apiVer,secondaryFilterCutPoint,secondaryFilterHash);
- assertNotNull(result);
- }
-
- @Test
- public void deleteAsNeededFromResultSet() throws AAIException {
- Vertex vert = new BaseVertexLabel("Test");
- Map<String, String> resultMock = new HashMap<String, String>();
- ResultSet resultSet = new ResultSet();
- resultSet.setVert(null);
-
- Map<String, String> result = processor.deleteAsNeededFromResultSet("test", "test",
- resultSet, "test", "test",
- "test",
- resultMock);
-
- assertEquals(result.size(), 0);
-
- resultSet.setVert(vert);
-
- Map<String, String> result1 = processor.deleteAsNeededFromResultSet("test", "test",
- resultSet, "test", "test",
- "test",
- resultMock);
-
- assertEquals(result.size(), 0);
-
-
- }
-
- @Test(expected = NullPointerException.class)
- public void pruneResultSetTest() throws AAIException {
- ResultSet rs = new ResultSet();
- Vertex v = new BaseVertexLabel(AAIProperties.NODE_TYPE);
- rs.setVert(v);
- List<ResultSet> rsList = new ArrayList<ResultSet>();
- ResultSet rs1 = new ResultSet();
- rsList.add(rs1);
- rs.setSubResultSet(rsList);
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("test", new Object());
- ResultSet resultSet = processor.pruneResultSet(rs, "testr", map);
- assertNotNull(resultSet);
-
- }
-
- @Test(expected = NullPointerException.class)
- public void satisfiesFiltersTest() throws AAIException {
- ResultSet rs = new ResultSet();
- Vertex v = new BaseVertexLabel(AAIProperties.NODE_TYPE);
- rs.setVert(v);
- rs.getVert().property(AAIProperties.NODE_TYPE);
- List<ResultSet> rsList = new ArrayList<ResultSet>();
- ResultSet rs1 = new ResultSet();
- rsList.add(rs1);
- rs.setSubResultSet(rsList);
- Map<String, Object> map = new HashMap<String, Object>();
-
- map.put("modern.vertex-id", new Object());
-
- boolean result = processor.satisfiesFilters(rs, map);
- assertEquals(result, true);
- }
-
- @Test
- public void satisfiesFiltersTest1() throws AAIException {
- ResultSet rs = new ResultSet();
- Vertex v = new BaseVertexLabel(AAIProperties.NODE_TYPE);
- rs.setVert(v);
- List<ResultSet> rsList = new ArrayList<ResultSet>();
- ResultSet rs1 = new ResultSet();
- rsList.add(rs1);
- rs.setSubResultSet(rsList);
- Map<String, Object> map = new HashMap<String, Object>();
- //map.put("test.filter",new Object());
-
- boolean result = processor.satisfiesFilters(rs, map);
- assertEquals(result, false);
- }
-
- @Test(expected = AAIException.class)
- public void satisfiesFiltersTest2() throws AAIException {
- ResultSet rs = new ResultSet();
- Vertex v = new BaseVertexLabel(AAIProperties.NODE_TYPE);
- rs.setVert(v);
- List<ResultSet> rsList = new ArrayList<ResultSet>();
- ResultSet rs1 = new ResultSet();
- rsList.add(rs1);
- rs.setSubResultSet(rsList);
- Map<String, Object> map = new HashMap<String, Object>();
- map.put("testfilter", new Object());
-
- boolean result = processor.satisfiesFilters(rs, map);
- assertEquals(result, false);
- }
-
- @Test
- public void collapseForDoNotOutputTest() throws AAIException {
- ResultSet rs = new ResultSet();
- rs.setDoNotOutputFlag("true");
- List<ResultSet> rsList = new ArrayList<ResultSet>();
- ResultSet rs1 = new ResultSet();
- rsList.add(rs1);
- rs.setSubResultSet(rsList);
- List<ResultSet> result = processor.collapseForDoNotOutput(rs);
- assertEquals(result.size(), 1);
- }
-
- @Test(expected = NullPointerException.class)
- public void collectInstanceDataTest() throws AAIException {
-
- BaseVertexLabel bs = new BaseVertexLabel("test");
- //bs.setId(80);
- EmptyVertex ev = new EmptyVertex();
- //ev.setId(50l);
- Vertex thisLevelElemVtx = ev;
-
-
- Multimap<String, String> thisMap = ArrayListMultimap.create();
- List<String> vidsTraversed = new ArrayList<String>();
- // only applies when collecting data using the default model for delete
- Multimap<String, String> validNextStepMap = ArrayListMultimap.create();
- Map<String, String> namedQueryElementHash = new HashMap<String, String>();
- namedQueryElementHash.put("test", "test");
- Map<String, String> delKeyHash = new HashMap<String, String>();
-
- ResultSet rs = processor.collectInstanceData("test", "test", thisLevelElemVtx, "test", validNextStepMap, vidsTraversed, 1, delKeyHash, namedQueryElementHash, "test");
- }
-
- @Test(expected = NullPointerException.class)
- public void genTopoMap4ModelVerTest() throws
- AAIException {
- Vertex vertext = new EmptyVertex();
- Multimap<String, String> map = processor.genTopoMap4ModelVer("test", "test", vertext, "test");
- assertNotEquals(map, null);
- }
-
- @Test(expected = AAIException.class)
- public void genTopoMap4ModelVerTestNull() throws
- AAIException {
- Vertex vertext = null;
- Multimap<String, String> map = processor.genTopoMap4ModelVer("test", "test", vertext, "test");
- assertNotEquals(map, null);
- }
-
- @Test
- public void makeSureItsAnArrayListTest() {
- String input = "model-versionId,modelTestID,modelTestid2;";
- List<String> result = processor.makeSureItsAnArrayList(input);
- assertTrue(result.size() > 0);
- }
-
- @Test(expected = AAIException.class)
- public void getModConstraintHashTest() throws AAIException {
- Vertex modelElementVtx = new EmptyVertex();
- //modelElementVtx.property(AAIProperties.NODE_TYPE,"Model");
- Vertex modelElementVtx1 = new EmptyVertex();
- Map<String, Vertex> currentHash = new HashMap<String, Vertex>();
- currentHash.put("constraint", modelElementVtx1);
- Map<String, Vertex> result = processor.getModConstraintHash(modelElementVtx, currentHash);
- assertTrue(result.size() > 0);
- }
-
- @Test(expected = AAIException.class)
- public void getModConstraintHashTestNull() throws AAIException {
- Vertex modelElementVtx = null;
- //modelElementVtx.property(AAIProperties.NODE_TYPE,"Model");
- Vertex modelElementVtx1 =null;
- Map<String, Vertex> currentHash = new HashMap<String, Vertex>();
- currentHash.put("constraint", modelElementVtx1);
- Map<String, Vertex> result = processor.getModConstraintHash(modelElementVtx, currentHash);
- assertTrue(result.size() > 0);
- }
-
- @Test(expected = NullPointerException.class)
- public void getTopElementForSvcOrResModelVerTest() throws AAIException {
- Vertex modelElementVtx = new EmptyVertex();
- //modelElementVtx.property(AAIProperties.NODE_TYPE,"Model");
- Vertex modelElementVtx1 = new EmptyVertex();
- Map<String, Vertex> currentHash = new HashMap<String, Vertex>();
- currentHash.put("constraint", modelElementVtx1);
- Vertex result = processor.getTopElementForSvcOrResModelVer(modelElementVtx, "test");
- assertNotEquals(result, null);
- }
-
- @Test
- public void getNamedQueryPropOverRideTest() throws AAIException {
- String transId = "test";
- String fromAppId = "test";
- Vertex namedQueryElementVertex = new EmptyVertex();
- Vertex instanceVertex = new EmptyVertex();
- String apiVer = "test";
-
- namedQueryElementVertex.properties("property-collect-list", "");
-
- Map<String, Object> result = processor.getNamedQueryPropOverRide(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
- assertNotEquals(result, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void getNamedQueryPropOverRideTestNull() throws AAIException {
- String transId = "test";
- String fromAppId = "test";
- Vertex namedQueryElementVertex = null;
- Vertex instanceVertex = new EmptyVertex();
- String apiVer = "test";
-
- namedQueryElementVertex.properties("property-collect-list", "");
-
- Map<String, Object> result = processor.getNamedQueryPropOverRide(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
- assertNotEquals(result, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void namedQueryConstraintSaysStopTest() throws AAIException {
- String transId = "test";
- String fromAppId = "test";
- Vertex namedQueryElementVertex = new EmptyVertex();
- Vertex instanceVertex = new EmptyVertex();
- String apiVer = "test";
-
- namedQueryElementVertex.properties("property-collect-list", "");
-
- boolean result = processor.namedQueryConstraintSaysStop(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
- assertTrue(result);
- }
-
- @Test(expected = NullPointerException.class)
- public void namedQueryConstraintSaysStopTestNull() throws AAIException {
- String transId = "test";
- String fromAppId = "test";
- Vertex namedQueryElementVertex = null;
- Vertex instanceVertex = new EmptyVertex();
- String apiVer = "test";
-
- namedQueryElementVertex.properties("property-collect-list", "");
-
- boolean result = processor.namedQueryConstraintSaysStop(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
- assertTrue(result);
- }
-
- @Test(expected = AAIException.class)
- public void namedQuerynamedQueryElementVertexNullTest() throws AAIException {
- String transId = "test";
- String fromAppId = "test";
- Vertex namedQueryElementVertex = null;
- Vertex instanceVertex = null;
- String apiVer = "test";
-
-
- boolean result = processor.namedQueryConstraintSaysStop(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
- assertTrue(result);
- }
-
- @Test(expected = NullPointerException.class)
-
- public void getNamedQueryExtraDataLookupTest() throws Exception {
-
- String transId = "test";
- String fromAppId = "test";
- Vertex namedQueryElementVertex = new EmptyVertex();
- Vertex instanceVertex = new EmptyVertex();
- String apiVer = "test";
-
- namedQueryElementVertex.properties("property-collect-list", "");
-
- Map<String, Object> result = processor.getNamedQueryExtraDataLookup(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
-
- assertTrue(result.size() > 0);
- }
-
- @Test(expected = NullPointerException.class)
- public void collectNQElementHash() throws AAIException {
- String transId = "test";
- String fromAppId = "test";
- Vertex thisLevelElemVtx = new EmptyVertex();
- String incomingTrail = "test";
- Map<String, String> currentHash = new HashMap<String, String>();
- ArrayList<String> vidsTraversed = new ArrayList<String>();
- int levelCounter = 1;
-
- Map<String, String> result = processor.collectNQElementHash(transId, fromAppId,
- thisLevelElemVtx, incomingTrail, currentHash,
- vidsTraversed, levelCounter);
-
- assertNotEquals(result, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void collectDeleteKeyHash() throws AAIException {
- String transId = "test";
- String fromAppId = "test";
- Vertex thisLevelElemVtx = new EmptyVertex();
- String incomingTrail = "test";
- Map<String, String> currentHash = new HashMap<String, String>();
- ArrayList<String> vidsTraversed = new ArrayList<String>();
- int levelCounter = 1;
- Map<String, Vertex> modConstraintHash = new HashMap<String, Vertex>();
- String overRideModelId = "test";
- String overRideModelVersionId = "test";
-
- Map<String, String> result = processor.collectDeleteKeyHash(transId, fromAppId,
- thisLevelElemVtx, incomingTrail, currentHash,
- vidsTraversed, levelCounter, modConstraintHash, overRideModelId, overRideModelVersionId);
-
- assertNotEquals(result, null);
- }
-
- @Test
- public void getLinkageConnectNodeTypesTest() throws AAIException {
- List<String> linkagePtList = new ArrayList<String>();
- linkagePtList.add("modern\\|testdata\\|");
- Set<String> result = processor.getLinkageConnectNodeTypes(linkagePtList);
- assertNotEquals(result, null);
-
- }
-
- @Test(expected = AAIException.class)
- public void getLinkageConnectNodeTypesTest1() throws AAIException {
-
- Set<String> result1 = processor.getLinkageConnectNodeTypes(null);
- assertNotEquals(result1, null);
-
- List<String> linkagePtList = new ArrayList<String>();
- linkagePtList.add("moderntestdata");
- Set<String> result = processor.getLinkageConnectNodeTypes(linkagePtList);
- assertNotEquals(result, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void collectTopology4ModelVerTest() throws AAIException {
- String transId = "test";
- String fromAppId = "test";
- Multimap<String, String> thisMap = ArrayListMultimap.create();
- Vertex thisLevelElemVtx = new EmptyVertex();
- String incomingTrail = "test";
- Map<String, Vertex> currentHash = new HashMap<String, Vertex>();
- List<String> vidsTraversed = new ArrayList<String>();
- int levelCounter = 1;
-
- Multimap<String, String> result = processor.collectTopology4ModelVer(transId, fromAppId,
- thisLevelElemVtx, incomingTrail, thisMap, vidsTraversed, levelCounter, currentHash
- , "test", "test");
-
- assertNotEquals(result, null);
- }
-
- @Test(expected = AAIException.class)
- public void check4EdgeRuleTest() throws AAIException {
- processor.check4EdgeRule("test", "test");
- }
-
- @Test(expected = AAIException.class)
- public void collectTopology4LinkagePointTest() throws AAIException {
- String transId = "test";
- String fromAppId = "test";
- String linkagePointStrVal = "test";
- String incomingTrail = "test";
- Multimap<String, String> currentMap = ArrayListMultimap.create();
-
- Multimap<String, String> result = processor.collectTopology4LinkagePoint(transId, fromAppId, linkagePointStrVal, incomingTrail, currentMap);
- assertNotEquals(result, null);
-
- }
-
- @Test(expected = AAIException.class)
- public void getNextStepElementsFromSet() throws AAIException {
- Vertex constrElemSetVtx = new EmptyVertex();
- constrElemSetVtx.<String>property(AAIProperties.NODE_TYPE);
- Map<String, Object> result = processor.getNextStepElementsFromSet(constrElemSetVtx);
- assertNotEquals(result, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void genTopoMap4NamedQTest() throws AAIException {
- String transId = "test";
- String fromAppId = "test";
- Vertex queryVertex = new EmptyVertex();
- String namedQueryUuid = "E44533334343";
- Multimap<String, String> result = processor.genTopoMap4NamedQ(transId, fromAppId, queryVertex, namedQueryUuid);
- assertNotEquals(result, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void collectTopology4NamedQTest() throws AAIException {
- String transId = "test";
- String fromAppId = "test";
- Multimap<String, String> thisMap = ArrayListMultimap.create();
- Vertex thisLevelElemVtx = new EmptyVertex();
- String incomingTrail = "test";
- Map<String, Vertex> currentHash = new HashMap<String, Vertex>();
- List<String> vidsTraversed = new ArrayList<String>();
- int levelCounter = 1;
-
- Multimap<String, String> result = processor.collectTopology4NamedQ(transId, fromAppId,
- thisLevelElemVtx, incomingTrail, thisMap, vidsTraversed, levelCounter);
- assertNotEquals(result, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void getModelThatNqElementRepresentsTest() throws AAIException {
- Vertex thisLevelElemVtx = new EmptyVertex();
- String incomingTrail = "test";
- Vertex vertex = processor.getModelThatNqElementRepresents(thisLevelElemVtx, incomingTrail);
- assertNotEquals(vertex, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void getModelGivenModelVer() throws AAIException {
- Vertex thisLevelElemVtx = new EmptyVertex();
- String incomingTrail = "test";
- Vertex vertex = processor.getModelGivenModelVer(thisLevelElemVtx, incomingTrail);
- assertNotEquals(vertex, null);
- }
-
- @Test(expected = AAIException.class)
- public void getModelTypeFromModel() throws AAIException {
- Vertex thisLevelElemVtx = new EmptyVertex();
- String incomingTrail = "test";
- String vertex = processor.getModelTypeFromModel(thisLevelElemVtx, incomingTrail);
- assertNotEquals(vertex, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void getModelTypeFromModelVer() throws AAIException {
- Vertex thisLevelElemVtx = new EmptyVertex();
- String incomingTrail = "test";
- String vertex = processor.getModelTypeFromModelVer(thisLevelElemVtx, incomingTrail);
- assertNotEquals(vertex, null);
- }
-
- @Test(expected = NullPointerException.class)
- public void getModelElementStepName() throws AAIException {
- Vertex thisLevelElemVtx = new EmptyVertex();
- String incomingTrail = "test";
- String vertex = processor.getModelElementStepName(thisLevelElemVtx, incomingTrail);
- assertNotEquals(vertex, null);
- }
-
- @Test(expected = AAIException.class)
- public void nodeTypeSupportsPersona() throws AAIException {
- String incomingTrail = "";
- boolean vertex = processor.nodeTypeSupportsPersona(incomingTrail);
- assertFalse(vertex);
-
-
- incomingTrail = "test";
- boolean vertex1 = processor.nodeTypeSupportsPersona(incomingTrail);
- assertTrue(vertex1);
- }
-
- @Test(expected = NullPointerException.class)
- public void getNqElementWidgetType() throws AAIException{
- String appId="test";
- String transID="test";
- Vertex thisLevelElemVtx = new EmptyVertex();
- String incomingTrail = "test";
- String vertex1 = processor.getNqElementWidgetType(appId,transID,thisLevelElemVtx,incomingTrail);
- assertNotEquals(vertex1,null);
- }
-
-
- @Test(expected = NullPointerException.class)
- public void getModElementWidgetType() throws AAIException{
- String appId="test";
- String transID="test";
- Vertex thisLevelElemVtx = new EmptyVertex();
- String incomingTrail = "test";
- String vertex1 = processor.getModElementWidgetType(thisLevelElemVtx,incomingTrail);
- assertNotEquals(vertex1,null);
- }
-
- @Test(expected = NullPointerException.class)
- public void getNodeUsingUniqueId() throws AAIException{
- String appId="test";
- String transID="test";
- String nodeType = "generic-vnf";
- String idPropertyName = "test";
- String uniqueIdVal="test";
- Vertex vertex1 = processor.getNodeUsingUniqueId(transID,appId,nodeType,idPropertyName,uniqueIdVal);
- assertNotEquals(vertex1,null);
- }
-
-
- @Test(expected = AAIException.class)
- public void getNodeUsingUniqueIdNull() throws AAIException{
- String appId="test";
- String transID="test";
- String nodeType = "generic-vnf";
- String idPropertyName = "test";
- String uniqueIdVal="";
- Vertex vertex1 = null;
- vertex1= processor.getNodeUsingUniqueId(transID,appId,nodeType,idPropertyName,uniqueIdVal);
- assertNotEquals(vertex1,null);
-
- }
-
-
- @Test(expected = AAIException.class)
- public void getNodeUsingUniqueIdNull1() throws AAIException{
- String appId="test";
- String transID="test";
- String nodeType = "generic-vnf";
- String idPropertyName="";
- String uniqueIdVal="test";
- Vertex vertex1 = null;
- vertex1= processor.getNodeUsingUniqueId(transID,appId,nodeType,idPropertyName,uniqueIdVal);
- assertNotEquals(vertex1,null);
-
-
- }
-
-
- @Test(expected = AAIException.class)
- public void getNodeUsingUniqueIdNull2() throws AAIException{
- String appId="test";
- String transID="test";
- String nodeType = "";
- String idPropertyName="test";
- String uniqueIdVal="test";
- Vertex vertex1 = null;
- vertex1= processor.getNodeUsingUniqueId(transID,appId,nodeType,idPropertyName,uniqueIdVal);
- assertNotEquals(vertex1,null);
-
-
- }
-
- @Test(expected = NullPointerException.class)
- public void getModelVersUsingName() throws AAIException{
- String appId="test";
- String transID="test";
- String modelName = "test";
-
- List<Vertex> result= processor.getModelVersUsingName(transID,appId,modelName);
- assertNotEquals(result,null);
- }
-
-
- @Test(expected = AAIException.class)
- public void getModelVersUsingNameNull() throws AAIException{
- String appId="test";
- String transID="test";
- String modelName = "";
-
- List<Vertex> result= processor.getModelVersUsingName(transID,appId,modelName);
- assertNotEquals(result,null);
- }
-
-
- @Test(expected = NullPointerException.class)
- public void getModVersUsingModelInvId() throws AAIException{
- String appId="test";
- String transID="test";
- String modelName = "test";
-
- Iterator<Vertex> result= processor.getModVersUsingModelInvId(transID,appId,modelName);
- assertNotEquals(result,null);
- }
-
- @Test(expected = AAIException.class)
- public void getModVersUsingModelInvIdNull() throws AAIException{
- String appId="test";
- String transID="test";
- String modelName = "";
-
- Iterator<Vertex> result= processor.getModVersUsingModelInvId(transID,appId,modelName);
- assertNotEquals(result,null);
- }
-
- @Test(expected = NullPointerException.class)
- public void getModVersUsingModel() throws AAIException{
- String appId="test";
- String transID="test";
- String modelName = "test";
- Vertex thisLevelElemVtx = new EmptyVertex();
- List<Vertex> result= processor.getModVersUsingModel(transID,appId,thisLevelElemVtx);
- assertNotEquals(result,null);
- }
-
- @Test(expected = AAIException.class)
- public void getModVersUsingModel1() throws AAIException{
- String appId="test";
- String transID="test";
-
- Vertex thisLevelElemVtx = null;
- List<Vertex> result= processor.getModVersUsingModel(transID,appId,thisLevelElemVtx);
- assertNotEquals(result,null);
- }
-
- @Test(expected = NullPointerException.class)
- public void getModelVerIdsUsingName() throws AAIException{
- String appId="test";
- String transID="test";
-
- String modelName= "test";
- List<String> result= processor.getModelVerIdsUsingName(transID,appId,modelName);
- assertNotEquals(result,null);
- }
-
- @Test(expected = AAIException.class)
- public void getModelVerIdsUsingName1() throws AAIException{
- String appId="test";
- String transID="test";
-
- String modelName= "";
- List<String> result= processor.getModelVerIdsUsingName(transID,appId,modelName);
- assertNotEquals(result,null);
- }
-
- @Test(expected =NullPointerException.class)
- public void validateModel() throws AAIException{
- String appId="test";
- String transID="test";
-
- String modelVersionId= "test";
- String modelInvId= "test";
- String modelName= "test";
- processor.validateModel(transID,appId,modelName,modelVersionId);
-
-
- }
-
-
-
-}
-
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.dbgraphgen;
+
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyMap;
+import static org.mockito.Matchers.anyMapOf;
+import static org.mockito.Mockito.*;
+
+import com.bazaarvoice.jolt.modifier.DataType;
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.LinkedListMultimap;
+import com.google.common.collect.Multimap;
+import com.thinkaurelius.titan.graphdb.olap.computer.VertexMapJob;
+import com.thinkaurelius.titan.graphdb.types.VertexLabelVertex;
+import com.thinkaurelius.titan.graphdb.types.system.BaseVertexLabel;
+import com.thinkaurelius.titan.graphdb.types.system.EmptyVertex;
+import com.thinkaurelius.titan.graphdb.types.vertices.EdgeLabelVertex;
+import com.thinkaurelius.titan.graphdb.types.vertices.PropertyKeyVertex;
+import org.apache.commons.lang.ObjectUtils;
+import org.apache.openjpa.kernel.exps.Exp;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.T;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.*;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.aai.db.DbMethHelper;
+import org.onap.aai.db.props.AAIProperties;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.exceptions.AAIUnknownObjectException;
+import org.onap.aai.serialization.db.DBSerializer;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+
+import javax.inject.Inject;
+import java.util.*;
+@RunWith(MockitoJUnitRunner.class)
+public class ModelBasedProcessingInvalidDataTest {
+
+ @Mock
+ private static TransactionalGraphEngine dbEngine;
+ private static Loader loader;
+ @Mock
+ private static DBSerializer serializer;
+ ModelBasedProcessing processor;
+
+ @Mock
+ private ModelBasedProcessing mockProcessor;
+
+
+ @Mock
+ private DbMethHelper dbMethHelper;
+
+ @BeforeClass
+ public static void configure() throws Exception {
+ System.setProperty("AJSC_HOME", ".");
+ System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local");
+ loader = LoaderFactory.createLoaderForVersion(ModelType.MOXY, AAIProperties.LATEST);
+
+
+ }
+
+ @Before
+ public void init() {
+ MockitoAnnotations.initMocks(this);
+ processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ dbMethHelper = new DbMethHelper(loader, dbEngine);
+
+ }
+
+ @Test
+ public void getStartNodesAndModVersionIdsTest() throws AAIException {
+
+
+ List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
+ Map<String, Object> map = new HashMap<String, Object>();
+ map.put("test", new Object());
+ startNodeFilterArrayOfHashes.add(map);
+ Map<String, String> result=new HashMap<>();
+
+ Map<String, String> result1 = mockProcessor.getStartNodesAndModVersionIds("test", "test",
+ "test", "test", "test",
+ "test", startNodeFilterArrayOfHashes,
+ "test");
+ assertNotNull(result);
+
+ }
+
+
+ @Test(expected = NullPointerException.class)
+ public void getStartNodesAndModVersionIdsTest2() throws AAIException {
+ List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
+ Map<String, Object> map = new HashMap<String, Object>();
+ map.put("test", new Object());
+ startNodeFilterArrayOfHashes.add(map);
+ Map<String, String> result1 = processor.getStartNodesAndModVersionIds("test", "test",
+ "", "test", "test",
+ "test", startNodeFilterArrayOfHashes,
+ "test");
+ assertNotNull(result1);
+ }
+
+
+ @Test(expected = NullPointerException.class)
+ public void getStartNodesAndModVersionIdsTest3() throws AAIException {
+ List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
+ Map<String, Object> map = new HashMap<String, Object>();
+ map.put("test", new Object());
+ startNodeFilterArrayOfHashes.add(map);
+ Map<String, String> result1 = processor.getStartNodesAndModVersionIds("test", "test",
+ "", "", "test",
+ "test", startNodeFilterArrayOfHashes,
+ "test");
+ assertNotNull(result1);
+ }
+
+
+ @Test(expected = AAIException.class)
+ public void getStartNodesAndModVersionIdsTest4() throws AAIException {
+ List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
+ Map<String, Object> map = new HashMap<String, Object>();
+ map.put("test", new Object());
+ startNodeFilterArrayOfHashes.add(map);
+ Map<String, String> result1 = processor.getStartNodesAndModVersionIds("test", "test",
+ "", "", "",
+ "test", startNodeFilterArrayOfHashes,
+ "test");
+ assertNotNull(result1);
+ }
+
+
+ @Test(expected = AAIException.class)
+ public void getStartNodesAndModVersionIdsTest5() throws AAIException {
+ List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
+ Map<String, Object> map = new HashMap<String, Object>();
+ map.put("test", new Object());
+ startNodeFilterArrayOfHashes.add(map);
+ Map<String, String> result1 = processor.getStartNodesAndModVersionIds("test", "test",
+ "", "", "",
+ "", startNodeFilterArrayOfHashes,
+ "test");
+ assertNotNull(result1);
+ }
+
+
+ @Test(expected = AAIException.class)
+ public void getStartNodesAndModVersionIdsNullTest() throws AAIException {
+ List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
+
+ Map<String, String> result = null;
+ result = processor.getStartNodesAndModVersionIds("test", "test",
+ "", "", "",
+ "", startNodeFilterArrayOfHashes,
+ "test");
+
+ assertNotNull(result);
+ }
+
+
+ @Test(expected = NullPointerException.class)
+ public void getStartNodesAndModVersionIdsNullTest1() throws AAIException {
+ List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
+
+ Map<String, String> result = null;
+ result = processor.getStartNodesAndModVersionIds("test", "test",
+ "Test", "", "",
+ "", startNodeFilterArrayOfHashes,
+ "test");
+
+ assertNotNull(result);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getStartNodesAndModVersionIdsNullTest2() throws AAIException {
+ List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
+
+ Map<String, String> result = null;
+ result = processor.getStartNodesAndModVersionIds("test", "test",
+ "", "test", "",
+ "", startNodeFilterArrayOfHashes,
+ "test");
+ assertNotNull(result);
+ }
+
+
+ @Test(expected = NullPointerException.class)
+ public void getStartNodesAndModVersionIdsNullTest3() throws AAIException {
+ List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
+
+ Map<String, String> result = null;
+ result = processor.getStartNodesAndModVersionIds("test", "test",
+ "", "", "test",
+ "", startNodeFilterArrayOfHashes,
+ "test");
+ assertNotNull(result);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getModelVerTopWidgetTypeTest() throws AAIException {
+ Vertex vertex = new EmptyVertex();
+ //Mockito.when(mockProcessor.getModelVerTopWidgetType(Mockito.any(Vertex.class), Mockito.any(String.class))).thenReturn("Sucess");
+ String result = processor.getModelVerTopWidgetType(vertex, "test");
+ assertEquals("result has -local tacked on the end as it should", "Sucess", result
+ );
+
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getModelVerTopWidgetType() throws AAIException {
+ /*Mockito.when(mockProcessor.getModelVerTopWidgetType(Mockito.any(String.class),
+ Mockito.any(String.class), Mockito.any(String.class),
+ Mockito.any(String.class), Mockito.any(String.class))
+ ).thenReturn("Sucess");*/
+ String result = processor.getModelVerTopWidgetType("test", "test", "test", "Test", "test");
+ assertEquals("result has -local tacked on the end as it should", "Sucess", result
+ );
+
+ }
+
+ @Test(expected = AAIException.class)
+ public void queryByModel() throws AAIException {
+ /*Mockito.when(mockProcessor.getModelVerTopWidgetType(Mockito.any(String.class),
+ Mockito.any(String.class), Mockito.any(String.class),
+ Mockito.any(String.class), Mockito.any(String.class))
+ ).thenReturn("Sucess");*/
+ List<ResultSet> result = processor.queryByModel("test", "test",
+ "test", "test", "test",
+ "generic-vnf", null,
+ "test");
+ assertEquals("result has -local tacked on the end as it should", 0, result.size());
+
+
+ }
+
+
+ @Test(expected = NullPointerException.class)
+ public void queryByModel_Timed() throws AAIException {
+ List<Map<String, Object>> startNodeFilterArrayOfHashes = new ArrayList<Map<String, Object>>();
+ Map<String, Object> map = new HashMap<String, Object>();
+ map.put("test", new Object());
+ startNodeFilterArrayOfHashes.add(map);
+ List<ResultSet> result = processor.queryByModel_Timed("test", "test",
+ "test", "test", "test",
+ "test", startNodeFilterArrayOfHashes,
+ "test");
+ assertEquals("result has -local tacked on the end as it should", 0, result.size());
+
+
+ }
+
+ @Mock
+ Map<String, Object> startNodeFilterHash;
+
+ @Test(expected = NullPointerException.class)
+ public void runDeleteByModel() throws AAIException {
+ Map<String, String> resultMock = new HashMap<String, String>();
+
+ // when(mockProcessor.getNodeUsingUniqueId(any(String.class),any(String.class),any(String.class),any(String.class),any(String.class))).thenReturn(vertex);
+ when(mockProcessor.runDeleteByModel(any(String.class),
+ any(String.class), any(String.class),
+ any(String.class), anyMapOf(String.class, Object.class), any(String.class), any(String.class))
+ ).thenReturn(resultMock);
+ Map<String, String> result = processor.runDeleteByModel("test", "test",
+ "test", "test", startNodeFilterHash,
+ "test",
+ "test");
+ assertEquals("result has -local tacked on the end as it should", result.size(), resultMock.size());
+
+
+ }
+
+ Optional<Vertex> vertext = Optional.empty();
+
+ @Test(expected = AAIException.class)
+ public void runDeleteByModelWithNullParams() throws AAIException {
+ Map<String, String> resultMock = new HashMap<String, String>();
+
+
+ Map<String, String> result = processor.runDeleteByModel("test", "test",
+ null, null, null,
+ "test",
+ "test");
+
+ assertNotNull(result);
+
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void runDeleteByModelWithNullParams1() throws AAIException {
+
+ Map<String, String> result1 = processor.runDeleteByModel("test", "test",
+ null, "unknown", null,
+ "test",
+ "test");
+ assertNotNull(result1);
+
+ }
+
+
+ @Test(expected = NullPointerException.class)
+ public void runDeleteByModelWithNullParams2() throws AAIException {
+
+ Map<String, String> result1 = processor.runDeleteByModel("test", "test",
+ null, "unknown", null,
+ "test",
+ "test");
+ assertNotNull(result1);
+
+ }
+
+ @Test(expected = AAIException.class)
+ public void queryByNamedQuery() throws AAIException{
+ String transId="test";
+ String fromAppId="test";
+ String namedQueryUuid="test";
+ ArrayList <Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<Map<String,Object>>();
+ String apiVer="test";
+ List<ResultSet> result=processor.queryByNamedQuery(transId,fromAppId,namedQueryUuid,startNodeFilterArrayOfHashes,apiVer);
+ assertNotNull(result);
+ }
+
+ @Test(expected = AAIException.class)
+ public void queryByNamedQuery1() throws AAIException{
+ String transId="teet";
+ String fromAppId="test";
+ String namedQueryUuid="test";
+ String secondaryFilterCutPoint="test";
+ List <Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<Map<String,Object>>();
+ String apiVer="test";
+ Map<String,Object> secondaryFilterHash=new HashMap<String,Object>();
+ List<ResultSet> result=processor.queryByNamedQuery(transId,fromAppId,namedQueryUuid,startNodeFilterArrayOfHashes,apiVer,secondaryFilterCutPoint,secondaryFilterHash);
+ assertNotNull(result);
+ }
+
+ @Test
+ public void deleteAsNeededFromResultSet() throws AAIException {
+ Vertex vert = new BaseVertexLabel("Test");
+ Map<String, String> resultMock = new HashMap<String, String>();
+ ResultSet resultSet = new ResultSet();
+ resultSet.setVert(null);
+
+ Map<String, String> result = processor.deleteAsNeededFromResultSet("test", "test",
+ resultSet, "test", "test",
+ "test",
+ resultMock);
+
+ assertEquals(result.size(), 0);
+
+ resultSet.setVert(vert);
+
+ Map<String, String> result1 = processor.deleteAsNeededFromResultSet("test", "test",
+ resultSet, "test", "test",
+ "test",
+ resultMock);
+
+ assertEquals(result.size(), 0);
+
+
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void pruneResultSetTest() throws AAIException {
+ ResultSet rs = new ResultSet();
+ Vertex v = new BaseVertexLabel(AAIProperties.NODE_TYPE);
+ rs.setVert(v);
+ List<ResultSet> rsList = new ArrayList<ResultSet>();
+ ResultSet rs1 = new ResultSet();
+ rsList.add(rs1);
+ rs.setSubResultSet(rsList);
+ Map<String, Object> map = new HashMap<String, Object>();
+ map.put("test", new Object());
+ ResultSet resultSet = processor.pruneResultSet(rs, "testr", map);
+ assertNotNull(resultSet);
+
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void satisfiesFiltersTest() throws AAIException {
+ ResultSet rs = new ResultSet();
+ Vertex v = new BaseVertexLabel(AAIProperties.NODE_TYPE);
+ rs.setVert(v);
+ rs.getVert().property(AAIProperties.NODE_TYPE);
+ List<ResultSet> rsList = new ArrayList<ResultSet>();
+ ResultSet rs1 = new ResultSet();
+ rsList.add(rs1);
+ rs.setSubResultSet(rsList);
+ Map<String, Object> map = new HashMap<String, Object>();
+
+ map.put("modern.vertex-id", new Object());
+
+ boolean result = processor.satisfiesFilters(rs, map);
+ assertEquals(result, true);
+ }
+
+ @Test
+ public void satisfiesFiltersTest1() throws AAIException {
+ ResultSet rs = new ResultSet();
+ Vertex v = new BaseVertexLabel(AAIProperties.NODE_TYPE);
+ rs.setVert(v);
+ List<ResultSet> rsList = new ArrayList<ResultSet>();
+ ResultSet rs1 = new ResultSet();
+ rsList.add(rs1);
+ rs.setSubResultSet(rsList);
+ Map<String, Object> map = new HashMap<String, Object>();
+ //map.put("test.filter",new Object());
+
+ boolean result = processor.satisfiesFilters(rs, map);
+ assertEquals(result, false);
+ }
+
+ @Test(expected = AAIException.class)
+ public void satisfiesFiltersTest2() throws AAIException {
+ ResultSet rs = new ResultSet();
+ Vertex v = new BaseVertexLabel(AAIProperties.NODE_TYPE);
+ rs.setVert(v);
+ List<ResultSet> rsList = new ArrayList<ResultSet>();
+ ResultSet rs1 = new ResultSet();
+ rsList.add(rs1);
+ rs.setSubResultSet(rsList);
+ Map<String, Object> map = new HashMap<String, Object>();
+ map.put("testfilter", new Object());
+
+ boolean result = processor.satisfiesFilters(rs, map);
+ assertEquals(result, false);
+ }
+
+ @Test
+ public void collapseForDoNotOutputTest() throws AAIException {
+ ResultSet rs = new ResultSet();
+ rs.setDoNotOutputFlag("true");
+ List<ResultSet> rsList = new ArrayList<ResultSet>();
+ ResultSet rs1 = new ResultSet();
+ rsList.add(rs1);
+ rs.setSubResultSet(rsList);
+ List<ResultSet> result = processor.collapseForDoNotOutput(rs);
+ assertEquals(result.size(), 1);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void collectInstanceDataTest() throws AAIException {
+
+ BaseVertexLabel bs = new BaseVertexLabel("test");
+ //bs.setId(80);
+ EmptyVertex ev = new EmptyVertex();
+ //ev.setId(50l);
+ Vertex thisLevelElemVtx = ev;
+
+
+ Multimap<String, String> thisMap = ArrayListMultimap.create();
+ List<String> vidsTraversed = new ArrayList<String>();
+ // only applies when collecting data using the default model for delete
+ Multimap<String, String> validNextStepMap = ArrayListMultimap.create();
+ Map<String, String> namedQueryElementHash = new HashMap<String, String>();
+ namedQueryElementHash.put("test", "test");
+ Map<String, String> delKeyHash = new HashMap<String, String>();
+
+ ResultSet rs = processor.collectInstanceData("test", "test", thisLevelElemVtx, "test", validNextStepMap, vidsTraversed, 1, delKeyHash, namedQueryElementHash, "test");
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void genTopoMap4ModelVerTest() throws
+ AAIException {
+ Vertex vertext = new EmptyVertex();
+ Multimap<String, String> map = processor.genTopoMap4ModelVer("test", "test", vertext, "test");
+ assertNotEquals(map, null);
+ }
+
+ @Test(expected = AAIException.class)
+ public void genTopoMap4ModelVerTestNull() throws
+ AAIException {
+ Vertex vertext = null;
+ Multimap<String, String> map = processor.genTopoMap4ModelVer("test", "test", vertext, "test");
+ assertNotEquals(map, null);
+ }
+
+ @Test
+ public void makeSureItsAnArrayListTest() {
+ String input = "model-versionId,modelTestID,modelTestid2;";
+ List<String> result = processor.makeSureItsAnArrayList(input);
+ assertTrue(result.size() > 0);
+ }
+
+ @Test(expected = AAIException.class)
+ public void getModConstraintHashTest() throws AAIException {
+ Vertex modelElementVtx = new EmptyVertex();
+ //modelElementVtx.property(AAIProperties.NODE_TYPE,"Model");
+ Vertex modelElementVtx1 = new EmptyVertex();
+ Map<String, Vertex> currentHash = new HashMap<String, Vertex>();
+ currentHash.put("constraint", modelElementVtx1);
+ Map<String, Vertex> result = processor.getModConstraintHash(modelElementVtx, currentHash);
+ assertTrue(result.size() > 0);
+ }
+
+ @Test(expected = AAIException.class)
+ public void getModConstraintHashTestNull() throws AAIException {
+ Vertex modelElementVtx = null;
+ //modelElementVtx.property(AAIProperties.NODE_TYPE,"Model");
+ Vertex modelElementVtx1 =null;
+ Map<String, Vertex> currentHash = new HashMap<String, Vertex>();
+ currentHash.put("constraint", modelElementVtx1);
+ Map<String, Vertex> result = processor.getModConstraintHash(modelElementVtx, currentHash);
+ assertTrue(result.size() > 0);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getTopElementForSvcOrResModelVerTest() throws AAIException {
+ Vertex modelElementVtx = new EmptyVertex();
+ //modelElementVtx.property(AAIProperties.NODE_TYPE,"Model");
+ Vertex modelElementVtx1 = new EmptyVertex();
+ Map<String, Vertex> currentHash = new HashMap<String, Vertex>();
+ currentHash.put("constraint", modelElementVtx1);
+ Vertex result = processor.getTopElementForSvcOrResModelVer(modelElementVtx, "test");
+ assertNotEquals(result, null);
+ }
+
+ @Test
+ public void getNamedQueryPropOverRideTest() throws AAIException {
+ String transId = "test";
+ String fromAppId = "test";
+ Vertex namedQueryElementVertex = new EmptyVertex();
+ Vertex instanceVertex = new EmptyVertex();
+ String apiVer = "test";
+
+ namedQueryElementVertex.properties("property-collect-list", "");
+
+ Map<String, Object> result = processor.getNamedQueryPropOverRide(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
+ assertNotEquals(result, null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getNamedQueryPropOverRideTestNull() throws AAIException {
+ String transId = "test";
+ String fromAppId = "test";
+ Vertex namedQueryElementVertex = null;
+ Vertex instanceVertex = new EmptyVertex();
+ String apiVer = "test";
+
+ namedQueryElementVertex.properties("property-collect-list", "");
+
+ Map<String, Object> result = processor.getNamedQueryPropOverRide(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
+ assertNotEquals(result, null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void namedQueryConstraintSaysStopTest() throws AAIException {
+ String transId = "test";
+ String fromAppId = "test";
+ Vertex namedQueryElementVertex = new EmptyVertex();
+ Vertex instanceVertex = new EmptyVertex();
+ String apiVer = "test";
+
+ namedQueryElementVertex.properties("property-collect-list", "");
+
+ boolean result = processor.namedQueryConstraintSaysStop(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
+ assertTrue(result);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void namedQueryConstraintSaysStopTestNull() throws AAIException {
+ String transId = "test";
+ String fromAppId = "test";
+ Vertex namedQueryElementVertex = null;
+ Vertex instanceVertex = new EmptyVertex();
+ String apiVer = "test";
+
+ namedQueryElementVertex.properties("property-collect-list", "");
+
+ boolean result = processor.namedQueryConstraintSaysStop(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
+ assertTrue(result);
+ }
+
+ @Test(expected = AAIException.class)
+ public void namedQuerynamedQueryElementVertexNullTest() throws AAIException {
+ String transId = "test";
+ String fromAppId = "test";
+ Vertex namedQueryElementVertex = null;
+ Vertex instanceVertex = null;
+ String apiVer = "test";
+
+
+ boolean result = processor.namedQueryConstraintSaysStop(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
+ assertTrue(result);
+ }
+
+ @Test(expected = NullPointerException.class)
+
+ public void getNamedQueryExtraDataLookupTest() throws Exception {
+
+ String transId = "test";
+ String fromAppId = "test";
+ Vertex namedQueryElementVertex = new EmptyVertex();
+ Vertex instanceVertex = new EmptyVertex();
+ String apiVer = "test";
+
+ namedQueryElementVertex.properties("property-collect-list", "");
+
+ Map<String, Object> result = processor.getNamedQueryExtraDataLookup(transId, fromAppId, namedQueryElementVertex, instanceVertex, apiVer);
+
+ assertTrue(result.size() > 0);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void collectNQElementHash() throws AAIException {
+ String transId = "test";
+ String fromAppId = "test";
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ String incomingTrail = "test";
+ Map<String, String> currentHash = new HashMap<String, String>();
+ ArrayList<String> vidsTraversed = new ArrayList<String>();
+ int levelCounter = 1;
+
+ Map<String, String> result = processor.collectNQElementHash(transId, fromAppId,
+ thisLevelElemVtx, incomingTrail, currentHash,
+ vidsTraversed, levelCounter);
+
+ assertNotEquals(result, null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void collectDeleteKeyHash() throws AAIException {
+ String transId = "test";
+ String fromAppId = "test";
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ String incomingTrail = "test";
+ Map<String, String> currentHash = new HashMap<String, String>();
+ ArrayList<String> vidsTraversed = new ArrayList<String>();
+ int levelCounter = 1;
+ Map<String, Vertex> modConstraintHash = new HashMap<String, Vertex>();
+ String overRideModelId = "test";
+ String overRideModelVersionId = "test";
+
+ Map<String, String> result = processor.collectDeleteKeyHash(transId, fromAppId,
+ thisLevelElemVtx, incomingTrail, currentHash,
+ vidsTraversed, levelCounter, modConstraintHash, overRideModelId, overRideModelVersionId);
+
+ assertNotEquals(result, null);
+ }
+
+ @Test
+ public void getLinkageConnectNodeTypesTest() throws AAIException {
+ List<String> linkagePtList = new ArrayList<String>();
+ linkagePtList.add("modern\\|testdata\\|");
+ Set<String> result = processor.getLinkageConnectNodeTypes(linkagePtList);
+ assertNotEquals(result, null);
+
+ }
+
+ @Test(expected = AAIException.class)
+ public void getLinkageConnectNodeTypesTest1() throws AAIException {
+
+ Set<String> result1 = processor.getLinkageConnectNodeTypes(null);
+ assertNotEquals(result1, null);
+
+ List<String> linkagePtList = new ArrayList<String>();
+ linkagePtList.add("moderntestdata");
+ Set<String> result = processor.getLinkageConnectNodeTypes(linkagePtList);
+ assertNotEquals(result, null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void collectTopology4ModelVerTest() throws AAIException {
+ String transId = "test";
+ String fromAppId = "test";
+ Multimap<String, String> thisMap = ArrayListMultimap.create();
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ String incomingTrail = "test";
+ Map<String, Vertex> currentHash = new HashMap<String, Vertex>();
+ List<String> vidsTraversed = new ArrayList<String>();
+ int levelCounter = 1;
+
+ Multimap<String, String> result = processor.collectTopology4ModelVer(transId, fromAppId,
+ thisLevelElemVtx, incomingTrail, thisMap, vidsTraversed, levelCounter, currentHash
+ , "test", "test");
+
+ assertNotEquals(result, null);
+ }
+
+ @Test(expected = AAIException.class)
+ public void check4EdgeRuleTest() throws AAIException {
+ processor.check4EdgeRule("test", "test");
+ }
+
+ @Test(expected = AAIException.class)
+ public void collectTopology4LinkagePointTest() throws AAIException {
+ String transId = "test";
+ String fromAppId = "test";
+ String linkagePointStrVal = "test";
+ String incomingTrail = "test";
+ Multimap<String, String> currentMap = ArrayListMultimap.create();
+
+ Multimap<String, String> result = processor.collectTopology4LinkagePoint(transId, fromAppId, linkagePointStrVal, incomingTrail, currentMap);
+ assertNotEquals(result, null);
+
+ }
+
+ @Test(expected = AAIException.class)
+ public void getNextStepElementsFromSet() throws AAIException {
+ Vertex constrElemSetVtx = new EmptyVertex();
+ constrElemSetVtx.<String>property(AAIProperties.NODE_TYPE);
+ Map<String, Object> result = processor.getNextStepElementsFromSet(constrElemSetVtx);
+ assertNotEquals(result, null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void genTopoMap4NamedQTest() throws AAIException {
+ String transId = "test";
+ String fromAppId = "test";
+ Vertex queryVertex = new EmptyVertex();
+ String namedQueryUuid = "E44533334343";
+ Multimap<String, String> result = processor.genTopoMap4NamedQ(transId, fromAppId, queryVertex, namedQueryUuid);
+ assertNotEquals(result, null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void collectTopology4NamedQTest() throws AAIException {
+ String transId = "test";
+ String fromAppId = "test";
+ Multimap<String, String> thisMap = ArrayListMultimap.create();
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ String incomingTrail = "test";
+ Map<String, Vertex> currentHash = new HashMap<String, Vertex>();
+ List<String> vidsTraversed = new ArrayList<String>();
+ int levelCounter = 1;
+
+ Multimap<String, String> result = processor.collectTopology4NamedQ(transId, fromAppId,
+ thisLevelElemVtx, incomingTrail, thisMap, vidsTraversed, levelCounter);
+ assertNotEquals(result, null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getModelThatNqElementRepresentsTest() throws AAIException {
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ String incomingTrail = "test";
+ Vertex vertex = processor.getModelThatNqElementRepresents(thisLevelElemVtx, incomingTrail);
+ assertNotEquals(vertex, null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getModelGivenModelVer() throws AAIException {
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ String incomingTrail = "test";
+ Vertex vertex = processor.getModelGivenModelVer(thisLevelElemVtx, incomingTrail);
+ assertNotEquals(vertex, null);
+ }
+
+ @Test(expected = AAIException.class)
+ public void getModelTypeFromModel() throws AAIException {
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ String incomingTrail = "test";
+ String vertex = processor.getModelTypeFromModel(thisLevelElemVtx, incomingTrail);
+ assertNotEquals(vertex, null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getModelTypeFromModelVer() throws AAIException {
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ String incomingTrail = "test";
+ String vertex = processor.getModelTypeFromModelVer(thisLevelElemVtx, incomingTrail);
+ assertNotEquals(vertex, null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getModelElementStepName() throws AAIException {
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ String incomingTrail = "test";
+ String vertex = processor.getModelElementStepName(thisLevelElemVtx, incomingTrail);
+ assertNotEquals(vertex, null);
+ }
+
+ @Test(expected = AAIException.class)
+ public void nodeTypeSupportsPersona() throws AAIException {
+ String incomingTrail = "";
+ boolean vertex = processor.nodeTypeSupportsPersona(incomingTrail);
+ assertFalse(vertex);
+
+
+ incomingTrail = "test";
+ boolean vertex1 = processor.nodeTypeSupportsPersona(incomingTrail);
+ assertTrue(vertex1);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getNqElementWidgetType() throws AAIException{
+ String appId="test";
+ String transID="test";
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ String incomingTrail = "test";
+ String vertex1 = processor.getNqElementWidgetType(appId,transID,thisLevelElemVtx,incomingTrail);
+ assertNotEquals(vertex1,null);
+ }
+
+
+ @Test(expected = NullPointerException.class)
+ public void getModElementWidgetType() throws AAIException{
+ String appId="test";
+ String transID="test";
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ String incomingTrail = "test";
+ String vertex1 = processor.getModElementWidgetType(thisLevelElemVtx,incomingTrail);
+ assertNotEquals(vertex1,null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getNodeUsingUniqueId() throws AAIException{
+ String appId="test";
+ String transID="test";
+ String nodeType = "generic-vnf";
+ String idPropertyName = "test";
+ String uniqueIdVal="test";
+ Vertex vertex1 = processor.getNodeUsingUniqueId(transID,appId,nodeType,idPropertyName,uniqueIdVal);
+ assertNotEquals(vertex1,null);
+ }
+
+
+ @Test(expected = AAIException.class)
+ public void getNodeUsingUniqueIdNull() throws AAIException{
+ String appId="test";
+ String transID="test";
+ String nodeType = "generic-vnf";
+ String idPropertyName = "test";
+ String uniqueIdVal="";
+ Vertex vertex1 = null;
+ vertex1= processor.getNodeUsingUniqueId(transID,appId,nodeType,idPropertyName,uniqueIdVal);
+ assertNotEquals(vertex1,null);
+
+ }
+
+
+ @Test(expected = AAIException.class)
+ public void getNodeUsingUniqueIdNull1() throws AAIException{
+ String appId="test";
+ String transID="test";
+ String nodeType = "generic-vnf";
+ String idPropertyName="";
+ String uniqueIdVal="test";
+ Vertex vertex1 = null;
+ vertex1= processor.getNodeUsingUniqueId(transID,appId,nodeType,idPropertyName,uniqueIdVal);
+ assertNotEquals(vertex1,null);
+
+
+ }
+
+
+ @Test(expected = AAIException.class)
+ public void getNodeUsingUniqueIdNull2() throws AAIException{
+ String appId="test";
+ String transID="test";
+ String nodeType = "";
+ String idPropertyName="test";
+ String uniqueIdVal="test";
+ Vertex vertex1 = null;
+ vertex1= processor.getNodeUsingUniqueId(transID,appId,nodeType,idPropertyName,uniqueIdVal);
+ assertNotEquals(vertex1,null);
+
+
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getModelVersUsingName() throws AAIException{
+ String appId="test";
+ String transID="test";
+ String modelName = "test";
+
+ List<Vertex> result= processor.getModelVersUsingName(transID,appId,modelName);
+ assertNotEquals(result,null);
+ }
+
+
+ @Test(expected = AAIException.class)
+ public void getModelVersUsingNameNull() throws AAIException{
+ String appId="test";
+ String transID="test";
+ String modelName = "";
+
+ List<Vertex> result= processor.getModelVersUsingName(transID,appId,modelName);
+ assertNotEquals(result,null);
+ }
+
+
+ @Test(expected = NullPointerException.class)
+ public void getModVersUsingModelInvId() throws AAIException{
+ String appId="test";
+ String transID="test";
+ String modelName = "test";
+
+ Iterator<Vertex> result= processor.getModVersUsingModelInvId(transID,appId,modelName);
+ assertNotEquals(result,null);
+ }
+
+ @Test(expected = AAIException.class)
+ public void getModVersUsingModelInvIdNull() throws AAIException{
+ String appId="test";
+ String transID="test";
+ String modelName = "";
+
+ Iterator<Vertex> result= processor.getModVersUsingModelInvId(transID,appId,modelName);
+ assertNotEquals(result,null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getModVersUsingModel() throws AAIException{
+ String appId="test";
+ String transID="test";
+ String modelName = "test";
+ Vertex thisLevelElemVtx = new EmptyVertex();
+ List<Vertex> result= processor.getModVersUsingModel(transID,appId,thisLevelElemVtx);
+ assertNotEquals(result,null);
+ }
+
+ @Test(expected = AAIException.class)
+ public void getModVersUsingModel1() throws AAIException{
+ String appId="test";
+ String transID="test";
+
+ Vertex thisLevelElemVtx = null;
+ List<Vertex> result= processor.getModVersUsingModel(transID,appId,thisLevelElemVtx);
+ assertNotEquals(result,null);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getModelVerIdsUsingName() throws AAIException{
+ String appId="test";
+ String transID="test";
+
+ String modelName= "test";
+ List<String> result= processor.getModelVerIdsUsingName(transID,appId,modelName);
+ assertNotEquals(result,null);
+ }
+
+ @Test(expected = AAIException.class)
+ public void getModelVerIdsUsingName1() throws AAIException{
+ String appId="test";
+ String transID="test";
+
+ String modelName= "";
+ List<String> result= processor.getModelVerIdsUsingName(transID,appId,modelName);
+ assertNotEquals(result,null);
+ }
+
+ @Test(expected =NullPointerException.class)
+ public void validateModel() throws AAIException{
+ String appId="test";
+ String transID="test";
+
+ String modelVersionId= "test";
+ String modelInvId= "test";
+ String modelName= "test";
+ processor.validateModel(transID,appId,modelName,modelVersionId);
+
+
+ }
+
+
+
+}
+
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessingTest.java b/aai-traversal/src/test/java/org/onap/aai/dbgraphgen/ModelBasedProcessingTest.java
index 64e723b..406d122 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/dbgraphgen/ModelBasedProcessingTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/dbgraphgen/ModelBasedProcessingTest.java
@@ -1,541 +1,542 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.openecomp.aai
- * ================================================================================
- * 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.aai.dbgraphgen;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import com.bazaarvoice.jolt.modifier.DataType;
-import com.google.common.collect.Multimap;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.*;
-import org.mockito.internal.exceptions.MockitoLimitations;
-import org.mockito.runners.MockitoJUnitRunner;
-import org.openecomp.aai.db.DbMethHelper;
-import org.openecomp.aai.db.props.AAIProperties;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.introspection.Introspector;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.LoaderFactory;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.exceptions.AAIUnknownObjectException;
-import org.openecomp.aai.parsers.exceptions.AAIIdentityMapParseException;
-import org.openecomp.aai.query.builder.GraphTraversalBuilder;
-import org.openecomp.aai.query.builder.QueryBuilder;
-import org.openecomp.aai.query.builder.TraversalQuery;
-import org.openecomp.aai.schema.enums.PropertyMetadata;
-import org.openecomp.aai.serialization.db.DBSerializer;
-import org.openecomp.aai.serialization.db.EdgeType;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.powermock.modules.junit4.PowerMockRunner;
-import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
-
-import java.util.*;
-
-@RunWith(MockitoJUnitRunner.class)
-public class ModelBasedProcessingTest {
-
- @Mock private static TransactionalGraphEngine dbEngine;
- private static Loader loader;
- @Mock private static DBSerializer serializer;
- @Mock private static TransactionalGraphEngine.Admin admin;
- ModelBasedProcessing mockProcessor;
- @Mock
- private DbMethHelper dbMethHelper;
-
- @BeforeClass
- public static void configure() throws Exception {
- System.setProperty("AJSC_HOME", ".");
- System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local");
- loader = LoaderFactory.createLoaderForVersion(ModelType.MOXY, AAIProperties.LATEST);
-
-
- }
-
- @Before
- public void init() {
- mockProcessor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- MockitoAnnotations.initMocks(this);
- }
-
- @Test
- public void testPropNameChange1() throws AAIUnknownObjectException {
- String result;
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- result = processor.getPropNameWithAliasIfNeeded("generic-vnf", "model-invariant-id");
- assertEquals("result has -local tacked on the end as it should", "model-invariant-id" + AAIProperties.DB_ALIAS_SUFFIX, result);
- result = processor.getPropNameWithAliasIfNeeded("generic-vnf", "vnf-id");
- assertEquals("result does NOT have -local tacked on the end as it should", "vnf-id", result);
- result = processor.getPropNameWithAliasIfNeeded("generic-vnf", "model-invariant-id" + AAIProperties.DB_ALIAS_SUFFIX);
- assertEquals("property not modified because it already includes the right suffix", "model-invariant-id" + AAIProperties.DB_ALIAS_SUFFIX, result);
- }
-
- @Mock
- GraphTraversal<Vertex, Vertex> v;
- @Mock
- GraphTraversal<Vertex, Vertex> graphTraversal;
- @Mock
- GraphTraversalSource graphTraversalSource;
- @Mock Iterable <?> uniqVerts;
- List<Vertex> vertexList=new ArrayList<>();
- @Mock Vertex vertex;
- @Mock Vertex vertex1;
- @Mock
- QueryBuilder<Vertex> queryBuilder;
-
- EdgeType treeType;
- @Test(expected = NullPointerException.class)
- public void getStartNodesAndModVersionIds() throws AAIException{
-
- vertex.property("model-ver","model-version-id");
- vertex1.property(AAIProperties.NODE_TYPE,"model-ver");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- vertexList.add(vertex);
- //vertexList.add(vertex1);
- Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
- Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
- Mockito.when(graphTraversalSource.V()).thenReturn(v);
- Mockito.when(v.has(AAIProperties.NODE_TYPE,"model-ver")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.has("model-ver","model-version-id")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- //this.engine.getQueryBuilder(startV).createEdgeTraversal(treeType, startV, loader.introspectorFromName(connectedNodeType));
-
- queryBuilder.toList().add(vertex);
- Mockito.when(dbEngine.getQueryBuilder(vertex)).thenReturn(queryBuilder);
-
- Introspector obj=loader.introspectorFromName("model-ver");
-
- Mockito.when(queryBuilder.createEdgeTraversal(EdgeType.TREE,vertex,obj)).thenReturn(queryBuilder);
- //Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","model-ver","model-version-id","vnf-id-1");
-
-
- List<Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<>();
-
- Map<String,String> result1=processor.getStartNodesAndModVersionIds("9999","postmen","vnf-id-1","vnf-id-1",
- "vnf-id","generic-vnf",startNodeFilterArrayOfHashes,"");
- }
-
-
- @Test(expected = AAIException.class)
- public void getStartNodesAndModVersionIds1() throws AAIException{
-
- vertex.property("model-version-id","vnf-id-1");
- vertex1.property(AAIProperties.NODE_TYPE,"model-ver");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- vertexList.add(vertex);
- //vertexList.add(vertex1);
- Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
- Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
- Mockito.when(graphTraversalSource.V()).thenReturn(v);
- Mockito.when(v.has(AAIProperties.NODE_TYPE,"model-ver")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.has("model-version-id","vnf-id-1")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- //this.engine.getQueryBuilder(startV).createEdgeTraversal(treeType, startV, loader.introspectorFromName(connectedNodeType));
-
- queryBuilder.toList().add(vertex);
- Mockito.when(dbEngine.getQueryBuilder(vertex)).thenReturn(queryBuilder);
-
- Introspector obj=loader.introspectorFromName("generic-vnf");
- Mockito.when(queryBuilder.createEdgeTraversal(EdgeType.TREE,vertex,obj)).thenReturn(queryBuilder);
- //Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","model-ver","model-version-id","vnf-id-1");
-
-
- List<Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<>();
-
- Map<String,String> result1=processor.getStartNodesAndModVersionIds("9999","postmen","vnf-id-1","vnf-id-1",
- "vnf-id","generic-vnf",startNodeFilterArrayOfHashes,"");
- }
-
- @Test
- public void getNodeUsingUniqueIdTest() throws AAIException{
- vertex.property("vnf-id","vnf-id-1");
- vertex1.property(AAIProperties.NODE_TYPE,"generic-vnf");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- vertexList.add(vertex);
- //vertexList.add(vertex1);
- Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
- Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
- Mockito.when(graphTraversalSource.V()).thenReturn(v);
- Mockito.when(v.has(AAIProperties.NODE_TYPE,"generic-vnf")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.has("vnf-id","vnf-id-1")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","vnf-id","vnf-id-1");
-
- assertNotNull(result);
- }
-
- @Test
- public void getNodeUsingUniqueIdTest1() throws AAIException{
- vertex.property("named-query-uui","vnf-id-1");
- vertex1.property(AAIProperties.NODE_TYPE,"named-query");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- vertexList.add(vertex);
- //vertexList.add(vertex1);
- Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
- Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
- Mockito.when(graphTraversalSource.V()).thenReturn(v);
- Mockito.when(v.has(AAIProperties.NODE_TYPE,"named-query")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.has("named-query-uui","vnf-id-1")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","named-query","named-query-uui","vnf-id-1");
-
- assertNotNull(result);
- }
-
- @Test(expected = AAIException.class)
- public void getModelVersUsingNameTest() throws AAIException{
-
- vertex.property(AAIProperties.NODE_TYPE,"generic-vnf");
- vertex1.property("generic-vnf","generic-vnf");
- graphTraversal.addV(vertex1);
- v.addV(vertex1);
- vertexList.add(vertex);
- vertexList.add(vertex1);
- Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
- Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
- Mockito.when(graphTraversalSource.V()).thenReturn(v);
- Mockito.when(v.has(AAIProperties.NODE_TYPE,"model-ver")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.has("model-name","generic-vnf")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
- //Mockito.when(vertexList.listIterator().hasNext()).thenReturn(true);
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- List<Vertex> result=processor.getModelVersUsingName("9999","postment","generic-vnf");
-
- assertTrue(result.size()>0);
- }
-
- //uniqueIdVal Null Expecting AAI Excpetion
- @Test(expected = AAIException.class)
- public void getNodeUsingUniqueIdTestNull() throws AAIException{
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","vnf-id","");
-
-
- }
-
- //idPropertyName Null Expecting AAI Excpetion
- @Test(expected = AAIException.class)
- public void getNodeUsingUniqueIdTestNull1() throws AAIException{
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","","vnf-id-1");
-
-
- }
-
- //idPropertyName Null Expecting AAI Excpetion
- @Test(expected = AAIException.class)
- public void getNodeUsingUniqueIdTestNull2() throws AAIException{
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","","vnf-id","vnf-id-1");
-
-
- }
-
- @Test(expected = AAIException.class)
- public void getNodeUsingUniqueIdTestTwoVertex() throws AAIException{
- vertex.property("vnf-id","vnf-id-1");
- vertex1.property(AAIProperties.NODE_TYPE,"generic-vnf");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- vertexList.add(vertex);
- vertexList.add(vertex1);
- Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
- Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
- Mockito.when(graphTraversalSource.V()).thenReturn(v);
- Mockito.when(v.has(AAIProperties.NODE_TYPE,"generic-vnf")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.has("vnf-id","vnf-id-1")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","vnf-id","vnf-id-1");
-
- assertNotNull(result);
- }
-
- //uniqVerts Null Expection AAI Exception
- @Test(expected = AAIException.class)
- public void getNodeUsingUniqueIdTestVertexNull() throws AAIException{
- vertex.property("vnf-id","vnf-id-1");
- vertex1.property(AAIProperties.NODE_TYPE,"generic-vnf");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- vertexList.add(vertex);
- //vertexList.add(vertex1);
- Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
- Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
- Mockito.when(graphTraversalSource.V()).thenReturn(v);
- Mockito.when(v.has(AAIProperties.NODE_TYPE,"generic-vnf")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.has("vnf-id","vnf-id-1")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.toList()).thenReturn(null);
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","vnf-id","vnf-id-1");
-
- assertNotNull(result);
- }
-
- //uniqVerts Null Expection AAI Exception
- @Test(expected = AAIException.class)
- public void getNodeUsingUniqueIdTestVertexHasNot() throws AAIException{
- vertex.property("vnf-id","vnf-id-1");
- vertex1.property(AAIProperties.NODE_TYPE,"generic-vnf");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- //vertexList.add(vertex);
- //vertexList.add(vertex1);
- Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
- Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
- Mockito.when(graphTraversalSource.V()).thenReturn(v);
- Mockito.when(v.has(AAIProperties.NODE_TYPE,"generic-vnf")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.has("vnf-id","vnf-id-1")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","vnf-id","vnf-id-1");
-
- assertNotNull(result);
- }
-
- @Test(expected = AAIIdentityMapParseException.class)
- public void runDeleteByModelTest() throws AAIException{
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- Optional<Vertex> vertex=Optional.empty();
- Map<String,Object> startNodeFilterHash=new HashMap<>();
- startNodeFilterHash.put("related-link.data","relationshipdata");
- startNodeFilterHash.put("generic-vnf.d","relationshipdata");
- Mockito.when(dbMethHelper.searchVertexByIdentityMap("relationship-data",startNodeFilterHash)).thenReturn(vertex);
- Map<String,String> re =processor.runDeleteByModel("9999","postmen","","relationship-data",startNodeFilterHash,"vnf-id","vnf-id");
- assertNotNull(re);
-
-
- }
-
- @Test(expected = AAIException.class)
- public void getModelGivenModelVerTest() throws AAIException{
- vertex.property("named-query-uuid","vnf-id-1");
- vertex1.property(AAIProperties.NODE_TYPE,"named-query");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- vertexList.add(vertex);
- //vertexList.add(vertex1);
- Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
- Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
- Mockito.when(graphTraversalSource.V()).thenReturn(v);
- Mockito.when(v.has(AAIProperties.NODE_TYPE,"named-query")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.has("named-query-uuid","vnf-id-1")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
-
- QueryBuilder qub=Mockito.mock(QueryBuilder.class);
- qub.toList().addAll(vertexList);
- Mockito.when(dbEngine.getQueryBuilder(Mockito.any(Vertex.class))).thenReturn(queryBuilder);
-
- Mockito.when(queryBuilder.createEdgeTraversal(Mockito.any(EdgeType.class),Mockito.any(Vertex.class),Mockito.any(Introspector.class))).thenReturn(qub);
-
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- Vertex result=processor.getModelGivenModelVer(vertex,"");
- assertNotNull(result);
-
- }
-
- @Test(expected = AAIException.class)
- public void queryByNamedQuery_TimedTest() throws AAIException{
- vertex.property("named-query-uuid","named-query-element");
- vertex1.property(AAIProperties.NODE_TYPE,"named-query");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- vertexList.add(vertex);
- //vertexList.add(vertex1);
- Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
- Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
- Mockito.when(graphTraversalSource.V()).thenReturn(v);
- Mockito.when(v.has(AAIProperties.NODE_TYPE,"named-query")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.has("named-query-uuid","named-query-element")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
-
- QueryBuilder qub=Mockito.mock(QueryBuilder.class);
- qub.toList().addAll(vertexList);
- Mockito.when(dbEngine.getQueryBuilder(Mockito.any(Vertex.class))).thenReturn(queryBuilder);
-
- Mockito.when(queryBuilder.createEdgeTraversal(Mockito.any(EdgeType.class),Mockito.any(Vertex.class),Mockito.any(Introspector.class))).thenReturn(qub);
-
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- List<Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<>();
- Map<String,Object> secondaryFilterHash=new HashMap<>();
-
- List<ResultSet> res=processor.queryByNamedQuery_Timed("99999","postmen","named-query-element",startNodeFilterArrayOfHashes,"vnf","vnf",
- secondaryFilterHash);
-
-
- }
-
- @Test(expected = AAIException.class)
- public void genTopoMap4NamedQTest() throws AAIException{
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- vertex.property("named-query-uuid","named-query-element");
- vertex1.property(AAIProperties.NODE_TYPE,"named-query-element");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- vertexList.add(vertex);
- QueryBuilder qub=Mockito.mock(QueryBuilder.class);
- qub.toList().addAll(vertexList);
- Mockito.when(dbEngine.getQueryBuilder(Mockito.any(Vertex.class))).thenReturn(queryBuilder);
-
- Mockito.when(queryBuilder.createEdgeTraversal(Mockito.any(EdgeType.class),Mockito.any(Vertex.class),Mockito.any(Introspector.class))).thenReturn(qub);
-
- Multimap<String, String> map =processor.genTopoMap4NamedQ("9999","postmen",vertex,"named-query-element");
- }
-
- @Test(expected = AAIException.class)
- public void genTopoMap4NamedQTest1() throws AAIException{
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- vertex.property("named-query-uuid","named-query-element");
- vertex1.property(AAIProperties.NODE_TYPE,"named-query-element");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- vertexList.add(vertex);
- QueryBuilder qub=Mockito.mock(QueryBuilder.class);
- qub.toList().addAll(vertexList);
- Mockito.when(dbEngine.getQueryBuilder(Mockito.any(Vertex.class))).thenReturn(queryBuilder);
-
- Mockito.when(queryBuilder.createEdgeTraversal(Mockito.any(EdgeType.class),Mockito.any(Vertex.class),Mockito.any(Introspector.class))).thenReturn(qub);
-
- Multimap<String, String> map =processor.genTopoMap4NamedQ("9999","postmen",null,"named-query-element");
- }
-
- @Test(expected = AAIException.class)
- public void getModelThatNqElementRepresentsTest() throws AAIException{
- vertex.property("model-ver","named-query-element");
- vertex1.property(AAIProperties.NODE_TYPE,"named-query-element");
- graphTraversal.addV(vertex);
- v.addV(vertex1);
- vertexList.add(vertex);
- QueryBuilder qub=Mockito.mock(QueryBuilder.class);
- qub.toList().addAll(vertexList);
- Mockito.when(dbEngine.getQueryBuilder(Mockito.any(Vertex.class))).thenReturn(queryBuilder);
-
- Mockito.when(queryBuilder.createEdgeTraversal(Mockito.any(EdgeType.class),Mockito.any(Vertex.class),Mockito.any(Introspector.class))).thenReturn(qub);
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- Vertex v=processor.getModelThatNqElementRepresents(vertex,"g");
- }
-
- @Test(expected = NullPointerException.class)
- public void getModelTypeFromModel() throws AAIException{
- Vertex vt=Mockito.mock(Vertex.class);
- vt.property("model-type","named-query-element");
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- String v=processor.getModelTypeFromModel(vt,"g");
- }
-
- @Test(expected = AAIException.class)
- public void getModelTypeFromModel1() throws AAIException{
- Vertex vt=Mockito.mock(Vertex.class);
- vt.property("model-type","named-query-element");
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- String v=processor.getModelTypeFromModel(null,"g");
- }
-
- @Test(expected = NullPointerException.class)
- public void getModVersUsingModelInvId() throws AAIException{
-
- vertex.property(AAIProperties.NODE_TYPE,"model-invariant-id");
- vertex1.property("model","model-invariant-id");
- graphTraversal.addV(vertex1);
- v.addV(vertex1);
- vertexList.add(vertex);
- vertexList.add(vertex1);
- Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
- Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
- Mockito.when(graphTraversalSource.V()).thenReturn(v);
- Mockito.when(v.has(AAIProperties.NODE_TYPE,"model-invariant-id")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.has("model","model-invariant-id")).thenReturn(graphTraversal);
- Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- Iterator<Vertex> result=processor.getModVersUsingModelInvId("9999","postment","model");
- }
-
- @Test(expected = AAIException.class)
- public void getNamedQueryExtraDataLookupTest() throws AAIException{
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- Map<String,Object> re=processor.getNamedQueryExtraDataLookup("","",null,vertex,
- "");
- }
-
- @Test(expected = AAIException.class)
- public void getNamedQueryExtraDataLookupTest1() throws AAIException{
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
-
- Map<String,Object> re=processor.getNamedQueryExtraDataLookup("","",vertex,null,
- "");
- }
-
- @Test(expected = NullPointerException.class)
- public void showResultSet() throws AAIException{
- vertex.property("model-ver","model-versionId");
- vertex.property("aai","model-versionId");
-
-
- ResultSet rs= Mockito.mock(ResultSet.class);
- Mockito.when(rs.getVert()).thenReturn(vertex);
-
- List<VertexProperty<String>> vb=new ArrayList<>();
- VertexProperty<String> v=Mockito.mock(VertexProperty.class);
- v.property("model-ver","1");
- vb.add(v);
- v.property("aai","5");
- vb.add(v);
- v.property("source-of-truth","6");
- vb.add(v);
-
- vertex.properties("model-ver","aai");
- Mockito.when(vertex.<String>property(AAIProperties.NODE_TYPE)).thenReturn(v);
- //Mockito.when(vertex.properties()).thenReturn(Mockito.any());
- ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- processor.showResultSet(rs,8);
-
- }
-}
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.dbgraphgen;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import com.bazaarvoice.jolt.modifier.DataType;
+import com.google.common.collect.Multimap;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.*;
+import org.mockito.internal.exceptions.MockitoLimitations;
+import org.mockito.runners.MockitoJUnitRunner;
+import org.onap.aai.db.DbMethHelper;
+import org.onap.aai.db.props.AAIProperties;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.introspection.Introspector;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.exceptions.AAIUnknownObjectException;
+import org.onap.aai.parsers.exceptions.AAIIdentityMapParseException;
+import org.onap.aai.query.builder.GraphTraversalBuilder;
+import org.onap.aai.query.builder.QueryBuilder;
+import org.onap.aai.query.builder.TraversalQuery;
+import org.onap.aai.schema.enums.PropertyMetadata;
+import org.onap.aai.serialization.db.DBSerializer;
+import org.onap.aai.serialization.db.EdgeType;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.powermock.modules.junit4.PowerMockRunner;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+import java.util.*;
+
+@RunWith(MockitoJUnitRunner.class)
+public class ModelBasedProcessingTest {
+
+ @Mock private static TransactionalGraphEngine dbEngine;
+ private static Loader loader;
+ @Mock private static DBSerializer serializer;
+ @Mock private static TransactionalGraphEngine.Admin admin;
+ ModelBasedProcessing mockProcessor;
+ @Mock
+ private DbMethHelper dbMethHelper;
+
+ @BeforeClass
+ public static void configure() throws Exception {
+ System.setProperty("AJSC_HOME", ".");
+ System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local");
+ loader = LoaderFactory.createLoaderForVersion(ModelType.MOXY, AAIProperties.LATEST);
+
+
+ }
+
+ @Before
+ public void init() {
+ mockProcessor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ MockitoAnnotations.initMocks(this);
+ }
+
+ @Test
+ public void testPropNameChange1() throws AAIUnknownObjectException {
+ String result;
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ result = processor.getPropNameWithAliasIfNeeded("generic-vnf", "model-invariant-id");
+ assertEquals("result has -local tacked on the end as it should", "model-invariant-id" + AAIProperties.DB_ALIAS_SUFFIX, result);
+ result = processor.getPropNameWithAliasIfNeeded("generic-vnf", "vnf-id");
+ assertEquals("result does NOT have -local tacked on the end as it should", "vnf-id", result);
+ result = processor.getPropNameWithAliasIfNeeded("generic-vnf", "model-invariant-id" + AAIProperties.DB_ALIAS_SUFFIX);
+ assertEquals("property not modified because it already includes the right suffix", "model-invariant-id" + AAIProperties.DB_ALIAS_SUFFIX, result);
+ }
+
+ @Mock
+ GraphTraversal<Vertex, Vertex> v;
+ @Mock
+ GraphTraversal<Vertex, Vertex> graphTraversal;
+ @Mock
+ GraphTraversalSource graphTraversalSource;
+ @Mock Iterable <?> uniqVerts;
+ List<Vertex> vertexList=new ArrayList<>();
+ @Mock Vertex vertex;
+ @Mock Vertex vertex1;
+ @Mock
+ QueryBuilder<Vertex> queryBuilder;
+
+ EdgeType treeType;
+ @Test(expected = NullPointerException.class)
+ public void getStartNodesAndModVersionIds() throws AAIException{
+
+ vertex.property("model-ver","model-version-id");
+ vertex1.property(AAIProperties.NODE_TYPE,"model-ver");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ //vertexList.add(vertex1);
+ Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
+ Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
+ Mockito.when(graphTraversalSource.V()).thenReturn(v);
+ Mockito.when(v.has(AAIProperties.NODE_TYPE,"model-ver")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.has("model-ver","model-version-id")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ //this.engine.getQueryBuilder(startV).createEdgeTraversal(treeType, startV, loader.introspectorFromName(connectedNodeType));
+
+ queryBuilder.toList().add(vertex);
+ Mockito.when(dbEngine.getQueryBuilder(vertex)).thenReturn(queryBuilder);
+
+ Introspector obj=loader.introspectorFromName("model-ver");
+
+ Mockito.when(queryBuilder.createEdgeTraversal(EdgeType.TREE,vertex,obj)).thenReturn(queryBuilder);
+ //Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","model-ver","model-version-id","vnf-id-1");
+
+
+ List<Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<>();
+
+ Map<String,String> result1=processor.getStartNodesAndModVersionIds("9999","postmen","vnf-id-1","vnf-id-1",
+ "vnf-id","generic-vnf",startNodeFilterArrayOfHashes,"");
+ }
+
+
+ @Test(expected = AAIException.class)
+ public void getStartNodesAndModVersionIds1() throws AAIException{
+
+ vertex.property("model-version-id","vnf-id-1");
+ vertex1.property(AAIProperties.NODE_TYPE,"model-ver");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ //vertexList.add(vertex1);
+ Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
+ Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
+ Mockito.when(graphTraversalSource.V()).thenReturn(v);
+ Mockito.when(v.has(AAIProperties.NODE_TYPE,"model-ver")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.has("model-version-id","vnf-id-1")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ //this.engine.getQueryBuilder(startV).createEdgeTraversal(treeType, startV, loader.introspectorFromName(connectedNodeType));
+
+ queryBuilder.toList().add(vertex);
+ Mockito.when(dbEngine.getQueryBuilder(vertex)).thenReturn(queryBuilder);
+
+ Introspector obj=loader.introspectorFromName("generic-vnf");
+ Mockito.when(queryBuilder.createEdgeTraversal(EdgeType.TREE,vertex,obj)).thenReturn(queryBuilder);
+ //Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","model-ver","model-version-id","vnf-id-1");
+
+
+ List<Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<>();
+
+ Map<String,String> result1=processor.getStartNodesAndModVersionIds("9999","postmen","vnf-id-1","vnf-id-1",
+ "vnf-id","generic-vnf",startNodeFilterArrayOfHashes,"");
+ }
+
+ @Test
+ public void getNodeUsingUniqueIdTest() throws AAIException{
+ vertex.property("vnf-id","vnf-id-1");
+ vertex1.property(AAIProperties.NODE_TYPE,"generic-vnf");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ //vertexList.add(vertex1);
+ Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
+ Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
+ Mockito.when(graphTraversalSource.V()).thenReturn(v);
+ Mockito.when(v.has(AAIProperties.NODE_TYPE,"generic-vnf")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.has("vnf-id","vnf-id-1")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","vnf-id","vnf-id-1");
+
+ assertNotNull(result);
+ }
+
+ @Test
+ public void getNodeUsingUniqueIdTest1() throws AAIException{
+ vertex.property("named-query-uui","vnf-id-1");
+ vertex1.property(AAIProperties.NODE_TYPE,"named-query");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ //vertexList.add(vertex1);
+ Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
+ Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
+ Mockito.when(graphTraversalSource.V()).thenReturn(v);
+ Mockito.when(v.has(AAIProperties.NODE_TYPE,"named-query")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.has("named-query-uui","vnf-id-1")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","named-query","named-query-uui","vnf-id-1");
+
+ assertNotNull(result);
+ }
+
+ @Test(expected = AAIException.class)
+ public void getModelVersUsingNameTest() throws AAIException{
+
+ vertex.property(AAIProperties.NODE_TYPE,"generic-vnf");
+ vertex1.property("generic-vnf","generic-vnf");
+ graphTraversal.addV(vertex1);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ vertexList.add(vertex1);
+ Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
+ Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
+ Mockito.when(graphTraversalSource.V()).thenReturn(v);
+ Mockito.when(v.has(AAIProperties.NODE_TYPE,"model-ver")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.has("model-name","generic-vnf")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
+ //Mockito.when(vertexList.listIterator().hasNext()).thenReturn(true);
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ List<Vertex> result=processor.getModelVersUsingName("9999","postment","generic-vnf");
+
+ assertTrue(result.size()>0);
+ }
+
+ //uniqueIdVal Null Expecting AAI Excpetion
+ @Test(expected = AAIException.class)
+ public void getNodeUsingUniqueIdTestNull() throws AAIException{
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","vnf-id","");
+
+
+ }
+
+ //idPropertyName Null Expecting AAI Excpetion
+ @Test(expected = AAIException.class)
+ public void getNodeUsingUniqueIdTestNull1() throws AAIException{
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","","vnf-id-1");
+
+
+ }
+
+ //idPropertyName Null Expecting AAI Excpetion
+ @Test(expected = AAIException.class)
+ public void getNodeUsingUniqueIdTestNull2() throws AAIException{
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","","vnf-id","vnf-id-1");
+
+
+ }
+
+ @Test(expected = AAIException.class)
+ public void getNodeUsingUniqueIdTestTwoVertex() throws AAIException{
+ vertex.property("vnf-id","vnf-id-1");
+ vertex1.property(AAIProperties.NODE_TYPE,"generic-vnf");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ vertexList.add(vertex1);
+ Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
+ Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
+ Mockito.when(graphTraversalSource.V()).thenReturn(v);
+ Mockito.when(v.has(AAIProperties.NODE_TYPE,"generic-vnf")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.has("vnf-id","vnf-id-1")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","vnf-id","vnf-id-1");
+
+ assertNotNull(result);
+ }
+
+ //uniqVerts Null Expection AAI Exception
+ @Test(expected = AAIException.class)
+ public void getNodeUsingUniqueIdTestVertexNull() throws AAIException{
+ vertex.property("vnf-id","vnf-id-1");
+ vertex1.property(AAIProperties.NODE_TYPE,"generic-vnf");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ //vertexList.add(vertex1);
+ Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
+ Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
+ Mockito.when(graphTraversalSource.V()).thenReturn(v);
+ Mockito.when(v.has(AAIProperties.NODE_TYPE,"generic-vnf")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.has("vnf-id","vnf-id-1")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.toList()).thenReturn(null);
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","vnf-id","vnf-id-1");
+
+ assertNotNull(result);
+ }
+
+ //uniqVerts Null Expection AAI Exception
+ @Test(expected = AAIException.class)
+ public void getNodeUsingUniqueIdTestVertexHasNot() throws AAIException{
+ vertex.property("vnf-id","vnf-id-1");
+ vertex1.property(AAIProperties.NODE_TYPE,"generic-vnf");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ //vertexList.add(vertex);
+ //vertexList.add(vertex1);
+ Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
+ Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
+ Mockito.when(graphTraversalSource.V()).thenReturn(v);
+ Mockito.when(v.has(AAIProperties.NODE_TYPE,"generic-vnf")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.has("vnf-id","vnf-id-1")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ Vertex result=processor.getNodeUsingUniqueId("9999", "postmen","generic-vnf","vnf-id","vnf-id-1");
+
+ assertNotNull(result);
+ }
+
+ @Test(expected = AAIIdentityMapParseException.class)
+ public void runDeleteByModelTest() throws AAIException{
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ Optional<Vertex> vertex=Optional.empty();
+ Map<String,Object> startNodeFilterHash=new HashMap<>();
+ startNodeFilterHash.put("related-link.data","relationshipdata");
+ startNodeFilterHash.put("generic-vnf.d","relationshipdata");
+ Mockito.when(dbMethHelper.searchVertexByIdentityMap("relationship-data",startNodeFilterHash)).thenReturn(vertex);
+ Map<String,String> re =processor.runDeleteByModel("9999","postmen","","relationship-data",startNodeFilterHash,"vnf-id","vnf-id");
+ assertNotNull(re);
+
+
+ }
+
+ @Test(expected = AAIException.class)
+ public void getModelGivenModelVerTest() throws AAIException{
+ vertex.property("named-query-uuid","vnf-id-1");
+ vertex1.property(AAIProperties.NODE_TYPE,"named-query");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ //vertexList.add(vertex1);
+ Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
+ Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
+ Mockito.when(graphTraversalSource.V()).thenReturn(v);
+ Mockito.when(v.has(AAIProperties.NODE_TYPE,"named-query")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.has("named-query-uuid","vnf-id-1")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
+
+ QueryBuilder qub=Mockito.mock(QueryBuilder.class);
+ qub.toList().addAll(vertexList);
+ Mockito.when(dbEngine.getQueryBuilder(Mockito.any(Vertex.class))).thenReturn(queryBuilder);
+
+ Mockito.when(queryBuilder.createEdgeTraversal(Mockito.any(EdgeType.class),Mockito.any(Vertex.class),Mockito.any(Introspector.class))).thenReturn(qub);
+
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ Vertex result=processor.getModelGivenModelVer(vertex,"");
+ assertNotNull(result);
+
+ }
+
+ @Test(expected = AAIException.class)
+ public void queryByNamedQuery_TimedTest() throws AAIException{
+ vertex.property("named-query-uuid","named-query-element");
+ vertex1.property(AAIProperties.NODE_TYPE,"named-query");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ //vertexList.add(vertex1);
+ Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
+ Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
+ Mockito.when(graphTraversalSource.V()).thenReturn(v);
+ Mockito.when(v.has(AAIProperties.NODE_TYPE,"named-query")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.has("named-query-uuid","named-query-element")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
+
+ QueryBuilder qub=Mockito.mock(QueryBuilder.class);
+ qub.toList().addAll(vertexList);
+ Mockito.when(dbEngine.getQueryBuilder(Mockito.any(Vertex.class))).thenReturn(queryBuilder);
+
+ Mockito.when(queryBuilder.createEdgeTraversal(Mockito.any(EdgeType.class),Mockito.any(Vertex.class),Mockito.any(Introspector.class))).thenReturn(qub);
+
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ List<Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<>();
+ Map<String,Object> secondaryFilterHash=new HashMap<>();
+
+ List<ResultSet> res=processor.queryByNamedQuery_Timed("99999","postmen","named-query-element",startNodeFilterArrayOfHashes,"vnf","vnf",
+ secondaryFilterHash);
+
+
+ }
+
+ @Test(expected = AAIException.class)
+ public void genTopoMap4NamedQTest() throws AAIException{
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ vertex.property("named-query-uuid","named-query-element");
+ vertex1.property(AAIProperties.NODE_TYPE,"named-query-element");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ QueryBuilder qub=Mockito.mock(QueryBuilder.class);
+ qub.toList().addAll(vertexList);
+ Mockito.when(dbEngine.getQueryBuilder(Mockito.any(Vertex.class))).thenReturn(queryBuilder);
+
+ Mockito.when(queryBuilder.createEdgeTraversal(Mockito.any(EdgeType.class),Mockito.any(Vertex.class),Mockito.any(Introspector.class))).thenReturn(qub);
+
+ Multimap<String, String> map =processor.genTopoMap4NamedQ("9999","postmen",vertex,"named-query-element");
+ }
+
+ @Test(expected = AAIException.class)
+ public void genTopoMap4NamedQTest1() throws AAIException{
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ vertex.property("named-query-uuid","named-query-element");
+ vertex1.property(AAIProperties.NODE_TYPE,"named-query-element");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ QueryBuilder qub=Mockito.mock(QueryBuilder.class);
+ qub.toList().addAll(vertexList);
+ Mockito.when(dbEngine.getQueryBuilder(Mockito.any(Vertex.class))).thenReturn(queryBuilder);
+
+ Mockito.when(queryBuilder.createEdgeTraversal(Mockito.any(EdgeType.class),Mockito.any(Vertex.class),Mockito.any(Introspector.class))).thenReturn(qub);
+
+ Multimap<String, String> map =processor.genTopoMap4NamedQ("9999","postmen",null,"named-query-element");
+ }
+
+ @Test(expected = AAIException.class)
+ public void getModelThatNqElementRepresentsTest() throws AAIException{
+ vertex.property("model-ver","named-query-element");
+ vertex1.property(AAIProperties.NODE_TYPE,"named-query-element");
+ graphTraversal.addV(vertex);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ QueryBuilder qub=Mockito.mock(QueryBuilder.class);
+ qub.toList().addAll(vertexList);
+ Mockito.when(dbEngine.getQueryBuilder(Mockito.any(Vertex.class))).thenReturn(queryBuilder);
+
+ Mockito.when(queryBuilder.createEdgeTraversal(Mockito.any(EdgeType.class),Mockito.any(Vertex.class),Mockito.any(Introspector.class))).thenReturn(qub);
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ Vertex v=processor.getModelThatNqElementRepresents(vertex,"g");
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getModelTypeFromModel() throws AAIException{
+ Vertex vt=Mockito.mock(Vertex.class);
+ vt.property("model-type","named-query-element");
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ String v=processor.getModelTypeFromModel(vt,"g");
+ }
+
+ @Test(expected = AAIException.class)
+ public void getModelTypeFromModel1() throws AAIException{
+ Vertex vt=Mockito.mock(Vertex.class);
+ vt.property("model-type","named-query-element");
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ String v=processor.getModelTypeFromModel(null,"g");
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void getModVersUsingModelInvId() throws AAIException{
+
+ vertex.property(AAIProperties.NODE_TYPE,"model-invariant-id");
+ vertex1.property("model","model-invariant-id");
+ graphTraversal.addV(vertex1);
+ v.addV(vertex1);
+ vertexList.add(vertex);
+ vertexList.add(vertex1);
+ Mockito.when(dbEngine.asAdmin()).thenReturn(admin);
+ Mockito.when(admin.getReadOnlyTraversalSource()).thenReturn(graphTraversalSource);
+ Mockito.when(graphTraversalSource.V()).thenReturn(v);
+ Mockito.when(v.has(AAIProperties.NODE_TYPE,"model-invariant-id")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.has("model","model-invariant-id")).thenReturn(graphTraversal);
+ Mockito.when(graphTraversal.toList()).thenReturn(vertexList);
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ Iterator<Vertex> result=processor.getModVersUsingModelInvId("9999","postment","model");
+ }
+
+ @Test(expected = AAIException.class)
+ public void getNamedQueryExtraDataLookupTest() throws AAIException{
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ Map<String,Object> re=processor.getNamedQueryExtraDataLookup("","",null,vertex,
+ "");
+ }
+
+ @Test(expected = AAIException.class)
+ public void getNamedQueryExtraDataLookupTest1() throws AAIException{
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+
+ Map<String,Object> re=processor.getNamedQueryExtraDataLookup("","",vertex,null,
+ "");
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void showResultSet() throws AAIException{
+ vertex.property("model-ver","model-versionId");
+ vertex.property("aai","model-versionId");
+
+
+ ResultSet rs= Mockito.mock(ResultSet.class);
+ Mockito.when(rs.getVert()).thenReturn(vertex);
+
+ List<VertexProperty<String>> vb=new ArrayList<>();
+ VertexProperty<String> v=Mockito.mock(VertexProperty.class);
+ v.property("model-ver","1");
+ vb.add(v);
+ v.property("aai","5");
+ vb.add(v);
+ v.property("source-of-truth","6");
+ vb.add(v);
+
+ vertex.properties("model-ver","aai");
+ Mockito.when(vertex.<String>property(AAIProperties.NODE_TYPE)).thenReturn(v);
+ //Mockito.when(vertex.properties()).thenReturn(Mockito.any());
+ ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ processor.showResultSet(rs,8);
+
+ }
+}
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/dbgraphmap/SearchGraphTest.java b/aai-traversal/src/test/java/org/onap/aai/dbgraphmap/SearchGraphTest.java
index 49ad810..f624828 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/dbgraphmap/SearchGraphTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/dbgraphmap/SearchGraphTest.java
@@ -1,378 +1,379 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.openecomp.aai
- * ================================================================================
- * 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.aai.dbgraphmap;
-
-import com.thinkaurelius.titan.core.TitanGraph;
-import com.thinkaurelius.titan.graphdb.types.system.EmptyVertex;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.apache.tinkerpop.gremlin.structure.VertexProperty;
-import org.apache.velocity.util.ArrayListWrapper;
-import org.eclipse.persistence.dynamic.DynamicEntity;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.InjectMocks;
-import org.mockito.Mock;
-import org.mockito.Mockito;
-import org.openecomp.aai.dbgraphgen.ModelBasedProcessing;
-import org.openecomp.aai.dbmap.DBConnectionType;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.extensions.AAIExtensionMap;
-import org.openecomp.aai.introspection.*;
-import org.openecomp.aai.parsers.relationship.RelationshipToURI;
-import org.openecomp.aai.serialization.db.DBSerializer;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TitanDBEngine;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.openecomp.aai.serialization.queryformats.utils.UrlBuilder;
-
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.*;
-import java.net.URI;
-import java.sql.ResultSet;
-import java.util.*;
-import java.util.stream.Stream;
-
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Mockito.*;
-
-public class SearchGraphTest {
-
- private SearchGraph searchGraph;
-
- protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json");
-
- private static final Set<Integer> VALID_HTTP_STATUS_CODES = new HashSet<>();
-
- private final static Version version = Version.getLatest();
- private final static ModelType introspectorFactoryType = ModelType.MOXY;
- private final static QueryStyle queryStyle = QueryStyle.TRAVERSAL;
- private final static DBConnectionType type = DBConnectionType.REALTIME;
-
- static {
- VALID_HTTP_STATUS_CODES.add(200);
- VALID_HTTP_STATUS_CODES.add(201);
- VALID_HTTP_STATUS_CODES.add(204);
- }
-
- private HttpHeaders httpHeaders;
-
- private UriInfo uriInfo;
-
- private MultivaluedMap<String, String> headersMultiMap;
- private MultivaluedMap<String, String> queryParameters;
-
- private List<String> aaiRequestContextList;
-
- private List<MediaType> outputMediaTypes;
-
- private Loader loader;
- private TitanGraph graph;
-
- private Graph tx;
-
- private GraphTraversalSource g;
- private TransactionalGraphEngine dbEngine;
-
- @Before
- public void setup(){
-
- System.setProperty("AJSC_HOME", ".");
- System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local");
-
- searchGraph = new SearchGraph();
-
- httpHeaders = mock(HttpHeaders.class);
- uriInfo = mock(UriInfo.class);
-
- headersMultiMap = new MultivaluedHashMap<>();
- queryParameters = Mockito.spy(new MultivaluedHashMap<>());
-
- headersMultiMap.add("X-FromAppId", "JUNIT");
- headersMultiMap.add("X-TransactionId", UUID.randomUUID().toString());
- headersMultiMap.add("Real-Time", "true");
- headersMultiMap.add("Accept", "application/json");
- headersMultiMap.add("aai-request-context", "");
-
- outputMediaTypes = new ArrayList<>();
- outputMediaTypes.add(APPLICATION_JSON);
-
- aaiRequestContextList = new ArrayList<>();
- aaiRequestContextList.add("");
-
- when(httpHeaders.getAcceptableMediaTypes()).thenReturn(outputMediaTypes);
- when(httpHeaders.getRequestHeaders()).thenReturn(headersMultiMap);
- when(httpHeaders.getRequestHeader("X-FromAppId")).thenReturn(Arrays.asList("JUNIT"));
- when(httpHeaders.getRequestHeader("X-TransactionId")).thenReturn(Arrays.asList("JUNIT"));
-
- when(httpHeaders.getRequestHeader("aai-request-context")).thenReturn(aaiRequestContextList);
-
-
- when(uriInfo.getQueryParameters()).thenReturn(queryParameters);
- when(uriInfo.getQueryParameters(false)).thenReturn(queryParameters);
-
- // TODO - Check if this is valid since RemoveDME2QueryParameters seems to be very unreasonable
- Mockito.doReturn(null).when(queryParameters).remove(anyObject());
-
- when(httpHeaders.getMediaType()).thenReturn(APPLICATION_JSON);
- loader = LoaderFactory.createLoaderForVersion(introspectorFactoryType, version);
- dbEngine = new TitanDBEngine(
- queryStyle,
- type,
- loader);
- }
-
-@Test(expected = AAIException.class)
- public void runNodesQuery() throws AAIException{
- DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
- UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
- searchGraph.runNodesQuery(httpHeaders,"",null,
- null,dbEngine,loader,urlBuilder);
- }
- @Test(expected = AAIException.class)
- public void runNodesQueryNull() throws AAIException{
- DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
- UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
- searchGraph.runNodesQuery(httpHeaders,"nnn",null,
- null,dbEngine,loader,urlBuilder);
- }
- @Test(expected = AAIException.class)
- public void testRunGenericQueryFailWhenInvalidRelationshipList() throws AAIException {
-
- List<String> keys = new ArrayList<>();
- keys.add("cloud-region.cloud-owner:test-aic");
-
- List<String> includeStrings = new ArrayList<>();
- includeStrings.add("cloud-region");
-
- DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
- UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
- Response response = searchGraph.runGenericQuery(httpHeaders, "service-instance", keys, includeStrings, 1, dbEngine, loader, urlBuilder);
- System.out.println(response);
- }
-
-
- @Test(expected = AAIException.class)
- public void testRunGenericQueryFailWhenInvalidRelationshipList1() throws AAIException {
-
- List<String> keys = new ArrayList<>();
- keys.add("cloud-region.cloud-owner:test-aic");
-
- List<String> includeStrings = new ArrayList<>();
- includeStrings.add("cloud-region");
-
- DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
- UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
- Response response = searchGraph.runGenericQuery(httpHeaders, null, keys, includeStrings, 1, dbEngine, loader, urlBuilder);
- System.out.println(response);
- }
-
- @Test(expected = AAIException.class)
- public void testRunGenericQueryFailWhenInvalidRelationshipList2() throws AAIException {
-
- List<String> keys = new ArrayList<>();
- keys.add("cloud-region.cloud-owner:test-aic");
-
- List<String> includeStrings = new ArrayList<>();
- includeStrings.add("cloud-region");
-
- DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
- UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
- Response response = searchGraph.runGenericQuery(httpHeaders, "", null, includeStrings, 1, dbEngine, loader, urlBuilder);
- System.out.println(response);
- }
-
- @Test(expected = AAIException.class)
- public void testRunGenericQueryFailWhenInvalidRelationshipList3() throws AAIException {
-
- List<String> keys = new ArrayList<>();
- keys.add("cloud-region.cloud-owner:test-aic");
-
- List<String> includeStrings = new ArrayList<>();
- includeStrings.add("cloud-region");
-
- DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
- UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
- Response response = searchGraph.runGenericQuery(httpHeaders, "", keys, null, 1, dbEngine, loader, urlBuilder);
- System.out.println(response);
- }
-
-
- /*@Test(expected = NullPointerException.class)
- public void createSearchResults() throws AAIException {
-
- List<Vertex> keys = new ArrayList<>();
- Vertex vertex=new EmptyVertex();
- keys.add(vertex);
-
-
-
- List<String> includeStrings = new ArrayList<>();
- includeStrings.add("cloud-region");
-
- DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
- UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
- Introspector response = searchGraph.createSearchResults(loader, urlBuilder, keys);
- System.out.println(response);
- }*/
- @Test
- public void createSearchResults1() throws Exception {
-
- List<Vertex> keys = new ArrayList<>();
- Vertex vertex=new EmptyVertex();
- keys.add(vertex);
- DBSerializer ds=mock(DBSerializer.class);
- UrlBuilder urlBuilder=mock(UrlBuilder.class);
- when(urlBuilder.pathed(vertex)).thenReturn("cloud-region");
- Stream<Vertex> stream=mock(Stream.class);
- when(stream.isParallel()).thenReturn(true);
- List<String> includeStrings = new ArrayList<>();
- includeStrings.add("cloud-region");
- RelationshipToURI relationshipToURI=mock(RelationshipToURI.class);
- URI uri =new URI("");
- when(relationshipToURI.getUri()).thenReturn(uri);
-
- DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
- // UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
- Introspector response = searchGraph.createSearchResults(loader, urlBuilder, keys);
- System.out.println(response);
- }
- @Test(expected = AAIException.class)
- public void executeModelOperationTest() throws Exception{
- Vertex vertex=new EmptyVertex();
- vertex.property("model-name");
- Map<String,Object> mapObj=new HashMap<String,Object>();
- mapObj.put("modle-version",vertex);
- List<Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<>();
- startNodeFilterArrayOfHashes.add(mapObj);
- List<org.openecomp.aai.dbgraphgen.ResultSet> resultSet=new ArrayList<org.openecomp.aai.dbgraphgen.ResultSet>();
- DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
- // ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- AAIExtensionMap map=mock(AAIExtensionMap.class);
- HttpServletRequest servletRequest=mock(HttpServletRequest.class);
-
- when(map.getHttpServletRequest()).thenReturn(servletRequest);
- when(servletRequest.getContentType()).thenReturn("application/json");
- DynamicEntity modelAndNamedQuerySearch=mock(DynamicEntity.class);
- when(modelAndNamedQuerySearch.isSet("topNodeType")).thenReturn(true);
-
-
-/* when(processor.queryByModel("9999","model-ver","model-version-id",
- "model-inv-id","modelname","aai",
- startNodeFilterArrayOfHashes,"aai-ver")).thenReturn(resultSet);*/
-
- searchGraph.executeModelOperation("","","",type,true,
- map);
- }
-
- @Test(expected = AAIException.class)
- public void executeModelOperationXMLTest() throws Exception{
- Vertex vertex=new EmptyVertex();
- vertex.property("model-name");
- Map<String,Object> mapObj=new HashMap<String,Object>();
- mapObj.put("modle-version",vertex);
- List<Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<>();
- startNodeFilterArrayOfHashes.add(mapObj);
- List<org.openecomp.aai.dbgraphgen.ResultSet> resultSet=new ArrayList<org.openecomp.aai.dbgraphgen.ResultSet>();
- DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
- // ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
- AAIExtensionMap map=mock(AAIExtensionMap.class);
- HttpServletRequest servletRequest=mock(HttpServletRequest.class);
-
- when(map.getHttpServletRequest()).thenReturn(servletRequest);
- when(servletRequest.getContentType()).thenReturn("application/xml");
-
- DynamicEntity modelAndNamedQuerySearch=mock(DynamicEntity.class);
- when(modelAndNamedQuerySearch.isSet("queryParameters")).thenReturn(true);
-/* when(processor.queryByModel("9999","model-ver","model-version-id",
- "model-inv-id","modelname","aai",
- startNodeFilterArrayOfHashes,"aai-ver")).thenReturn(resultSet);*/
-
- searchGraph.executeModelOperation("","","",type,true,
- map);
- }
- @Test
- public void runNodesQueryTest() throws AAIException{
- UrlBuilder urlBuilder=mock(UrlBuilder.class);
- List<String> filter=new ArrayList<String>();
- filter.add("model:EQUALS:DOES-NOT-EXIST:AAI");
- List<String> edgeFilter=new ArrayList<String>();
- edgeFilter.add("model:DOES-NOT-EXIST:DOES-NOT-EXIST:AAI");
- Response response= searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
- filter,dbEngine,loader,urlBuilder);
- Assert.assertNotNull(response);
- }
-
- @Test
- public void runNodesQueryExistsTest() throws AAIException{
- UrlBuilder urlBuilder=mock(UrlBuilder.class);
- List<String> filter=new ArrayList<String>();
- filter.add("model:EQUALS:DOES-NOT-EXIST:AAI");
- List<String> edgeFilter=new ArrayList<String>();
- edgeFilter.add("model:EXISTS:DOES-NOT-EXIST:AAI");
- Response response= searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
- filter,dbEngine,loader,urlBuilder);
- Assert.assertNotNull(response);
- }
-
- @Test
- public void runNodesQueryTestDOESNOTEQUAL() throws AAIException{
- UrlBuilder urlBuilder=mock(UrlBuilder.class);
- List<String> filter=new ArrayList<String>();
- filter.add("model:DOES-NOT-EQUAL:DOES-NOT-EXIST");
- List<String> edgeFilter=new ArrayList<String>();
- searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
- filter,dbEngine,loader,urlBuilder);
- }
-
- @Test
- public void runNodesQueryTestGreaterThan3() throws AAIException{
- UrlBuilder urlBuilder=mock(UrlBuilder.class);
- List<String> filter=new ArrayList<String>();
- filter.add("model:DOES-NOT-EQUAL:DOES-NOT-EXIST:AAI");
- List<String> edgeFilter=new ArrayList<String>();
- searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
- filter,dbEngine,loader,urlBuilder);
- }
-
- @Test
- public void runNodesQueryTestGreaterThanExists() throws AAIException{
- UrlBuilder urlBuilder=mock(UrlBuilder.class);
- List<String> filter=new ArrayList<String>();
- filter.add("model:EXISTS:DOES-NOT-EXIST:AAI");
- List<String> edgeFilter=new ArrayList<String>();
- searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
- filter,dbEngine,loader,urlBuilder);
- }
-
- @Test(expected = AAIException.class)
- public void runNodesQueryTestGreaterThanDoesNotExists() throws AAIException{
- UrlBuilder urlBuilder=mock(UrlBuilder.class);
- List<String> filter=new ArrayList<String>();
- filter.add("model:DOES_NOT_EXIST:DOES-NOT-EXIST:AAI");
- List<String> edgeFilter=new ArrayList<String>();
- searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
- filter,dbEngine,loader,urlBuilder);
- }
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.dbgraphmap;
+
+import com.thinkaurelius.titan.core.TitanGraph;
+import com.thinkaurelius.titan.graphdb.types.system.EmptyVertex;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.apache.tinkerpop.gremlin.structure.VertexProperty;
+import org.apache.velocity.util.ArrayListWrapper;
+import org.eclipse.persistence.dynamic.DynamicEntity;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.InjectMocks;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.onap.aai.dbgraphgen.ModelBasedProcessing;
+import org.onap.aai.dbmap.DBConnectionType;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.extensions.AAIExtensionMap;
+import org.onap.aai.introspection.*;
+import org.onap.aai.parsers.relationship.RelationshipToURI;
+import org.onap.aai.serialization.db.DBSerializer;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TitanDBEngine;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.serialization.queryformats.utils.UrlBuilder;
+
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.*;
+import java.net.URI;
+import java.sql.ResultSet;
+import java.util.*;
+import java.util.stream.Stream;
+
+import static org.mockito.Matchers.anyObject;
+import static org.mockito.Mockito.*;
+
+public class SearchGraphTest {
+
+ private SearchGraph searchGraph;
+
+ protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json");
+
+ private static final Set<Integer> VALID_HTTP_STATUS_CODES = new HashSet<>();
+
+ private final static Version version = Version.getLatest();
+ private final static ModelType introspectorFactoryType = ModelType.MOXY;
+ private final static QueryStyle queryStyle = QueryStyle.TRAVERSAL;
+ private final static DBConnectionType type = DBConnectionType.REALTIME;
+
+ static {
+ VALID_HTTP_STATUS_CODES.add(200);
+ VALID_HTTP_STATUS_CODES.add(201);
+ VALID_HTTP_STATUS_CODES.add(204);
+ }
+
+ private HttpHeaders httpHeaders;
+
+ private UriInfo uriInfo;
+
+ private MultivaluedMap<String, String> headersMultiMap;
+ private MultivaluedMap<String, String> queryParameters;
+
+ private List<String> aaiRequestContextList;
+
+ private List<MediaType> outputMediaTypes;
+
+ private Loader loader;
+ private TitanGraph graph;
+
+ private Graph tx;
+
+ private GraphTraversalSource g;
+ private TransactionalGraphEngine dbEngine;
+
+ @Before
+ public void setup(){
+
+ System.setProperty("AJSC_HOME", ".");
+ System.setProperty("BUNDLECONFIG_DIR", "bundleconfig-local");
+
+ searchGraph = new SearchGraph();
+
+ httpHeaders = mock(HttpHeaders.class);
+ uriInfo = mock(UriInfo.class);
+
+ headersMultiMap = new MultivaluedHashMap<>();
+ queryParameters = Mockito.spy(new MultivaluedHashMap<>());
+
+ headersMultiMap.add("X-FromAppId", "JUNIT");
+ headersMultiMap.add("X-TransactionId", UUID.randomUUID().toString());
+ headersMultiMap.add("Real-Time", "true");
+ headersMultiMap.add("Accept", "application/json");
+ headersMultiMap.add("aai-request-context", "");
+
+ outputMediaTypes = new ArrayList<>();
+ outputMediaTypes.add(APPLICATION_JSON);
+
+ aaiRequestContextList = new ArrayList<>();
+ aaiRequestContextList.add("");
+
+ when(httpHeaders.getAcceptableMediaTypes()).thenReturn(outputMediaTypes);
+ when(httpHeaders.getRequestHeaders()).thenReturn(headersMultiMap);
+ when(httpHeaders.getRequestHeader("X-FromAppId")).thenReturn(Arrays.asList("JUNIT"));
+ when(httpHeaders.getRequestHeader("X-TransactionId")).thenReturn(Arrays.asList("JUNIT"));
+
+ when(httpHeaders.getRequestHeader("aai-request-context")).thenReturn(aaiRequestContextList);
+
+
+ when(uriInfo.getQueryParameters()).thenReturn(queryParameters);
+ when(uriInfo.getQueryParameters(false)).thenReturn(queryParameters);
+
+ // TODO - Check if this is valid since RemoveDME2QueryParameters seems to be very unreasonable
+ Mockito.doReturn(null).when(queryParameters).remove(anyObject());
+
+ when(httpHeaders.getMediaType()).thenReturn(APPLICATION_JSON);
+ loader = LoaderFactory.createLoaderForVersion(introspectorFactoryType, version);
+ dbEngine = new TitanDBEngine(
+ queryStyle,
+ type,
+ loader);
+ }
+
+@Test(expected = AAIException.class)
+ public void runNodesQuery() throws AAIException{
+ DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
+ UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
+ searchGraph.runNodesQuery(httpHeaders,"",null,
+ null,dbEngine,loader,urlBuilder);
+ }
+ @Test(expected = AAIException.class)
+ public void runNodesQueryNull() throws AAIException{
+ DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
+ UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
+ searchGraph.runNodesQuery(httpHeaders,"nnn",null,
+ null,dbEngine,loader,urlBuilder);
+ }
+ @Test(expected = AAIException.class)
+ public void testRunGenericQueryFailWhenInvalidRelationshipList() throws AAIException {
+
+ List<String> keys = new ArrayList<>();
+ keys.add("cloud-region.cloud-owner:test-aic");
+
+ List<String> includeStrings = new ArrayList<>();
+ includeStrings.add("cloud-region");
+
+ DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
+ UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
+ Response response = searchGraph.runGenericQuery(httpHeaders, "service-instance", keys, includeStrings, 1, dbEngine, loader, urlBuilder);
+ System.out.println(response);
+ }
+
+
+ @Test(expected = AAIException.class)
+ public void testRunGenericQueryFailWhenInvalidRelationshipList1() throws AAIException {
+
+ List<String> keys = new ArrayList<>();
+ keys.add("cloud-region.cloud-owner:test-aic");
+
+ List<String> includeStrings = new ArrayList<>();
+ includeStrings.add("cloud-region");
+
+ DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
+ UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
+ Response response = searchGraph.runGenericQuery(httpHeaders, null, keys, includeStrings, 1, dbEngine, loader, urlBuilder);
+ System.out.println(response);
+ }
+
+ @Test(expected = AAIException.class)
+ public void testRunGenericQueryFailWhenInvalidRelationshipList2() throws AAIException {
+
+ List<String> keys = new ArrayList<>();
+ keys.add("cloud-region.cloud-owner:test-aic");
+
+ List<String> includeStrings = new ArrayList<>();
+ includeStrings.add("cloud-region");
+
+ DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
+ UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
+ Response response = searchGraph.runGenericQuery(httpHeaders, "", null, includeStrings, 1, dbEngine, loader, urlBuilder);
+ System.out.println(response);
+ }
+
+ @Test(expected = AAIException.class)
+ public void testRunGenericQueryFailWhenInvalidRelationshipList3() throws AAIException {
+
+ List<String> keys = new ArrayList<>();
+ keys.add("cloud-region.cloud-owner:test-aic");
+
+ List<String> includeStrings = new ArrayList<>();
+ includeStrings.add("cloud-region");
+
+ DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
+ UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
+ Response response = searchGraph.runGenericQuery(httpHeaders, "", keys, null, 1, dbEngine, loader, urlBuilder);
+ System.out.println(response);
+ }
+
+
+ /*@Test(expected = NullPointerException.class)
+ public void createSearchResults() throws AAIException {
+
+ List<Vertex> keys = new ArrayList<>();
+ Vertex vertex=new EmptyVertex();
+ keys.add(vertex);
+
+
+
+ List<String> includeStrings = new ArrayList<>();
+ includeStrings.add("cloud-region");
+
+ DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
+ UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
+ Introspector response = searchGraph.createSearchResults(loader, urlBuilder, keys);
+ System.out.println(response);
+ }*/
+ @Test
+ public void createSearchResults1() throws Exception {
+
+ List<Vertex> keys = new ArrayList<>();
+ Vertex vertex=new EmptyVertex();
+ keys.add(vertex);
+ DBSerializer ds=mock(DBSerializer.class);
+ UrlBuilder urlBuilder=mock(UrlBuilder.class);
+ when(urlBuilder.pathed(vertex)).thenReturn("cloud-region");
+ Stream<Vertex> stream=mock(Stream.class);
+ when(stream.isParallel()).thenReturn(true);
+ List<String> includeStrings = new ArrayList<>();
+ includeStrings.add("cloud-region");
+ RelationshipToURI relationshipToURI=mock(RelationshipToURI.class);
+ URI uri =new URI("");
+ when(relationshipToURI.getUri()).thenReturn(uri);
+
+ DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
+ // UrlBuilder urlBuilder = new UrlBuilder(version, serializer);
+ Introspector response = searchGraph.createSearchResults(loader, urlBuilder, keys);
+ System.out.println(response);
+ }
+ @Test(expected = AAIException.class)
+ public void executeModelOperationTest() throws Exception{
+ Vertex vertex=new EmptyVertex();
+ vertex.property("model-name");
+ Map<String,Object> mapObj=new HashMap<String,Object>();
+ mapObj.put("modle-version",vertex);
+ List<Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<>();
+ startNodeFilterArrayOfHashes.add(mapObj);
+ List<org.onap.aai.dbgraphgen.ResultSet> resultSet=new ArrayList<org.onap.aai.dbgraphgen.ResultSet>();
+ DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
+ // ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ AAIExtensionMap map=mock(AAIExtensionMap.class);
+ HttpServletRequest servletRequest=mock(HttpServletRequest.class);
+
+ when(map.getHttpServletRequest()).thenReturn(servletRequest);
+ when(servletRequest.getContentType()).thenReturn("application/json");
+ DynamicEntity modelAndNamedQuerySearch=mock(DynamicEntity.class);
+ when(modelAndNamedQuerySearch.isSet("topNodeType")).thenReturn(true);
+
+
+/* when(processor.queryByModel("9999","model-ver","model-version-id",
+ "model-inv-id","modelname","aai",
+ startNodeFilterArrayOfHashes,"aai-ver")).thenReturn(resultSet);*/
+
+ searchGraph.executeModelOperation("","","",type,true,
+ map);
+ }
+
+ @Test(expected = AAIException.class)
+ public void executeModelOperationXMLTest() throws Exception{
+ Vertex vertex=new EmptyVertex();
+ vertex.property("model-name");
+ Map<String,Object> mapObj=new HashMap<String,Object>();
+ mapObj.put("modle-version",vertex);
+ List<Map<String,Object>> startNodeFilterArrayOfHashes=new ArrayList<>();
+ startNodeFilterArrayOfHashes.add(mapObj);
+ List<org.onap.aai.dbgraphgen.ResultSet> resultSet=new ArrayList<org.onap.aai.dbgraphgen.ResultSet>();
+ DBSerializer serializer = new DBSerializer(version, dbEngine, introspectorFactoryType, "JUNIT");
+ // ModelBasedProcessing processor = new ModelBasedProcessing(loader, dbEngine, serializer);
+ AAIExtensionMap map=mock(AAIExtensionMap.class);
+ HttpServletRequest servletRequest=mock(HttpServletRequest.class);
+
+ when(map.getHttpServletRequest()).thenReturn(servletRequest);
+ when(servletRequest.getContentType()).thenReturn("application/xml");
+
+ DynamicEntity modelAndNamedQuerySearch=mock(DynamicEntity.class);
+ when(modelAndNamedQuerySearch.isSet("queryParameters")).thenReturn(true);
+/* when(processor.queryByModel("9999","model-ver","model-version-id",
+ "model-inv-id","modelname","aai",
+ startNodeFilterArrayOfHashes,"aai-ver")).thenReturn(resultSet);*/
+
+ searchGraph.executeModelOperation("","","",type,true,
+ map);
+ }
+ @Test
+ public void runNodesQueryTest() throws AAIException{
+ UrlBuilder urlBuilder=mock(UrlBuilder.class);
+ List<String> filter=new ArrayList<String>();
+ filter.add("model:EQUALS:DOES-NOT-EXIST:AAI");
+ List<String> edgeFilter=new ArrayList<String>();
+ edgeFilter.add("model:DOES-NOT-EXIST:DOES-NOT-EXIST:AAI");
+ Response response= searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
+ filter,dbEngine,loader,urlBuilder);
+ Assert.assertNotNull(response);
+ }
+
+ @Test
+ public void runNodesQueryExistsTest() throws AAIException{
+ UrlBuilder urlBuilder=mock(UrlBuilder.class);
+ List<String> filter=new ArrayList<String>();
+ filter.add("model:EQUALS:DOES-NOT-EXIST:AAI");
+ List<String> edgeFilter=new ArrayList<String>();
+ edgeFilter.add("model:EXISTS:DOES-NOT-EXIST:AAI");
+ Response response= searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
+ filter,dbEngine,loader,urlBuilder);
+ Assert.assertNotNull(response);
+ }
+
+ @Test
+ public void runNodesQueryTestDOESNOTEQUAL() throws AAIException{
+ UrlBuilder urlBuilder=mock(UrlBuilder.class);
+ List<String> filter=new ArrayList<String>();
+ filter.add("model:DOES-NOT-EQUAL:DOES-NOT-EXIST");
+ List<String> edgeFilter=new ArrayList<String>();
+ searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
+ filter,dbEngine,loader,urlBuilder);
+ }
+
+ @Test
+ public void runNodesQueryTestGreaterThan3() throws AAIException{
+ UrlBuilder urlBuilder=mock(UrlBuilder.class);
+ List<String> filter=new ArrayList<String>();
+ filter.add("model:DOES-NOT-EQUAL:DOES-NOT-EXIST:AAI");
+ List<String> edgeFilter=new ArrayList<String>();
+ searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
+ filter,dbEngine,loader,urlBuilder);
+ }
+
+ @Test
+ public void runNodesQueryTestGreaterThanExists() throws AAIException{
+ UrlBuilder urlBuilder=mock(UrlBuilder.class);
+ List<String> filter=new ArrayList<String>();
+ filter.add("model:EXISTS:DOES-NOT-EXIST:AAI");
+ List<String> edgeFilter=new ArrayList<String>();
+ searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
+ filter,dbEngine,loader,urlBuilder);
+ }
+
+ @Test(expected = AAIException.class)
+ public void runNodesQueryTestGreaterThanDoesNotExists() throws AAIException{
+ UrlBuilder urlBuilder=mock(UrlBuilder.class);
+ List<String> filter=new ArrayList<String>();
+ filter.add("model:DOES_NOT_EXIST:DOES-NOT-EXIST:AAI");
+ List<String> edgeFilter=new ArrayList<String>();
+ searchGraph.runNodesQuery(httpHeaders,"model-ver",edgeFilter,
+ filter,dbEngine,loader,urlBuilder);
+ }
} \ No newline at end of file
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptorTest.java b/aai-traversal/src/test/java/org/onap/aai/interceptors/AAILogJAXRSInInterceptorTest.java
index d265299..40de5a9 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/interceptors/AAILogJAXRSInInterceptorTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/interceptors/AAILogJAXRSInInterceptorTest.java
@@ -1,14 +1,14 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,9 +16,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.interceptors;
+package org.onap.aai.interceptors;
import org.apache.cxf.message.Exchange;
import org.apache.cxf.message.ExchangeImpl;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/interceptors/AAILogJAXRSOutInterceptorTest.java b/aai-traversal/src/test/java/org/onap/aai/interceptors/AAILogJAXRSOutInterceptorTest.java
index df2feec..52c6a42 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/interceptors/AAILogJAXRSOutInterceptorTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/interceptors/AAILogJAXRSOutInterceptorTest.java
@@ -1,14 +1,14 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,9 +16,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.interceptors;
+package org.onap.aai.interceptors;
import org.apache.cxf.io.CacheAndWriteOutputStream;
import org.apache.cxf.message.Exchange;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/interceptors/PostAaiAjscInterceptorTest.java b/aai-traversal/src/test/java/org/onap/aai/interceptors/PostAaiAjscInterceptorTest.java
index 3aa2aa9..6efb0d1 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/interceptors/PostAaiAjscInterceptorTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/interceptors/PostAaiAjscInterceptorTest.java
@@ -1,14 +1,14 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,14 +16,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.interceptors;
+package org.onap.aai.interceptors;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
-import org.openecomp.aai.logging.LoggingContext;
+import org.onap.aai.logging.LoggingContext;
import javax.servlet.http.HttpServletRequest;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/interceptors/PreAaiAjscInterceptorTest.java b/aai-traversal/src/test/java/org/onap/aai/interceptors/PreAaiAjscInterceptorTest.java
index 9162019..35651c3 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/interceptors/PreAaiAjscInterceptorTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/interceptors/PreAaiAjscInterceptorTest.java
@@ -1,14 +1,14 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,9 +16,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.interceptors;
+package org.onap.aai.interceptors;
import org.junit.Before;
import org.junit.Test;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/ExceptionHandlerTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/ExceptionHandlerTest.java
index 8e2bb94..eaf9e55 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/ExceptionHandlerTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/ExceptionHandlerTest.java
@@ -1,14 +1,14 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,9 +16,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest;
+package org.onap.aai.rest;
import com.fasterxml.jackson.core.JsonLocation;
import com.fasterxml.jackson.core.JsonParseException;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromNfTypeQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromNfTypeQueryTest.java
index f2a1a3e..1c93230 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromNfTypeQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromNfTypeQueryTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class CloudRegionFromNfTypeQueryTest extends QueryTest {
public CloudRegionFromNfTypeQueryTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromNfTypeVendorVersionTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromNfTypeVendorVersionTest.java
index 5a39f12..ae04734 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromNfTypeVendorVersionTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromNfTypeVendorVersionTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -27,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class CloudRegionFromNfTypeVendorVersionTest extends QueryTest {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromNfTypeVendorVersion_withOptionalTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromNfTypeVendorVersion_withOptionalTest.java
index 08a24a9..59b0d0a 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromNfTypeVendorVersion_withOptionalTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromNfTypeVendorVersion_withOptionalTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -27,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class CloudRegionFromNfTypeVendorVersion_withOptionalTest extends QueryTest {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromVnfTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromVnfTest.java
index 5e0ecd5..f828558 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionFromVnfTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionFromVnfTest.java
@@ -1,4 +1,25 @@
-package org.openecomp.aai.rest.search;
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.rest.search;
import static org.junit.Assert.*;
@@ -9,8 +30,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class CloudRegionFromVnfTest extends QueryTest {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionfromCountryCloudRegionVersionQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionfromCountryCloudRegionVersionQueryTest.java
index 0bf58fb..08c62af 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionfromCountryCloudRegionVersionQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionfromCountryCloudRegionVersionQueryTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class CloudRegionfromCountryCloudRegionVersionQueryTest extends QueryTest {
public CloudRegionfromCountryCloudRegionVersionQueryTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionfromCountryQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionfromCountryQueryTest.java
index 4a5991d..4106939 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/CloudRegionfromCountryQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/CloudRegionfromCountryQueryTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class CloudRegionfromCountryQueryTest extends QueryTest {
public CloudRegionfromCountryQueryTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/FirstNetTopology_LineOfBusinessTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/FirstNetTopology_LineOfBusinessTest.java
index ce739c8..88831bd 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/FirstNetTopology_LineOfBusinessTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/FirstNetTopology_LineOfBusinessTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -27,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class FirstNetTopology_LineOfBusinessTest extends QueryTest {
public FirstNetTopology_LineOfBusinessTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/FirstNetTopology_ServiceInstanceTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/FirstNetTopology_ServiceInstanceTest.java
index a6352ec..a53ca0c 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/FirstNetTopology_ServiceInstanceTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/FirstNetTopology_ServiceInstanceTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -27,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class FirstNetTopology_ServiceInstanceTest extends QueryTest {
public FirstNetTopology_ServiceInstanceTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/GremlinServerImplTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/GremlinServerImplTest.java
index deea903..5c6a45f 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/GremlinServerImplTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/GremlinServerImplTest.java
@@ -1,163 +1,164 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.openecomp.aai
- * ================================================================================
- * 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.aai.rest.search;
-
-import com.thinkaurelius.titan.core.TitanGraph;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.structure.T;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.aai.dbmap.DBConnectionType;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.LoaderFactory;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.Version;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TitanDBEngine;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.openecomp.aai.serialization.queryformats.SubGraphStyle;
-
-import javax.ws.rs.core.*;
-import java.net.URI;
-import java.util.*;
-
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class GremlinServerImplTest {
-
- GremlinServerImpl gremlinServerImpl;
-
- protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json");
-
- private static final Set<Integer> VALID_HTTP_STATUS_CODES = new HashSet<>();
-
- private final static Version version = Version.getLatest();
- private final static ModelType introspectorFactoryType = ModelType.MOXY;
- private final static QueryStyle queryStyle = QueryStyle.TRAVERSAL;
- private final static DBConnectionType type = DBConnectionType.REALTIME;
-
- static {
- VALID_HTTP_STATUS_CODES.add(200);
- VALID_HTTP_STATUS_CODES.add(201);
- VALID_HTTP_STATUS_CODES.add(204);
- }
-
- private GenericQueryProcessor genericQueryProcessor;
- private HttpHeaders httpHeaders;
-
- private UriInfo uriInfo;
-
- private MultivaluedMap<String, String> headersMultiMap;
- private MultivaluedMap<String, String> queryParameters;
-
- private List<String> aaiRequestContextList;
-
- private List<MediaType> outputMediaTypes;
-
- private Loader loader;
- private TitanGraph graph;
-
- private Graph tx;
-
- private GraphTraversalSource g;
- private TransactionalGraphEngine dbEngine;
-
-
-
-@Before
- public void setup()throws AAIException{
-
- httpHeaders = mock(HttpHeaders.class);
- uriInfo = mock(UriInfo.class);
-
- headersMultiMap = new MultivaluedHashMap<>();
- queryParameters = Mockito.spy(new MultivaluedHashMap<>());
-
- headersMultiMap.add("X-FromAppId", "JUNIT");
- headersMultiMap.add("X-TransactionId", UUID.randomUUID().toString());
- headersMultiMap.add("Real-Time", "true");
- headersMultiMap.add("Accept", "application/json");
- headersMultiMap.add("aai-request-context", "");
-
- outputMediaTypes = new ArrayList<>();
- outputMediaTypes.add(APPLICATION_JSON);
-
- aaiRequestContextList = new ArrayList<>();
- aaiRequestContextList.add("");
-
- when(httpHeaders.getAcceptableMediaTypes()).thenReturn(outputMediaTypes);
- when(httpHeaders.getRequestHeaders()).thenReturn(headersMultiMap);
- when(httpHeaders.getRequestHeader("X-FromAppId")).thenReturn(Arrays.asList("JUNIT"));
- when(httpHeaders.getRequestHeader("X-TransactionId")).thenReturn(Arrays.asList("JUNIT"));
-
- when(httpHeaders.getRequestHeader("aai-request-context")).thenReturn(aaiRequestContextList);
-
-
- when(uriInfo.getQueryParameters()).thenReturn(queryParameters);
- when(uriInfo.getQueryParameters(false)).thenReturn(queryParameters);
-
- // TODO - Check if this is valid since RemoveDME2QueryParameters seems to be very unreasonable
- Mockito.doReturn(null).when(queryParameters).remove(anyObject());
-
- when(httpHeaders.getMediaType()).thenReturn(APPLICATION_JSON);
- loader = LoaderFactory.createLoaderForVersion(introspectorFactoryType, version);
- dbEngine = new TitanDBEngine(
- queryStyle,
- type,
- loader);
- GenericQueryProcessor.Builder builder=new GenericQueryProcessor.Builder(dbEngine);
-builder.queryFrom(URI.create("te"));
-builder.queryFrom("te");
-builder.create();
-builder.processWith(QueryProcessorType.GREMLIN_SERVER);
- builder.processWith(QueryProcessorType.LOCAL_GROOVY);
-
- gremlinServerImpl= new GremlinServerImpl(builder);
- }
-
- @Test(expected = NullPointerException.class)
- public void processSubGraphTest() throws Exception{
- GraphTraversal<Vertex, Vertex> g=Mockito.mock(GraphTraversal.class);
- g.has("cloud-region-id", "cloud-region-id-1");
- gremlinServerImpl.processSubGraph(SubGraphStyle.prune,g);
-}
-
- @Test(expected = RuntimeException.class)
- public void executeTest() throws Exception{
- GraphTraversal<Vertex, Vertex> g=Mockito.mock(GraphTraversal.class);
- g.has("cloud-region-id", "cloud-region-id-1");
- //Mockito.when(etPath()).thenReturn("testpath");
- List<Object> re= gremlinServerImpl.execute(SubGraphStyle.prune);
- Assert.assertNotNull(re);
- }
-
-
-
-}
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+
+package org.onap.aai.rest.search;
+
+import com.thinkaurelius.titan.core.TitanGraph;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.T;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.aai.dbmap.DBConnectionType;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.Version;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TitanDBEngine;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.serialization.queryformats.SubGraphStyle;
+
+import javax.ws.rs.core.*;
+import java.net.URI;
+import java.util.*;
+
+import static org.mockito.Matchers.anyObject;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public class GremlinServerImplTest {
+
+ GremlinServerImpl gremlinServerImpl;
+
+ protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json");
+
+ private static final Set<Integer> VALID_HTTP_STATUS_CODES = new HashSet<>();
+
+ private final static Version version = Version.getLatest();
+ private final static ModelType introspectorFactoryType = ModelType.MOXY;
+ private final static QueryStyle queryStyle = QueryStyle.TRAVERSAL;
+ private final static DBConnectionType type = DBConnectionType.REALTIME;
+
+ static {
+ VALID_HTTP_STATUS_CODES.add(200);
+ VALID_HTTP_STATUS_CODES.add(201);
+ VALID_HTTP_STATUS_CODES.add(204);
+ }
+
+ private GenericQueryProcessor genericQueryProcessor;
+ private HttpHeaders httpHeaders;
+
+ private UriInfo uriInfo;
+
+ private MultivaluedMap<String, String> headersMultiMap;
+ private MultivaluedMap<String, String> queryParameters;
+
+ private List<String> aaiRequestContextList;
+
+ private List<MediaType> outputMediaTypes;
+
+ private Loader loader;
+ private TitanGraph graph;
+
+ private Graph tx;
+
+ private GraphTraversalSource g;
+ private TransactionalGraphEngine dbEngine;
+
+
+
+@Before
+ public void setup()throws AAIException{
+
+ httpHeaders = mock(HttpHeaders.class);
+ uriInfo = mock(UriInfo.class);
+
+ headersMultiMap = new MultivaluedHashMap<>();
+ queryParameters = Mockito.spy(new MultivaluedHashMap<>());
+
+ headersMultiMap.add("X-FromAppId", "JUNIT");
+ headersMultiMap.add("X-TransactionId", UUID.randomUUID().toString());
+ headersMultiMap.add("Real-Time", "true");
+ headersMultiMap.add("Accept", "application/json");
+ headersMultiMap.add("aai-request-context", "");
+
+ outputMediaTypes = new ArrayList<>();
+ outputMediaTypes.add(APPLICATION_JSON);
+
+ aaiRequestContextList = new ArrayList<>();
+ aaiRequestContextList.add("");
+
+ when(httpHeaders.getAcceptableMediaTypes()).thenReturn(outputMediaTypes);
+ when(httpHeaders.getRequestHeaders()).thenReturn(headersMultiMap);
+ when(httpHeaders.getRequestHeader("X-FromAppId")).thenReturn(Arrays.asList("JUNIT"));
+ when(httpHeaders.getRequestHeader("X-TransactionId")).thenReturn(Arrays.asList("JUNIT"));
+
+ when(httpHeaders.getRequestHeader("aai-request-context")).thenReturn(aaiRequestContextList);
+
+
+ when(uriInfo.getQueryParameters()).thenReturn(queryParameters);
+ when(uriInfo.getQueryParameters(false)).thenReturn(queryParameters);
+
+ // TODO - Check if this is valid since RemoveDME2QueryParameters seems to be very unreasonable
+ Mockito.doReturn(null).when(queryParameters).remove(anyObject());
+
+ when(httpHeaders.getMediaType()).thenReturn(APPLICATION_JSON);
+ loader = LoaderFactory.createLoaderForVersion(introspectorFactoryType, version);
+ dbEngine = new TitanDBEngine(
+ queryStyle,
+ type,
+ loader);
+ GenericQueryProcessor.Builder builder=new GenericQueryProcessor.Builder(dbEngine);
+builder.queryFrom(URI.create("te"));
+builder.queryFrom("te");
+builder.create();
+builder.processWith(QueryProcessorType.GREMLIN_SERVER);
+ builder.processWith(QueryProcessorType.LOCAL_GROOVY);
+
+ gremlinServerImpl= new GremlinServerImpl(builder);
+ }
+
+ @Test(expected = NullPointerException.class)
+ public void processSubGraphTest() throws Exception{
+ GraphTraversal<Vertex, Vertex> g=Mockito.mock(GraphTraversal.class);
+ g.has("cloud-region-id", "cloud-region-id-1");
+ gremlinServerImpl.processSubGraph(SubGraphStyle.prune,g);
+}
+
+ @Test(expected = RuntimeException.class)
+ public void executeTest() throws Exception{
+ GraphTraversal<Vertex, Vertex> g=Mockito.mock(GraphTraversal.class);
+ g.has("cloud-region-id", "cloud-region-id-1");
+ //Mockito.when(etPath()).thenReturn("testpath");
+ List<Object> re= gremlinServerImpl.execute(SubGraphStyle.prune);
+ Assert.assertNotNull(re);
+ }
+
+
+
+}
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/GroovyShellImplTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/GroovyShellImplTest.java
index 723e30d..3735e97 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/GroovyShellImplTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/GroovyShellImplTest.java
@@ -1,157 +1,158 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.openecomp.aai
- * ================================================================================
- * 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.aai.rest.search;
-
-import com.thinkaurelius.titan.core.TitanGraph;
-import groovy.lang.MissingPropertyException;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.structure.Vertex;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.aai.dbmap.DBConnectionType;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.LoaderFactory;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.Version;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TitanDBEngine;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.openecomp.aai.serialization.queryformats.SubGraphStyle;
-
-import javax.ws.rs.core.*;
-import java.net.URI;
-import java.util.*;
-
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
-
-public class GroovyShellImplTest {
-
- GroovyShellImpl groovyShellImpl ;
-
- protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json");
-
- private static final Set<Integer> VALID_HTTP_STATUS_CODES = new HashSet<>();
-
- private final static Version version = Version.getLatest();
- private final static ModelType introspectorFactoryType = ModelType.MOXY;
- private final static QueryStyle queryStyle = QueryStyle.TRAVERSAL;
- private final static DBConnectionType type = DBConnectionType.REALTIME;
-
- static {
- VALID_HTTP_STATUS_CODES.add(200);
- VALID_HTTP_STATUS_CODES.add(201);
- VALID_HTTP_STATUS_CODES.add(204);
- }
-
- private GenericQueryProcessor genericQueryProcessor;
- private HttpHeaders httpHeaders;
-
- private UriInfo uriInfo;
-
- private MultivaluedMap<String, String> headersMultiMap;
- private MultivaluedMap<String, String> queryParameters;
-
- private List<String> aaiRequestContextList;
-
- private List<MediaType> outputMediaTypes;
-
- private Loader loader;
- private TitanGraph graph;
-
- private Graph tx;
-
- private GraphTraversalSource g;
- private TransactionalGraphEngine dbEngine;
-
-
-
-@Before
- public void setup()throws AAIException{
-
- httpHeaders = mock(HttpHeaders.class);
- uriInfo = mock(UriInfo.class);
-
- headersMultiMap = new MultivaluedHashMap<>();
- queryParameters = Mockito.spy(new MultivaluedHashMap<>());
-
- headersMultiMap.add("X-FromAppId", "JUNIT");
- headersMultiMap.add("X-TransactionId", UUID.randomUUID().toString());
- headersMultiMap.add("Real-Time", "true");
- headersMultiMap.add("Accept", "application/json");
- headersMultiMap.add("aai-request-context", "");
-
- outputMediaTypes = new ArrayList<>();
- outputMediaTypes.add(APPLICATION_JSON);
-
- aaiRequestContextList = new ArrayList<>();
- aaiRequestContextList.add("");
-
- when(httpHeaders.getAcceptableMediaTypes()).thenReturn(outputMediaTypes);
- when(httpHeaders.getRequestHeaders()).thenReturn(headersMultiMap);
- when(httpHeaders.getRequestHeader("X-FromAppId")).thenReturn(Arrays.asList("JUNIT"));
- when(httpHeaders.getRequestHeader("X-TransactionId")).thenReturn(Arrays.asList("JUNIT"));
-
- when(httpHeaders.getRequestHeader("aai-request-context")).thenReturn(aaiRequestContextList);
-
-
- when(uriInfo.getQueryParameters()).thenReturn(queryParameters);
- when(uriInfo.getQueryParameters(false)).thenReturn(queryParameters);
-
- // TODO - Check if this is valid since RemoveDME2QueryParameters seems to be very unreasonable
- Mockito.doReturn(null).when(queryParameters).remove(anyObject());
-
- when(httpHeaders.getMediaType()).thenReturn(APPLICATION_JSON);
- loader = LoaderFactory.createLoaderForVersion(introspectorFactoryType, version);
- dbEngine = new TitanDBEngine(
- queryStyle,
- type,
- loader);
- GenericQueryProcessor.Builder builder=new GenericQueryProcessor.Builder(dbEngine);
-builder.queryFrom(URI.create("te"));
-builder.queryFrom("te");
-builder.create();
-builder.processWith(QueryProcessorType.GREMLIN_SERVER);
- builder.processWith(QueryProcessorType.LOCAL_GROOVY);
-
- groovyShellImpl= new GroovyShellImpl(builder);
- }
-
- @Test(expected = MissingPropertyException.class)
- public void processSubGraphTest() throws Exception{
- GraphTraversal<Vertex, Vertex> g=Mockito.mock(GraphTraversal.class);
- g.has("cloud-region-id", "cloud-region-id-1");
- Map<String, Object> params = new HashMap<>();
- groovyShellImpl.runQuery("vnfs-fromServiceInstance",params);
-}
-
-
-
-
-
-}
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+
+package org.onap.aai.rest.search;
+
+import com.thinkaurelius.titan.core.TitanGraph;
+import groovy.lang.MissingPropertyException;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.Vertex;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.aai.dbmap.DBConnectionType;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.Version;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TitanDBEngine;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.serialization.queryformats.SubGraphStyle;
+
+import javax.ws.rs.core.*;
+import java.net.URI;
+import java.util.*;
+
+import static org.mockito.Matchers.anyObject;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+public class GroovyShellImplTest {
+
+ GroovyShellImpl groovyShellImpl ;
+
+ protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json");
+
+ private static final Set<Integer> VALID_HTTP_STATUS_CODES = new HashSet<>();
+
+ private final static Version version = Version.getLatest();
+ private final static ModelType introspectorFactoryType = ModelType.MOXY;
+ private final static QueryStyle queryStyle = QueryStyle.TRAVERSAL;
+ private final static DBConnectionType type = DBConnectionType.REALTIME;
+
+ static {
+ VALID_HTTP_STATUS_CODES.add(200);
+ VALID_HTTP_STATUS_CODES.add(201);
+ VALID_HTTP_STATUS_CODES.add(204);
+ }
+
+ private GenericQueryProcessor genericQueryProcessor;
+ private HttpHeaders httpHeaders;
+
+ private UriInfo uriInfo;
+
+ private MultivaluedMap<String, String> headersMultiMap;
+ private MultivaluedMap<String, String> queryParameters;
+
+ private List<String> aaiRequestContextList;
+
+ private List<MediaType> outputMediaTypes;
+
+ private Loader loader;
+ private TitanGraph graph;
+
+ private Graph tx;
+
+ private GraphTraversalSource g;
+ private TransactionalGraphEngine dbEngine;
+
+
+
+@Before
+ public void setup()throws AAIException{
+
+ httpHeaders = mock(HttpHeaders.class);
+ uriInfo = mock(UriInfo.class);
+
+ headersMultiMap = new MultivaluedHashMap<>();
+ queryParameters = Mockito.spy(new MultivaluedHashMap<>());
+
+ headersMultiMap.add("X-FromAppId", "JUNIT");
+ headersMultiMap.add("X-TransactionId", UUID.randomUUID().toString());
+ headersMultiMap.add("Real-Time", "true");
+ headersMultiMap.add("Accept", "application/json");
+ headersMultiMap.add("aai-request-context", "");
+
+ outputMediaTypes = new ArrayList<>();
+ outputMediaTypes.add(APPLICATION_JSON);
+
+ aaiRequestContextList = new ArrayList<>();
+ aaiRequestContextList.add("");
+
+ when(httpHeaders.getAcceptableMediaTypes()).thenReturn(outputMediaTypes);
+ when(httpHeaders.getRequestHeaders()).thenReturn(headersMultiMap);
+ when(httpHeaders.getRequestHeader("X-FromAppId")).thenReturn(Arrays.asList("JUNIT"));
+ when(httpHeaders.getRequestHeader("X-TransactionId")).thenReturn(Arrays.asList("JUNIT"));
+
+ when(httpHeaders.getRequestHeader("aai-request-context")).thenReturn(aaiRequestContextList);
+
+
+ when(uriInfo.getQueryParameters()).thenReturn(queryParameters);
+ when(uriInfo.getQueryParameters(false)).thenReturn(queryParameters);
+
+ // TODO - Check if this is valid since RemoveDME2QueryParameters seems to be very unreasonable
+ Mockito.doReturn(null).when(queryParameters).remove(anyObject());
+
+ when(httpHeaders.getMediaType()).thenReturn(APPLICATION_JSON);
+ loader = LoaderFactory.createLoaderForVersion(introspectorFactoryType, version);
+ dbEngine = new TitanDBEngine(
+ queryStyle,
+ type,
+ loader);
+ GenericQueryProcessor.Builder builder=new GenericQueryProcessor.Builder(dbEngine);
+builder.queryFrom(URI.create("te"));
+builder.queryFrom("te");
+builder.create();
+builder.processWith(QueryProcessorType.GREMLIN_SERVER);
+ builder.processWith(QueryProcessorType.LOCAL_GROOVY);
+
+ groovyShellImpl= new GroovyShellImpl(builder);
+ }
+
+ @Test(expected = MissingPropertyException.class)
+ public void processSubGraphTest() throws Exception{
+ GraphTraversal<Vertex, Vertex> g=Mockito.mock(GraphTraversal.class);
+ g.has("cloud-region-id", "cloud-region-id-1");
+ Map<String, Object> params = new HashMap<>();
+ groovyShellImpl.runQuery("vnfs-fromServiceInstance",params);
+}
+
+
+
+
+
+}
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/ImageFromCloudRegionNfTypeTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/ImageFromCloudRegionNfTypeTest.java
index d93f183..02f7162 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/ImageFromCloudRegionNfTypeTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/ImageFromCloudRegionNfTypeTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -27,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class ImageFromCloudRegionNfTypeTest extends QueryTest {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/LinkedDevices_ComplicatedGVtoGV.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/LinkedDevices_ComplicatedGVtoGV.java
index 656cd44..c4b90bf 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/LinkedDevices_ComplicatedGVtoGV.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/LinkedDevices_ComplicatedGVtoGV.java
@@ -1,4 +1,25 @@
-package org.openecomp.aai.rest.search;
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -7,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class LinkedDevices_ComplicatedGVtoGV extends QueryTest {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/LinkedDevices_NewvceVserverTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/LinkedDevices_NewvceVserverTest.java
index e37bb5a..dcc3d32 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/LinkedDevices_NewvceVserverTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/LinkedDevices_NewvceVserverTest.java
@@ -1,4 +1,25 @@
-package org.openecomp.aai.rest.search;
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.rest.search;
import static org.junit.Assert.*;
@@ -11,8 +32,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class LinkedDevices_NewvceVserverTest extends QueryTest {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/LinkedDevices_SimpleGVtoGVQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/LinkedDevices_SimpleGVtoGVQueryTest.java
index 435878e..399b60a 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/LinkedDevices_SimpleGVtoGVQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/LinkedDevices_SimpleGVtoGVQueryTest.java
@@ -1,4 +1,25 @@
-package org.openecomp.aai.rest.search;
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -7,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class LinkedDevices_SimpleGVtoGVQueryTest extends QueryTest {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/LocationNetTypeNetRolefromCloudRegionQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/LocationNetTypeNetRolefromCloudRegionQueryTest.java
index e8aec8b..6dcb071 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/LocationNetTypeNetRolefromCloudRegionQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/LocationNetTypeNetRolefromCloudRegionQueryTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class LocationNetTypeNetRolefromCloudRegionQueryTest extends QueryTest {
public LocationNetTypeNetRolefromCloudRegionQueryTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/ModelAndNamedQueryRestProviderTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/ModelAndNamedQueryRestProviderTest.java
index 5813ef1..ea5bc85 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/ModelAndNamedQueryRestProviderTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/ModelAndNamedQueryRestProviderTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
@@ -26,16 +27,16 @@ import org.apache.commons.io.IOUtils;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
-import org.openecomp.aai.dbmap.DBConnectionType;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.LoaderFactory;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.Version;
-import org.openecomp.aai.serialization.db.DBSerializer;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TitanDBEngine;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.openecomp.aai.serialization.queryformats.utils.UrlBuilder;
+import org.onap.aai.dbmap.DBConnectionType;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.Version;
+import org.onap.aai.serialization.db.DBSerializer;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TitanDBEngine;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.serialization.queryformats.utils.UrlBuilder;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.*;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/MsoRequestVfModuleTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/MsoRequestVfModuleTest.java
index 1038eb3..225d45f 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/MsoRequestVfModuleTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/MsoRequestVfModuleTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -27,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class MsoRequestVfModuleTest extends QueryTest {
public MsoRequestVfModuleTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/NetworkNameFromNetworkRoleQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/NetworkNameFromNetworkRoleQueryTest.java
index ce88b01..83b6d2f 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/NetworkNameFromNetworkRoleQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/NetworkNameFromNetworkRoleQueryTest.java
@@ -1,4 +1,25 @@
-package org.openecomp.aai.rest.search;
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.rest.search;
import static org.junit.Assert.*;
@@ -9,8 +30,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class NetworkNameFromNetworkRoleQueryTest extends QueryTest {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/NfTypefromCloudRegionQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/NfTypefromCloudRegionQueryTest.java
index 9451a86..4b667d0 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/NfTypefromCloudRegionQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/NfTypefromCloudRegionQueryTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -27,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class NfTypefromCloudRegionQueryTest extends QueryTest {
public NfTypefromCloudRegionQueryTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/OwningEntityfromServiceInstance.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/OwningEntityfromServiceInstance.java
index d6704fa..d0fd1b1 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/OwningEntityfromServiceInstance.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/OwningEntityfromServiceInstance.java
@@ -1,32 +1,33 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
import java.util.Map;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/PendingTopologyDetailTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/PendingTopologyDetailTest.java
index 22a60ce..d282164 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/PendingTopologyDetailTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/PendingTopologyDetailTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class PendingTopologyDetailTest extends QueryTest {
public PendingTopologyDetailTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/PserverfromConfigurationFilterInterfaceIdTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/PserverfromConfigurationFilterInterfaceIdTest.java
index 2dc023b..9a427ca 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/PserverfromConfigurationFilterInterfaceIdTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/PserverfromConfigurationFilterInterfaceIdTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class PserverfromConfigurationFilterInterfaceIdTest extends QueryTest {
public PserverfromConfigurationFilterInterfaceIdTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/PserverfromConfigurationTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/PserverfromConfigurationTest.java
index fd23bc4..9638cfd 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/PserverfromConfigurationTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/PserverfromConfigurationTest.java
@@ -1,14 +1,14 @@
-/*-
+/**
* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,9 +16,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class PserverfromConfigurationTest extends QueryTest {
public PserverfromConfigurationTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/PserversFromVnfQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/PserversFromVnfQueryTest.java
index f8bcb7d..e6abee6 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/PserversFromVnfQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/PserversFromVnfQueryTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class PserversFromVnfQueryTest extends QueryTest {
public PserversFromVnfQueryTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/QueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/QueryTest.java
index 2d40484..5457937 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/QueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/QueryTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.any;
@@ -35,16 +36,16 @@ import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.LoaderFactory;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.Version;
-import org.openecomp.aai.query.builder.GremlinTraversal;
-import org.openecomp.aai.serialization.db.EdgeRules;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.Version;
+import org.onap.aai.query.builder.GremlinTraversal;
+import org.onap.aai.serialization.db.EdgeRules;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
public abstract class QueryTest {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/QueryVnfFromModelByRegionTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/QueryVnfFromModelByRegionTest.java
index 6fe7872..67f7d11 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/QueryVnfFromModelByRegionTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/QueryVnfFromModelByRegionTest.java
@@ -1,12 +1,33 @@
-package org.openecomp.aai.rest.search;
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.rest.search;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal;
import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
import java.util.Map;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/SearchProviderTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/SearchProviderTest.java
index 6b922bf..8633cb4 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/SearchProviderTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/SearchProviderTest.java
@@ -1,40 +1,41 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
-import org.openecomp.aai.dbmap.DBConnectionType;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.LoaderFactory;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.Version;
-import org.openecomp.aai.serialization.db.DBSerializer;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TitanDBEngine;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.openecomp.aai.serialization.queryformats.utils.UrlBuilder;
+import org.onap.aai.dbmap.DBConnectionType;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.Version;
+import org.onap.aai.serialization.db.DBSerializer;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TitanDBEngine;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.serialization.queryformats.utils.UrlBuilder;
import javax.ws.rs.core.*;
import java.util.*;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/ServiceFromPserverAndSubsNameTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/ServiceFromPserverAndSubsNameTest.java
index 264e462..3be5b34 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/ServiceFromPserverAndSubsNameTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/ServiceFromPserverAndSubsNameTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class ServiceFromPserverAndSubsNameTest extends QueryTest {
public ServiceFromPserverAndSubsNameTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/SimpleFormatTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/SimpleFormatTest.java
index eedcd69..17ddfc5 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/SimpleFormatTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/SimpleFormatTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -35,21 +36,21 @@ import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
import org.junit.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
-import org.openecomp.aai.dbmap.DBConnectionType;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.introspection.Loader;
-import org.openecomp.aai.introspection.LoaderFactory;
-import org.openecomp.aai.introspection.ModelType;
-import org.openecomp.aai.introspection.Version;
-import org.openecomp.aai.serialization.db.DBSerializer;
-import org.openecomp.aai.serialization.db.EdgeRules;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
-import org.openecomp.aai.serialization.engines.QueryStyle;
-import org.openecomp.aai.serialization.engines.TitanDBEngine;
-import org.openecomp.aai.serialization.engines.TransactionalGraphEngine;
-import org.openecomp.aai.serialization.queryformats.RawFormat;
-import org.openecomp.aai.serialization.queryformats.exceptions.AAIFormatVertexException;
-import org.openecomp.aai.serialization.queryformats.utils.UrlBuilder;
+import org.onap.aai.dbmap.DBConnectionType;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.introspection.Loader;
+import org.onap.aai.introspection.LoaderFactory;
+import org.onap.aai.introspection.ModelType;
+import org.onap.aai.introspection.Version;
+import org.onap.aai.serialization.db.DBSerializer;
+import org.onap.aai.serialization.db.EdgeRules;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.serialization.engines.QueryStyle;
+import org.onap.aai.serialization.engines.TitanDBEngine;
+import org.onap.aai.serialization.engines.TransactionalGraphEngine;
+import org.onap.aai.serialization.queryformats.RawFormat;
+import org.onap.aai.serialization.queryformats.exceptions.AAIFormatVertexException;
+import org.onap.aai.serialization.queryformats.utils.UrlBuilder;
import com.google.gson.JsonObject;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyDetailFromVserverQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyDetailFromVserverQueryTest.java
index 758b113..a99fa8f 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyDetailFromVserverQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyDetailFromVserverQueryTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class TopologyDetailFromVserverQueryTest extends QueryTest {
public TopologyDetailFromVserverQueryTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyDetailsQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyDetailsQueryTest.java
index 1dd4db2..1891914 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyDetailsQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyDetailsQueryTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -27,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class TopologyDetailsQueryTest extends QueryTest {
public TopologyDetailsQueryTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyFromCloudRegionIdAndServiceIdTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyFromCloudRegionIdAndServiceIdTest.java
index d53f51d..8068c31 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyFromCloudRegionIdAndServiceIdTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyFromCloudRegionIdAndServiceIdTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class TopologyFromCloudRegionIdAndServiceIdTest extends QueryTest {
public TopologyFromCloudRegionIdAndServiceIdTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyFromSubscriberNameAndServiceTypeTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyFromSubscriberNameAndServiceTypeTest.java
index b200e9b..b10abf3 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/TopologyFromSubscriberNameAndServiceTypeTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/TopologyFromSubscriberNameAndServiceTypeTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -32,8 +33,8 @@ import com.att.eelf.configuration.EELFManager;
import com.google.common.base.CaseFormat;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class TopologyFromSubscriberNameAndServiceTypeTest extends QueryTest {
private static final EELFLogger LOGGER = EELFManager.getInstance()
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfInstancesFromServiceInstancebyModelVersionTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfInstancesFromServiceInstancebyModelVersionTest.java
index 56ddaaf..ecf30b3 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfInstancesFromServiceInstancebyModelVersionTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfInstancesFromServiceInstancebyModelVersionTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -27,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class VnfInstancesFromServiceInstancebyModelVersionTest extends QueryTest {
public VnfInstancesFromServiceInstancebyModelVersionTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfTopologyFromServiceInstanceTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfTopologyFromServiceInstanceTest.java
index 2963c2f..b426ee1 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfTopologyFromServiceInstanceTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfTopologyFromServiceInstanceTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -27,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class VnfTopologyFromServiceInstanceTest extends QueryTest {
public VnfTopologyFromServiceInstanceTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfTopologyFromVfModuleTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfTopologyFromVfModuleTest.java
index 07e3894..7fbc175 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfTopologyFromVfModuleTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfTopologyFromVfModuleTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class VnfTopologyFromVfModuleTest extends QueryTest {
public VnfTopologyFromVfModuleTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfTopologyFromVnfTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfTopologyFromVnfTest.java
index c678be5..af935f7 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfTopologyFromVnfTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfTopologyFromVnfTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class VnfTopologyFromVnfTest extends QueryTest {
public VnfTopologyFromVnfTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfsFromPserverQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfsFromPserverQueryTest.java
index fde3729..a3f9c97 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfsFromPserverQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfsFromPserverQueryTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -28,8 +29,8 @@ import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class VnfsFromPserverQueryTest extends QueryTest {
public VnfsFromPserverQueryTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfsFromServiceInstanceTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfsFromServiceInstanceTest.java
index 2a33d7d..6e4f923 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VnfsFromServiceInstanceTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/VnfsFromServiceInstanceTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import java.util.Map;
@@ -27,8 +28,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class VnfsFromServiceInstanceTest extends QueryTest {
public VnfsFromServiceInstanceTest() throws AAIException, NoEdgeRuleFoundException {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VserverFromVnfQueryTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/VserverFromVnfQueryTest.java
index 9d6ad2e..acec2e7 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VserverFromVnfQueryTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/VserverFromVnfQueryTest.java
@@ -1,4 +1,25 @@
-package org.openecomp.aai.rest.search;
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.rest.search;
import static org.junit.Assert.*;
@@ -9,8 +30,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class VserverFromVnfQueryTest extends QueryTest {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VserverLogicallinkFromPServerTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/search/VserverLogicallinkFromPServerTest.java
index 5d022ff..8901de2 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/search/VserverLogicallinkFromPServerTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/search/VserverLogicallinkFromPServerTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.search;
+package org.onap.aai.rest.search;
import static org.junit.Assert.*;
@@ -29,8 +30,8 @@ import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSo
import org.apache.tinkerpop.gremlin.structure.T;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.junit.Test;
-import org.openecomp.aai.exceptions.AAIException;
-import org.openecomp.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
+import org.onap.aai.exceptions.AAIException;
+import org.onap.aai.serialization.db.exceptions.NoEdgeRuleFoundException;
public class VserverLogicallinkFromPServerTest extends QueryTest {
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/util/EchoResponseTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/util/EchoResponseTest.java
index 44d38be..d06c8b7 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/util/EchoResponseTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/util/EchoResponseTest.java
@@ -1,14 +1,14 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
+ * http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,9 +16,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.util;
+package org.onap.aai.rest.util;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/util/LogFormatToolsTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/util/LogFormatToolsTest.java
index 3a1ddc1..c4cc211 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/util/LogFormatToolsTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/util/LogFormatToolsTest.java
@@ -1,35 +1,36 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.openecomp.aai
- * ================================================================================
- * 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.aai.rest.util;
-
-import org.junit.Test;
-
-import static org.junit.Assert.assertNotNull;
-
-public class LogFormatToolsTest {
-
- @Test
- public void testLogFormatTools(){
-
- String dateTime = new LogFormatTools().getCurrentDateTime();
- assertNotNull(dateTime);
- }
-}
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.rest.util;
+
+import org.junit.Test;
+
+import static org.junit.Assert.assertNotNull;
+
+public class LogFormatToolsTest {
+
+ @Test
+ public void testLogFormatTools(){
+
+ String dateTime = new LogFormatTools().getCurrentDateTime();
+ assertNotNull(dateTime);
+ }
+}
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/rest/util/ValidateEncodingTest.java b/aai-traversal/src/test/java/org/onap/aai/rest/util/ValidateEncodingTest.java
index 8c6450d..fa6480f 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/rest/util/ValidateEncodingTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/rest/util/ValidateEncodingTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.rest.util;
+package org.onap.aai.rest.util;
import static org.junit.Assert.*;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/JaxrsUserServiceTest.java b/aai-traversal/src/test/java/org/onap/aai/retiredcustomer/JaxrsUserServiceTest.java
index 9a9ae8d..3e323dd 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/JaxrsUserServiceTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/retiredcustomer/JaxrsUserServiceTest.java
@@ -1,110 +1,111 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.openecomp.aai
- * ================================================================================
- * 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.aai.retiredcustomer;
-
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.aai.ajsc_aai.JaxrsUserService;
-import org.openecomp.aai.introspection.Version;
-import org.openecomp.aai.rest.retired.RetiredConsumer;
-
-import javax.ws.rs.core.*;
-import java.util.*;
-
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Mockito.when;
-
-public class JaxrsUserServiceTest {
-
-
- protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json");
-
- private static final Set<Integer> VALID_HTTP_STATUS_CODES = new HashSet<>();
-
- static {
- VALID_HTTP_STATUS_CODES.add(200);
- VALID_HTTP_STATUS_CODES.add(201);
- VALID_HTTP_STATUS_CODES.add(204);
- }
-
- protected JaxrsUserService jaxrsUserService;
- protected HttpHeaders httpHeaders;
- protected UriInfo uriInfo;
-
- private MultivaluedMap<String, String> headersMultiMap;
- private MultivaluedMap<String, String> queryParameters;
-
- private List<String> aaiRequestContextList;
-
- private List<MediaType> outputMediaTypes;
-
- private static final EELFLogger logger = EELFManager.getInstance().getLogger(RetiredConsumer.class.getName());
-
- @Before
- public void setup(){
- logger.info("Starting the setup for the integration tests of Rest Endpoints");
-
- jaxrsUserService = new JaxrsUserService();
- httpHeaders = Mockito.mock(HttpHeaders.class);
- uriInfo = Mockito.mock(UriInfo.class);
-
- headersMultiMap = new MultivaluedHashMap<>();
- queryParameters = Mockito.spy(new MultivaluedHashMap<>());
-
- headersMultiMap.add("X-FromAppId", "JUNIT");
- headersMultiMap.add("X-TransactionId", UUID.randomUUID().toString());
- headersMultiMap.add("Real-Time", "true");
- headersMultiMap.add("Accept", "application/json");
- headersMultiMap.add("aai-request-context", "");
-
- outputMediaTypes = new ArrayList<>();
- outputMediaTypes.add(APPLICATION_JSON);
-
- aaiRequestContextList = new ArrayList<>();
- aaiRequestContextList.add("");
-
- when(httpHeaders.getAcceptableMediaTypes()).thenReturn(outputMediaTypes);
- when(httpHeaders.getRequestHeaders()).thenReturn(headersMultiMap);
-
- when(httpHeaders.getRequestHeader("aai-request-context")).thenReturn(aaiRequestContextList);
-
-
- when(uriInfo.getQueryParameters()).thenReturn(queryParameters);
- when(uriInfo.getQueryParameters(false)).thenReturn(queryParameters);
-
- // TODO - Check if this is valid since RemoveDME2QueryParameters seems to be very unreasonable
- Mockito.doReturn(null).when(queryParameters).remove(anyObject());
-
- when(httpHeaders.getMediaType()).thenReturn(APPLICATION_JSON);
- }
- @Test
- public void lookUpUserTest(){
- when(uriInfo.getPath()).thenReturn("/user?userID1");
- String response = jaxrsUserService.lookupUser("userID1");
- assertNotNull(response);
-
-
- }
-}
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.retiredcustomer;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.aai.ajsc_aai.JaxrsUserService;
+import org.onap.aai.introspection.Version;
+import org.onap.aai.rest.retired.RetiredConsumer;
+
+import javax.ws.rs.core.*;
+import java.util.*;
+
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Matchers.anyObject;
+import static org.mockito.Mockito.when;
+
+public class JaxrsUserServiceTest {
+
+
+ protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json");
+
+ private static final Set<Integer> VALID_HTTP_STATUS_CODES = new HashSet<>();
+
+ static {
+ VALID_HTTP_STATUS_CODES.add(200);
+ VALID_HTTP_STATUS_CODES.add(201);
+ VALID_HTTP_STATUS_CODES.add(204);
+ }
+
+ protected JaxrsUserService jaxrsUserService;
+ protected HttpHeaders httpHeaders;
+ protected UriInfo uriInfo;
+
+ private MultivaluedMap<String, String> headersMultiMap;
+ private MultivaluedMap<String, String> queryParameters;
+
+ private List<String> aaiRequestContextList;
+
+ private List<MediaType> outputMediaTypes;
+
+ private static final EELFLogger logger = EELFManager.getInstance().getLogger(RetiredConsumer.class.getName());
+
+ @Before
+ public void setup(){
+ logger.info("Starting the setup for the integration tests of Rest Endpoints");
+
+ jaxrsUserService = new JaxrsUserService();
+ httpHeaders = Mockito.mock(HttpHeaders.class);
+ uriInfo = Mockito.mock(UriInfo.class);
+
+ headersMultiMap = new MultivaluedHashMap<>();
+ queryParameters = Mockito.spy(new MultivaluedHashMap<>());
+
+ headersMultiMap.add("X-FromAppId", "JUNIT");
+ headersMultiMap.add("X-TransactionId", UUID.randomUUID().toString());
+ headersMultiMap.add("Real-Time", "true");
+ headersMultiMap.add("Accept", "application/json");
+ headersMultiMap.add("aai-request-context", "");
+
+ outputMediaTypes = new ArrayList<>();
+ outputMediaTypes.add(APPLICATION_JSON);
+
+ aaiRequestContextList = new ArrayList<>();
+ aaiRequestContextList.add("");
+
+ when(httpHeaders.getAcceptableMediaTypes()).thenReturn(outputMediaTypes);
+ when(httpHeaders.getRequestHeaders()).thenReturn(headersMultiMap);
+
+ when(httpHeaders.getRequestHeader("aai-request-context")).thenReturn(aaiRequestContextList);
+
+
+ when(uriInfo.getQueryParameters()).thenReturn(queryParameters);
+ when(uriInfo.getQueryParameters(false)).thenReturn(queryParameters);
+
+ // TODO - Check if this is valid since RemoveDME2QueryParameters seems to be very unreasonable
+ Mockito.doReturn(null).when(queryParameters).remove(anyObject());
+
+ when(httpHeaders.getMediaType()).thenReturn(APPLICATION_JSON);
+ }
+ @Test
+ public void lookUpUserTest(){
+ when(uriInfo.getPath()).thenReturn("/user?userID1");
+ String response = jaxrsUserService.lookupUser("userID1");
+ assertNotNull(response);
+
+
+ }
+}
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/RetiredConsumerTest.java b/aai-traversal/src/test/java/org/onap/aai/retiredcustomer/RetiredConsumerTest.java
index 4a8a051..3810d44 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/RetiredConsumerTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/retiredcustomer/RetiredConsumerTest.java
@@ -1,128 +1,129 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.openecomp.aai
- * ================================================================================
- * 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.aai.retiredcustomer;
-
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.openecomp.aai.introspection.Version;
-import org.openecomp.aai.rest.retired.RetiredConsumer;
-
-import javax.ws.rs.core.*;
-import java.util.*;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.Matchers.anyObject;
-import static org.mockito.Mockito.when;
-
-public abstract class RetiredConsumerTest {
-
- protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json");
-
- private static final Set<Integer> VALID_HTTP_STATUS_CODES = new HashSet<>();
-
- static {
- VALID_HTTP_STATUS_CODES.add(200);
- VALID_HTTP_STATUS_CODES.add(201);
- VALID_HTTP_STATUS_CODES.add(204);
- }
-
- protected RetiredConsumer retiredConsumer;
- protected HttpHeaders httpHeaders;
- protected UriInfo uriInfo;
-
- private MultivaluedMap<String, String> headersMultiMap;
- private MultivaluedMap<String, String> queryParameters;
-
- private List<String> aaiRequestContextList;
-
- private List<MediaType> outputMediaTypes;
-
- private static final EELFLogger logger = EELFManager.getInstance().getLogger(RetiredConsumer.class.getName());
-
- @Before
- public void setup(){
- logger.info("Starting the setup for the integration tests of Rest Endpoints");
-
- retiredConsumer = getRetiredConsumer();
- httpHeaders = Mockito.mock(HttpHeaders.class);
- uriInfo = Mockito.mock(UriInfo.class);
-
- headersMultiMap = new MultivaluedHashMap<>();
- queryParameters = Mockito.spy(new MultivaluedHashMap<>());
-
- headersMultiMap.add("X-FromAppId", "JUNIT");
- headersMultiMap.add("X-TransactionId", UUID.randomUUID().toString());
- headersMultiMap.add("Real-Time", "true");
- headersMultiMap.add("Accept", "application/json");
- headersMultiMap.add("aai-request-context", "");
-
- outputMediaTypes = new ArrayList<>();
- outputMediaTypes.add(APPLICATION_JSON);
-
- aaiRequestContextList = new ArrayList<>();
- aaiRequestContextList.add("");
-
- when(httpHeaders.getAcceptableMediaTypes()).thenReturn(outputMediaTypes);
- when(httpHeaders.getRequestHeaders()).thenReturn(headersMultiMap);
-
- when(httpHeaders.getRequestHeader("aai-request-context")).thenReturn(aaiRequestContextList);
-
-
- when(uriInfo.getQueryParameters()).thenReturn(queryParameters);
- when(uriInfo.getQueryParameters(false)).thenReturn(queryParameters);
-
- // TODO - Check if this is valid since RemoveDME2QueryParameters seems to be very unreasonable
- Mockito.doReturn(null).when(queryParameters).remove(anyObject());
-
- when(httpHeaders.getMediaType()).thenReturn(APPLICATION_JSON);
- }
-
- @Test
- public void testRetiredForAllEndPoints(){
- when(uriInfo.getPath()).thenReturn("/aai/v3/cloud-infrastructure/pservers/pserver/test-pserver1");
-
- Response response = retiredConsumer.createMessageGet(Version.getLatest().toString(), httpHeaders, uriInfo, null);
- assertNotNull(response);
- assertEquals(Response.Status.GONE.getStatusCode(), response.getStatus());
-
- response = retiredConsumer.createMessagePost(Version.getLatest().toString(), httpHeaders, uriInfo, null);
- assertNotNull(response);
- assertEquals(Response.Status.GONE.getStatusCode(), response.getStatus());
-
- response = retiredConsumer.createMessagePatch(Version.getLatest().toString(), httpHeaders, uriInfo, null);
- assertNotNull(response);
- assertEquals(Response.Status.GONE.getStatusCode(), response.getStatus());
-
- response = retiredConsumer.createMessagePut(Version.getLatest().toString(), httpHeaders, uriInfo, null);
- assertNotNull(response);
- assertEquals(Response.Status.GONE.getStatusCode(), response.getStatus());
-
- response = retiredConsumer.createMessageDelete(Version.getLatest().toString(), httpHeaders, uriInfo, null);
- assertNotNull(response);
- assertEquals(Response.Status.GONE.getStatusCode(), response.getStatus());
- }
-
- public abstract RetiredConsumer getRetiredConsumer();
-}
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.retiredcustomer;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.onap.aai.introspection.Version;
+import org.onap.aai.rest.retired.RetiredConsumer;
+
+import javax.ws.rs.core.*;
+import java.util.*;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.mockito.Matchers.anyObject;
+import static org.mockito.Mockito.when;
+
+public abstract class RetiredConsumerTest {
+
+ protected static final MediaType APPLICATION_JSON = MediaType.valueOf("application/json");
+
+ private static final Set<Integer> VALID_HTTP_STATUS_CODES = new HashSet<>();
+
+ static {
+ VALID_HTTP_STATUS_CODES.add(200);
+ VALID_HTTP_STATUS_CODES.add(201);
+ VALID_HTTP_STATUS_CODES.add(204);
+ }
+
+ protected RetiredConsumer retiredConsumer;
+ protected HttpHeaders httpHeaders;
+ protected UriInfo uriInfo;
+
+ private MultivaluedMap<String, String> headersMultiMap;
+ private MultivaluedMap<String, String> queryParameters;
+
+ private List<String> aaiRequestContextList;
+
+ private List<MediaType> outputMediaTypes;
+
+ private static final EELFLogger logger = EELFManager.getInstance().getLogger(RetiredConsumer.class.getName());
+
+ @Before
+ public void setup(){
+ logger.info("Starting the setup for the integration tests of Rest Endpoints");
+
+ retiredConsumer = getRetiredConsumer();
+ httpHeaders = Mockito.mock(HttpHeaders.class);
+ uriInfo = Mockito.mock(UriInfo.class);
+
+ headersMultiMap = new MultivaluedHashMap<>();
+ queryParameters = Mockito.spy(new MultivaluedHashMap<>());
+
+ headersMultiMap.add("X-FromAppId", "JUNIT");
+ headersMultiMap.add("X-TransactionId", UUID.randomUUID().toString());
+ headersMultiMap.add("Real-Time", "true");
+ headersMultiMap.add("Accept", "application/json");
+ headersMultiMap.add("aai-request-context", "");
+
+ outputMediaTypes = new ArrayList<>();
+ outputMediaTypes.add(APPLICATION_JSON);
+
+ aaiRequestContextList = new ArrayList<>();
+ aaiRequestContextList.add("");
+
+ when(httpHeaders.getAcceptableMediaTypes()).thenReturn(outputMediaTypes);
+ when(httpHeaders.getRequestHeaders()).thenReturn(headersMultiMap);
+
+ when(httpHeaders.getRequestHeader("aai-request-context")).thenReturn(aaiRequestContextList);
+
+
+ when(uriInfo.getQueryParameters()).thenReturn(queryParameters);
+ when(uriInfo.getQueryParameters(false)).thenReturn(queryParameters);
+
+ // TODO - Check if this is valid since RemoveDME2QueryParameters seems to be very unreasonable
+ Mockito.doReturn(null).when(queryParameters).remove(anyObject());
+
+ when(httpHeaders.getMediaType()).thenReturn(APPLICATION_JSON);
+ }
+
+ @Test
+ public void testRetiredForAllEndPoints(){
+ when(uriInfo.getPath()).thenReturn("/aai/v3/cloud-infrastructure/pservers/pserver/test-pserver1");
+
+ Response response = retiredConsumer.createMessageGet(Version.getLatest().toString(), httpHeaders, uriInfo, null);
+ assertNotNull(response);
+ assertEquals(Response.Status.GONE.getStatusCode(), response.getStatus());
+
+ response = retiredConsumer.createMessagePost(Version.getLatest().toString(), httpHeaders, uriInfo, null);
+ assertNotNull(response);
+ assertEquals(Response.Status.GONE.getStatusCode(), response.getStatus());
+
+ response = retiredConsumer.createMessagePatch(Version.getLatest().toString(), httpHeaders, uriInfo, null);
+ assertNotNull(response);
+ assertEquals(Response.Status.GONE.getStatusCode(), response.getStatus());
+
+ response = retiredConsumer.createMessagePut(Version.getLatest().toString(), httpHeaders, uriInfo, null);
+ assertNotNull(response);
+ assertEquals(Response.Status.GONE.getStatusCode(), response.getStatus());
+
+ response = retiredConsumer.createMessageDelete(Version.getLatest().toString(), httpHeaders, uriInfo, null);
+ assertNotNull(response);
+ assertEquals(Response.Status.GONE.getStatusCode(), response.getStatus());
+ }
+
+ public abstract RetiredConsumer getRetiredConsumer();
+}
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/V3ThroughV7ConsumerTest.java b/aai-traversal/src/test/java/org/onap/aai/retiredcustomer/V3ThroughV7ConsumerTest.java
index ea8ea9c..e02cf38 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/V3ThroughV7ConsumerTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/retiredcustomer/V3ThroughV7ConsumerTest.java
@@ -1,33 +1,34 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.openecomp.aai
- * ================================================================================
- * 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.aai.retiredcustomer;
-
-import org.openecomp.aai.rest.retired.RetiredConsumer;
-import org.openecomp.aai.rest.retired.V3ThroughV7Consumer;
-
-
-public class V3ThroughV7ConsumerTest extends RetiredConsumerTest {
-
- @Override
- public RetiredConsumer getRetiredConsumer() {
- return new V3ThroughV7Consumer();
- }
-}
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.retiredcustomer;
+
+import org.onap.aai.rest.retired.RetiredConsumer;
+import org.onap.aai.rest.retired.V3ThroughV7Consumer;
+
+
+public class V3ThroughV7ConsumerTest extends RetiredConsumerTest {
+
+ @Override
+ public RetiredConsumer getRetiredConsumer() {
+ return new V3ThroughV7Consumer();
+ }
+}
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/V7V8NamedQueriesTest.java b/aai-traversal/src/test/java/org/onap/aai/retiredcustomer/V7V8NamedQueriesTest.java
index 9968ee8..7c75e60 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/retiredcustomer/V7V8NamedQueriesTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/retiredcustomer/V7V8NamedQueriesTest.java
@@ -1,33 +1,34 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.openecomp.aai
- * ================================================================================
- * 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.aai.retiredcustomer;
-
-import org.openecomp.aai.rest.retired.RetiredConsumer;
-import org.openecomp.aai.rest.retired.V7V8NamedQueries;
-
-public class V7V8NamedQueriesTest extends RetiredConsumerTest {
-
- @Override
- public RetiredConsumer getRetiredConsumer() {
- return new V7V8NamedQueries();
- }
-}
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+
+package org.onap.aai.retiredcustomer;
+
+import org.onap.aai.rest.retired.RetiredConsumer;
+import org.onap.aai.rest.retired.V7V8NamedQueries;
+
+public class V7V8NamedQueriesTest extends RetiredConsumerTest {
+
+ @Override
+ public RetiredConsumer getRetiredConsumer() {
+ return new V7V8NamedQueries();
+ }
+}
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/transforms/JoltTestUtil.java b/aai-traversal/src/test/java/org/onap/aai/transforms/JoltTestUtil.java
index 7df2790..6a1966c 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/transforms/JoltTestUtil.java
+++ b/aai-traversal/src/test/java/org/onap/aai/transforms/JoltTestUtil.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.transforms;
+package org.onap.aai.transforms;
import java.io.IOException;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/transforms/LowerHyphenToLowerCamelConverterTest.java b/aai-traversal/src/test/java/org/onap/aai/transforms/LowerHyphenToLowerCamelConverterTest.java
index 3dc5299..8c8837c 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/transforms/LowerHyphenToLowerCamelConverterTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/transforms/LowerHyphenToLowerCamelConverterTest.java
@@ -1,24 +1,25 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
-
-package org.openecomp.aai.transforms;
+package org.onap.aai.transforms;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/transforms/MapTraverserTest.java b/aai-traversal/src/test/java/org/onap/aai/transforms/MapTraverserTest.java
index e3b7760..f26f719 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/transforms/MapTraverserTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/transforms/MapTraverserTest.java
@@ -1,27 +1,28 @@
-/*-
+/**
* ============LICENSE_START=======================================================
- * org.openecomp.aai
+ * org.onap.aai
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 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
- *
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
*/
+package org.onap.aai.transforms;
-package org.openecomp.aai.transforms;
-
-import org.openecomp.aai.transforms.LowerCamelToLowerHyphenConverter;
-import org.openecomp.aai.transforms.MapTraverser;
+import org.onap.aai.transforms.LowerCamelToLowerHyphenConverter;
+import org.onap.aai.transforms.MapTraverser;
import com.bazaarvoice.jolt.JsonUtils;
import org.junit.Test;
diff --git a/aai-traversal/src/test/java/org/openecomp/aai/util/AAIAppServletContextListenerTest.java b/aai-traversal/src/test/java/org/onap/aai/util/AAIAppServletContextListenerTest.java
index d8e4928..003c4e0 100644
--- a/aai-traversal/src/test/java/org/openecomp/aai/util/AAIAppServletContextListenerTest.java
+++ b/aai-traversal/src/test/java/org/onap/aai/util/AAIAppServletContextListenerTest.java
@@ -1,177 +1,178 @@
-/*-
- * ============LICENSE_START=======================================================
- * org.openecomp.aai
- * ================================================================================
- * 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.aai.util;
-
-import ch.qos.logback.classic.Level;
-import ch.qos.logback.classic.Logger;
-import ch.qos.logback.classic.PatternLayout;
-import ch.qos.logback.classic.spi.ILoggingEvent;
-import ch.qos.logback.core.AppenderBase;
-import org.apache.commons.lang.ObjectUtils;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.openecomp.aai.dbmap.AAIGraph;
-import org.openecomp.aai.logging.ErrorLogHelper;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.agent.PowerMockAgent;
-import org.powermock.modules.junit4.rule.PowerMockRule;
-import org.slf4j.LoggerFactory;
-
-import javax.servlet.ServletContextEvent;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-@PrepareForTest({AAIGraph.class, AAIConfig.class, ErrorLogHelper.class})
-public class AAIAppServletContextListenerTest {
-
- @Rule
- public PowerMockRule rule = new PowerMockRule();
-
- static {
- PowerMockAgent.initializeIfNeeded();
- }
-
- private ServletContextEvent arg;
- private AAIAppServletContextListener listener;
-
- /**
- * Initialize.
- */
- @Before
- @PrepareForTest({AAIGraph.class, AAIConfig.class, ErrorLogHelper.class})
- public void initialize(){
- arg = PowerMockito.mock(ServletContextEvent.class);
- PowerMockito.mockStatic(AAIGraph.class);
- PowerMockito.mockStatic(AAIConfig.class);
- PowerMockito.mockStatic(ErrorLogHelper.class);
-
- listener = new AAIAppServletContextListener();
- configureLog();
- }
-
- /**
- * Test contextDestroyed.
- */
- @Test(expected = NullPointerException.class)
- //@Ignore
- public void testContextDestroyed(){
- listener.contextDestroyed(arg);
- assertTrue(logContains(Level.DEBUG, "AAI Server shutdown"));
- assertTrue(logContains(Level.INFO, "AAI graph shutdown"));
- }
-
- /**
- * Test contextInitialized.
- */
- @Test
- //@Ignore
- public void testContextInitialized(){
- listener.contextInitialized(arg);
- assertFalse(logContains(Level.DEBUG, "Loading aaiconfig.properties"));
- assertFalse(logContains(Level.DEBUG, "Loading error.properties"));
- assertFalse(logContains(Level.DEBUG, "Loading graph database"));
- assertFalse(logContains(Level.INFO, "AAI Server initialization"));
- }
-
-
- /**
- * Helper method to check if a String appears in the desired log level.
- *
- * @param level Log level to use
- * @param expected String to search for
- * @return True if search String is found, false otherwise
- */
- private boolean logContains(Level level, String expected) {
- String actual[] = RecordingAppender.messages();
- for (String log : actual) {
- if (log.contains(level.toString()) && log.contains(expected))
- return true;
- }
- return false;
- }
-
- /**
- * Set logging level, and initialize log-appender.
- */
- private void configureLog() {
- org.slf4j.Logger rootLogger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
- rootLogger.debug("debug");
- // rootLogger.();
- // rootLogger.addAppender(RecordingAppender.appender(new PatternLayout()));
- }
-
-}
-
-
-/**
- * Appender class that appends log messages to a String List when some logging event occurs
- */
-class RecordingAppender extends AppenderBase<ILoggingEvent> {
- private static List<String> messages = new ArrayList<String>();
- private static RecordingAppender appender = new RecordingAppender();
- private PatternLayout patternLayout;
-
- private RecordingAppender() {
- super();
- }
-
- /**
- * @param patternLayout Pattern to format log message
- * @return Current appender
- */
- public static RecordingAppender appender(PatternLayout patternLayout) {
- appender.patternLayout = patternLayout;
- appender.clear();
- return appender;
- }
-
- @Override
- protected void append(ILoggingEvent event) {
- messages.add(patternLayout.doLayout(event));
- }
-
- public void close() {}
-
- public boolean requiresLayout() {
- return false;
- }
-
- /**
- * @return Return logs as a String array
- */
- public static String[] messages() {
- return (String[]) messages.toArray(new String[messages.size()]);
- }
-
- /**
- * Clear the message container
- */
- private void clear() {
- messages.clear();
- }
-
-}
+/**
+ * ============LICENSE_START=======================================================
+ * org.onap.aai
+ * ================================================================================
+ * 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 is a trademark and service mark of AT&T Intellectual Property.
+ */
+package org.onap.aai.util;
+
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.Logger;
+import ch.qos.logback.classic.PatternLayout;
+import ch.qos.logback.classic.spi.ILoggingEvent;
+import ch.qos.logback.core.AppenderBase;
+import org.apache.commons.lang.ObjectUtils;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.onap.aai.dbmap.AAIGraph;
+import org.onap.aai.logging.ErrorLogHelper;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.core.classloader.annotations.PrepareForTest;
+import org.powermock.modules.agent.PowerMockAgent;
+import org.powermock.modules.junit4.rule.PowerMockRule;
+import org.slf4j.LoggerFactory;
+
+import javax.servlet.ServletContextEvent;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+@PrepareForTest({AAIGraph.class, AAIConfig.class, ErrorLogHelper.class})
+public class AAIAppServletContextListenerTest {
+
+ @Rule
+ public PowerMockRule rule = new PowerMockRule();
+
+ static {
+ PowerMockAgent.initializeIfNeeded();
+ }
+
+ private ServletContextEvent arg;
+ private AAIAppServletContextListener listener;
+
+ /**
+ * Initialize.
+ */
+ @Before
+ @PrepareForTest({AAIGraph.class, AAIConfig.class, ErrorLogHelper.class})
+ public void initialize(){
+ arg = PowerMockito.mock(ServletContextEvent.class);
+ PowerMockito.mockStatic(AAIGraph.class);
+ PowerMockito.mockStatic(AAIConfig.class);
+ PowerMockito.mockStatic(ErrorLogHelper.class);
+
+ listener = new AAIAppServletContextListener();
+ configureLog();
+ }
+
+ /**
+ * Test contextDestroyed.
+ */
+ @Test(expected = NullPointerException.class)
+ //@Ignore
+ public void testContextDestroyed(){
+ listener.contextDestroyed(arg);
+ assertTrue(logContains(Level.DEBUG, "AAI Server shutdown"));
+ assertTrue(logContains(Level.INFO, "AAI graph shutdown"));
+ }
+
+ /**
+ * Test contextInitialized.
+ */
+ @Test
+ //@Ignore
+ public void testContextInitialized(){
+ listener.contextInitialized(arg);
+ assertFalse(logContains(Level.DEBUG, "Loading aaiconfig.properties"));
+ assertFalse(logContains(Level.DEBUG, "Loading error.properties"));
+ assertFalse(logContains(Level.DEBUG, "Loading graph database"));
+ assertFalse(logContains(Level.INFO, "AAI Server initialization"));
+ }
+
+
+ /**
+ * Helper method to check if a String appears in the desired log level.
+ *
+ * @param level Log level to use
+ * @param expected String to search for
+ * @return True if search String is found, false otherwise
+ */
+ private boolean logContains(Level level, String expected) {
+ String actual[] = RecordingAppender.messages();
+ for (String log : actual) {
+ if (log.contains(level.toString()) && log.contains(expected))
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Set logging level, and initialize log-appender.
+ */
+ private void configureLog() {
+ org.slf4j.Logger rootLogger = LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
+ rootLogger.debug("debug");
+ // rootLogger.();
+ // rootLogger.addAppender(RecordingAppender.appender(new PatternLayout()));
+ }
+
+}
+
+
+/**
+ * Appender class that appends log messages to a String List when some logging event occurs
+ */
+class RecordingAppender extends AppenderBase<ILoggingEvent> {
+ private static List<String> messages = new ArrayList<String>();
+ private static RecordingAppender appender = new RecordingAppender();
+ private PatternLayout patternLayout;
+
+ private RecordingAppender() {
+ super();
+ }
+
+ /**
+ * @param patternLayout Pattern to format log message
+ * @return Current appender
+ */
+ public static RecordingAppender appender(PatternLayout patternLayout) {
+ appender.patternLayout = patternLayout;
+ appender.clear();
+ return appender;
+ }
+
+ @Override
+ protected void append(ILoggingEvent event) {
+ messages.add(patternLayout.doLayout(event));
+ }
+
+ public void close() {}
+
+ public boolean requiresLayout() {
+ return false;
+ }
+
+ /**
+ * @return Return logs as a String array
+ */
+ public static String[] messages() {
+ return (String[]) messages.toArray(new String[messages.size()]);
+ }
+
+ /**
+ * Clear the message container
+ */
+ private void clear() {
+ messages.clear();
+ }
+
+}
diff --git a/aai-traversal/src/test/resources/bundleconfig-local/etc/appprops/aaiconfig.properties b/aai-traversal/src/test/resources/bundleconfig-local/etc/appprops/aaiconfig.properties
index e138653..218d9ac 100644
--- a/aai-traversal/src/test/resources/bundleconfig-local/etc/appprops/aaiconfig.properties
+++ b/aai-traversal/src/test/resources/bundleconfig-local/etc/appprops/aaiconfig.properties
@@ -1,22 +1,24 @@
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
####################################################################
# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE
diff --git a/aai-traversal/src/test/resources/config/etc/titan-cached.properties b/aai-traversal/src/test/resources/config/etc/titan-cached.properties
index 6408909..2333d2a 100644
--- a/aai-traversal/src/test/resources/config/etc/titan-cached.properties
+++ b/aai-traversal/src/test/resources/config/etc/titan-cached.properties
@@ -1,22 +1,24 @@
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
query.fast-property=true
# the following parameters are not reloaded automatically and require a manual bounce
diff --git a/aai-traversal/src/test/resources/config/etc/titan-realtime.properties b/aai-traversal/src/test/resources/config/etc/titan-realtime.properties
index c50b141..2d1d21d 100644
--- a/aai-traversal/src/test/resources/config/etc/titan-realtime.properties
+++ b/aai-traversal/src/test/resources/config/etc/titan-realtime.properties
@@ -1,22 +1,24 @@
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
query.fast-property=true
# the following parameters are not reloaded automatically and require a manual bounce
diff --git a/aai-traversal/src/test/resources/inmemory_titan.properties b/aai-traversal/src/test/resources/inmemory_titan.properties
index 46695d6..cf4bbfd 100644
--- a/aai-traversal/src/test/resources/inmemory_titan.properties
+++ b/aai-traversal/src/test/resources/inmemory_titan.properties
@@ -1,21 +1,23 @@
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
storage.backend=inmemory
diff --git a/aai-traversal/src/test/resources/logback.xml b/aai-traversal/src/test/resources/logback.xml
index 042f052..cc64017 100644
--- a/aai-traversal/src/test/resources/logback.xml
+++ b/aai-traversal/src/test/resources/logback.xml
@@ -1,21 +1,26 @@
<!--
- ============LICENSE_START=======================================================
- org.openecomp.aai
- ================================================================================
- 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=========================================================
- -->
+ ============LICENSE_START=======================================================
+ org.onap.aai
+ ================================================================================
+ 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 is a trademark and service mark of AT&T Intellectual Property.
+
+-->
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<contextName>${module.ajsc.namespace.name}</contextName>
<jmxConfigurator />
@@ -231,12 +236,12 @@
</logger>
-->
- <logger name="org.openecomp.aai" level="INFO" />
+ <logger name="org.onap.aai" level="INFO" />
<!--
- <logger name="org.openecomp.aai.util" level="WARN" />
- <logger name="org.openecomp.aai.rest" level="WARN" />
- <logger name="org.openecomp.aai.rest.Business" level="WARN" />
+ <logger name="org.onap.aai.util" level="WARN" />
+ <logger name="org.onap.aai.rest" level="WARN" />
+ <logger name="org.onap.aai.rest.Business" level="WARN" />
-->
<logger name="org.apache" level="WARN" />
diff --git a/aai-traversal/src/test/resources/test_aaiconfig.properties b/aai-traversal/src/test/resources/test_aaiconfig.properties
index 926d3f8..f984761 100644
--- a/aai-traversal/src/test/resources/test_aaiconfig.properties
+++ b/aai-traversal/src/test/resources/test_aaiconfig.properties
@@ -1,22 +1,24 @@
-###
+#
# ============LICENSE_START=======================================================
-# org.openecomp.aai
+# org.onap.aai
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# 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
-#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR 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 is a trademark and service mark of AT&T Intellectual Property.
+#
####################################################################
# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE