diff options
author | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-07-10 14:20:54 +0300 |
---|---|---|
committer | Sonsino, Ofir (os0695) <os0695@intl.att.com> | 2018-07-10 14:20:54 +0300 |
commit | c72d565bb58226b20625b2bce5f0019046bee649 (patch) | |
tree | 8658e49595705b02e47ddc14afa20d6bb7123547 /epsdk-app-onap | |
parent | ef8a6b47847012fd59ea20da21d8d3d7c4a301ed (diff) |
Merge 1806 code of vid-common
Change-Id: I75d52abed4a24dfe3827d79edc4a2938726aa87a
Issue-ID: VID-208
Signed-off-by: Sonsino, Ofir (os0695) <os0695@intl.att.com>
Diffstat (limited to 'epsdk-app-onap')
4 files changed, 91 insertions, 1 deletions
diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java index 2d222f0d..9cf5df54 100644 --- a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppConfig.java @@ -63,6 +63,8 @@ import org.springframework.context.annotation.PropertySource; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.scheduling.quartz.SchedulerFactoryBean; +import org.springframework.scheduling.quartz.SpringBeanJobFactory; +import org.springframework.web.multipart.commons.CommonsMultipartResolver; import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.InterceptorRegistry; @@ -176,13 +178,14 @@ public class ExternalAppConfig extends AppConfig implements Configurable { * @return New instance of {@link SchedulerFactoryBean} * @throws Exception */ - // @Bean // ANNOTATION COMMENTED OUT + @Bean // ANNOTATION COMMENTED OUT // APPLICATIONS REQUIRING QUARTZ SHOULD RESTORE ANNOTATION public SchedulerFactoryBean schedulerFactoryBean() throws Exception { SchedulerFactoryBean scheduler = new SchedulerFactoryBean(); scheduler.setTriggers(schedulerRegistryAdapter.getTriggers()); scheduler.setConfigLocation(appApplicationContext.getResource("WEB-INF/conf/quartz.properties")); scheduler.setDataSource(dataSource()); + scheduler.setJobFactory(new SpringBeanJobFactory()); return scheduler; } @@ -218,6 +221,14 @@ public class ExternalAppConfig extends AppConfig implements Configurable { return populator; } + + /*@Bean + public SpringLiquibase liquibaseBean(DataSource dataSource) { + SpringLiquibase springLiquibase = new SpringLiquibase(); + springLiquibase.setDataSource(dataSource); + springLiquibase.setChangeLog("classpath:db-master-changelog.xml"); + return springLiquibase; + }*/ /** * Sets the scheduler registry adapter. @@ -233,4 +244,12 @@ public class ExternalAppConfig extends AppConfig implements Configurable { public LoginStrategy loginStrategy() { return new LoginStrategyImpl(); } + + @Bean + public CommonsMultipartResolver multipartResolver() { + CommonsMultipartResolver resolver=new CommonsMultipartResolver(); + resolver.setDefaultEncoding("utf-8"); + return resolver; + } + } diff --git a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java index c8fbc434..93e867d6 100644 --- a/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java +++ b/epsdk-app-onap/src/main/java/org/onap/portalapp/conf/ExternalAppInitializer.java @@ -37,7 +37,13 @@ */ package org.onap.portalapp.conf; +import org.onap.vid.controllers.ChangeManagementController; +import org.onap.vid.controllers.MaintenanceController; +import org.onap.vid.controllers.RoleGeneratorController; import org.onap.portalsdk.core.conf.AppInitializer; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import java.util.TimeZone; public class ExternalAppInitializer extends AppInitializer { @@ -62,4 +68,20 @@ public class ExternalAppInitializer extends AppInitializer { return super.getServletMappings(); } +// @Override +// public void onStartup(ServletContext servletContext) throws ServletException { +// super.onStartup(servletContext); +// setDefaultTimeZoneToUTC(); +// servletContext.addFilter("requestFromLocalhost", LocalhostFilter.class) +// .addMappingForUrlPatterns(null, false, +// String.format("/%s/%s/*", ChangeManagementController.CHANGE_MANAGEMENT, ChangeManagementController.VNF_WORKFLOW_RELATION), +// String.format("/%s/*", RoleGeneratorController.GENERATE_ROLE_SCRIPT), +// String.format("/%s/*", MaintenanceController.MAINTENANCE)); +// } + + //set time zone to UTC so Dates would be written to DB in UTC timezone + private void setDefaultTimeZoneToUTC() { + System.setProperty("user.timezone", "UTC"); + TimeZone.setDefault(TimeZone.getTimeZone("UTC")); //since TimeZone cache previous user.timezone + } } 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 defbff9f..035d3d8f 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 @@ -162,6 +162,7 @@ mso.password.x=OBF:1ghz1kfx1j1w1m7w1i271e8q1eas1hzj1m4i1iyy1kch1gdz #E2E is v3
mso.restapi.svc.e2einstance=/e2eServiceInstances/v3
mso.restapi.svc.instance=/serviceInstances/v6
+mso.restapi.svc.instance.deleteAndUnassign=/serviceInstantiation/v7/serviceInstances
mso.restapi.vnf.instance=/serviceInstances/v6/<service_instance_id>/vnfs
mso.restapi.vnf.changemanagement.instance=/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/<request_type>
mso.restapi.network.instance=/serviceInstances/v6/<service_instance_id>/networks
@@ -170,6 +171,29 @@ mso.restapi.volume.group.instance=/serviceInstances/v6/<service_instance_id>/vnf 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/<service_instance_id>/configurations
+mso.restapi.configuration.instance=${mso.restapi.configurations}/<configuration_id>
+
+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/<operational_environment_id>
+
+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=<request_id>
+
+mso.displayTestAPIOnScreen=true
+mso.defaultTestAPI=GR_API
+mso.maxOpenedInstantiationRequests=20
+mso.asyncPollingIntervalSeconds=1
+refreshTimeInstantiationDashboard=10
+
vid.truststore.filename=/opt/app/vid/etc/vid_keystore.jks
mso.dme2.client.timeout=30000
mso.dme2.client.read.timeout=120000
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 07319630..2ca038a5 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 @@ -105,6 +105,7 @@ mso.password.x=${VID_MSO_PASS} #E2E is v3
mso.restapi.svc.e2einstance=/ecomp/mso/infra/e2eServiceInstances/v3
mso.restapi.svc.instance=/ecomp/mso/infra/serviceInstances/v6
+mso.restapi.svc.instance.deleteAndUnassign=/serviceInstantiation/v7/serviceInstances
mso.restapi.vnf.instance=/ecomp/mso/infra/serviceInstances/v6/<service_instance_id>/vnfs
mso.restapi.vnf.changemanagement.instance=/ecomp/mso/infra/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/<request_type>
mso.restapi.network.instance=/ecomp/mso/infra/serviceInstances/v6/<service_instance_id>/networks
@@ -112,6 +113,30 @@ mso.restapi.vf.module.instance=/ecomp/mso/infra/serviceInstances/v6/<service_ins mso.restapi.volume.group.instance=/ecomp/mso/infra/serviceInstances/v6/<service_instance_id>/vnfs/<vnf_instance_id>/volumeGroups
mso.restapi.get.orc.req=/ecomp/mso/infra/orchestrationRequests/v6
mso.restapi.get.orc.reqs=/ecomp/mso/infra/orchestrationRequests/v6?
+mso.restapi.get.man.tasks=/tasks/v1
+mso.restapi.configurations=/serviceInstances/v6/<service_instance_id>/configurations
+mso.restapi.configuration.instance=${mso.restapi.configurations}/<configuration_id>
+
+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/<operational_environment_id>
+
+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=<request_id>
+
+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}
|