From 135fc9d006c5923d4a1ca4822c5a71362f5db573 Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Thu, 21 Feb 2019 14:04:39 +0200 Subject: Enable AsyncInstantiationBusinessLogic tests Issue-ID: VID-378 Change-Id: If0dd6147f1ce7fba3db01c85359f17abad8bcb07 Signed-off-by: Ittay Stern --- .../src/main/webapp/WEB-INF/conf/system.properties | 415 +++++++++++---------- .../webapp/WEB-INF/conf/system_template.properties | 297 +++++++-------- .../java/org/onap/vid/config/DataSourceConfig.java | 19 +- .../MockedAaiClientAndFeatureManagerConfig.java | 7 + .../AsyncInstantiationBusinessLogicTest.java | 210 +++++++---- .../test/resources/WEB-INF/conf/system.properties | 5 + .../resources/WEB-INF/fusion/orm/Fusion.hbm.xml | 394 +++++++++++++++++++ .../resources/WEB-INF/fusion/orm/Workflow.hbm.xml | 66 ++++ 8 files changed, 972 insertions(+), 441 deletions(-) create mode 100644 vid-app-common/src/test/resources/WEB-INF/fusion/orm/Fusion.hbm.xml create mode 100644 vid-app-common/src/test/resources/WEB-INF/fusion/orm/Workflow.hbm.xml diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties index dba844112..1d0a45522 100755 --- a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system.properties @@ -1,208 +1,209 @@ -### -# ================================================================================ -# eCOMP Portal SDK -# ================================================================================ -# Copyright (C) 2017 AT&T Intellectual Property -# ================================================================================ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# ================================================================================ -### -# Properties read by ECOMP Core library, ecompSDK-core.jar -# testing - props 1.0 -########################################################################## -# The following properties should NOT be changed by partner applications. -########################################################################## - -application_user_id = 30000 -post_default_role_id = 16 -clustered = true - -#Enable Fusion Mobile capabilities for the application -mobile_enable = false - -# Cache config file is needed on the classpath -cache_config_file_path = /WEB-INF/classes/cache.ccf -cache_switch = 199 -cache_load_on_startup = false - -user_name = fullName -decryption_key = AGLDdG4D04BKm2IxIWEr8o== - -########################################################################## -# The following properties MAY require changes by partner applications. -########################################################################## - -#Oracle -#db.userName=quantumbd -#db.password=c1syn2yhmr -#db.connectionURL=jdbc:oracle:thin:todo.link -#db.hib.dialect=org.hibernate.dialect.Oracle10gDialect -#db.driver=oracle.jdbc.driver.OracleDriver -#Hibernate -#hb.dialect=org.hibernate.dialect.Oracle10gDialect -#hb.show_sql=true - -#Postgre -#db.userName=XXXX -#db.password=XXXX -#db.connectionURL=jdbc:postgresql://XXXX/XX -#db.hib.dialect=org.hibernate.dialect.PostgreSQLDialect -#db.driver=org.postgresql.Driver -#hb.dialect=org.hibernate.dialect.PostgreSQLDialect -#hb.show_sql=true - -cookie_domain = onap.org -#Mysql -db.driver = org.mariadb.jdbc.Driver -db.connectionURL = jdbc:mariadb://localhost:3306/vid_openecomp_epsdk -db.userName = euser -db.password = euser -#db.hib.dialect = org.hibernate.dialect.MySQLDialect -db.min_pool_size = 5 -db.max_pool_size = 10 -hb.dialect = org.hibernate.dialect.MySQLDialect - -hb.show_sql = false # this property is set in logger configuration to keep console output clean -hb.idle_connection_test_period = 3600 -app_display_name = VID -files_path = /tmp - -# menu settings -#menu_query_name = menuData -#menu_properties_file_location = /WEB-INF/fusion/menu/ -#application_menu_set_name = APP -#application_menu_attribute_name = applicationMenuData -#application_menu_properties_name = menu.properties -#business_direct_menu_set_name = BD -#business_direct_menu_properties_name = bd.menu.properties -#business_direct_menu_attribute_name = businessDirectMenuData - -application_name = Virtual Infrastructure Deployment -application_user_id = 30000 -post_default_role_id = 16 -clustered = true - -#Enable Fusion Mobile capabilities for the application -mobile_enable = false - -# Cache config file is needed on the classpath -cache_config_file_path = /WEB-INF/classes/cache.ccf -cache_switch = 199 -cache_load_on_startup = false - -user_name = fullName -decryption_key = AGLDdG4D04BKm2IxIWEr8o== - -#element map files -element_map_file_path = app/fusionapp/files/ -element_map_icon_path = app/fusionapp/icons/ - -#aai related properties -#aai.server.url.base=https://aai.api.openecomp.org:8443/aai/ -#aai.server.url=https://aai.api.openecomp.org:8443/aai/v8/ -#aai.oldserver.url.base=https://aai.api.openecomp.org:8443/aai/servers/ -#aai.oldserver.url=https://aai.api.openecomp.org:8443/aai/servers/v3/ -aai.server.url.base=https://104.239.249.183:8443/aai/ -aai.server.url=https://104.239.249.183:8443/aai/v13/ -aai.oldserver.url.base=https://104.239.249.183:8443/aai/servers/ -aai.oldserver.url=https://104.239.249.183:8443/aai/servers/v3/ -aai.truststore.filename=tomcat_keystore -aai.truststore.passwd.x=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp -aai.keystore.filename=tomcat_keystore -aai.keystore.passwd.x=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp - -aai.vid.username=VID -aai.vid.passwd.x=OBF:1jm91i0v1jl9 - -aai.use.client.cert=false -aai.vnf.provstatus=PREPROV,NVTPROV,PROV,CAPPED -#Cron Schedules -log_cron = 0 0/1 * * * ?; -mylogins_feed_cron = 0 0/60 * * * ?; -#sessiontimeout_feed_cron = 0 * * * * ? * -my_login_feed_output_dir = /tmp/MyLogins - -# ECOMP Portal Shared Context REST API URL -ecomp_shared_context_rest_url= https://www.openecomp.org:8080/ecompportal/context - -# Link shown in Help menu -contact_us_link = https://www.openecomp.org/EcompPortal/ECOMP+Portal+Home - -# An Unique 128-bit value defined to identify a specific version -# of an application deployed on a specific virtual machine. -# This value must be generated and updated by the application -# which is using the ECOMP SDK at the time of its deployment. -# Online Unique UUID generator - https://www.uuidgenerator.net/ -instance_uuid=292b461a-2954-4b63-a3f9-f916c7ad3bc0 - - - -#authenticate user server -authenticate_user_server=http://todo_enter_auth_server_hostname:8383/openid-connect-server-webapp/allUsers - -#MSO related properties -#simulator -#mso.server.url=http://localhost:8089 -#dev2dev -#good -mso.server.url=https://mso.api.simpledemo.onap.org:8443/onap/so/infra -mso.polling.interval.msecs=2000 -mso.max.polls=3 -mso.user.name=infraportal -mso.password.x=OBF:1ghz1kfx1j1w1m7w1i271e8q1eas1hzj1m4i1iyy1kch1gdz -#E2E is v3 -mso.restapi.svc.e2einstance=/e2eServiceInstances/v3 -mso.restapi.svc.instance=/serviceInstantiation/v7/serviceInstances -mso.restapi.svc.instance.deleteAndUnassign=/serviceInstantiation/v7/serviceInstances -mso.restapi.vnf.instance=/serviceInstances/v6//vnfs -mso.restapi.vnf.changemanagement.instance=/serviceInstances/v6//vnfs// -mso.restapi.network.instance=/serviceInstances/v6//networks -mso.restapi.vf.module.instance=/serviceInstances/v6//vnfs//vfModules -mso.restapi.vf.module.scaleout=/serviceInstantiation/v7/serviceInstances//vnfs//vfModules/scaleOut -mso.restapi.volume.group.instance=/serviceInstances/v6//vnfs//volumeGroups -mso.restapi.get.orc.req=/orchestrationRequests/v6 -mso.restapi.get.orc.reqs=/orchestrationRequests/v6? -mso.restapi.get.man.tasks=/tasks/v1 -mso.restapi.configurations=/serviceInstances/v6//configurations -mso.restapi.configuration.instance=${mso.restapi.configurations}/ - -mso.restapi.serviceInstantiationApiRoot=/serviceInstantiation/v7 -mso.restapi.serviceInstanceCreate=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances -mso.restapi.serviceInstanceAssign=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances/assign - -mso.restapi.cloudResourcesApiRoot=/cloudResources/v1 -mso.restapi.operationalEnvironment=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments/ - -mso.restapi.operationalEnvironment.activate=${mso.restapi.operationalEnvironment}/activate -mso.restapi.operationalEnvironment.deactivate=${mso.restapi.operationalEnvironment}/deactivate -mso.restapi.operationalEnvironment.create=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments - -mso.restapi.cloudResourcesRequestsApiRoot=/cloudResourcesRequests/v1 -mso.restapi.operationalEnvironment.cloudResourcesRequests.status=${mso.restapi.cloudResourcesRequestsApiRoot}?requestId= - -mso.displayTestAPIOnScreen=true -mso.defaultTestAPI=GR_API -mso.maxOpenedInstantiationRequests=20 -mso.asyncPollingIntervalSeconds=1 -refreshTimeInstantiationDashboard=10 - -vid.truststore.filename=/opt/app/vid/etc/org.onap.vid.trust.jks -vid.truststore.passwd.x=OBF:1dx01j0e1hs01t981mis1dws156s1ojc1qjc1zsx1pw31qob1qr71pyj1zst1qhy1ojq156i1dua1mm21tb61hvi1j0g1du2 -mso.dme2.client.timeout=30000 -mso.dme2.client.read.timeout=120000 -scheduler.create.new.vnf.change.instance=/v1/ChangeManagement/schedules/ -scheduler.get.time.slots=/v1/ChangeManagement/schedules/ -scheduler.server.url=http://BYO.scheduler:8989/scheduler - -scheduler.submit.new.vnf.change=/v1/ChangeManagement/schedules/{scheduleId}/approvals +### +# ================================================================================ +# eCOMP Portal SDK +# ================================================================================ +# Copyright (C) 2017 AT&T Intellectual Property +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ================================================================================ +### +# Properties read by ECOMP Core library, ecompSDK-core.jar +# testing - props 1.0 +########################################################################## +# The following properties should NOT be changed by partner applications. +########################################################################## + +application_user_id = 30000 +post_default_role_id = 16 +clustered = true + +#Enable Fusion Mobile capabilities for the application +mobile_enable = false + +# Cache config file is needed on the classpath +cache_config_file_path = /WEB-INF/classes/cache.ccf +cache_switch = 199 +cache_load_on_startup = false + +user_name = fullName +decryption_key = AGLDdG4D04BKm2IxIWEr8o== + +########################################################################## +# The following properties MAY require changes by partner applications. +########################################################################## + +#Oracle +#db.userName=quantumbd +#db.password=c1syn2yhmr +#db.connectionURL=jdbc:oracle:thin:todo.link +#db.hib.dialect=org.hibernate.dialect.Oracle10gDialect +#db.driver=oracle.jdbc.driver.OracleDriver +#Hibernate +#hb.dialect=org.hibernate.dialect.Oracle10gDialect +#hb.show_sql=true + +#Postgre +#db.userName=XXXX +#db.password=XXXX +#db.connectionURL=jdbc:postgresql://XXXX/XX +#db.hib.dialect=org.hibernate.dialect.PostgreSQLDialect +#db.driver=org.postgresql.Driver +#hb.dialect=org.hibernate.dialect.PostgreSQLDialect +#hb.show_sql=true + +cookie_domain = onap.org +#Mysql +db.driver = org.mariadb.jdbc.Driver +db.connectionURL = jdbc:mariadb://localhost:3306/vid_openecomp_epsdk +db.userName = euser +db.password = euser +#db.hib.dialect = org.hibernate.dialect.MySQLDialect +db.min_pool_size = 5 +db.max_pool_size = 10 +hb.dialect = org.hibernate.dialect.MySQLDialect + +hb.show_sql = false # this property is set in logger configuration to keep console output clean +hb.idle_connection_test_period = 3600 +app_display_name = VID +files_path = /tmp + +# menu settings +#menu_query_name = menuData +#menu_properties_file_location = /WEB-INF/fusion/menu/ +#application_menu_set_name = APP +#application_menu_attribute_name = applicationMenuData +#application_menu_properties_name = menu.properties +#business_direct_menu_set_name = BD +#business_direct_menu_properties_name = bd.menu.properties +#business_direct_menu_attribute_name = businessDirectMenuData + +application_name = Virtual Infrastructure Deployment +application_user_id = 30000 +post_default_role_id = 16 +clustered = true + +#Enable Fusion Mobile capabilities for the application +mobile_enable = false + +# Cache config file is needed on the classpath +cache_config_file_path = /WEB-INF/classes/cache.ccf +cache_switch = 199 +cache_load_on_startup = false + +user_name = fullName +decryption_key = AGLDdG4D04BKm2IxIWEr8o== + +#element map files +element_map_file_path = app/fusionapp/files/ +element_map_icon_path = app/fusionapp/icons/ + +#aai related properties +#aai.server.url.base=https://aai.api.openecomp.org:8443/aai/ +#aai.server.url=https://aai.api.openecomp.org:8443/aai/v8/ +#aai.oldserver.url.base=https://aai.api.openecomp.org:8443/aai/servers/ +#aai.oldserver.url=https://aai.api.openecomp.org:8443/aai/servers/v3/ +aai.server.url.base=https://104.239.249.183:8443/aai/ +aai.server.url=https://104.239.249.183:8443/aai/v13/ +aai.oldserver.url.base=https://104.239.249.183:8443/aai/servers/ +aai.oldserver.url=https://104.239.249.183:8443/aai/servers/v3/ +aai.truststore.filename=tomcat_keystore +aai.truststore.passwd.x=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp +aai.keystore.filename=tomcat_keystore +aai.keystore.passwd.x=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp + +aai.vid.username=VID +aai.vid.passwd.x=OBF:1jm91i0v1jl9 + +aai.use.client.cert=false +aai.vnf.provstatus=PREPROV,NVTPROV,PROV,CAPPED +#Cron Schedules +log_cron = 0 0/1 * * * ?; +mylogins_feed_cron = 0 0/60 * * * ?; +#sessiontimeout_feed_cron = 0 * * * * ? * +my_login_feed_output_dir = /tmp/MyLogins + +# ECOMP Portal Shared Context REST API URL +ecomp_shared_context_rest_url= https://www.openecomp.org:8080/ecompportal/context + +# Link shown in Help menu +contact_us_link = https://www.openecomp.org/EcompPortal/ECOMP+Portal+Home + +# An Unique 128-bit value defined to identify a specific version +# of an application deployed on a specific virtual machine. +# This value must be generated and updated by the application +# which is using the ECOMP SDK at the time of its deployment. +# Online Unique UUID generator - https://www.uuidgenerator.net/ +instance_uuid=292b461a-2954-4b63-a3f9-f916c7ad3bc0 + + + +#authenticate user server +authenticate_user_server=http://todo_enter_auth_server_hostname:8383/openid-connect-server-webapp/allUsers + +#MSO related properties +#simulator +#mso.server.url=http://localhost:8089 +#dev2dev +#good +mso.server.url=https://mso.api.simpledemo.onap.org:8443/onap/so/infra +mso.polling.interval.msecs=2000 +mso.max.polls=3 +mso.user.name=infraportal +mso.password.x=OBF:1ghz1kfx1j1w1m7w1i271e8q1eas1hzj1m4i1iyy1kch1gdz +#E2E is v3 +mso.restapi.svc.e2einstance=/e2eServiceInstances/v3 +mso.restapi.svc.instance=/serviceInstantiation/v7/serviceInstances +mso.restapi.svc.instance.deleteAndUnassign=/serviceInstantiation/v7/serviceInstances +mso.restapi.vnf.instance=/serviceInstances/v6//vnfs +mso.restapi.vnf.changemanagement.instance=/serviceInstances/v6//vnfs// +mso.restapi.network.instance=/serviceInstances/v6//networks +mso.restapi.vf.module.instance=/serviceInstances/v6//vnfs//vfModules +mso.restapi.vf.module.scaleout=/serviceInstantiation/v7/serviceInstances//vnfs//vfModules/scaleOut +mso.restapi.volume.group.instance=/serviceInstances/v6//vnfs//volumeGroups +mso.restapi.instance.group=/serviceInstantiation/v7/instanceGroups +mso.restapi.get.orc.req=/orchestrationRequests/v6 +mso.restapi.get.orc.reqs=/orchestrationRequests/v6? +mso.restapi.get.man.tasks=/tasks/v1 +mso.restapi.configurations=/serviceInstances/v6//configurations +mso.restapi.configuration.instance=${mso.restapi.configurations}/ + +mso.restapi.serviceInstantiationApiRoot=/serviceInstantiation/v7 +mso.restapi.serviceInstanceCreate=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances +mso.restapi.serviceInstanceAssign=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances/assign + +mso.restapi.cloudResourcesApiRoot=/cloudResources/v1 +mso.restapi.operationalEnvironment=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments/ + +mso.restapi.operationalEnvironment.activate=${mso.restapi.operationalEnvironment}/activate +mso.restapi.operationalEnvironment.deactivate=${mso.restapi.operationalEnvironment}/deactivate +mso.restapi.operationalEnvironment.create=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments + +mso.restapi.cloudResourcesRequestsApiRoot=/cloudResourcesRequests/v1 +mso.restapi.operationalEnvironment.cloudResourcesRequests.status=${mso.restapi.cloudResourcesRequestsApiRoot}?requestId= + +mso.displayTestAPIOnScreen=true +mso.defaultTestAPI=GR_API +mso.maxOpenedInstantiationRequests=20 +mso.asyncPollingIntervalSeconds=1 +refreshTimeInstantiationDashboard=10 + +vid.truststore.filename=/opt/app/vid/etc/org.onap.vid.trust.jks +vid.truststore.passwd.x=OBF:1dx01j0e1hs01t981mis1dws156s1ojc1qjc1zsx1pw31qob1qr71pyj1zst1qhy1ojq156i1dua1mm21tb61hvi1j0g1du2 +mso.dme2.client.timeout=30000 +mso.dme2.client.read.timeout=120000 +scheduler.create.new.vnf.change.instance=/v1/ChangeManagement/schedules/ +scheduler.get.time.slots=/v1/ChangeManagement/schedules/ +scheduler.server.url=http://BYO.scheduler:8989/scheduler + +scheduler.submit.new.vnf.change=/v1/ChangeManagement/schedules/{scheduleId}/approvals scheduler.get.schedules=/v1/ChangeManagement/schedules/scheduleDetails/ \ No newline at end of file diff --git a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties index 6b5b37c91..5668b785b 100755 --- a/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties +++ b/epsdk-app-onap/src/main/webapp/WEB-INF/conf/system_template.properties @@ -1,148 +1,149 @@ -#DB Info -#db.userName=XXXX -#db.password=XXXX -#db.connectionURL=jdbc:oracle:thin:@XXXX/XX -#db.hib.dialect=org.hibernate.dialect.Oracle10gDialect -#db.driver=oracle.jdbc.driver.OracleDriver -#Hibernate -#hb.dialect=org.hibernate.dialect.Oracle10gDialect -#hb.show_sql=true - -#Postgre -#db.userName=XXXX -#db.password=XXXX -#db.connectionURL=jdbc:postgresql://XXXX/XX -#db.hib.dialect=org.hibernate.dialect.PostgreSQLDialect -#db.driver=org.postgresql.Driver -#hb.dialect=org.hibernate.dialect.PostgreSQLDialect -#hb.show_sql=true - -cookie_domain = onap.org -#mysql -db.driver = org.mariadb.jdbc.Driver -db.connectionURL = jdbc:mariadb://${VID_MYSQL_HOST}:${VID_MYSQL_PORT}/${VID_MYSQL_DBNAME} -db.userName = ${VID_MYSQL_USER} -db.password = ${VID_MYSQL_PASS} -db.hib.dialect = org.hibernate.dialect.MySQLDialect -db.min_pool_size = 5 -db.max_pool_size = 10 -hb.dialect = org.hibernate.dialect.MySQLDialect - -hb.show_sql = false # this property is set in logger configuration to keep console output clean -hb.idle_connection_test_period = 3600 -app_display_name = ${VID_APP_DISPLAY_NAME} -files_path = /tmp - -# menu settings -#menu_query_name = menuData -#menu_properties_file_location = /WEB-INF/fusion/menu/ -#application_menu_set_name = APP -#application_menu_attribute_name = applicationMenuData -#application_menu_properties_name = menu.properties -#business_direct_menu_set_name = BD -#business_direct_menu_properties_name = bd.menu.properties -#business_direct_menu_attribute_name = businessDirectMenuData - -application_name = Virtual Infrastructure Deployment -application_user_id = 30000 -post_default_role_id = 16 -clustered = true - -#Enable Fusion Mobile capabilities for the application -mobile_enable = false - -# Cache config file is needed on the classpath -cache_config_file_path = /WEB-INF/classes/cache.ccf -cache_switch = 199 -cache_load_on_startup = false - -user_name = fullName - -decryption_key = ${VID_DECRYPTION_KEY} - -#element map files -element_map_file_path = /tmp -element_map_icon_path = app/vid/icons/ - -#aai related properties -aai.server.url.base=${VID_AAI_URL}/aai/ -aai.server.url=${VID_AAI_URL}/aai/v13/ -aai.oldserver.url.base=${VID_AAI_URL}/aai/servers/ -aai.oldserver.url=${VID_AAI_URL}/aai/servers/v3/ -aai.truststore.filename=${AAI_TRUSTSTORE_FILENAME} -aai.truststore.passwd.x=${AAI_TRUSTSTORE_PASSWD_X} -aai.keystore.filename=${AAI_KEYSTORE_FILENAME} -aai.keystore.passwd.x=${AAI_KEYSTORE_PASSWD_X} -aai.vid.username=${AAI_VID_UID} -aai.vid.passwd.x=${AAI_VID_PASSWD_X} -aai.use.client.cert=${AAI_USE_CLIENT_CERT} -aai.vnf.provstatus=${AAI_VNF_PROVSTATUS} - -# ECOMP Portal Shared Context REST API URL -ecomp_shared_context_rest_url=${VID_ECOMP_SHARED_CONTEXT_REST_URL} -# Link shown in Help menu -contact_us_link=${VID_CONTACT_US_LINK} -#Cron Schedules -log_cron = 0 0/1 * * * ?; -mylogins_feed_cron = 0 0/60 * * * ?; -#sessiontimeout_feed_cron = 0 * * * * ? * -my_login_feed_output_dir = ${VID_MYLOGIN_FEED_DIRECTORY} - -# An Unique 128-bit value defined to identify a specific version -# of an application deployed on a specific virtual machine. -# This value must be generated and updated by the application -# which is using the ECOMP SDK at the time of its deployment. -# Online Unique UUID generator - https://www.uuidgenerator.net/ -instance_uuid=292b461a-2954-4b63-a3f9-f916c7ad3bc0 - - -#MSO related properties -#simulator -mso.server.url=${VID_MSO_SERVER_URL} -mso.polling.interval.msecs=${MSO_POLLING_INTERVAL_MSECS} -mso.max.polls=10 -mso.user.name=${VID_MSO_USER} -mso.password.x=${VID_MSO_PASS} -#E2E is v3 -mso.restapi.svc.e2einstance=/e2eServiceInstances/v3 -mso.restapi.svc.instance=/serviceInstantiation/v7/serviceInstances -mso.restapi.svc.instance.deleteAndUnassign=/serviceInstantiation/v7/serviceInstances -mso.restapi.vnf.instance=/serviceInstances/v6//vnfs -mso.restapi.vnf.changemanagement.instance=/serviceInstances/v6//vnfs// -mso.restapi.network.instance=/serviceInstances/v6//networks -mso.restapi.vf.module.scaleout=/serviceInstantiation/v7/serviceInstances//vnfs//vfModules/scaleOut -mso.restapi.vf.module.instance=/serviceInstances/v6//vnfs//vfModules -mso.restapi.volume.group.instance=/serviceInstances/v6//vnfs//volumeGroups -mso.restapi.get.orc.req=/orchestrationRequests/v6 -mso.restapi.get.orc.reqs=/orchestrationRequests/v6? -mso.restapi.get.man.tasks=/tasks/v1 -mso.restapi.configurations=/serviceInstances/v6//configurations -mso.restapi.configuration.instance=${mso.restapi.configurations}/ - -mso.restapi.serviceInstantiationApiRoot=/serviceInstantiation/v7 -mso.restapi.serviceInstanceCreate=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances -mso.restapi.serviceInstanceAssign=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances/assign - -mso.restapi.cloudResourcesApiRoot=/cloudResources/v1 -mso.restapi.operationalEnvironment=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments/ - -mso.restapi.operationalEnvironment.activate=${mso.restapi.operationalEnvironment}/activate -mso.restapi.operationalEnvironment.deactivate=${mso.restapi.operationalEnvironment}/deactivate -mso.restapi.operationalEnvironment.create=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments - -mso.restapi.cloudResourcesRequestsApiRoot=/cloudResourcesRequests/v1 -mso.restapi.operationalEnvironment.cloudResourcesRequests.status=${mso.restapi.cloudResourcesRequestsApiRoot}?requestId= - -mso.displayTestAPIOnScreen=true -mso.defaultTestAPI=GR_API -mso.maxOpenedInstantiationRequests=20 -mso.asyncPollingIntervalSeconds=1 -refreshTimeInstantiationDashboard=10 - -vid.truststore.filename=${VID_TRUSTSTORE_FILE} -vid.truststore.passwd.x=${VID_TRUSTSTORE_PASS} -mso.dme2.client.timeout=${MSO_DME2_CLIENT_TIMEOUT} -mso.dme2.client.read.timeout=${MSO_DME2_CLIENT_READ_TIMEOUT} -mso.dme2.server.url=${MSO_DME2_SERVER_URL} -mso.dme2.enabled=${MSO_DME2_ENABLED} -scheduler.basic.auth= +#DB Info +#db.userName=XXXX +#db.password=XXXX +#db.connectionURL=jdbc:oracle:thin:@XXXX/XX +#db.hib.dialect=org.hibernate.dialect.Oracle10gDialect +#db.driver=oracle.jdbc.driver.OracleDriver +#Hibernate +#hb.dialect=org.hibernate.dialect.Oracle10gDialect +#hb.show_sql=true + +#Postgre +#db.userName=XXXX +#db.password=XXXX +#db.connectionURL=jdbc:postgresql://XXXX/XX +#db.hib.dialect=org.hibernate.dialect.PostgreSQLDialect +#db.driver=org.postgresql.Driver +#hb.dialect=org.hibernate.dialect.PostgreSQLDialect +#hb.show_sql=true + +cookie_domain = onap.org +#mysql +db.driver = org.mariadb.jdbc.Driver +db.connectionURL = jdbc:mariadb://${VID_MYSQL_HOST}:${VID_MYSQL_PORT}/${VID_MYSQL_DBNAME} +db.userName = ${VID_MYSQL_USER} +db.password = ${VID_MYSQL_PASS} +db.hib.dialect = org.hibernate.dialect.MySQLDialect +db.min_pool_size = 5 +db.max_pool_size = 10 +hb.dialect = org.hibernate.dialect.MySQLDialect + +hb.show_sql = false # this property is set in logger configuration to keep console output clean +hb.idle_connection_test_period = 3600 +app_display_name = ${VID_APP_DISPLAY_NAME} +files_path = /tmp + +# menu settings +#menu_query_name = menuData +#menu_properties_file_location = /WEB-INF/fusion/menu/ +#application_menu_set_name = APP +#application_menu_attribute_name = applicationMenuData +#application_menu_properties_name = menu.properties +#business_direct_menu_set_name = BD +#business_direct_menu_properties_name = bd.menu.properties +#business_direct_menu_attribute_name = businessDirectMenuData + +application_name = Virtual Infrastructure Deployment +application_user_id = 30000 +post_default_role_id = 16 +clustered = true + +#Enable Fusion Mobile capabilities for the application +mobile_enable = false + +# Cache config file is needed on the classpath +cache_config_file_path = /WEB-INF/classes/cache.ccf +cache_switch = 199 +cache_load_on_startup = false + +user_name = fullName + +decryption_key = ${VID_DECRYPTION_KEY} + +#element map files +element_map_file_path = /tmp +element_map_icon_path = app/vid/icons/ + +#aai related properties +aai.server.url.base=${VID_AAI_URL}/aai/ +aai.server.url=${VID_AAI_URL}/aai/v13/ +aai.oldserver.url.base=${VID_AAI_URL}/aai/servers/ +aai.oldserver.url=${VID_AAI_URL}/aai/servers/v3/ +aai.truststore.filename=${AAI_TRUSTSTORE_FILENAME} +aai.truststore.passwd.x=${AAI_TRUSTSTORE_PASSWD_X} +aai.keystore.filename=${AAI_KEYSTORE_FILENAME} +aai.keystore.passwd.x=${AAI_KEYSTORE_PASSWD_X} +aai.vid.username=${AAI_VID_UID} +aai.vid.passwd.x=${AAI_VID_PASSWD_X} +aai.use.client.cert=${AAI_USE_CLIENT_CERT} +aai.vnf.provstatus=${AAI_VNF_PROVSTATUS} + +# ECOMP Portal Shared Context REST API URL +ecomp_shared_context_rest_url=${VID_ECOMP_SHARED_CONTEXT_REST_URL} +# Link shown in Help menu +contact_us_link=${VID_CONTACT_US_LINK} +#Cron Schedules +log_cron = 0 0/1 * * * ?; +mylogins_feed_cron = 0 0/60 * * * ?; +#sessiontimeout_feed_cron = 0 * * * * ? * +my_login_feed_output_dir = ${VID_MYLOGIN_FEED_DIRECTORY} + +# An Unique 128-bit value defined to identify a specific version +# of an application deployed on a specific virtual machine. +# This value must be generated and updated by the application +# which is using the ECOMP SDK at the time of its deployment. +# Online Unique UUID generator - https://www.uuidgenerator.net/ +instance_uuid=292b461a-2954-4b63-a3f9-f916c7ad3bc0 + + +#MSO related properties +#simulator +mso.server.url=${VID_MSO_SERVER_URL} +mso.polling.interval.msecs=${MSO_POLLING_INTERVAL_MSECS} +mso.max.polls=10 +mso.user.name=${VID_MSO_USER} +mso.password.x=${VID_MSO_PASS} +#E2E is v3 +mso.restapi.svc.e2einstance=/e2eServiceInstances/v3 +mso.restapi.svc.instance=/serviceInstantiation/v7/serviceInstances +mso.restapi.svc.instance.deleteAndUnassign=/serviceInstantiation/v7/serviceInstances +mso.restapi.vnf.instance=/serviceInstances/v6//vnfs +mso.restapi.vnf.changemanagement.instance=/serviceInstances/v6//vnfs// +mso.restapi.network.instance=/serviceInstances/v6//networks +mso.restapi.vf.module.scaleout=/serviceInstantiation/v7/serviceInstances//vnfs//vfModules/scaleOut +mso.restapi.vf.module.instance=/serviceInstances/v6//vnfs//vfModules +mso.restapi.volume.group.instance=/serviceInstances/v6//vnfs//volumeGroups +mso.restapi.instance.group=/serviceInstantiation/v7/instanceGroups +mso.restapi.get.orc.req=/orchestrationRequests/v6 +mso.restapi.get.orc.reqs=/orchestrationRequests/v6? +mso.restapi.get.man.tasks=/tasks/v1 +mso.restapi.configurations=/serviceInstances/v6//configurations +mso.restapi.configuration.instance=${mso.restapi.configurations}/ + +mso.restapi.serviceInstantiationApiRoot=/serviceInstantiation/v7 +mso.restapi.serviceInstanceCreate=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances +mso.restapi.serviceInstanceAssign=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances/assign + +mso.restapi.cloudResourcesApiRoot=/cloudResources/v1 +mso.restapi.operationalEnvironment=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments/ + +mso.restapi.operationalEnvironment.activate=${mso.restapi.operationalEnvironment}/activate +mso.restapi.operationalEnvironment.deactivate=${mso.restapi.operationalEnvironment}/deactivate +mso.restapi.operationalEnvironment.create=${mso.restapi.cloudResourcesApiRoot}/operationalEnvironments + +mso.restapi.cloudResourcesRequestsApiRoot=/cloudResourcesRequests/v1 +mso.restapi.operationalEnvironment.cloudResourcesRequests.status=${mso.restapi.cloudResourcesRequestsApiRoot}?requestId= + +mso.displayTestAPIOnScreen=true +mso.defaultTestAPI=GR_API +mso.maxOpenedInstantiationRequests=20 +mso.asyncPollingIntervalSeconds=1 +refreshTimeInstantiationDashboard=10 + +vid.truststore.filename=${VID_TRUSTSTORE_FILE} +vid.truststore.passwd.x=${VID_TRUSTSTORE_PASS} +mso.dme2.client.timeout=${MSO_DME2_CLIENT_TIMEOUT} +mso.dme2.client.read.timeout=${MSO_DME2_CLIENT_READ_TIMEOUT} +mso.dme2.server.url=${MSO_DME2_SERVER_URL} +mso.dme2.enabled=${MSO_DME2_ENABLED} +scheduler.basic.auth= diff --git a/vid-app-common/src/test/java/org/onap/vid/config/DataSourceConfig.java b/vid-app-common/src/test/java/org/onap/vid/config/DataSourceConfig.java index ba8060da7..b25a7f238 100644 --- a/vid-app-common/src/test/java/org/onap/vid/config/DataSourceConfig.java +++ b/vid-app-common/src/test/java/org/onap/vid/config/DataSourceConfig.java @@ -1,21 +1,25 @@ package org.onap.vid.config; +import java.util.Properties; +import javax.sql.DataSource; import org.hibernate.SessionFactory; import org.onap.portalsdk.core.service.DataAccessService; import org.onap.portalsdk.core.service.DataAccessServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.ClassPathResource; +import org.springframework.core.io.Resource; import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.orm.hibernate4.HibernateTransactionManager; import org.springframework.orm.hibernate4.LocalSessionFactoryBean; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; -import javax.sql.DataSource; -import java.util.Properties; - +/* +this class enable using in-memory DB in Unit test. +*/ @Configuration @EnableTransactionManagement public class DataSourceConfig { @@ -36,8 +40,15 @@ public class DataSourceConfig { properties.put("hbm2ddl.auto", "create"); properties.put("hibernate.hbm2ddl.auto", "create"); - sessionFactory.setPackagesToScan("org.onap"); + Resource[] mappingLocations = { + new ClassPathResource("WEB-INF/fusion/orm/Fusion.hbm.xml"), + new ClassPathResource("WEB-INF/fusion/orm/Workflow.hbm.xml"), + new ClassPathResource("WEB-INF/fusion/orm/RNoteBookIntegration.hbm.xml") + }; + sessionFactory.setHibernateProperties(properties); + sessionFactory.setPackagesToScan("org.onap"); + sessionFactory.setMappingLocations(mappingLocations); return sessionFactory; } diff --git a/vid-app-common/src/test/java/org/onap/vid/config/MockedAaiClientAndFeatureManagerConfig.java b/vid-app-common/src/test/java/org/onap/vid/config/MockedAaiClientAndFeatureManagerConfig.java index 1a4eb528e..83b125949 100644 --- a/vid-app-common/src/test/java/org/onap/vid/config/MockedAaiClientAndFeatureManagerConfig.java +++ b/vid-app-common/src/test/java/org/onap/vid/config/MockedAaiClientAndFeatureManagerConfig.java @@ -2,6 +2,8 @@ package org.onap.vid.config; import org.mockito.Mockito; import org.onap.vid.aai.AaiClientInterface; +import org.onap.vid.services.CloudOwnerService; +import org.onap.vid.services.CloudOwnerServiceImpl; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.togglz.core.manager.FeatureManager; @@ -14,6 +16,11 @@ public class MockedAaiClientAndFeatureManagerConfig { return Mockito.mock(FeatureManager.class); } + @Bean + public CloudOwnerService cloudOwnerService(AaiClientInterface aaiClient, FeatureManager featureManager) { + return new CloudOwnerServiceImpl(aaiClient, featureManager); + } + @Bean public AaiClientInterface aaiClient() { return Mockito.mock(AaiClientInterface.class); diff --git a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java index 96b39bcb1..0e74fbd9a 100644 --- a/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java +++ b/vid-app-common/src/test/java/org/onap/vid/services/AsyncInstantiationBusinessLogicTest.java @@ -1,9 +1,65 @@ package org.onap.vid.services; +import static com.google.common.collect.Maps.newHashMap; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.contains; +import static org.hamcrest.Matchers.hasItem; +import static org.hamcrest.Matchers.hasItems; +import static org.hamcrest.Matchers.hasProperty; +import static org.hamcrest.Matchers.is; +import static org.hamcrest.Matchers.matchesPattern; +import static org.hamcrest.Matchers.not; +import static org.hamcrest.core.Every.everyItem; +import static org.hamcrest.core.IsEqual.equalTo; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.anyInt; +import static org.mockito.Mockito.anyString; +import static org.mockito.Mockito.doNothing; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.onap.vid.job.Job.JobStatus.COMPLETED; +import static org.onap.vid.job.Job.JobStatus.FAILED; +import static org.onap.vid.job.Job.JobStatus.IN_PROGRESS; +import static org.onap.vid.job.Job.JobStatus.PAUSE; +import static org.onap.vid.job.Job.JobStatus.PENDING; +import static org.onap.vid.job.Job.JobStatus.STOPPED; +import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertFalse; +import static org.testng.Assert.assertNotNull; +import static org.testng.Assert.assertNull; +import static org.testng.Assert.assertTrue; + import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import java.io.IOException; +import java.lang.reflect.Method; +import java.net.URL; +import java.time.Instant; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.stream.Collectors; +import java.util.stream.IntStream; +import javax.inject.Inject; import net.javacrumbs.jsonunit.JsonAssert; import org.apache.commons.io.IOUtils; import org.hibernate.SessionFactory; @@ -36,9 +92,21 @@ import org.onap.vid.model.JobAuditStatus; import org.onap.vid.model.JobAuditStatus.SourceStatus; import org.onap.vid.model.NameCounter; import org.onap.vid.model.ServiceInfo; -import org.onap.vid.model.serviceInstantiation.*; +import org.onap.vid.model.serviceInstantiation.InstanceGroup; +import org.onap.vid.model.serviceInstantiation.Network; +import org.onap.vid.model.serviceInstantiation.ServiceInstantiation; +import org.onap.vid.model.serviceInstantiation.VfModule; +import org.onap.vid.model.serviceInstantiation.Vnf; import org.onap.vid.mso.MsoOperationalEnvironmentTest; -import org.onap.vid.mso.model.*; +import org.onap.vid.mso.model.InstanceGroupInstantiationRequestDetails; +import org.onap.vid.mso.model.ModelInfo; +import org.onap.vid.mso.model.NetworkInstantiationRequestDetails; +import org.onap.vid.mso.model.ServiceDeletionRequestDetails; +import org.onap.vid.mso.model.ServiceInstantiationRequestDetails; +import org.onap.vid.mso.model.VfModuleInstantiationRequestDetails; +import org.onap.vid.mso.model.VfModuleMacro; +import org.onap.vid.mso.model.VnfInstantiationRequestDetails; +import org.onap.vid.mso.model.VolumeGroupRequestDetails; import org.onap.vid.mso.rest.AsyncRequestStatus; import org.onap.vid.properties.Features; import org.onap.vid.testUtils.TestUtils; @@ -46,33 +114,11 @@ import org.onap.vid.utils.DaoUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.testng.Assert; -import org.testng.annotations.*; - -import javax.inject.Inject; -import java.io.IOException; -import java.lang.reflect.Method; -import java.net.URL; -import java.time.Instant; -import java.time.LocalDateTime; -import java.time.ZoneId; -import java.util.Optional; -import java.util.*; -import java.util.concurrent.Callable; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; -import java.util.stream.Collectors; -import java.util.stream.IntStream; - -import static com.google.common.collect.Maps.newHashMap; -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.contains; -import static org.hamcrest.Matchers.*; -import static org.hamcrest.core.Every.everyItem; -import static org.hamcrest.core.IsEqual.equalTo; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.*; -import static org.onap.vid.job.Job.JobStatus.*; -import static org.testng.Assert.*; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.DataProvider; +import org.testng.annotations.Test; @ContextConfiguration(classes = {DataSourceConfig.class, SystemProperties.class, MockedAaiClientAndFeatureManagerConfig.class}) public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseTest { @@ -268,7 +314,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT dataAccessService.saveDomainObject(jobDao, getPropsMap()); } - @Test(enabled = false) + @Test public void testServiceInfoAreOrderedAsExpected() { int userId = 2222; createNewTestServicesInfo(String.valueOf(userId)); @@ -277,7 +323,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT assertThat("Services aren't ordered as expected", serviceInfoListResult, equalTo(expectedOrderServiceInfo)); } - @Test(enabled = false) + @Test public void testServiceInfoAreFilteredAsExpected() { int userId = 2222; createNewTestServicesInfoForFilter(String.valueOf(userId)); @@ -293,7 +339,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT assertThat("Services aren't ordered filtered as expected", serviceInfoFilteredByUser, equalTo(expectedFilterByUser)); } - @Test(enabled = false, dataProvider = "pauseAndInstanceParams") + @Test(dataProvider = "pauseAndInstanceParams") public void createMacroServiceInstantiationMsoRequestUniqueName(Boolean isPause, HashMap vfModuleInstanceParamsMap, List vnfInstanceParams) throws Exception { defineMocks(); ServiceInstantiation serviceInstantiationPayload = generateMockMacroServiceInstantiationPayload(isPause, createVnfList(vfModuleInstanceParamsMap, vnfInstanceParams, true), 2, true, PROJECT_NAME, false); @@ -355,7 +401,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT }; } - @Test(enabled = false, dataProvider="dataProviderForInstanceNames") + @Test(dataProvider="dataProviderForInstanceNames") public void pushBulkJob_bulkWithSize3_instancesNamesAreExactlyAsExpected(boolean isUserProvidedNaming, List expectedNames) { int bulkSize = 3; @@ -375,7 +421,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT assertEquals(serviceInfoList.stream().map(ServiceInfo::getServiceInstanceName).collect(Collectors.toList()), expectedNames); } - @Test(enabled = false, dataProvider = "aLaCarteAndMacroPayload") + @Test(dataProvider = "aLaCarteAndMacroPayload") public void generateMockServiceInstantiationPayload_serializeBackAndForth_sourceShouldBeTheSame(ServiceInstantiation serviceInstantiationPayload) throws IOException { ObjectMapper mapper = new ObjectMapper(); final String asString = mapper.writeValueAsString(serviceInstantiationPayload); @@ -455,7 +501,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT return generateMockMacroServiceInstantiationPayload(isPause, vnfs, 1, true, PROJECT_NAME, false); } - @Test(enabled = false) + @Test public void testUpdateServiceInfo_WithExistingServiceInfo_ServiceInfoIsUpdated() { UUID uuid = createFakedJobAndServiceInfo(); final String STEPH_CURRY = "Steph Curry"; @@ -484,12 +530,12 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT return uuid; } - @Test(enabled = false, expectedExceptions = GenericUncheckedException.class, expectedExceptionsMessageRegExp = UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE) + @Test(expectedExceptions = GenericUncheckedException.class, expectedExceptionsMessageRegExp = UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE) public void testUpdateServiceInfo_WithNonExisting_ThrowException() { asyncInstantiationBL.updateServiceInfo(UUID.randomUUID(), x -> x.setServiceInstanceName("not matter")); } - @Test(enabled = false, expectedExceptions = GenericUncheckedException.class, expectedExceptionsMessageRegExp = UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE) + @Test(expectedExceptions = GenericUncheckedException.class, expectedExceptionsMessageRegExp = UPDATE_SERVICE_INFO_EXCEPTION_MESSAGE) public void testUpdateServiceInfo_WithDoubleServiceWithSameJobUuid_ThrowException() { UUID uuid = createFakedJobAndServiceInfo(); ServiceInfo serviceInfo = new ServiceInfo(); @@ -508,25 +554,25 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT } - @Test(enabled = false, dataProvider = "isPauseAndPropertyDataProvider") + @Test(dataProvider = "isPauseAndPropertyDataProvider") public void testServiceInstantiationPath_RequestPathIsAsExpected(boolean isPause, String expectedProperty) { ServiceInstantiation serviceInstantiationPauseFlagTrue = generateMacroMockServiceInstantiationPayload(isPause, createVnfList(instanceParamsMapWithoutParams, Collections.EMPTY_LIST, true)); String path = asyncInstantiationBL.getServiceInstantiationPath(serviceInstantiationPauseFlagTrue); Assert.assertEquals(path, SystemProperties.getProperty(expectedProperty)); } - @Test(enabled = false) + @Test public void testCreateVnfEndpoint_useProvidedInstanceId() { String path = asyncInstantiationBL.getVnfInstantiationPath("myGreatId"); - assertThat(path, equalTo("/serviceInstances/v7/myGreatId/vnfs")); + assertThat(path, matchesPattern("/serviceInstances/v./myGreatId/vnfs")); } - @Test(enabled = false) + @Test public void createServiceInfo_WithUserProvidedNamingFalse_ServiceInfoIsAsExpected() throws IOException { createMacroServiceInfo_WithUserProvidedNamingFalse_ServiceInfoIsAsExpected(true); } - @Test(enabled = false) + @Test public void createServiceInfo_WithUserProvidedNamingFalseAndNoVfmodules_ServiceInfoIsAsExpected() throws IOException { createMacroServiceInfo_WithUserProvidedNamingFalse_ServiceInfoIsAsExpected(false); } @@ -554,7 +600,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result); } - @Test(enabled = false) + @Test public void createALaCarteService_WithUserProvidedNamingFalse_RequestDetailsIsAsExpected() throws IOException { ServiceInstantiation serviceInstantiationPayload = generateMockALaCarteServiceInstantiationPayload(false, newHashMap(), @@ -571,7 +617,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result); } - @Test(enabled = false) + @Test public void generateALaCarteServiceInstantiationRequest_withVnfList_HappyFllow() throws IOException { ServiceInstantiation serviceInstantiationPayload = generateALaCarteWithVnfsServiceInstantiationPayload(); RequestDetailsWrapper result = @@ -581,7 +627,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(serviceExpected, result); } - @Test(enabled = false, dataProvider = "createVnfParameters") + @Test(dataProvider = "createVnfParameters") public void createVnfRequestDetails_detailsAreAsExpected(boolean isFlagAddCloudOwnerActive, boolean isUserProvidedNaming, String file) throws IOException { final List vnfList = new ArrayList<>(createVnfList(new HashMap<>(), null, isUserProvidedNaming, true).values()); @@ -619,7 +665,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT }; } - @Test(enabled = false, dataProvider = "vfModuleRequestDetails") + @Test(dataProvider = "vfModuleRequestDetails") public void createVfModuleRequestDetails_detailsAreAsExpected(String volumeGroupInstanceId, boolean isUserProvidedNaming, String fileName) throws IOException { ModelInfo siModelInfo = createServiceModelInfo(); @@ -660,7 +706,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT }; } - @Test(enabled = false, dataProvider = "expectedAggregatedParams") + @Test(dataProvider = "expectedAggregatedParams") public void testAggregateInstanceParamsAndSuppFile(Map instanceParams, Map suppParams, List> expected) { List> aggParams = ((AsyncInstantiationBusinessLogicImpl)asyncInstantiationBL).aggregateAllInstanceParams(instanceParams, suppParams); assertThat("Aggregated params are not as expected", aggParams, equalTo(expected)); @@ -674,7 +720,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT }; } - @Test(enabled = false, dataProvider = "expectedNetworkRequestDetailsParameters") + @Test(dataProvider = "expectedNetworkRequestDetailsParameters") public void createNetworkRequestDetails_detailsAreAsExpected(boolean isUserProvidedNaming, String filePath) throws IOException { final List networksList = new ArrayList<>(createNetworkList(null, isUserProvidedNaming, true).values()); @@ -692,7 +738,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result); } - @Test(enabled = false) + @Test public void createInstanceGroupRequestDetails_detailsAreAsExpected() throws IOException { final InstanceGroup instanceGroup = createInstanceGroup(true, Action.Create); @@ -710,7 +756,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result); } - @Test(enabled = false) + @Test public void checkIfNullProjectNameSentToMso(){ ServiceInstantiation serviceInstantiationPayload = generateMockMacroServiceInstantiationPayload(true, createVnfList(vfModuleInstanceParamsMapWithParamsToRemove, Collections.EMPTY_LIST, false), @@ -732,7 +778,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT } - @Test(enabled = false) + @Test public void pushBulkJob_macroServiceverifyCreatedDateBehavior_createdDateIsTheSameForAllServicesInSameBulk() { LocalDateTime startTestDate = LocalDateTime.now().withNano(0); final ServiceInstantiation request = generateMockMacroServiceInstantiationPayload( @@ -744,7 +790,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT pushJobAndAssertDates(startTestDate, request); } - @Test(enabled = false) + @Test public void whenCreateServiceInfo_thenModelId_isModelVersionId() { ServiceInfo serviceInfo = asyncInstantiationBL.createServiceInfo("userID", generateALaCarteWithVnfsServiceInstantiationPayload(), @@ -756,7 +802,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT } - @Test(enabled = false) + @Test public void pushBulkJob_aLaCarteServiceverifyCreatedDateBehavior_createdDateIsTheSameForAllServicesInSameBulk() { LocalDateTime startTestDate = LocalDateTime.now().withNano(0); final ServiceInstantiation request = generateALaCarteServiceInstantiationPayload(); @@ -807,7 +853,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT }; } - @Test(enabled = false, dataProvider = "msoToJobStatusDataProvider") + @Test(dataProvider = "msoToJobStatusDataProvider") public void whenGetStatusFromMso_calcRightJobStatus(String msoStatus, Job.JobStatus expectedJobStatus) { AsyncRequestStatus asyncRequestStatus = asyncRequestStatusResponse(msoStatus); assertThat(asyncInstantiationBL.calcStatus(asyncRequestStatus), equalTo(expectedJobStatus)); @@ -852,7 +898,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT } - @Test(enabled = false, dataProvider = "auditStatuses") + @Test(dataProvider = "auditStatuses") public void givenSomeAuditStatuses_getStatusesOfSpecificSourceAndJobId_getSortedResultsMatchingToParameters(SourceStatus expectedSource, String [] expectedSortedStatuses){ UUID jobUuid = UUID.randomUUID(); List auditStatusList = com.google.common.collect.ImmutableList.of( @@ -870,7 +916,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT - @Test(enabled = false) + @Test public void addSomeVidStatuses_getThem_verifyGetInsertedWithoutDuplicates(){ ImmutableList statusesToBeInserted = ImmutableList.of(PENDING, IN_PROGRESS, IN_PROGRESS, COMPLETED); UUID jobUuid = UUID.randomUUID(); @@ -915,7 +961,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT }; } - @Test(enabled = false, dataProvider = "msoAuditStatuses") + @Test(dataProvider = "msoAuditStatuses") public void addSomeMsoStatuses_getThem_verifyGetInsertedWithoutDuplicates(UUID jobUuid, ImmutableList msoStatuses, ImmutableList expectedStatuses, String assertionReason) { msoStatuses.forEach(status -> { asyncInstantiationBL.auditMsoStatus(status.getJobId(), status.getJobStatus(), status.getRequestId() != null ? status.getRequestId().toString() : null, status.getAdditionalInfo()); @@ -924,7 +970,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT assertThat( assertionReason, statusesFromDB, is(expectedStatuses)); } - @Test(enabled = false) + @Test public void addSameStatusOfVidAndMso_verifyThatBothWereAdded(){ UUID jobUuid = UUID.randomUUID(); JobStatus sameStatus = IN_PROGRESS; @@ -947,7 +993,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT }; } - @Test(enabled = false, dataProvider="msoRequestStatusFiles") + @Test(dataProvider="msoRequestStatusFiles") public void verifyAsyncRequestStatus_canBeReadFromSample(String msoResponseFile) throws IOException { AsyncRequestStatus asyncRequestStatus = TestUtils.readJsonResourceFileAsObject( msoResponseFile, @@ -955,7 +1001,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT assertThat(asyncRequestStatus.request.requestStatus.getRequestState(), equalTo("COMPLETE")); } - @Test(enabled = false) + @Test public void deleteJobInfo_pending_deleted() { doNothing().when(jobsBrokerServiceMock).delete(any()); UUID uuid = createServicesInfoWithDefaultValues(PENDING); @@ -963,7 +1009,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT assertNotNull(asyncInstantiationBL.getServiceInfoByJobId(uuid).getDeletedAt(), "service info wasn't deleted"); } - @Test(enabled = false, expectedExceptions = IllegalStateException.class, expectedExceptionsMessageRegExp = DELETE_SERVICE_INFO_STATUS_EXCEPTION_MESSAGE) + @Test(expectedExceptions = IllegalStateException.class, expectedExceptionsMessageRegExp = DELETE_SERVICE_INFO_STATUS_EXCEPTION_MESSAGE) public void deleteJobInfo_notAllowdStatus_shouldSendError() { UUID uuid = createServicesInfoWithDefaultValues(COMPLETED); doThrow(new IllegalStateException(DELETE_SERVICE_INFO_STATUS_EXCEPTION_MESSAGE)).when(jobsBrokerServiceMock).delete(any()); @@ -982,7 +1028,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT .map(v -> new Object[]{v}).collect(Collectors.toList()).toArray(new Object[][]{}); } - @Test(enabled = false, dataProvider = "jobStatusesFinal") + @Test(dataProvider = "jobStatusesFinal") public void whenHideService_theServiceNotReturnedInServiceList(JobStatus jobStatus) { UUID uuidToHide = createServicesInfoWithDefaultValues(jobStatus); UUID uuidToShown = createServicesInfoWithDefaultValues(jobStatus); @@ -1007,7 +1053,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT .map(v -> new Object[]{v}).collect(Collectors.toList()).toArray(new Object[][]{}); } - @Test(enabled = false, dataProvider = "jobStatusesNotFinal", + @Test(dataProvider = "jobStatusesNotFinal", expectedExceptions = OperationNotAllowedException.class, expectedExceptionsMessageRegExp = "jobId.*Service status does not allow hide service, status = .*") public void hideServiceInfo_notAllowedStatus_shouldSendError(JobStatus jobStatus) { @@ -1020,7 +1066,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT } } - @Test(enabled = false) + @Test public void whenUseGetCounterInMultiThreads_EachThreadGetDifferentCounter() throws InterruptedException { int SIZE = 200; ExecutorService executor = Executors.newFixedThreadPool(SIZE); @@ -1041,7 +1087,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT assertThat(expectedResults.size(), is(0)); } - @Test(enabled = false) + @Test public void whenUseGetCounterForSameName_numbersReturnedByOrder() { String name = UUID.randomUUID().toString(); @@ -1051,7 +1097,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT } } - @Test(enabled = false) + @Test public void whenNamedInUsedInAai_getNextNumber() { String name = someCommonStepsAndGetName(); ResourceType type = ResourceType.GENERIC_VNF; @@ -1069,7 +1115,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT when(aaiClient.isNodeTypeExistsByName(eq(AsyncInstantiationBusinessLogicImpl.NAME_FOR_CHECK_AAI_STATUS), any())).thenReturn(false); } - @Test(enabled = false, expectedExceptions=ExceptionWithRequestInfo.class) + @Test(expectedExceptions=ExceptionWithRequestInfo.class) public void whenAaiBadResponseCode_throwInvalidAAIResponseException() { String name = someCommonStepsAndGetName(); ResourceType type = ResourceType.SERVICE_INSTANCE; @@ -1077,7 +1123,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT asyncInstantiationBL.getUniqueName(name, type); } - @Test(enabled = false, expectedExceptions=MaxRetriesException.class) + @Test(expectedExceptions=MaxRetriesException.class) public void whenAaiAlwaysReturnNameUsed_throwInvalidAAIResponseException() { String name = someCommonStepsAndGetName(); ResourceType type = ResourceType.VF_MODULE; @@ -1086,7 +1132,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT asyncInstantiationBL.getUniqueName(name, type); } - @Test(enabled = false) + @Test public void testFormattingOfNameAndCounter() { AsyncInstantiationBusinessLogicImpl bl = (AsyncInstantiationBusinessLogicImpl) asyncInstantiationBL; assertThat(bl.formatNameAndCounter("x", 0), equalTo("x")); @@ -1096,7 +1142,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT assertThat(bl.formatNameAndCounter("x", 1234), equalTo("x_1234")); } - @Test(enabled = false) + @Test public void pushBulkJob_verifyAlacarteFlow_useALaCartServiceInstantiationJobType(){ final ServiceInstantiation request = generateALaCarteServiceInstantiationPayload(); @@ -1109,7 +1155,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT assertTrue(argumentCaptor.getValue().equals(JobType.ALaCarteServiceInstantiation)); } - @Test(enabled = false) + @Test public void pushBulkJob_verifyMacroFlow_useMacroServiceInstantiationJobType(){ final ServiceInstantiation request = generateMacroMockServiceInstantiationPayload(false, Collections.emptyMap()); @@ -1122,7 +1168,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT assertTrue(argumentCaptor.getValue().equals(JobType.MacroServiceInstantiation)); } - @Test(enabled = false) + @Test public void generateALaCarteServiceInstantiationRequest_verifyRequestIsAsExpected() throws IOException { ServiceInstantiation serviceInstantiationPayload = generateALaCarteServiceInstantiationPayload(); final URL resource = this.getClass().getResource("/payload_jsons/bulk_alacarte_service_request.json"); @@ -1132,7 +1178,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result); } - @Test(enabled = false) + @Test public void generateALaCarteServiceDeletionRequest_verifyRequestIsAsExpected() throws IOException { final URL resource = this.getClass().getResource("/payload_jsons/bulk_alacarte_service_deletion_request.json"); String expected = IOUtils.toString(resource, "UTF-8"); @@ -1144,17 +1190,17 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result); } - @Test(enabled = false) + @Test public void getALaCarteServiceDeletionPath_verifyPathIsAsExpected() throws IOException { - String expected = "/serviceInstantiation/v7/serviceInstances/f36f5734-e9df-4fbf-9f35-61be13f028a1"; + String expected = "/serviceInstantiation/v./serviceInstances/f36f5734-e9df-4fbf-9f35-61be13f028a1"; String result = asyncInstantiationBL.getServiceDeletionPath("f36f5734-e9df-4fbf-9f35-61be13f028a1"); - assertThat(expected,equalTo(result)); + assertThat(result, matchesPattern(expected)); } - @Test(enabled = false) + @Test public void getInstanceGroupsDeletionPath_verifyPathIsAsExpected() { assertEquals(asyncInstantiationBL.getInstanceGroupDeletePath("9aada4af-0f9b-424f-ae21-e693bd3e005b"), @@ -1229,7 +1275,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT }; } - @Test(enabled = false, dataProvider="testBuildVnfInstanceParamsDataProvider") + @Test(dataProvider="testBuildVnfInstanceParamsDataProvider") public void testBuildVnfInstanceParams(List> currentVnfInstanceParams, List>> vfModulesInstanceParams, boolean isFeatureActive, @@ -1242,7 +1288,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT } - @Test(enabled = false) + @Test public void whenLcpRegionNotEmpty_thenCloudRegionIdOfResourceIsLegacy() { String legacyCloudRegion = "legacyCloudRegion"; Vnf vnf = new Vnf(new ModelInfo(), null, null, Action.Create.name(), null, "anyCloudRegion", legacyCloudRegion, null, null, null, false, null, null); @@ -1251,7 +1297,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT } - @Test(enabled = false) + @Test public void whenLcpRegionNotEmpty_thenCloudRegionIdOfServiceIsLegacy() { String legacyCloudRegion = "legacyCloudRegion"; ServiceInstantiation service = new ServiceInstantiation(new ModelInfo(), null, null, null, null, null, null, @@ -1260,7 +1306,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT assertThat(service.getLcpCloudRegionId(), equalTo(legacyCloudRegion)); } - @Test(enabled = false) + @Test public void createVolumeGroup_verifyResultAsExpected() throws IOException { final URL resource = this.getClass().getResource("/payload_jsons/volumegroup_instantiation_request.json"); VfModule vfModule = createVfModule("201673MowAvpnVpeBvL..AVPN_vRE_BV..module-1", @@ -1285,7 +1331,7 @@ public class AsyncInstantiationBusinessLogicTest extends AsyncInstantiationBaseT MsoOperationalEnvironmentTest.assertThatExpectationIsLikeObject(expected, result); } - @Test(enabled = false) + @Test public void getJobTypeByRequest_verifyResultAsExpected(){ ServiceInstantiation service = new ServiceInstantiation(new ModelInfo(), null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, diff --git a/vid-app-common/src/test/resources/WEB-INF/conf/system.properties b/vid-app-common/src/test/resources/WEB-INF/conf/system.properties index baf56d36c..ef444944d 100644 --- a/vid-app-common/src/test/resources/WEB-INF/conf/system.properties +++ b/vid-app-common/src/test/resources/WEB-INF/conf/system.properties @@ -150,12 +150,17 @@ mso.restapi.network.instance=/serviceInstances/v5//networks mso.restapi.vf.module.instance=/serviceInstances/v7//vnfs//vfModules mso.restapi.vf.module.scaleout=/serviceInstantiation/v7/serviceInstances//vnfs//vfModules/scaleOut mso.restapi.volume.group.instance=/serviceInstances/v5//vnfs//volumeGroups +mso.restapi.instance.group=/serviceInstantiation/v7/instanceGroups mso.restapi.get.orc.req=/orchestrationRequests/v5 mso.restapi.get.orc.reqs=/orchestrationRequests/v5? mso.restapi.get.man.tasks=/tasks/v1 mso.restapi.configurations=/serviceInstances/v6//configurations mso.restapi.configuration.instance=${mso.restapi.configurations} +mso.restapi.serviceInstantiationApiRoot=/serviceInstantiation/v7 +mso.restapi.serviceInstanceCreate=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances +mso.restapi.serviceInstanceAssign=${mso.restapi.serviceInstantiationApiRoot}/serviceInstances/assign + vid.truststore.filename=/opt/app/vid/etc/vid_keystore.jks mso.dme2.client.timeout=30000 mso.dme2.client.read.timeout=120000 diff --git a/vid-app-common/src/test/resources/WEB-INF/fusion/orm/Fusion.hbm.xml b/vid-app-common/src/test/resources/WEB-INF/fusion/orm/Fusion.hbm.xml new file mode 100644 index 000000000..e9eed439b --- /dev/null +++ b/vid-app-common/src/test/resources/WEB-INF/fusion/orm/Fusion.hbm.xml @@ -0,0 +1,394 @@ + + + + + + + + + + + + seq_fn_user + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + seq_fn_audit_log + + + + + + + + + + + + + seq_fn_role + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + seq_fn_menu + + + + + + + + + + + + + + + + + + + + + + + + seq_fn_menu + + + + + + + + + + + + + + + + + + + + + + + + + + + + seq_fn_broadcast_message + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + select distinct md.parentMenu.id from MenuData as md where md.label = :paramLabel and md.label is not null + + + + select distinct md.id from MenuData as md where md.label = :paramLabel + + + + select distinct md.id, md.label, md.parentMenu.id from MenuData as md where md.label is not null + + + + select distinct functionCd from MenuData + + + + select distinct code from RoleFunction + + + + from MenuData where menuSetCode = :menu_set_cd and parentMenu is null + + + FROM UrlsAccessible A where upper(A.urlsAccessibleKey.url) = upper(:current_url) + + + + select firstName, lastName from User where id = :user_id + + + + select email from User where id = :user_id + + + + select id, firstName, lastName from User where active = true order by lastName, firstName + + + + select name from Role where id = :role_id + + + + select id, name from Role order by name + + + + select orgUserId from User where id = :user_id + + + + select id from User where orgUserId = :orgUserId + + + + FROM User WHERE orgUserId = :org_user_id + + + + FROM User WHERE loginId = :login_id + + + + FROM User WHERE loginId = :login_id and loginPwd = :login_pwd + + + diff --git a/vid-app-common/src/test/resources/WEB-INF/fusion/orm/Workflow.hbm.xml b/vid-app-common/src/test/resources/WEB-INF/fusion/orm/Workflow.hbm.xml new file mode 100644 index 000000000..75361ed34 --- /dev/null +++ b/vid-app-common/src/test/resources/WEB-INF/fusion/orm/Workflow.hbm.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit 1.2.3-korg