From cf53acb09d7638676caf94beb685f8845d9940e4 Mon Sep 17 00:00:00 2001 From: "RamaPrasad Amaranarayana (ra5425)" Date: Wed, 19 Sep 2018 18:25:49 -0400 Subject: Change Management Schedule Optimization Adding CMSO Service Template Files for Change Management Schedule Optimization Change-Id: Ic574407b44af1a7fd63a87fba3d3ca28e801d7b4 Issue-ID: OPTFRA-353 Signed-off-by: RamaPrasad Amaranarayana (ra5425) --- cmso-service/.gitignore | 1 + cmso-service/etc/config/README.txt | 3 + cmso-service/etc/config/cmso.properties | 115 +++++++ cmso-service/etc/config/optimizer.properties | 34 ++ cmso-service/etc/config/ticketmgt.properties | 38 +++ cmso-service/pom.xml | 448 +++++++++++++++++++++++++++ 6 files changed, 639 insertions(+) create mode 100644 cmso-service/.gitignore create mode 100644 cmso-service/etc/config/README.txt create mode 100644 cmso-service/etc/config/cmso.properties create mode 100644 cmso-service/etc/config/optimizer.properties create mode 100644 cmso-service/etc/config/ticketmgt.properties create mode 100644 cmso-service/pom.xml (limited to 'cmso-service') diff --git a/cmso-service/.gitignore b/cmso-service/.gitignore new file mode 100644 index 0000000..b83d222 --- /dev/null +++ b/cmso-service/.gitignore @@ -0,0 +1 @@ +/target/ diff --git a/cmso-service/etc/config/README.txt b/cmso-service/etc/config/README.txt new file mode 100644 index 0000000..e086cef --- /dev/null +++ b/cmso-service/etc/config/README.txt @@ -0,0 +1,3 @@ +The files in this etc/config folder are here for testing locally on eclipse. + +The files actually deployed are elsewhere diff --git a/cmso-service/etc/config/cmso.properties b/cmso-service/etc/config/cmso.properties new file mode 100644 index 0000000..6f50e60 --- /dev/null +++ b/cmso-service/etc/config/cmso.properties @@ -0,0 +1,115 @@ + +#------------------------------------------------------------------------------- +# Copyright 2017-2018 AT&T Intellectual Property. +# Modifications Copyright 2018 IBM. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Unless otherwise specified, all documentation contained herein is licensed +# under the Creative Commons License, Attribution 4.0 Intl. (the ??License?); +# you may not use this documentation except in compliance with the License. +# You may obtain a copy of the License at +# +# https://creativecommons.org/licenses/by/4.0/ +# +# Unless required by applicable law or agreed to in writing, documentation +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#------------------------------------------------------------------------------- +### + +### MySQL DB. +spring.datasource.url=jdbc:mariadb://localhost:3305/cmso +spring.datasource.driver-class-name=org.mariadb.jdbc.Driver +spring.datasource.username=cmso +cmso.database.password=enc:bfodXf8qRfCqMvlxVBYNWQ== + +### +### +### H2 DB. +#spring.datasource.url=jdbc:h2:file:./h2db;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=true;MODE=MYSQL +#spring.datasource.driver-class-name=org.h2.Driver +#spring.datasource.username=sa +#spring.datasource.password=sa + +spring.datasource.initialize=false +spring.datasource.tomcat.max-wait=10000 +spring.datasource.tomcat.initialSize=5 +spring.datasource.tomcat.max-active=25 +spring.datasource.tomcat.test-on-borrow=true + +spring.jpa.show-sql=false +spring.jpa.hibernate.ddl-auto=none +spring.jpa.hibernate.naming.strategy=org.hibernate.cfg.EJB3NamingStrategy +spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect +spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl + +logging.level.org.hibernate.SQL=TRACE + +logging.level.org.hibernate=TRACE + +# +#@BP.name="Enable AAF authentication" +#@BP.description="Log level for +#@BP.type=enum(true,false) +##BP.default=true +#@BP.required=false +#@BP.volatility=1 +cmso.aaf.enabled=false + +# Enable swagger - Enable in development and test only +cmso.swagger.enabled=true + +# Enable schedule immediate to be dispatched without ticket approvals +# Has no effect when in vTM loopback mode as always approved. +cmso.cm.dispatch.immediate.enabled = true + +# NUmber of seconds between sniro dispatch jobs +cmso.optimizer.job.interval.ms=10000 + +# NUmber of seconds between change management cmso polling jobs +# Controls frequenct of polling to the ChangeManagementScheduler table... +cmso.cm.polling.job.interval.ms=10000 +# How many management cmso polling intervals to look ahead to dispatch +# (To account for possible latency of the polling job) +cmso.cm.polling.job.lookahead.intervals=5 +# Lead time before event time to enable dispatcher to +# test that it is safe to dispatch (i.e. meeting reminder lead time) +cmso.cm.dispatcher.lead.time.ms=5000 +# Lead time to prepare and call VID to dispatch work to MSO +# Includes latency from VID call to the start of the workflow +cmso.cm.dispatch.lead.time.ms=1000 + +# Interval between polling to check status of schedules in Notifications Initiated status +cmso.status.job.interval.ms=60000 + +org.quartz.jobStore.class=org.quartz.simpl.RAMJobStore + +loopback.mso.requestId=dummy123 + +so.polling.interval.ms=10000 +#mso.user=cmso@onap.org +#mso.pass=enc:bfodXf8qRfCqMvlxVBYNWQ== + +## loopback settings +so.url=http://localhost:8080/cmso/v1/loopbacktest/onap/so/infra/orchestrationRequests/v7 +so.user=cmso@onap.org +so.pass=enc:bfodXf8qRfCqMvlxVBYNWQ== + +mechid.user=cmso@onap.org +mechid.pass=enc:bfodXf8qRfCqMvlxVBYNWQ== + +cmso.dispatch.url=http://localhost:8089 diff --git a/cmso-service/etc/config/optimizer.properties b/cmso-service/etc/config/optimizer.properties new file mode 100644 index 0000000..db014d6 --- /dev/null +++ b/cmso-service/etc/config/optimizer.properties @@ -0,0 +1,34 @@ +#------------------------------------------------------------------------------- +# Copyright 2017-2018 AT&T Intellectual Property. +# Modifications Copyright 2018 IBM. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Unless otherwise specified, all documentation contained herein is licensed +# under the Creative Commons License, Attribution 4.0 Intl. (the ??License?); +# you may not use this documentation except in compliance with the License. +# You may obtain a copy of the License at +# +# https://creativecommons.org/licenses/by/4.0/ +# +# Unless required by applicable law or agreed to in writing, documentation +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#------------------------------------------------------------------------------- + +cmso.optimizer.url=http://localhost:8080/cmso/v1/loopbacktest/optimizer +cmso.optimizer.callbackurl=http://localhost:8080/cmso/v1/optimizerCallback + diff --git a/cmso-service/etc/config/ticketmgt.properties b/cmso-service/etc/config/ticketmgt.properties new file mode 100644 index 0000000..88db1ee --- /dev/null +++ b/cmso-service/etc/config/ticketmgt.properties @@ -0,0 +1,38 @@ +#------------------------------------------------------------------------------- +# Copyright 2017-2018 AT&T Intellectual Property. +# Modifications Copyright 2018 IBM. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# Unless otherwise specified, all documentation contained herein is licensed +# under the Creative Commons License, Attribution 4.0 Intl. (the ??License?); +# you may not use this documentation except in compliance with the License. +# You may obtain a copy of the License at +# +# https://creativecommons.org/licenses/by/4.0/ +# +# Unless required by applicable law or agreed to in writing, documentation +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#------------------------------------------------------------------------------- + +tm.vnfs.per.ticket=1 +tm.getPath=http://localhost:8080/cmso/v1/tm/getChangeRecord +tm.createPath=http://localhost:8080/cmso/v1/tm/createChangeRecord +tm.closePath=http://localhost:8080/cmso/v1/tm/closeCancelChangeRecord +tm.updatePath=http://localhost:8080/cmso/v1/tm/updateChangeRecord +tm.approvalStatus=Approved|Scheduled,Approved|Assigned +tm.template.folder=data/templates/tm diff --git a/cmso-service/pom.xml b/cmso-service/pom.xml new file mode 100644 index 0000000..160deb7 --- /dev/null +++ b/cmso-service/pom.xml @@ -0,0 +1,448 @@ + + + + + 4.0.0 + + + org.onap.oparent + oparent + 1.2.0 + + + org.onap.optf.cmso + cmso-service + 0.1.0-SNAPSHOT + jar + + cmso + + + cmso + Casablanca + org.onap.optf.cmso + cmso + + 1.8 + 1.0.0 + 3.3.9 + 5.0.8.RELEASE + 2.0.4.RELEASE + 2.9.2 + + 1.8 + 1.8 + ${maven.build.timestamp} + UTF-8 + UTF-8 + yyyyMMdd'T'HHmmss'Z' + + 1.4.197 + ${basedir}/src/main/resources/swagger-ui/dist + + + 2.0.7 + java + ${basedir}/target/jacoco_report + ${basedir}/target/jacoco_itReport + reuseReports + jacoco + ${basedir}/target/jacoco-ut.exec + ${basedir}/target/jacoco-it.exec + ${basedir}/target/surefire-reports + ${basedir}/target/failsafe-reports + + + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring.boot.version} + pom + import + + + + + + + org.springframework.boot + spring-boot-starter-actuator + + + org.springframework.boot + spring-boot-starter-jersey + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-security + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-tomcat + + + + org.springframework.boot + spring-boot-configuration-processor + true + + + org.springframework.boot + spring-boot-starter-test + test + + + org.apache.httpcomponents + httpclient + + + org.springframework + spring-test + test + + + org.springframework + spring-aop + + + org.springframework + spring-beans + + + org.springframework + spring-beans + + + org.springframework + spring-context + + + org.springframework + spring-core + + + org.springframework + spring-expression + + + org.springframework + spring-web + + + org.springframework + spring-tx + + + org.springframework + spring-context-support + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + + + com.att.eelf + eelf-core + ${eelf.version} + + + + javax.ws.rs + javax.ws.rs-api + 2.1 + + + + + io.springfox + springfox-swagger2 + ${springfox.swagger2.version} + + + io.springfox + springfox-swagger-ui + ${springfox.swagger2.version} + + + + org.quartz-scheduler + quartz + + + + + com.h2database + h2 + + + + + au.com.dius + pact-jvm-consumer-junit_2.11 + ${pact.version} + + + org.codehaus.groovy + groovy-all + + + + + au.com.dius + pact-jvm-provider-junit_2.11 + ${pact.version} + + + + + + org.mockito + mockito-all + 1.9.5 + test + + + org.jacoco + jacoco-maven-plugin + 0.8.1 + + + + + cmso-service + + + au.com.dius + pact-jvm-provider-maven_2.11 + ${pact.version} + + + ${BROKER_URL} + pactadmin + pactadmin + 1.0.0 + + + + core + http + ${APP_URL} + ${APP_PORT} + / + + ${BROKER_URL} + + pactadmin + pactadmin + + + + + + + + maven-dependency-plugin + + + com.github.kongchen + swagger-maven-plugin + 3.1.5 + + + + + org.onap.optf.cmso.service.rs + + /cmso + + ${project.artifactId} + ${project.version} + + ${swagger.directory} + + + + + + compile + + generate + + + + + + exec-maven-plugin + org.codehaus.mojo + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + + + repackage + + + + + + + + + src/main/resources + true + + **/* + + + + ${basedir}/truststore + ${basedir}/target/truststore + true + + **/* + + + + ${basedir}/bin + ${basedir}/target/bin + true + + **/* + + + + ${basedir}/data + ${basedir}/target/data + true + + **/* + + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + com.github.kongchen + + + swagger-maven-plugin + + + [3.1.5] + + + generate + + + + + + + + + + + + + + + + + snapshot + + true + + + -${build.number}-${release-tag} + + + + next-stable + + -${release-tag} + + + + last-stable + + -${release-tag} + + + + -- cgit 1.2.3-korg