diff options
Diffstat (limited to 'nokia/vnfmdriver')
146 files changed, 7353 insertions, 2122 deletions
diff --git a/nokia/vnfmdriver/pom.xml b/nokia/vnfmdriver/pom.xml index ec9dff06..d39781bb 100644 --- a/nokia/vnfmdriver/pom.xml +++ b/nokia/vnfmdriver/pom.xml @@ -29,7 +29,7 @@ <name>vfc/nfvo/drivers/vnfm/svnfm/nokia/vnfmdriver</name> <description>nfvo vnfmdriver</description> <modules> - <module>vfcadaptor</module> + <module>vfcadaptorservice</module> </modules> <build> diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml b/nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml new file mode 100644 index 00000000..f0c4df7f --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/pom.xml @@ -0,0 +1,126 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Copyright (c) 2016, Nokia Corporation. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm</groupId> + <artifactId>vfcadaptor-service</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent> + + <artifactId>vfcadaptor-deployment</artifactId> + <packaging>pom</packaging> + + <name>vfc/nfvo/driver/vnfm/svnfm/nokia/vnfmdriver/vfcadaptorservice/deployment</name> + <description>svnfm vnfm driver deployment</description> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <build> + <plugins> + <plugin> + <groupId>org.codehaus.gmaven</groupId> + <artifactId>gmaven-plugin</artifactId> + <version>1.5</version> + <executions> + <execution> + <id>vfcadaptor package</id> + <phase>package</phase> + <goals> + <goal>execute</goal> + </goals> + <configuration> + <source> + System.out.println("******** Going to make release zip ********") + + deployFolder = + "${project.build.directory}/deployoutput" + deployUnzip = + "${project.build.directory}/deployunzip" + outfileName = + "${package.name}-${project.version}.zip" + ant.delete(dir: "${deployFolder}") + ant.mkdir(dir: + "${deployFolder}") + + ant.delete(dir: "${deployUnzip}") + ant.mkdir(dir: "${deployUnzip}") + + ant.mkdir(dir: + "${deployUnzip}/webapps/") + ant.mkdir(dir: "${deployUnzip}/webapps/ROOT") + ant.mkdir(dir: + "${deployUnzip}/logs") + + System.out.println("******** start copying from ${basedir}/src/main/release to ${deployUnzip}. ************") + + ant.copy(todir: "${deployUnzip}") { + fileset(dir: "${basedir}/src/main/release"){ + exclude(name: "**/.gitignore") + } + + } + + System.out.println("******** start copying from ${project.build.directory}/../../vfcadaptor/target/${package.name}-${project.version} to ${deployUnzip}/webapps/ROOT. ************") + ant.copy(todir: + "${deployUnzip}/webapps/ROOT") { + fileset(dir: + "${project.build.directory}/../../vfcadaptor/target/${package.name}-${project.version}") + } + + System.out.println("******** start zipping from ${deployUnzip} to ${deployFolder}/${outfileName}. ************") + ant.zip(destfile: + "${deployFolder}/${outfileName}") { + fileset(dir: "${deployUnzip}") + } + System.out.println("******** completed. ************") + </source> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>3.0.0</version> + <executions> + <execution> + <id>attach-artifacts</id> + <phase>package</phase> + <goals> + <goal>attach-artifact</goal> + </goals> + <configuration> + <artifacts> + <artifact> + <file>${project.build.directory}/deployoutput/${package.name}-${project.version}.zip</file> + <type>zip</type> + </artifact> + </artifacts> + </configuration> + </execution> + </executions> + </plugin> + + + + </plugins> + </build> +</project> diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt new file mode 100644 index 00000000..fa97d7e6 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/README.txt @@ -0,0 +1,58 @@ +Introduction: +============= + This document provides the required steps for installation + and configuration this service. + +Installation steps: +==================== + Install following software: + - Java 1.8 or lattest + - MySql Server 5.7 or lattest. + - Apache Tomcat Server 8.0 or lattest + + Set the following environment variables: + - JAVA_HOME: Set to JAVA JDK installed location + - CATALINIA_HOME: Set to Tomcat installed location + - CATALINIA_BASE: Set to the location, where this + service installer is unzipped, its optional + - PATH: Update it with the location of command 'mysql' + + - In command console, cd to 'bin' directory under the location, + where this service installer is unzipped and + run ./init_db.sh <db user> <db password> <db server ip> <db port> + CAUTION: Existing vnfm_db will be cleaned before + initializing the schema, so please take a back-up of it + before executing it next time. + +Configuration steps: +==================== + - Update the db credetials in 'application.properties' under webapps directory. + - Update the MSB address in 'application.properties' under webapps directory. + - Update the VNFM address in 'application.properties' under webapps directory. + - Update the Catalog address in 'application.properties' under webapps directory. + - Update the NSLCM address in 'application.properties' under webapps directory. + + +How to run? +=========== + - In command console, cd to 'bin' directory under the location, + where this service installer is unzipped and + run ./startup.sh + NOTE: It starts the tomcat at predefined http port. To change + default port, update the port in tomcat configuration file + 'conf/server.xml' + - Verify that 'Tomcat started.' is reported on the console. + - Once service is started, please verify below details: + - from MSB service, verify that "nokiavnfm" is reported from GET request on "/openoapi/microservices/v1/services" + - from this service, run one of the supported REST API mentioned in open-o NFVO wiki and verify that the + expected response is returned. +How to stop? +============= + - In command console, cd to 'bin' directory under the location, + where this service installer is unzipped and + run ./shutdown.sh + +Update: +========= +The latest information are available through the OPEN-O release notes at +https://wiki.open-o.org/view/OPEN-O_Sun_Release_Notes diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/init_db.sh b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/init_db.sh new file mode 100755 index 00000000..63e7800d --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/init_db.sh @@ -0,0 +1,61 @@ +#******************************************************************************* +# Copyright 2016, Nokia Corporation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#******************************************************************************* +#!/bin/bash + +cd .. + +if [ -z "$1" ] +then + echo "usage: init_db.sh <db user> <db password> <db server ip> <db port> " + exit 1 +fi + +if [ -z "$2" ] +then + echo "usage: init_db.sh <db user> <db password> <db server ip> <db port> " + exit 1 +fi + +if [ -z "$3" ] +then + echo "usage: init_db.sh <db user> <db password> <db server ip> <db port> " + exit 1 +fi + +if [ -z "$4" ] +then + echo "usage: init_db.sh <db user> <db password> <db server ip> <db port> " + exit 1 +fi + +echo +echo "DB-INIT [vnfmdb] : START" + +mysql -u$1 -p$2 -h$3 -P$4 <$(cd `dirname $0`; pwd)/db/mysql/db-schema.sql + +if [ $? != 0 ] ; then + echo "DB-INIT [vnfm_db] : FAILED !" + exit 1 +fi + +echo "DB-INIT [vnfmdb] : PASSED" +echo +echo "*************************************************************" +echo "CAUTION: Existing vnfmdb will be cleaned before" +echo "initializing the schema, so please take a back-up of it" +echo "before executing it next time." +echo "*************************************************************" +exit 0
\ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/shutdown.sh b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/shutdown.sh new file mode 100755 index 00000000..cd0c97dc --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/shutdown.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# ----------------------------------------------------------------------------- +# Stop script for the CATALINA Server +# ----------------------------------------------------------------------------- + +# Better OS/400 detection: see Bugzilla 31132 +os400=false +case "`uname`" in +OS400*) os400=true;; +esac + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +PRGDIR=`dirname "$PRG"` +EXECUTABLE=catalina.sh + +# Check that target executable exists +if $os400; then + # -x will Only work on the os400 if the files are: + # 1. owned by the user + # 2. owned by the PRIMARY group of the user + # this will not work if the user belongs in secondary groups + eval +else + if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then + echo "Cannot find $PRGDIR/$EXECUTABLE" + echo "The file is absent or does not have execute permission" + echo "This file is needed to run this program" + exit 1 + fi +fi + +exec "$PRGDIR"/"$EXECUTABLE" stop "$@" diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/startup.sh b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/startup.sh new file mode 100755 index 00000000..7b102875 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/bin/startup.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# ----------------------------------------------------------------------------- +# Start Script for the CATALINA Server +# ----------------------------------------------------------------------------- + +# Better OS/400 detection: see Bugzilla 31132 +os400=false +case "`uname`" in +OS400*) os400=true;; +esac + +# resolve links - $0 may be a softlink +PRG="$0" + +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`/"$link" + fi +done + +PRGDIR=`dirname "$PRG"` +EXECUTABLE=catalina.sh + +# Check that target executable exists +if $os400; then + # -x will Only work on the os400 if the files are: + # 1. owned by the user + # 2. owned by the PRIMARY group of the user + # this will not work if the user belongs in secondary groups + eval +else + if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then + echo "Cannot find $PRGDIR/$EXECUTABLE" + echo "The file is absent or does not have execute permission" + echo "This file is needed to run this program" + exit 1 + fi +fi + +exec "$PRGDIR"/"$EXECUTABLE" start "$@" diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.policy b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.policy new file mode 100644 index 00000000..a48a027f --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.policy @@ -0,0 +1,250 @@ +// Licensed to the Apache Software Foundation (ASF) under one or more +// contributor license agreements. See the NOTICE file distributed with +// this work for additional information regarding copyright ownership. +// The ASF licenses this file to You under the Apache License, Version 2.0 +// (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// ============================================================================ +// catalina.policy - Security Policy Permissions for Tomcat +// +// This file contains a default set of security policies to be enforced (by the +// JVM) when Catalina is executed with the "-security" option. In addition +// to the permissions granted here, the following additional permissions are +// granted to each web application: +// +// * Read access to the web application's document root directory +// * Read, write and delete access to the web application's working directory +// ============================================================================ + + +// ========== SYSTEM CODE PERMISSIONS ========================================= + + +// These permissions apply to javac +grant codeBase "file:${java.home}/lib/-" { + permission java.security.AllPermission; +}; + +// These permissions apply to all shared system extensions +grant codeBase "file:${java.home}/jre/lib/ext/-" { + permission java.security.AllPermission; +}; + +// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre +grant codeBase "file:${java.home}/../lib/-" { + permission java.security.AllPermission; +}; + +// These permissions apply to all shared system extensions when +// ${java.home} points at $JAVA_HOME/jre +grant codeBase "file:${java.home}/lib/ext/-" { + permission java.security.AllPermission; +}; + + +// ========== CATALINA CODE PERMISSIONS ======================================= + + +// These permissions apply to the daemon code +grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" { + permission java.security.AllPermission; +}; + +// These permissions apply to the logging API +// Note: If tomcat-juli.jar is in ${catalina.base} and not in ${catalina.home}, +// update this section accordingly. +// grant codeBase "file:${catalina.base}/bin/tomcat-juli.jar" {..} +grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" { + permission java.io.FilePermission + "${java.home}${file.separator}lib${file.separator}logging.properties", "read"; + + permission java.io.FilePermission + "${catalina.base}${file.separator}conf${file.separator}logging.properties", "read"; + permission java.io.FilePermission + "${catalina.base}${file.separator}logs", "read, write"; + permission java.io.FilePermission + "${catalina.base}${file.separator}logs${file.separator}*", "read, write"; + + permission java.lang.RuntimePermission "shutdownHooks"; + permission java.lang.RuntimePermission "getClassLoader"; + permission java.lang.RuntimePermission "setContextClassLoader"; + + permission java.lang.management.ManagementPermission "monitor"; + + permission java.util.logging.LoggingPermission "control"; + + permission java.util.PropertyPermission "java.util.logging.config.class", "read"; + permission java.util.PropertyPermission "java.util.logging.config.file", "read"; + permission java.util.PropertyPermission "org.apache.juli.AsyncLoggerPollInterval", "read"; + permission java.util.PropertyPermission "org.apache.juli.AsyncMaxRecordCount", "read"; + permission java.util.PropertyPermission "org.apache.juli.AsyncOverflowDropType", "read"; + permission java.util.PropertyPermission "org.apache.juli.ClassLoaderLogManager.debug", "read"; + permission java.util.PropertyPermission "catalina.base", "read"; + + // Note: To enable per context logging configuration, permit read access to + // the appropriate file. Be sure that the logging configuration is + // secure before enabling such access. + // E.g. for the examples web application (uncomment and unwrap + // the following to be on a single line): + // permission java.io.FilePermission "${catalina.base}${file.separator} + // webapps${file.separator}examples${file.separator}WEB-INF + // ${file.separator}classes${file.separator}logging.properties", "read"; +}; + +// These permissions apply to the server startup code +grant codeBase "file:${catalina.home}/bin/bootstrap.jar" { + permission java.security.AllPermission; +}; + +// These permissions apply to the servlet API classes +// and those that are shared across all class loaders +// located in the "lib" directory +grant codeBase "file:${catalina.home}/lib/-" { + permission java.security.AllPermission; +}; + + +// If using a per instance lib directory, i.e. ${catalina.base}/lib, +// then the following permission will need to be uncommented +// grant codeBase "file:${catalina.base}/lib/-" { +// permission java.security.AllPermission; +// }; + + +// ========== WEB APPLICATION PERMISSIONS ===================================== + + +// These permissions are granted by default to all web applications +// In addition, a web application will be given a read FilePermission +// for all files and directories in its document root. +grant { + // Required for JNDI lookup of named JDBC DataSource's and + // javamail named MimePart DataSource used to send mail + permission java.util.PropertyPermission "java.home", "read"; + permission java.util.PropertyPermission "java.naming.*", "read"; + permission java.util.PropertyPermission "javax.sql.*", "read"; + + // OS Specific properties to allow read access + permission java.util.PropertyPermission "os.name", "read"; + permission java.util.PropertyPermission "os.version", "read"; + permission java.util.PropertyPermission "os.arch", "read"; + permission java.util.PropertyPermission "file.separator", "read"; + permission java.util.PropertyPermission "path.separator", "read"; + permission java.util.PropertyPermission "line.separator", "read"; + + // JVM properties to allow read access + permission java.util.PropertyPermission "java.version", "read"; + permission java.util.PropertyPermission "java.vendor", "read"; + permission java.util.PropertyPermission "java.vendor.url", "read"; + permission java.util.PropertyPermission "java.class.version", "read"; + permission java.util.PropertyPermission "java.specification.version", "read"; + permission java.util.PropertyPermission "java.specification.vendor", "read"; + permission java.util.PropertyPermission "java.specification.name", "read"; + + permission java.util.PropertyPermission "java.vm.specification.version", "read"; + permission java.util.PropertyPermission "java.vm.specification.vendor", "read"; + permission java.util.PropertyPermission "java.vm.specification.name", "read"; + permission java.util.PropertyPermission "java.vm.version", "read"; + permission java.util.PropertyPermission "java.vm.vendor", "read"; + permission java.util.PropertyPermission "java.vm.name", "read"; + + // Required for OpenJMX + permission java.lang.RuntimePermission "getAttribute"; + + // Allow read of JAXP compliant XML parser debug + permission java.util.PropertyPermission "jaxp.debug", "read"; + + // All JSPs need to be able to read this package + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat"; + + // Precompiled JSPs need access to these packages. + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.el"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime"; + permission java.lang.RuntimePermission + "accessClassInPackage.org.apache.jasper.runtime.*"; + + // Precompiled JSPs need access to these system properties. + permission java.util.PropertyPermission + "org.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER", "read"; + permission java.util.PropertyPermission + "org.apache.el.parser.COERCE_TO_ZERO", "read"; + + // The cookie code needs these. + permission java.util.PropertyPermission + "org.apache.catalina.STRICT_SERVLET_COMPLIANCE", "read"; + permission java.util.PropertyPermission + "org.apache.tomcat.util.http.ServerCookie.STRICT_NAMING", "read"; + permission java.util.PropertyPermission + "org.apache.tomcat.util.http.ServerCookie.FWD_SLASH_IS_SEPARATOR", "read"; + + // Applications using Comet need to be able to access this package + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.comet"; + + // Applications using WebSocket need to be able to access these packages + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.websocket.server"; +}; + + +// The Manager application needs access to the following packages to support the +// session display functionality. These settings support the following +// configurations: +// - default CATALINA_HOME == CATALINA_BASE +// - CATALINA_HOME != CATALINA_BASE, per instance Manager in CATALINA_BASE +// - CATALINA_HOME != CATALINA_BASE, shared Manager in CATALINA_HOME +grant codeBase "file:${catalina.base}/webapps/manager/-" { + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util"; +}; +grant codeBase "file:${catalina.home}/webapps/manager/-" { + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.ha.session"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.manager.util"; + permission java.lang.RuntimePermission "accessClassInPackage.org.apache.catalina.util"; +}; + +// You can assign additional permissions to particular web applications by +// adding additional "grant" entries here, based on the code base for that +// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files. +// +// Different permissions can be granted to JSP pages, classes loaded from +// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/ +// directory, or even to individual jar files in the /WEB-INF/lib/ directory. +// +// For instance, assume that the standard "examples" application +// included a JDBC driver that needed to establish a network connection to the +// corresponding database and used the scrape taglib to get the weather from +// the NOAA web server. You might create a "grant" entries like this: +// +// The permissions granted to the context root directory apply to JSP pages. +// grant codeBase "file:${catalina.base}/webapps/examples/-" { +// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect"; +// permission java.net.SocketPermission "*.noaa.gov:80", "connect"; +// }; +// +// The permissions granted to the context WEB-INF/classes directory +// grant codeBase "file:${catalina.base}/webapps/examples/WEB-INF/classes/-" { +// }; +// +// The permission granted to your JDBC driver +// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/driver.jar!/-" { +// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect"; +// }; +// The permission granted to the scrape taglib +// grant codeBase "jar:file:${catalina.base}/webapps/examples/WEB-INF/lib/scrape.jar!/-" { +// permission java.net.SocketPermission "*.noaa.gov:80", "connect"; +// }; + diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.properties b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.properties new file mode 100644 index 00000000..830b29a3 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/catalina.properties @@ -0,0 +1,146 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when +# passed to checkPackageAccess unless the +# corresponding RuntimePermission ("accessClassInPackage."+package) has +# been granted. +package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.jasper.,org.apache.tomcat. +# +# List of comma-separated packages that start with or equal this string +# will cause a security exception to be thrown when +# passed to checkPackageDefinition unless the +# corresponding RuntimePermission ("defineClassInPackage."+package) has +# been granted. +# +# by default, no packages are restricted for definition, and none of +# the class loaders supplied with the JDK call checkPackageDefinition. +# +package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,\ +org.apache.jasper.,org.apache.naming.,org.apache.tomcat. + +# +# +# List of comma-separated paths defining the contents of the "common" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. +# If left as blank,the JVM system loader will be used as Catalina's "common" +# loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +# +# Note: Values are enclosed in double quotes ("...") in case either the +# ${catalina.base} path or the ${catalina.home} path contains a comma. +# Because double quotes are used for quoting, the double quote character +# may not appear in a path. +common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar" + +# +# List of comma-separated paths defining the contents of the "server" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute. +# If left as blank, the "common" loader will be used as Catalina's "server" +# loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +# +# Note: Values may be enclosed in double quotes ("...") in case either the +# ${catalina.base} path or the ${catalina.home} path contains a comma. +# Because double quotes are used for quoting, the double quote character +# may not appear in a path. +server.loader= + +# +# List of comma-separated paths defining the contents of the "shared" +# classloader. Prefixes should be used to define what is the repository type. +# Path may be relative to the CATALINA_BASE path or absolute. If left as blank, +# the "common" loader will be used as Catalina's "shared" loader. +# Examples: +# "foo": Add this folder as a class repository +# "foo/*.jar": Add all the JARs of the specified folder as class +# repositories +# "foo/bar.jar": Add bar.jar as a class repository +# Please note that for single jars, e.g. bar.jar, you need the URL form +# starting with file:. +# +# Note: Values may be enclosed in double quotes ("...") in case either the +# ${catalina.base} path or the ${catalina.home} path contains a comma. +# Because double quotes are used for quoting, the double quote character +# may not appear in a path. +shared.loader= + +# Default list of JAR files that should not be scanned using the JarScanner +# functionality. This is typically used to scan JARs for configuration +# information. JARs that do not contain such information may be excluded from +# the scan to speed up the scanning process. This is the default list. JARs on +# this list are excluded from all scans. The list must be a comma separated list +# of JAR file names. +# The list of JARs to skip may be over-ridden at a Context level for individual +# scan types by configuring a JarScanner with a nested JarScanFilter. +# The JARs listed below include: +# - Tomcat Bootstrap JARs +# - Tomcat API JARs +# - Catalina JARs +# - Jasper JARs +# - Tomcat JARs +# - Common non-Tomcat JARs +# - Test JARs (JUnit, Cobertura and dependencies) +tomcat.util.scan.StandardJarScanFilter.jarsToSkip=\ +bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\ +annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,websocket-api.jar,\ +catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-storeconfig.jar,\ +catalina-tribes.jar,\ +jasper.jar,jasper-el.jar,ecj-*.jar,\ +tomcat-api.jar,tomcat-util.jar,tomcat-util-scan.jar,tomcat-coyote.jar,\ +tomcat-dbcp.jar,tomcat-jni.jar,tomcat-websocket.jar,\ +tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\ +tomcat-juli-adapters.jar,catalina-jmx-remote.jar,catalina-ws.jar,\ +tomcat-jdbc.jar,\ +tools.jar,\ +commons-beanutils*.jar,commons-codec*.jar,commons-collections*.jar,\ +commons-dbcp*.jar,commons-digester*.jar,commons-fileupload*.jar,\ +commons-httpclient*.jar,commons-io*.jar,commons-lang*.jar,commons-logging*.jar,\ +commons-math*.jar,commons-pool*.jar,\ +jstl.jar,taglibs-standard-spec-*.jar,\ +geronimo-spec-jaxrpc*.jar,wsdl4j*.jar,\ +ant.jar,ant-junit*.jar,aspectj*.jar,jmx.jar,h2*.jar,hibernate*.jar,httpclient*.jar,\ +jmx-tools.jar,jta*.jar,log4j*.jar,mail*.jar,slf4j*.jar,\ +xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\ +junit.jar,junit-*.jar,ant-launcher.jar,\ +cobertura-*.jar,asm-*.jar,dom4j-*.jar,icu4j-*.jar,jaxen-*.jar,jdom-*.jar,\ +jetty-*.jar,oro-*.jar,servlet-api-*.jar,tagsoup-*.jar,xmlParserAPIs-*.jar,\ +xom-*.jar + +# Default list of JAR files that should be scanned that overrides the default +# jarsToSkip list above. This is typically used to include a specific JAR that +# has been excluded by a broad file name pattern in the jarsToSkip list. +# The list of JARs to scan may be over-ridden at a Context level for individual +# scan types by configuring a JarScanner with a nested JarScanFilter. +tomcat.util.scan.StandardJarScanFilter.jarsToScan=\ +log4j-core*.jar,log4j-taglib*.jar,log4javascript*.jar,slf4j-taglib*.jar + +# String cache configuration. +tomcat.util.buf.StringCache.byte.enabled=true +#tomcat.util.buf.StringCache.char.enabled=true +#tomcat.util.buf.StringCache.trainThreshold=500000 +#tomcat.util.buf.StringCache.cacheSize=5000 diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/context.xml b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/context.xml new file mode 100644 index 00000000..98727cb7 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/context.xml @@ -0,0 +1,36 @@ +<?xml version='1.0' encoding='utf-8'?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- The contents of this file will be loaded for each web application --> +<Context> + + <!-- Default set of monitored resources. If one of these changes, the --> + <!-- web application will be reloaded. --> + <WatchedResource>WEB-INF/web.xml</WatchedResource> + <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> + + <!-- Uncomment this to disable session persistence across Tomcat restarts --> + <!-- + <Manager pathname="" /> + --> + + <!-- Uncomment this to enable Comet connection tacking (provides events + on session expiration as well as webapp lifecycle) --> + <!-- + <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" /> + --> +</Context> diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xml b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xml new file mode 100644 index 00000000..cdebf872 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<jaspic-providers xmlns="http://tomcat.apache.org/xml" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://tomcat.apache.org/xml jaspic-providers.xsd" + version="1.0"> + <!-- No JASPIC providers configured by default --> +</jaspic-providers> diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xsd b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xsd new file mode 100644 index 00000000..73a87aa2 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/jaspic-providers.xsd @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<xs:schema xmlns="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://tomcat.apache.org/xml" + xmlns:jaspic="http://tomcat.apache.org/xml" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + elementFormDefault="qualified" + attributeFormDefault="unqualified" + version="1.0"> + <xs:element name="jaspic-providers"> + <xs:complexType> + <xs:sequence> + <xs:element name="provider" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:sequence> + <xs:element name="property" minOccurs="0" maxOccurs="unbounded"> + <xs:complexType> + <xs:attribute name="name" use="required" type="jaspic:propertyname" /> + <xs:attribute name="value" use="required" type="xs:string" /> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="className" use="required" type="xs:string" /> + <xs:attribute name="layer" use="required" type="xs:string" /> + <xs:attribute name="appContext" use="required" type="xs:string" /> + <xs:attribute name="description" type="xs:string" /> + </xs:complexType> + </xs:element> + </xs:sequence> + <xs:attribute name="version" type="xs:string" /> + </xs:complexType> + </xs:element> + <xs:simpleType name="propertyname"> + <xs:restriction base="xs:string"> + <xs:minLength value="1"/> + </xs:restriction> + </xs:simpleType> +</xs:schema>
\ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/logging.properties b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/logging.properties new file mode 100644 index 00000000..cb5ed661 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/logging.properties @@ -0,0 +1,64 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler + +.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +1catalina.org.apache.juli.AsyncFileHandler.level = FINE +1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina. + +2localhost.org.apache.juli.AsyncFileHandler.level = FINE +2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost. + +3manager.org.apache.juli.AsyncFileHandler.level = FINE +3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +3manager.org.apache.juli.AsyncFileHandler.prefix = manager. + +4host-manager.org.apache.juli.AsyncFileHandler.level = FINE +4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager. + +java.util.logging.ConsoleHandler.level = FINE +java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter + + +############################################################ +# Facility specific properties. +# Provides extra control for each logger. +############################################################ + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler + +# For example, set the org.apache.catalina.util.LifecycleBase logger to log +# each component that extends LifecycleBase changing state: +#org.apache.catalina.util.LifecycleBase.level = FINE + +# To see debug messages in TldLocationsCache, uncomment the following line: +#org.apache.jasper.compiler.TldLocationsCache.level = FINE diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/server.xml b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/server.xml new file mode 100644 index 00000000..7b93b3b0 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/server.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<!-- Note: A "Server" is not itself a "Container", so you may not + define subcomponents such as "Valves" at this level. + Documentation at /docs/config/server.html + --> +<Server port="9482" shutdown="SHUTDOWN"> + <Listener className="org.apache.catalina.startup.VersionLoggerListener" /> + <Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener" /> + <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" /> + <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> + <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" /> + <GlobalNamingResources> + <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" + name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase" /> + </GlobalNamingResources> + <Service name="Catalina"> + <Connector connectionTimeout="20000" port="8482" protocol="HTTP/1.1" redirectPort="8443" /> + <Connector port="8821" protocol="AJP/1.3" redirectPort="8443" /> + <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" + SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="true" + keystoreFile="conf/server.p12" keystorePass="Changeme_123" keystoreType="PKCS12" + truststoreFile="conf/trust.jks" truststoreType="JKS" truststorePass="Changeme_123" + sslProtocol="TLS" + ciphers="TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,TLS_RSA_WITH_AES_128_CBC_SHA256,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,TLS_RSA_WITH_AES_128_CBC_SHA" connectionTimeout="20000"/> + + <Engine defaultHost="localhost" name="Catalina"> + <Realm className="org.apache.catalina.realm.LockOutRealm"> + <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" /> + </Realm> + + <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true"> + <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" + pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log" suffix=".txt" /> + <Context docBase="ROOT" path="" reloadable="true" /> + </Host> + </Engine> + </Service> +</Server> diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/web.xml b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/web.xml new file mode 100644 index 00000000..c98ff28c --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/conf/web.xml @@ -0,0 +1,4692 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee + http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" + version="3.1"> + + <!-- ======================== Introduction ============================== --> + <!-- This document defines default values for *all* web applications --> + <!-- loaded into this instance of Tomcat. As each application is --> + <!-- deployed, this file is processed, followed by the --> + <!-- "/WEB-INF/web.xml" deployment descriptor from your own --> + <!-- applications. --> + <!-- --> + <!-- WARNING: Do not configure application-specific resources here! --> + <!-- They should go in the "/WEB-INF/web.xml" file in your application. --> + + + <!-- ================== Built In Servlet Definitions ==================== --> + + + <!-- The default servlet for all web applications, that serves static --> + <!-- resources. It processes all requests that are not mapped to other --> + <!-- servlets with servlet mappings (defined either here or in your own --> + <!-- web.xml file). This servlet supports the following initialization --> + <!-- parameters (default values are in square brackets): --> + <!-- --> + <!-- debug Debugging detail level for messages logged --> + <!-- by this servlet. Useful values are 0, 1, and --> + <!-- 11 where higher values mean more detail. [0] --> + <!-- --> + <!-- fileEncoding Encoding to be used to read static resources --> + <!-- [platform default] --> + <!-- --> + <!-- input Input buffer size (in bytes) when reading --> + <!-- resources to be served. [2048] --> + <!-- --> + <!-- listings Should directory listings be produced if there --> + <!-- is no welcome file in this directory? [false] --> + <!-- WARNING: Listings for directories with many --> + <!-- entries can be slow and may consume --> + <!-- significant proportions of server resources. --> + <!-- --> + <!-- output Output buffer size (in bytes) when writing --> + <!-- resources to be served. [2048] --> + <!-- --> + <!-- readonly Is this context "read only", so HTTP --> + <!-- commands like PUT and DELETE are --> + <!-- rejected? [true] --> + <!-- --> + <!-- readmeFile File to display together with the directory --> + <!-- contents. [null] --> + <!-- --> + <!-- sendfileSize If the connector used supports sendfile, this --> + <!-- represents the minimal file size in KB for --> + <!-- which sendfile will be used. Use a negative --> + <!-- value to always disable sendfile. [48] --> + <!-- --> + <!-- useAcceptRanges Should the Accept-Ranges header be included --> + <!-- in responses where appropriate? [true] --> + <!-- --> + <!-- For directory listing customization. Checks localXsltFile, then --> + <!-- globalXsltFile, then defaults to original behavior. --> + <!-- --> + <!-- localXsltFile Make directory listings an XML doc and --> + <!-- pass the result to this style sheet residing --> + <!-- in that directory. This overrides --> + <!-- contextXsltFile and globalXsltFile[null] --> + <!-- --> + <!-- contextXsltFile Make directory listings an XML doc and --> + <!-- pass the result to this style sheet which is --> + <!-- relative to the context root. This overrides --> + <!-- globalXsltFile[null] --> + <!-- --> + <!-- globalXsltFile Site wide configuration version of --> + <!-- localXsltFile. This argument must either be an --> + <!-- absolute or relative (to either --> + <!-- $CATALINA_BASE/conf or $CATALINA_HOME/conf) --> + <!-- path that points to a location below either --> + <!-- $CATALINA_BASE/conf (checked first) or --> + <!-- $CATALINA_HOME/conf (checked second).[null] --> + <!-- --> + <!-- showServerInfo Should server information be presented in the --> + <!-- response sent to clients when directory --> + <!-- listings is enabled? [true] --> + + <servlet> + <servlet-name>default</servlet-name> + <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> + <init-param> + <param-name>debug</param-name> + <param-value>0</param-value> + </init-param> + <init-param> + <param-name>listings</param-name> + <param-value>false</param-value> + </init-param> + <load-on-startup>1</load-on-startup> + </servlet> + + + <!-- The JSP page compiler and execution servlet, which is the mechanism --> + <!-- used by Tomcat to support JSP pages. Traditionally, this servlet --> + <!-- is mapped to the URL pattern "*.jsp". This servlet supports the --> + <!-- following initialization parameters (default values are in square --> + <!-- brackets): --> + <!-- --> + <!-- checkInterval If development is false and checkInterval is --> + <!-- greater than zero, background compilations are --> + <!-- enabled. checkInterval is the time in seconds --> + <!-- between checks to see if a JSP page (and its --> + <!-- dependent files) needs to be recompiled. [0] --> + <!-- --> + <!-- classdebuginfo Should the class file be compiled with --> + <!-- debugging information? [true] --> + <!-- --> + <!-- classpath What class path should I use while compiling --> + <!-- generated servlets? [Created dynamically --> + <!-- based on the current web application] --> + <!-- --> + <!-- compiler Which compiler Ant should use to compile JSP --> + <!-- pages. See the jasper documentation for more --> + <!-- information. --> + <!-- --> + <!-- compilerSourceVM Compiler source VM. [1.7] --> + <!-- --> + <!-- compilerTargetVM Compiler target VM. [1.7] --> + <!-- --> + <!-- development Is Jasper used in development mode? If true, --> + <!-- the frequency at which JSPs are checked for --> + <!-- modification may be specified via the --> + <!-- modificationTestInterval parameter. [true] --> + <!-- --> + <!-- displaySourceFragment --> + <!-- Should a source fragment be included in --> + <!-- exception messages? [true] --> + <!-- --> + <!-- dumpSmap Should the SMAP info for JSR45 debugging be --> + <!-- dumped to a file? [false] --> + <!-- False if suppressSmap is true --> + <!-- --> + <!-- enablePooling Determines whether tag handler pooling is --> + <!-- enabled. This is a compilation option. It will --> + <!-- not alter the behaviour of JSPs that have --> + <!-- already been compiled. [true] --> + <!-- --> + <!-- engineOptionsClass Allows specifying the Options class used to --> + <!-- configure Jasper. If not present, the default --> + <!-- EmbeddedServletOptions will be used. --> + <!-- --> + <!-- errorOnUseBeanInvalidClassAttribute --> + <!-- Should Jasper issue an error when the value of --> + <!-- the class attribute in an useBean action is --> + <!-- not a valid bean class? [true] --> + <!-- --> + <!-- fork Tell Ant to fork compiles of JSP pages so that --> + <!-- a separate JVM is used for JSP page compiles --> + <!-- from the one Tomcat is running in. [true] --> + <!-- --> + <!-- genStringAsCharArray --> + <!-- Should text strings be generated as char --> + <!-- arrays, to improve performance in some cases? --> + <!-- [false] --> + <!-- --> + <!-- ieClassId The class-id value to be sent to Internet --> + <!-- Explorer when using <jsp:plugin> tags. --> + <!-- [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93] --> + <!-- --> + <!-- javaEncoding Java file encoding to use for generating java --> + <!-- source files. [UTF8] --> + <!-- --> + <!-- keepgenerated Should we keep the generated Java source code --> + <!-- for each page instead of deleting it? [true] --> + <!-- --> + <!-- mappedfile Should we generate static content with one --> + <!-- print statement per input line, to ease --> + <!-- debugging? [true] --> + <!-- --> + <!-- maxLoadedJsps The maximum number of JSPs that will be loaded --> + <!-- for a web application. If more than this --> + <!-- number of JSPs are loaded, the least recently --> + <!-- used JSPs will be unloaded so that the number --> + <!-- of JSPs loaded at any one time does not exceed --> + <!-- this limit. A value of zero or less indicates --> + <!-- no limit. [-1] --> + <!-- --> + <!-- jspIdleTimeout The amount of time in seconds a JSP can be --> + <!-- idle before it is unloaded. A value of zero --> + <!-- or less indicates never unload. [-1] --> + <!-- --> + <!-- modificationTestInterval --> + <!-- Causes a JSP (and its dependent files) to not --> + <!-- be checked for modification during the --> + <!-- specified time interval (in seconds) from the --> + <!-- last time the JSP was checked for --> + <!-- modification. A value of 0 will cause the JSP --> + <!-- to be checked on every access. --> + <!-- Used in development mode only. [4] --> + <!-- --> + <!-- recompileOnFail If a JSP compilation fails should the --> + <!-- modificationTestInterval be ignored and the --> + <!-- next access trigger a re-compilation attempt? --> + <!-- Used in development mode only and is disabled --> + <!-- by default as compilation may be expensive and --> + <!-- could lead to excessive resource usage. --> + <!-- [false] --> + <!-- --> + <!-- scratchdir What scratch directory should we use when --> + <!-- compiling JSP pages? [default work directory --> + <!-- for the current web application] --> + <!-- --> + <!-- suppressSmap Should the generation of SMAP info for JSR45 --> + <!-- debugging be suppressed? [false] --> + <!-- --> + <!-- trimSpaces Should white spaces in template text between --> + <!-- actions or directives be trimmed? [false] --> + <!-- --> + <!-- xpoweredBy Determines whether X-Powered-By response --> + <!-- header is added by generated servlet. [false] --> + <!-- --> + <!-- strictQuoteEscaping When scriptlet expressions are used for --> + <!-- attribute values, should the rules in JSP.1.6 --> + <!-- for the escaping of quote characters be --> + <!-- strictly applied? [true] --> + <!-- The default can be changed with the --> + <!-- org.apache.jasper.compiler.Parser. --> + <!-- STRICT_QUOTE_ESCAPING system property. --> + <!-- --> + <!-- quoteAttributeEL When EL is used in an attribute value on a --> + <!-- JSP page should the rules for quoting of --> + <!-- attributes described in JSP.1.6 be applied to --> + <!-- the expression? [true] --> + + <servlet> + <servlet-name>jsp</servlet-name> + <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class> + <init-param> + <param-name>fork</param-name> + <param-value>false</param-value> + </init-param> + <init-param> + <param-name>xpoweredBy</param-name> + <param-value>false</param-value> + </init-param> + <load-on-startup>3</load-on-startup> + </servlet> + + + <!-- NOTE: An SSI Filter is also available as an alternative SSI --> + <!-- implementation. Use either the Servlet or the Filter but NOT both. --> + <!-- --> + <!-- Server Side Includes processing servlet, which processes SSI --> + <!-- directives in HTML pages consistent with similar support in web --> + <!-- servers like Apache. Traditionally, this servlet is mapped to the --> + <!-- URL pattern "*.shtml". This servlet supports the following --> + <!-- initialization parameters (default values are in square brackets): --> + <!-- --> + <!-- buffered Should output from this servlet be buffered? --> + <!-- (0=false, 1=true) [0] --> + <!-- --> + <!-- debug Debugging detail level for messages logged --> + <!-- by this servlet. [0] --> + <!-- --> + <!-- expires The number of seconds before a page with SSI --> + <!-- directives will expire. [No default] --> + <!-- --> + <!-- isVirtualWebappRelative --> + <!-- Should "virtual" paths be interpreted as --> + <!-- relative to the context root, instead of --> + <!-- the server root? [false] --> + <!-- --> + <!-- inputEncoding The encoding to assume for SSI resources if --> + <!-- one is not available from the resource. --> + <!-- [Platform default] --> + <!-- --> + <!-- outputEncoding The encoding to use for the page that results --> + <!-- from the SSI processing. [UTF-8] --> + <!-- --> + <!-- allowExec Is use of the exec command enabled? [false] --> + +<!-- + <servlet> + <servlet-name>ssi</servlet-name> + <servlet-class> + org.apache.catalina.ssi.SSIServlet + </servlet-class> + <init-param> + <param-name>buffered</param-name> + <param-value>1</param-value> + </init-param> + <init-param> + <param-name>debug</param-name> + <param-value>0</param-value> + </init-param> + <init-param> + <param-name>expires</param-name> + <param-value>666</param-value> + </init-param> + <init-param> + <param-name>isVirtualWebappRelative</param-name> + <param-value>false</param-value> + </init-param> + <load-on-startup>4</load-on-startup> + </servlet> +--> + + + <!-- Common Gateway Includes (CGI) processing servlet, which supports --> + <!-- execution of external applications that conform to the CGI spec --> + <!-- requirements. Typically, this servlet is mapped to the URL pattern --> + <!-- "/cgi-bin/*", which means that any CGI applications that are --> + <!-- executed must be present within the web application. This servlet --> + <!-- supports the following initialization parameters (default values --> + <!-- are in square brackets): --> + <!-- --> + <!-- cgiPathPrefix The CGI search path will start at --> + <!-- webAppRootDir + File.separator + this prefix. --> + <!-- If not set, then webAppRootDir is used. --> + <!-- Recommended value: WEB-INF/cgi --> + <!-- --> + <!-- debug Debugging detail level for messages logged --> + <!-- by this servlet. Useful values range from 0 --> + <!-- to 5 where 0 means no logging and 5 means --> + <!-- maximum logging. Values of 10 or more mean --> + <!-- maximum logging plus debug info added to the --> + <!-- HTTP response. If an error occurs and debug --> + <!-- is 10 or more the standard error page --> + <!-- mechanism will be disabled and a response --> + <!-- body with debug information will be produced. --> + <!-- Note that any value of 10 or more has the --> + <!-- same effect as a value of 10. If set to 10 or --> + <!-- more the standard error page mechanism will --> + <!-- be disabled and a debug page shown instead. --> + <!-- The debug page is not considered secure and --> + <!-- should not be enabled for production systems. --> + <!-- [0] --> + <!-- --> + <!-- executable Name of the executable used to run the --> + <!-- script. [perl] --> + <!-- --> + <!-- parameterEncoding Name of parameter encoding to be used with --> + <!-- CGI servlet. --> + <!-- [System.getProperty("file.encoding","UTF-8")] --> + <!-- --> + <!-- passShellEnvironment Should the shell environment variables (if --> + <!-- any) be passed to the CGI script? [false] --> + <!-- --> + <!-- stderrTimeout The time (in milliseconds) to wait for the --> + <!-- reading of stderr to complete before --> + <!-- terminating the CGI process. [2000] --> + +<!-- + <servlet> + <servlet-name>cgi</servlet-name> + <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class> + <init-param> + <param-name>debug</param-name> + <param-value>0</param-value> + </init-param> + <init-param> + <param-name>cgiPathPrefix</param-name> + <param-value>WEB-INF/cgi</param-value> + </init-param> + <load-on-startup>5</load-on-startup> + </servlet> +--> + + + <!-- ================ Built In Servlet Mappings ========================= --> + + + <!-- The servlet mappings for the built in servlets defined above. Note --> + <!-- that, by default, the CGI and SSI servlets are *not* mapped. You --> + <!-- must uncomment these mappings (or add them to your application's own --> + <!-- web.xml deployment descriptor) to enable these services --> + + <!-- The mapping for the default servlet --> + <servlet-mapping> + <servlet-name>default</servlet-name> + <url-pattern>/</url-pattern> + </servlet-mapping> + + <!-- The mappings for the JSP servlet --> + <servlet-mapping> + <servlet-name>jsp</servlet-name> + <url-pattern>*.jsp</url-pattern> + <url-pattern>*.jspx</url-pattern> + </servlet-mapping> + + <!-- The mapping for the SSI servlet --> +<!-- + <servlet-mapping> + <servlet-name>ssi</servlet-name> + <url-pattern>*.shtml</url-pattern> + </servlet-mapping> +--> + + <!-- The mapping for the CGI Gateway servlet --> + +<!-- + <servlet-mapping> + <servlet-name>cgi</servlet-name> + <url-pattern>/cgi-bin/*</url-pattern> + </servlet-mapping> +--> + + + <!-- ================== Built In Filter Definitions ===================== --> + + <!-- A filter that sets various security related HTTP Response headers. --> + <!-- This filter supports the following initialization parameters --> + <!-- (default values are in square brackets): --> + <!-- --> + <!-- hstsEnabled Should the HTTP Strict Transport Security --> + <!-- (HSTS) header be added to the response? See --> + <!-- RFC 6797 for more information on HSTS. [true] --> + <!-- --> + <!-- hstsMaxAgeSeconds The max age value that should be used in the --> + <!-- HSTS header. Negative values will be treated --> + <!-- as zero. [0] --> + <!-- --> + <!-- hstsIncludeSubDomains --> + <!-- Should the includeSubDomains parameter be --> + <!-- included in the HSTS header. --> + <!-- --> + <!-- antiClickJackingEnabled --> + <!-- Should the anti click-jacking header --> + <!-- X-Frame-Options be added to every response? --> + <!-- [true] --> + <!-- --> + <!-- antiClickJackingOption --> + <!-- What value should be used for the header. Must --> + <!-- be one of DENY, SAMEORIGIN, ALLOW-FROM --> + <!-- (case-insensitive). [DENY] --> + <!-- --> + <!-- antiClickJackingUri IF ALLOW-FROM is used, what URI should be --> + <!-- allowed? [] --> + <!-- --> + <!-- blockContentTypeSniffingEnabled --> + <!-- Should the header that blocks content type --> + <!-- sniffing be added to every response? [true] --> +<!-- + <filter> + <filter-name>httpHeaderSecurity</filter-name> + <filter-class>org.apache.catalina.filters.HttpHeaderSecurityFilter</filter-class> + <async-supported>true</async-supported> + </filter> +--> + + <!-- A filter that sets character encoding that is used to decode --> + <!-- parameters in a POST request --> +<!-- + <filter> + <filter-name>setCharacterEncodingFilter</filter-name> + <filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class> + <init-param> + <param-name>encoding</param-name> + <param-value>UTF-8</param-value> + </init-param> + <async-supported>true</async-supported> + </filter> +--> + + <!-- A filter that triggers request parameters parsing and rejects the --> + <!-- request if some parameters were skipped because of parsing errors or --> + <!-- request size limitations. --> +<!-- + <filter> + <filter-name>failedRequestFilter</filter-name> + <filter-class> + org.apache.catalina.filters.FailedRequestFilter + </filter-class> + <async-supported>true</async-supported> + </filter> +--> + + + <!-- NOTE: An SSI Servlet is also available as an alternative SSI --> + <!-- implementation. Use either the Servlet or the Filter but NOT both. --> + <!-- --> + <!-- Server Side Includes processing filter, which processes SSI --> + <!-- directives in HTML pages consistent with similar support in web --> + <!-- servers like Apache. Traditionally, this filter is mapped to the --> + <!-- URL pattern "*.shtml", though it can be mapped to "*" as it will --> + <!-- selectively enable/disable SSI processing based on mime types. For --> + <!-- this to work you will need to uncomment the .shtml mime type --> + <!-- definition towards the bottom of this file. --> + <!-- The contentType init param allows you to apply SSI processing to JSP --> + <!-- pages, javascript, or any other content you wish. This filter --> + <!-- supports the following initialization parameters (default values are --> + <!-- in square brackets): --> + <!-- --> + <!-- contentType A regex pattern that must be matched before --> + <!-- SSI processing is applied. --> + <!-- [text/x-server-parsed-html(;.*)?] --> + <!-- --> + <!-- debug Debugging detail level for messages logged --> + <!-- by this servlet. [0] --> + <!-- --> + <!-- expires The number of seconds before a page with SSI --> + <!-- directives will expire. [No default] --> + <!-- --> + <!-- isVirtualWebappRelative --> + <!-- Should "virtual" paths be interpreted as --> + <!-- relative to the context root, instead of --> + <!-- the server root? [false] --> + <!-- --> + <!-- allowExec Is use of the exec command enabled? [false] --> + +<!-- + <filter> + <filter-name>ssi</filter-name> + <filter-class> + org.apache.catalina.ssi.SSIFilter + </filter-class> + <init-param> + <param-name>contentType</param-name> + <param-value>text/x-server-parsed-html(;.*)?</param-value> + </init-param> + <init-param> + <param-name>debug</param-name> + <param-value>0</param-value> + </init-param> + <init-param> + <param-name>expires</param-name> + <param-value>666</param-value> + </init-param> + <init-param> + <param-name>isVirtualWebappRelative</param-name> + <param-value>false</param-value> + </init-param> + </filter> +--> + + + <!-- ==================== Built In Filter Mappings ====================== --> + + <!-- The mapping for the HTTP header security Filter --> +<!-- + <filter-mapping> + <filter-name>httpHeaderSecurity</filter-name> + <url-pattern>/*</url-pattern> + <dispatcher>REQUEST</dispatcher> + </filter-mapping> +--> + + <!-- The mapping for the Set Character Encoding Filter --> +<!-- + <filter-mapping> + <filter-name>setCharacterEncodingFilter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> +--> + + <!-- The mapping for the Failed Request Filter --> +<!-- + <filter-mapping> + <filter-name>failedRequestFilter</filter-name> + <url-pattern>/*</url-pattern> + </filter-mapping> +--> + + <!-- The mapping for the SSI Filter --> +<!-- + <filter-mapping> + <filter-name>ssi</filter-name> + <url-pattern>*.shtml</url-pattern> + </filter-mapping> +--> + + + <!-- ==================== Default Session Configuration ================= --> + <!-- You can set the default session timeout (in minutes) for all newly --> + <!-- created sessions by modifying the value below. --> + + <session-config> + <session-timeout>30</session-timeout> + </session-config> + + + <!-- ===================== Default MIME Type Mappings =================== --> + <!-- When serving static resources, Tomcat will automatically generate --> + <!-- a "Content-Type" header based on the resource's filename extension, --> + <!-- based on these mappings. Additional mappings can be added here (to --> + <!-- apply to all web applications), or in your own application's web.xml --> + <!-- deployment descriptor. --> + <!-- Note: Extensions are always matched in a case-insensitive manner. --> + + <mime-mapping> + <extension>123</extension> + <mime-type>application/vnd.lotus-1-2-3</mime-type> + </mime-mapping> + <mime-mapping> + <extension>3dml</extension> + <mime-type>text/vnd.in3d.3dml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>3ds</extension> + <mime-type>image/x-3ds</mime-type> + </mime-mapping> + <mime-mapping> + <extension>3g2</extension> + <mime-type>video/3gpp2</mime-type> + </mime-mapping> + <mime-mapping> + <extension>3gp</extension> + <mime-type>video/3gpp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>7z</extension> + <mime-type>application/x-7z-compressed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aab</extension> + <mime-type>application/x-authorware-bin</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aac</extension> + <mime-type>audio/x-aac</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aam</extension> + <mime-type>application/x-authorware-map</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aas</extension> + <mime-type>application/x-authorware-seg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>abs</extension> + <mime-type>audio/x-mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>abw</extension> + <mime-type>application/x-abiword</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ac</extension> + <mime-type>application/pkix-attr-cert</mime-type> + </mime-mapping> + <mime-mapping> + <extension>acc</extension> + <mime-type>application/vnd.americandynamics.acc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ace</extension> + <mime-type>application/x-ace-compressed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>acu</extension> + <mime-type>application/vnd.acucobol</mime-type> + </mime-mapping> + <mime-mapping> + <extension>acutc</extension> + <mime-type>application/vnd.acucorp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>adp</extension> + <mime-type>audio/adpcm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aep</extension> + <mime-type>application/vnd.audiograph</mime-type> + </mime-mapping> + <mime-mapping> + <extension>afm</extension> + <mime-type>application/x-font-type1</mime-type> + </mime-mapping> + <mime-mapping> + <extension>afp</extension> + <mime-type>application/vnd.ibm.modcap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ahead</extension> + <mime-type>application/vnd.ahead.space</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ai</extension> + <mime-type>application/postscript</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aif</extension> + <mime-type>audio/x-aiff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aifc</extension> + <mime-type>audio/x-aiff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aiff</extension> + <mime-type>audio/x-aiff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aim</extension> + <mime-type>application/x-aim</mime-type> + </mime-mapping> + <mime-mapping> + <extension>air</extension> + <mime-type>application/vnd.adobe.air-application-installer-package+zip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ait</extension> + <mime-type>application/vnd.dvb.ait</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ami</extension> + <mime-type>application/vnd.amiga.ami</mime-type> + </mime-mapping> + <mime-mapping> + <extension>anx</extension> + <mime-type>application/annodex</mime-type> + </mime-mapping> + <mime-mapping> + <extension>apk</extension> + <mime-type>application/vnd.android.package-archive</mime-type> + </mime-mapping> + <mime-mapping> + <extension>appcache</extension> + <mime-type>text/cache-manifest</mime-type> + </mime-mapping> + <mime-mapping> + <extension>application</extension> + <mime-type>application/x-ms-application</mime-type> + </mime-mapping> + <mime-mapping> + <extension>apr</extension> + <mime-type>application/vnd.lotus-approach</mime-type> + </mime-mapping> + <mime-mapping> + <extension>arc</extension> + <mime-type>application/x-freearc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>art</extension> + <mime-type>image/x-jg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>asc</extension> + <mime-type>application/pgp-signature</mime-type> + </mime-mapping> + <mime-mapping> + <extension>asf</extension> + <mime-type>video/x-ms-asf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>asm</extension> + <mime-type>text/x-asm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aso</extension> + <mime-type>application/vnd.accpac.simply.aso</mime-type> + </mime-mapping> + <mime-mapping> + <extension>asx</extension> + <mime-type>video/x-ms-asf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>atc</extension> + <mime-type>application/vnd.acucorp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>atom</extension> + <mime-type>application/atom+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>atomcat</extension> + <mime-type>application/atomcat+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>atomsvc</extension> + <mime-type>application/atomsvc+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>atx</extension> + <mime-type>application/vnd.antix.game-component</mime-type> + </mime-mapping> + <mime-mapping> + <extension>au</extension> + <mime-type>audio/basic</mime-type> + </mime-mapping> + <mime-mapping> + <extension>avi</extension> + <mime-type>video/x-msvideo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>avx</extension> + <mime-type>video/x-rad-screenplay</mime-type> + </mime-mapping> + <mime-mapping> + <extension>aw</extension> + <mime-type>application/applixware</mime-type> + </mime-mapping> + <mime-mapping> + <extension>axa</extension> + <mime-type>audio/annodex</mime-type> + </mime-mapping> + <mime-mapping> + <extension>axv</extension> + <mime-type>video/annodex</mime-type> + </mime-mapping> + <mime-mapping> + <extension>azf</extension> + <mime-type>application/vnd.airzip.filesecure.azf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>azs</extension> + <mime-type>application/vnd.airzip.filesecure.azs</mime-type> + </mime-mapping> + <mime-mapping> + <extension>azw</extension> + <mime-type>application/vnd.amazon.ebook</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bat</extension> + <mime-type>application/x-msdownload</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bcpio</extension> + <mime-type>application/x-bcpio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bdf</extension> + <mime-type>application/x-font-bdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bdm</extension> + <mime-type>application/vnd.syncml.dm+wbxml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bed</extension> + <mime-type>application/vnd.realvnc.bed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bh2</extension> + <mime-type>application/vnd.fujitsu.oasysprs</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bin</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>blb</extension> + <mime-type>application/x-blorb</mime-type> + </mime-mapping> + <mime-mapping> + <extension>blorb</extension> + <mime-type>application/x-blorb</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bmi</extension> + <mime-type>application/vnd.bmi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bmp</extension> + <mime-type>image/bmp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>body</extension> + <mime-type>text/html</mime-type> + </mime-mapping> + <mime-mapping> + <extension>book</extension> + <mime-type>application/vnd.framemaker</mime-type> + </mime-mapping> + <mime-mapping> + <extension>box</extension> + <mime-type>application/vnd.previewsystems.box</mime-type> + </mime-mapping> + <mime-mapping> + <extension>boz</extension> + <mime-type>application/x-bzip2</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bpk</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>btif</extension> + <mime-type>image/prs.btif</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bz</extension> + <mime-type>application/x-bzip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>bz2</extension> + <mime-type>application/x-bzip2</mime-type> + </mime-mapping> + <mime-mapping> + <extension>c</extension> + <mime-type>text/x-c</mime-type> + </mime-mapping> + <mime-mapping> + <extension>c11amc</extension> + <mime-type>application/vnd.cluetrust.cartomobile-config</mime-type> + </mime-mapping> + <mime-mapping> + <extension>c11amz</extension> + <mime-type>application/vnd.cluetrust.cartomobile-config-pkg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>c4d</extension> + <mime-type>application/vnd.clonk.c4group</mime-type> + </mime-mapping> + <mime-mapping> + <extension>c4f</extension> + <mime-type>application/vnd.clonk.c4group</mime-type> + </mime-mapping> + <mime-mapping> + <extension>c4g</extension> + <mime-type>application/vnd.clonk.c4group</mime-type> + </mime-mapping> + <mime-mapping> + <extension>c4p</extension> + <mime-type>application/vnd.clonk.c4group</mime-type> + </mime-mapping> + <mime-mapping> + <extension>c4u</extension> + <mime-type>application/vnd.clonk.c4group</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cab</extension> + <mime-type>application/vnd.ms-cab-compressed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>caf</extension> + <mime-type>audio/x-caf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cap</extension> + <mime-type>application/vnd.tcpdump.pcap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>car</extension> + <mime-type>application/vnd.curl.car</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cat</extension> + <mime-type>application/vnd.ms-pki.seccat</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cb7</extension> + <mime-type>application/x-cbr</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cba</extension> + <mime-type>application/x-cbr</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cbr</extension> + <mime-type>application/x-cbr</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cbt</extension> + <mime-type>application/x-cbr</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cbz</extension> + <mime-type>application/x-cbr</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cc</extension> + <mime-type>text/x-c</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cct</extension> + <mime-type>application/x-director</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ccxml</extension> + <mime-type>application/ccxml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdbcmsg</extension> + <mime-type>application/vnd.contact.cmsg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdf</extension> + <mime-type>application/x-cdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdkey</extension> + <mime-type>application/vnd.mediastation.cdkey</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdmia</extension> + <mime-type>application/cdmi-capability</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdmic</extension> + <mime-type>application/cdmi-container</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdmid</extension> + <mime-type>application/cdmi-domain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdmio</extension> + <mime-type>application/cdmi-object</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdmiq</extension> + <mime-type>application/cdmi-queue</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdx</extension> + <mime-type>chemical/x-cdx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdxml</extension> + <mime-type>application/vnd.chemdraw+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cdy</extension> + <mime-type>application/vnd.cinderella</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cer</extension> + <mime-type>application/pkix-cert</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cfs</extension> + <mime-type>application/x-cfs-compressed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cgm</extension> + <mime-type>image/cgm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>chat</extension> + <mime-type>application/x-chat</mime-type> + </mime-mapping> + <mime-mapping> + <extension>chm</extension> + <mime-type>application/vnd.ms-htmlhelp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>chrt</extension> + <mime-type>application/vnd.kde.kchart</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cif</extension> + <mime-type>chemical/x-cif</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cii</extension> + <mime-type>application/vnd.anser-web-certificate-issue-initiation</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cil</extension> + <mime-type>application/vnd.ms-artgalry</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cla</extension> + <mime-type>application/vnd.claymore</mime-type> + </mime-mapping> + <mime-mapping> + <extension>class</extension> + <mime-type>application/java</mime-type> + </mime-mapping> + <mime-mapping> + <extension>clkk</extension> + <mime-type>application/vnd.crick.clicker.keyboard</mime-type> + </mime-mapping> + <mime-mapping> + <extension>clkp</extension> + <mime-type>application/vnd.crick.clicker.palette</mime-type> + </mime-mapping> + <mime-mapping> + <extension>clkt</extension> + <mime-type>application/vnd.crick.clicker.template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>clkw</extension> + <mime-type>application/vnd.crick.clicker.wordbank</mime-type> + </mime-mapping> + <mime-mapping> + <extension>clkx</extension> + <mime-type>application/vnd.crick.clicker</mime-type> + </mime-mapping> + <mime-mapping> + <extension>clp</extension> + <mime-type>application/x-msclip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cmc</extension> + <mime-type>application/vnd.cosmocaller</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cmdf</extension> + <mime-type>chemical/x-cmdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cml</extension> + <mime-type>chemical/x-cml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cmp</extension> + <mime-type>application/vnd.yellowriver-custom-menu</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cmx</extension> + <mime-type>image/x-cmx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cod</extension> + <mime-type>application/vnd.rim.cod</mime-type> + </mime-mapping> + <mime-mapping> + <extension>com</extension> + <mime-type>application/x-msdownload</mime-type> + </mime-mapping> + <mime-mapping> + <extension>conf</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cpio</extension> + <mime-type>application/x-cpio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cpp</extension> + <mime-type>text/x-c</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cpt</extension> + <mime-type>application/mac-compactpro</mime-type> + </mime-mapping> + <mime-mapping> + <extension>crd</extension> + <mime-type>application/x-mscardfile</mime-type> + </mime-mapping> + <mime-mapping> + <extension>crl</extension> + <mime-type>application/pkix-crl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>crt</extension> + <mime-type>application/x-x509-ca-cert</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cryptonote</extension> + <mime-type>application/vnd.rig.cryptonote</mime-type> + </mime-mapping> + <mime-mapping> + <extension>csh</extension> + <mime-type>application/x-csh</mime-type> + </mime-mapping> + <mime-mapping> + <extension>csml</extension> + <mime-type>chemical/x-csml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>csp</extension> + <mime-type>application/vnd.commonspace</mime-type> + </mime-mapping> + <mime-mapping> + <extension>css</extension> + <mime-type>text/css</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cst</extension> + <mime-type>application/x-director</mime-type> + </mime-mapping> + <mime-mapping> + <extension>csv</extension> + <mime-type>text/csv</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cu</extension> + <mime-type>application/cu-seeme</mime-type> + </mime-mapping> + <mime-mapping> + <extension>curl</extension> + <mime-type>text/vnd.curl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cww</extension> + <mime-type>application/prs.cww</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cxt</extension> + <mime-type>application/x-director</mime-type> + </mime-mapping> + <mime-mapping> + <extension>cxx</extension> + <mime-type>text/x-c</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dae</extension> + <mime-type>model/vnd.collada+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>daf</extension> + <mime-type>application/vnd.mobius.daf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dart</extension> + <mime-type>application/vnd.dart</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dataless</extension> + <mime-type>application/vnd.fdsn.seed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>davmount</extension> + <mime-type>application/davmount+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dbk</extension> + <mime-type>application/docbook+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dcr</extension> + <mime-type>application/x-director</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dcurl</extension> + <mime-type>text/vnd.curl.dcurl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dd2</extension> + <mime-type>application/vnd.oma.dd2+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ddd</extension> + <mime-type>application/vnd.fujixerox.ddd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>deb</extension> + <mime-type>application/x-debian-package</mime-type> + </mime-mapping> + <mime-mapping> + <extension>def</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>deploy</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>der</extension> + <mime-type>application/x-x509-ca-cert</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dfac</extension> + <mime-type>application/vnd.dreamfactory</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dgc</extension> + <mime-type>application/x-dgc-compressed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dib</extension> + <mime-type>image/bmp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dic</extension> + <mime-type>text/x-c</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dir</extension> + <mime-type>application/x-director</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dis</extension> + <mime-type>application/vnd.mobius.dis</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dist</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>distz</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>djv</extension> + <mime-type>image/vnd.djvu</mime-type> + </mime-mapping> + <mime-mapping> + <extension>djvu</extension> + <mime-type>image/vnd.djvu</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dll</extension> + <mime-type>application/x-msdownload</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dmg</extension> + <mime-type>application/x-apple-diskimage</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dmp</extension> + <mime-type>application/vnd.tcpdump.pcap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dms</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dna</extension> + <mime-type>application/vnd.dna</mime-type> + </mime-mapping> + <mime-mapping> + <extension>doc</extension> + <mime-type>application/msword</mime-type> + </mime-mapping> + <mime-mapping> + <extension>docm</extension> + <mime-type>application/vnd.ms-word.document.macroenabled.12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>docx</extension> + <mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.document</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dot</extension> + <mime-type>application/msword</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dotm</extension> + <mime-type>application/vnd.ms-word.template.macroenabled.12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dotx</extension> + <mime-type>application/vnd.openxmlformats-officedocument.wordprocessingml.template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dp</extension> + <mime-type>application/vnd.osgi.dp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dpg</extension> + <mime-type>application/vnd.dpgraph</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dra</extension> + <mime-type>audio/vnd.dra</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dsc</extension> + <mime-type>text/prs.lines.tag</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dssc</extension> + <mime-type>application/dssc+der</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dtb</extension> + <mime-type>application/x-dtbook+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dtd</extension> + <mime-type>application/xml-dtd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dts</extension> + <mime-type>audio/vnd.dts</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dtshd</extension> + <mime-type>audio/vnd.dts.hd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dump</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dv</extension> + <mime-type>video/x-dv</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dvb</extension> + <mime-type>video/vnd.dvb.file</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dvi</extension> + <mime-type>application/x-dvi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dwf</extension> + <mime-type>model/vnd.dwf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dwg</extension> + <mime-type>image/vnd.dwg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dxf</extension> + <mime-type>image/vnd.dxf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dxp</extension> + <mime-type>application/vnd.spotfire.dxp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>dxr</extension> + <mime-type>application/x-director</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ecelp4800</extension> + <mime-type>audio/vnd.nuera.ecelp4800</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ecelp7470</extension> + <mime-type>audio/vnd.nuera.ecelp7470</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ecelp9600</extension> + <mime-type>audio/vnd.nuera.ecelp9600</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ecma</extension> + <mime-type>application/ecmascript</mime-type> + </mime-mapping> + <mime-mapping> + <extension>edm</extension> + <mime-type>application/vnd.novadigm.edm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>edx</extension> + <mime-type>application/vnd.novadigm.edx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>efif</extension> + <mime-type>application/vnd.picsel</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ei6</extension> + <mime-type>application/vnd.pg.osasli</mime-type> + </mime-mapping> + <mime-mapping> + <extension>elc</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>emf</extension> + <mime-type>application/x-msmetafile</mime-type> + </mime-mapping> + <mime-mapping> + <extension>eml</extension> + <mime-type>message/rfc822</mime-type> + </mime-mapping> + <mime-mapping> + <extension>emma</extension> + <mime-type>application/emma+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>emz</extension> + <mime-type>application/x-msmetafile</mime-type> + </mime-mapping> + <mime-mapping> + <extension>eol</extension> + <mime-type>audio/vnd.digital-winds</mime-type> + </mime-mapping> + <mime-mapping> + <extension>eot</extension> + <mime-type>application/vnd.ms-fontobject</mime-type> + </mime-mapping> + <mime-mapping> + <extension>eps</extension> + <mime-type>application/postscript</mime-type> + </mime-mapping> + <mime-mapping> + <extension>epub</extension> + <mime-type>application/epub+zip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>es3</extension> + <mime-type>application/vnd.eszigno3+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>esa</extension> + <mime-type>application/vnd.osgi.subsystem</mime-type> + </mime-mapping> + <mime-mapping> + <extension>esf</extension> + <mime-type>application/vnd.epson.esf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>et3</extension> + <mime-type>application/vnd.eszigno3+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>etx</extension> + <mime-type>text/x-setext</mime-type> + </mime-mapping> + <mime-mapping> + <extension>eva</extension> + <mime-type>application/x-eva</mime-type> + </mime-mapping> + <mime-mapping> + <extension>evy</extension> + <mime-type>application/x-envoy</mime-type> + </mime-mapping> + <mime-mapping> + <extension>exe</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>exi</extension> + <mime-type>application/exi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ext</extension> + <mime-type>application/vnd.novadigm.ext</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ez</extension> + <mime-type>application/andrew-inset</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ez2</extension> + <mime-type>application/vnd.ezpix-album</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ez3</extension> + <mime-type>application/vnd.ezpix-package</mime-type> + </mime-mapping> + <mime-mapping> + <extension>f</extension> + <mime-type>text/x-fortran</mime-type> + </mime-mapping> + <mime-mapping> + <extension>f4v</extension> + <mime-type>video/x-f4v</mime-type> + </mime-mapping> + <mime-mapping> + <extension>f77</extension> + <mime-type>text/x-fortran</mime-type> + </mime-mapping> + <mime-mapping> + <extension>f90</extension> + <mime-type>text/x-fortran</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fbs</extension> + <mime-type>image/vnd.fastbidsheet</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fcdt</extension> + <mime-type>application/vnd.adobe.formscentral.fcdt</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fcs</extension> + <mime-type>application/vnd.isac.fcs</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fdf</extension> + <mime-type>application/vnd.fdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fe_launch</extension> + <mime-type>application/vnd.denovo.fcselayout-link</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fg5</extension> + <mime-type>application/vnd.fujitsu.oasysgp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fgd</extension> + <mime-type>application/x-director</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fh</extension> + <mime-type>image/x-freehand</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fh4</extension> + <mime-type>image/x-freehand</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fh5</extension> + <mime-type>image/x-freehand</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fh7</extension> + <mime-type>image/x-freehand</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fhc</extension> + <mime-type>image/x-freehand</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fig</extension> + <mime-type>application/x-xfig</mime-type> + </mime-mapping> + <mime-mapping> + <extension>flac</extension> + <mime-type>audio/flac</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fli</extension> + <mime-type>video/x-fli</mime-type> + </mime-mapping> + <mime-mapping> + <extension>flo</extension> + <mime-type>application/vnd.micrografx.flo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>flv</extension> + <mime-type>video/x-flv</mime-type> + </mime-mapping> + <mime-mapping> + <extension>flw</extension> + <mime-type>application/vnd.kde.kivio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>flx</extension> + <mime-type>text/vnd.fmi.flexstor</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fly</extension> + <mime-type>text/vnd.fly</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fm</extension> + <mime-type>application/vnd.framemaker</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fnc</extension> + <mime-type>application/vnd.frogans.fnc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>for</extension> + <mime-type>text/x-fortran</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fpx</extension> + <mime-type>image/vnd.fpx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>frame</extension> + <mime-type>application/vnd.framemaker</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fsc</extension> + <mime-type>application/vnd.fsc.weblaunch</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fst</extension> + <mime-type>image/vnd.fst</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ftc</extension> + <mime-type>application/vnd.fluxtime.clip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fti</extension> + <mime-type>application/vnd.anser-web-funds-transfer-initiation</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fvt</extension> + <mime-type>video/vnd.fvt</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fxp</extension> + <mime-type>application/vnd.adobe.fxp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fxpl</extension> + <mime-type>application/vnd.adobe.fxp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>fzs</extension> + <mime-type>application/vnd.fuzzysheet</mime-type> + </mime-mapping> + <mime-mapping> + <extension>g2w</extension> + <mime-type>application/vnd.geoplan</mime-type> + </mime-mapping> + <mime-mapping> + <extension>g3</extension> + <mime-type>image/g3fax</mime-type> + </mime-mapping> + <mime-mapping> + <extension>g3w</extension> + <mime-type>application/vnd.geospace</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gac</extension> + <mime-type>application/vnd.groove-account</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gam</extension> + <mime-type>application/x-tads</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gbr</extension> + <mime-type>application/rpki-ghostbusters</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gca</extension> + <mime-type>application/x-gca-compressed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gdl</extension> + <mime-type>model/vnd.gdl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>geo</extension> + <mime-type>application/vnd.dynageo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gex</extension> + <mime-type>application/vnd.geometry-explorer</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ggb</extension> + <mime-type>application/vnd.geogebra.file</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ggt</extension> + <mime-type>application/vnd.geogebra.tool</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ghf</extension> + <mime-type>application/vnd.groove-help</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gif</extension> + <mime-type>image/gif</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gim</extension> + <mime-type>application/vnd.groove-identity-message</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gml</extension> + <mime-type>application/gml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gmx</extension> + <mime-type>application/vnd.gmx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gnumeric</extension> + <mime-type>application/x-gnumeric</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gph</extension> + <mime-type>application/vnd.flographit</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gpx</extension> + <mime-type>application/gpx+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gqf</extension> + <mime-type>application/vnd.grafeq</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gqs</extension> + <mime-type>application/vnd.grafeq</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gram</extension> + <mime-type>application/srgs</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gramps</extension> + <mime-type>application/x-gramps-xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gre</extension> + <mime-type>application/vnd.geometry-explorer</mime-type> + </mime-mapping> + <mime-mapping> + <extension>grv</extension> + <mime-type>application/vnd.groove-injector</mime-type> + </mime-mapping> + <mime-mapping> + <extension>grxml</extension> + <mime-type>application/srgs+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gsf</extension> + <mime-type>application/x-font-ghostscript</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gtar</extension> + <mime-type>application/x-gtar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gtm</extension> + <mime-type>application/vnd.groove-tool-message</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gtw</extension> + <mime-type>model/vnd.gtw</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gv</extension> + <mime-type>text/vnd.graphviz</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gxf</extension> + <mime-type>application/gxf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gxt</extension> + <mime-type>application/vnd.geonext</mime-type> + </mime-mapping> + <mime-mapping> + <extension>gz</extension> + <mime-type>application/x-gzip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>h</extension> + <mime-type>text/x-c</mime-type> + </mime-mapping> + <mime-mapping> + <extension>h261</extension> + <mime-type>video/h261</mime-type> + </mime-mapping> + <mime-mapping> + <extension>h263</extension> + <mime-type>video/h263</mime-type> + </mime-mapping> + <mime-mapping> + <extension>h264</extension> + <mime-type>video/h264</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hal</extension> + <mime-type>application/vnd.hal+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hbci</extension> + <mime-type>application/vnd.hbci</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hdf</extension> + <mime-type>application/x-hdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hh</extension> + <mime-type>text/x-c</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hlp</extension> + <mime-type>application/winhlp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hpgl</extension> + <mime-type>application/vnd.hp-hpgl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hpid</extension> + <mime-type>application/vnd.hp-hpid</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hps</extension> + <mime-type>application/vnd.hp-hps</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hqx</extension> + <mime-type>application/mac-binhex40</mime-type> + </mime-mapping> + <mime-mapping> + <extension>htc</extension> + <mime-type>text/x-component</mime-type> + </mime-mapping> + <mime-mapping> + <extension>htke</extension> + <mime-type>application/vnd.kenameaapp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>htm</extension> + <mime-type>text/html</mime-type> + </mime-mapping> + <mime-mapping> + <extension>html</extension> + <mime-type>text/html</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hvd</extension> + <mime-type>application/vnd.yamaha.hv-dic</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hvp</extension> + <mime-type>application/vnd.yamaha.hv-voice</mime-type> + </mime-mapping> + <mime-mapping> + <extension>hvs</extension> + <mime-type>application/vnd.yamaha.hv-script</mime-type> + </mime-mapping> + <mime-mapping> + <extension>i2g</extension> + <mime-type>application/vnd.intergeo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>icc</extension> + <mime-type>application/vnd.iccprofile</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ice</extension> + <mime-type>x-conference/x-cooltalk</mime-type> + </mime-mapping> + <mime-mapping> + <extension>icm</extension> + <mime-type>application/vnd.iccprofile</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ico</extension> + <mime-type>image/x-icon</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ics</extension> + <mime-type>text/calendar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ief</extension> + <mime-type>image/ief</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ifb</extension> + <mime-type>text/calendar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ifm</extension> + <mime-type>application/vnd.shana.informed.formdata</mime-type> + </mime-mapping> + <mime-mapping> + <extension>iges</extension> + <mime-type>model/iges</mime-type> + </mime-mapping> + <mime-mapping> + <extension>igl</extension> + <mime-type>application/vnd.igloader</mime-type> + </mime-mapping> + <mime-mapping> + <extension>igm</extension> + <mime-type>application/vnd.insors.igm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>igs</extension> + <mime-type>model/iges</mime-type> + </mime-mapping> + <mime-mapping> + <extension>igx</extension> + <mime-type>application/vnd.micrografx.igx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>iif</extension> + <mime-type>application/vnd.shana.informed.interchange</mime-type> + </mime-mapping> + <mime-mapping> + <extension>imp</extension> + <mime-type>application/vnd.accpac.simply.imp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ims</extension> + <mime-type>application/vnd.ms-ims</mime-type> + </mime-mapping> + <mime-mapping> + <extension>in</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ink</extension> + <mime-type>application/inkml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>inkml</extension> + <mime-type>application/inkml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>install</extension> + <mime-type>application/x-install-instructions</mime-type> + </mime-mapping> + <mime-mapping> + <extension>iota</extension> + <mime-type>application/vnd.astraea-software.iota</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ipfix</extension> + <mime-type>application/ipfix</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ipk</extension> + <mime-type>application/vnd.shana.informed.package</mime-type> + </mime-mapping> + <mime-mapping> + <extension>irm</extension> + <mime-type>application/vnd.ibm.rights-management</mime-type> + </mime-mapping> + <mime-mapping> + <extension>irp</extension> + <mime-type>application/vnd.irepository.package+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>iso</extension> + <mime-type>application/x-iso9660-image</mime-type> + </mime-mapping> + <mime-mapping> + <extension>itp</extension> + <mime-type>application/vnd.shana.informed.formtemplate</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ivp</extension> + <mime-type>application/vnd.immervision-ivp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ivu</extension> + <mime-type>application/vnd.immervision-ivu</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jad</extension> + <mime-type>text/vnd.sun.j2me.app-descriptor</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jam</extension> + <mime-type>application/vnd.jam</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jar</extension> + <mime-type>application/java-archive</mime-type> + </mime-mapping> + <mime-mapping> + <extension>java</extension> + <mime-type>text/x-java-source</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jisp</extension> + <mime-type>application/vnd.jisp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jlt</extension> + <mime-type>application/vnd.hp-jlyt</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jnlp</extension> + <mime-type>application/x-java-jnlp-file</mime-type> + </mime-mapping> + <mime-mapping> + <extension>joda</extension> + <mime-type>application/vnd.joost.joda-archive</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jpe</extension> + <mime-type>image/jpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jpeg</extension> + <mime-type>image/jpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jpg</extension> + <mime-type>image/jpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jpgm</extension> + <mime-type>video/jpm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jpgv</extension> + <mime-type>video/jpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jpm</extension> + <mime-type>video/jpm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>js</extension> + <mime-type>application/javascript</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jsf</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>json</extension> + <mime-type>application/json</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jsonml</extension> + <mime-type>application/jsonml+json</mime-type> + </mime-mapping> + <mime-mapping> + <extension>jspf</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kar</extension> + <mime-type>audio/midi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>karbon</extension> + <mime-type>application/vnd.kde.karbon</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kfo</extension> + <mime-type>application/vnd.kde.kformula</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kia</extension> + <mime-type>application/vnd.kidspiration</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kml</extension> + <mime-type>application/vnd.google-earth.kml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kmz</extension> + <mime-type>application/vnd.google-earth.kmz</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kne</extension> + <mime-type>application/vnd.kinar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>knp</extension> + <mime-type>application/vnd.kinar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kon</extension> + <mime-type>application/vnd.kde.kontour</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kpr</extension> + <mime-type>application/vnd.kde.kpresenter</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kpt</extension> + <mime-type>application/vnd.kde.kpresenter</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kpxx</extension> + <mime-type>application/vnd.ds-keypoint</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ksp</extension> + <mime-type>application/vnd.kde.kspread</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ktr</extension> + <mime-type>application/vnd.kahootz</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ktx</extension> + <mime-type>image/ktx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ktz</extension> + <mime-type>application/vnd.kahootz</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kwd</extension> + <mime-type>application/vnd.kde.kword</mime-type> + </mime-mapping> + <mime-mapping> + <extension>kwt</extension> + <mime-type>application/vnd.kde.kword</mime-type> + </mime-mapping> + <mime-mapping> + <extension>lasxml</extension> + <mime-type>application/vnd.las.las+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>latex</extension> + <mime-type>application/x-latex</mime-type> + </mime-mapping> + <mime-mapping> + <extension>lbd</extension> + <mime-type>application/vnd.llamagraphics.life-balance.desktop</mime-type> + </mime-mapping> + <mime-mapping> + <extension>lbe</extension> + <mime-type>application/vnd.llamagraphics.life-balance.exchange+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>les</extension> + <mime-type>application/vnd.hhe.lesson-player</mime-type> + </mime-mapping> + <mime-mapping> + <extension>lha</extension> + <mime-type>application/x-lzh-compressed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>link66</extension> + <mime-type>application/vnd.route66.link66+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>list</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>list3820</extension> + <mime-type>application/vnd.ibm.modcap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>listafp</extension> + <mime-type>application/vnd.ibm.modcap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>lnk</extension> + <mime-type>application/x-ms-shortcut</mime-type> + </mime-mapping> + <mime-mapping> + <extension>log</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>lostxml</extension> + <mime-type>application/lost+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>lrf</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>lrm</extension> + <mime-type>application/vnd.ms-lrm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ltf</extension> + <mime-type>application/vnd.frogans.ltf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>lvp</extension> + <mime-type>audio/vnd.lucent.voice</mime-type> + </mime-mapping> + <mime-mapping> + <extension>lwp</extension> + <mime-type>application/vnd.lotus-wordpro</mime-type> + </mime-mapping> + <mime-mapping> + <extension>lzh</extension> + <mime-type>application/x-lzh-compressed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m13</extension> + <mime-type>application/x-msmediaview</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m14</extension> + <mime-type>application/x-msmediaview</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m1v</extension> + <mime-type>video/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m21</extension> + <mime-type>application/mp21</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m2a</extension> + <mime-type>audio/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m2v</extension> + <mime-type>video/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m3a</extension> + <mime-type>audio/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m3u</extension> + <mime-type>audio/x-mpegurl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m3u8</extension> + <mime-type>application/vnd.apple.mpegurl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m4a</extension> + <mime-type>audio/mp4</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m4b</extension> + <mime-type>audio/mp4</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m4r</extension> + <mime-type>audio/mp4</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m4u</extension> + <mime-type>video/vnd.mpegurl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>m4v</extension> + <mime-type>video/mp4</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ma</extension> + <mime-type>application/mathematica</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mac</extension> + <mime-type>image/x-macpaint</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mads</extension> + <mime-type>application/mads+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mag</extension> + <mime-type>application/vnd.ecowin.chart</mime-type> + </mime-mapping> + <mime-mapping> + <extension>maker</extension> + <mime-type>application/vnd.framemaker</mime-type> + </mime-mapping> + <mime-mapping> + <extension>man</extension> + <mime-type>text/troff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mar</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mathml</extension> + <mime-type>application/mathml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mb</extension> + <mime-type>application/mathematica</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mbk</extension> + <mime-type>application/vnd.mobius.mbk</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mbox</extension> + <mime-type>application/mbox</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mc1</extension> + <mime-type>application/vnd.medcalcdata</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mcd</extension> + <mime-type>application/vnd.mcd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mcurl</extension> + <mime-type>text/vnd.curl.mcurl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mdb</extension> + <mime-type>application/x-msaccess</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mdi</extension> + <mime-type>image/vnd.ms-modi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>me</extension> + <mime-type>text/troff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mesh</extension> + <mime-type>model/mesh</mime-type> + </mime-mapping> + <mime-mapping> + <extension>meta4</extension> + <mime-type>application/metalink4+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>metalink</extension> + <mime-type>application/metalink+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mets</extension> + <mime-type>application/mets+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mfm</extension> + <mime-type>application/vnd.mfmp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mft</extension> + <mime-type>application/rpki-manifest</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mgp</extension> + <mime-type>application/vnd.osgeo.mapguide.package</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mgz</extension> + <mime-type>application/vnd.proteus.magazine</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mid</extension> + <mime-type>audio/midi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>midi</extension> + <mime-type>audio/midi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mie</extension> + <mime-type>application/x-mie</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mif</extension> + <mime-type>application/x-mif</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mime</extension> + <mime-type>message/rfc822</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mj2</extension> + <mime-type>video/mj2</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mjp2</extension> + <mime-type>video/mj2</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mk3d</extension> + <mime-type>video/x-matroska</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mka</extension> + <mime-type>audio/x-matroska</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mks</extension> + <mime-type>video/x-matroska</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mkv</extension> + <mime-type>video/x-matroska</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mlp</extension> + <mime-type>application/vnd.dolby.mlp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mmd</extension> + <mime-type>application/vnd.chipnuts.karaoke-mmd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mmf</extension> + <mime-type>application/vnd.smaf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mmr</extension> + <mime-type>image/vnd.fujixerox.edmics-mmr</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mng</extension> + <mime-type>video/x-mng</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mny</extension> + <mime-type>application/x-msmoney</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mobi</extension> + <mime-type>application/x-mobipocket-ebook</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mods</extension> + <mime-type>application/mods+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mov</extension> + <mime-type>video/quicktime</mime-type> + </mime-mapping> + <mime-mapping> + <extension>movie</extension> + <mime-type>video/x-sgi-movie</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp1</extension> + <mime-type>audio/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp2</extension> + <mime-type>audio/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp21</extension> + <mime-type>application/mp21</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp2a</extension> + <mime-type>audio/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp3</extension> + <mime-type>audio/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp4</extension> + <mime-type>video/mp4</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp4a</extension> + <mime-type>audio/mp4</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp4s</extension> + <mime-type>application/mp4</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mp4v</extension> + <mime-type>video/mp4</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpa</extension> + <mime-type>audio/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpc</extension> + <mime-type>application/vnd.mophun.certificate</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpe</extension> + <mime-type>video/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpeg</extension> + <mime-type>video/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpega</extension> + <mime-type>audio/x-mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpg</extension> + <mime-type>video/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpg4</extension> + <mime-type>video/mp4</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpga</extension> + <mime-type>audio/mpeg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpkg</extension> + <mime-type>application/vnd.apple.installer+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpm</extension> + <mime-type>application/vnd.blueice.multipass</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpn</extension> + <mime-type>application/vnd.mophun.application</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpp</extension> + <mime-type>application/vnd.ms-project</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpt</extension> + <mime-type>application/vnd.ms-project</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpv2</extension> + <mime-type>video/mpeg2</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mpy</extension> + <mime-type>application/vnd.ibm.minipay</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mqy</extension> + <mime-type>application/vnd.mobius.mqy</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mrc</extension> + <mime-type>application/marc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mrcx</extension> + <mime-type>application/marcxml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ms</extension> + <mime-type>text/troff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mscml</extension> + <mime-type>application/mediaservercontrol+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mseed</extension> + <mime-type>application/vnd.fdsn.mseed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mseq</extension> + <mime-type>application/vnd.mseq</mime-type> + </mime-mapping> + <mime-mapping> + <extension>msf</extension> + <mime-type>application/vnd.epson.msf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>msh</extension> + <mime-type>model/mesh</mime-type> + </mime-mapping> + <mime-mapping> + <extension>msi</extension> + <mime-type>application/x-msdownload</mime-type> + </mime-mapping> + <mime-mapping> + <extension>msl</extension> + <mime-type>application/vnd.mobius.msl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>msty</extension> + <mime-type>application/vnd.muvee.style</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mts</extension> + <mime-type>model/vnd.mts</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mus</extension> + <mime-type>application/vnd.musician</mime-type> + </mime-mapping> + <mime-mapping> + <extension>musicxml</extension> + <mime-type>application/vnd.recordare.musicxml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mvb</extension> + <mime-type>application/x-msmediaview</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mwf</extension> + <mime-type>application/vnd.mfer</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mxf</extension> + <mime-type>application/mxf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mxl</extension> + <mime-type>application/vnd.recordare.musicxml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mxml</extension> + <mime-type>application/xv+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mxs</extension> + <mime-type>application/vnd.triscape.mxs</mime-type> + </mime-mapping> + <mime-mapping> + <extension>mxu</extension> + <mime-type>video/vnd.mpegurl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>n-gage</extension> + <mime-type>application/vnd.nokia.n-gage.symbian.install</mime-type> + </mime-mapping> + <mime-mapping> + <extension>n3</extension> + <mime-type>text/n3</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nb</extension> + <mime-type>application/mathematica</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nbp</extension> + <mime-type>application/vnd.wolfram.player</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nc</extension> + <mime-type>application/x-netcdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ncx</extension> + <mime-type>application/x-dtbncx+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nfo</extension> + <mime-type>text/x-nfo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ngdat</extension> + <mime-type>application/vnd.nokia.n-gage.data</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nitf</extension> + <mime-type>application/vnd.nitf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nlu</extension> + <mime-type>application/vnd.neurolanguage.nlu</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nml</extension> + <mime-type>application/vnd.enliven</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nnd</extension> + <mime-type>application/vnd.noblenet-directory</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nns</extension> + <mime-type>application/vnd.noblenet-sealer</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nnw</extension> + <mime-type>application/vnd.noblenet-web</mime-type> + </mime-mapping> + <mime-mapping> + <extension>npx</extension> + <mime-type>image/vnd.net-fpx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nsc</extension> + <mime-type>application/x-conference</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nsf</extension> + <mime-type>application/vnd.lotus-notes</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ntf</extension> + <mime-type>application/vnd.nitf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>nzb</extension> + <mime-type>application/x-nzb</mime-type> + </mime-mapping> + <mime-mapping> + <extension>oa2</extension> + <mime-type>application/vnd.fujitsu.oasys2</mime-type> + </mime-mapping> + <mime-mapping> + <extension>oa3</extension> + <mime-type>application/vnd.fujitsu.oasys3</mime-type> + </mime-mapping> + <mime-mapping> + <extension>oas</extension> + <mime-type>application/vnd.fujitsu.oasys</mime-type> + </mime-mapping> + <mime-mapping> + <extension>obd</extension> + <mime-type>application/x-msbinder</mime-type> + </mime-mapping> + <mime-mapping> + <extension>obj</extension> + <mime-type>application/x-tgif</mime-type> + </mime-mapping> + <mime-mapping> + <extension>oda</extension> + <mime-type>application/oda</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Database --> + <extension>odb</extension> + <mime-type>application/vnd.oasis.opendocument.database</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Chart --> + <extension>odc</extension> + <mime-type>application/vnd.oasis.opendocument.chart</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Formula --> + <extension>odf</extension> + <mime-type>application/vnd.oasis.opendocument.formula</mime-type> + </mime-mapping> + <mime-mapping> + <extension>odft</extension> + <mime-type>application/vnd.oasis.opendocument.formula-template</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Drawing --> + <extension>odg</extension> + <mime-type>application/vnd.oasis.opendocument.graphics</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Image --> + <extension>odi</extension> + <mime-type>application/vnd.oasis.opendocument.image</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Master Document --> + <extension>odm</extension> + <mime-type>application/vnd.oasis.opendocument.text-master</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Presentation --> + <extension>odp</extension> + <mime-type>application/vnd.oasis.opendocument.presentation</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Spreadsheet --> + <extension>ods</extension> + <mime-type>application/vnd.oasis.opendocument.spreadsheet</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Text --> + <extension>odt</extension> + <mime-type>application/vnd.oasis.opendocument.text</mime-type> + </mime-mapping> + <mime-mapping> + <extension>oga</extension> + <mime-type>audio/ogg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ogg</extension> + <mime-type>audio/ogg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ogv</extension> + <mime-type>video/ogg</mime-type> + </mime-mapping> + <mime-mapping> + <!-- xiph mime types --> + <extension>ogx</extension> + <mime-type>application/ogg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>omdoc</extension> + <mime-type>application/omdoc+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>onepkg</extension> + <mime-type>application/onenote</mime-type> + </mime-mapping> + <mime-mapping> + <extension>onetmp</extension> + <mime-type>application/onenote</mime-type> + </mime-mapping> + <mime-mapping> + <extension>onetoc</extension> + <mime-type>application/onenote</mime-type> + </mime-mapping> + <mime-mapping> + <extension>onetoc2</extension> + <mime-type>application/onenote</mime-type> + </mime-mapping> + <mime-mapping> + <extension>opf</extension> + <mime-type>application/oebps-package+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>opml</extension> + <mime-type>text/x-opml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>oprc</extension> + <mime-type>application/vnd.palm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>org</extension> + <mime-type>application/vnd.lotus-organizer</mime-type> + </mime-mapping> + <mime-mapping> + <extension>osf</extension> + <mime-type>application/vnd.yamaha.openscoreformat</mime-type> + </mime-mapping> + <mime-mapping> + <extension>osfpvg</extension> + <mime-type>application/vnd.yamaha.openscoreformat.osfpvg+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>otc</extension> + <mime-type>application/vnd.oasis.opendocument.chart-template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>otf</extension> + <mime-type>application/x-font-otf</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Drawing Template --> + <extension>otg</extension> + <mime-type>application/vnd.oasis.opendocument.graphics-template</mime-type> + </mime-mapping> + <mime-mapping> + <!-- HTML Document Template --> + <extension>oth</extension> + <mime-type>application/vnd.oasis.opendocument.text-web</mime-type> + </mime-mapping> + <mime-mapping> + <extension>oti</extension> + <mime-type>application/vnd.oasis.opendocument.image-template</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Presentation Template --> + <extension>otp</extension> + <mime-type>application/vnd.oasis.opendocument.presentation-template</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Spreadsheet Template --> + <extension>ots</extension> + <mime-type>application/vnd.oasis.opendocument.spreadsheet-template</mime-type> + </mime-mapping> + <mime-mapping> + <!-- OpenDocument Text Template --> + <extension>ott</extension> + <mime-type>application/vnd.oasis.opendocument.text-template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>oxps</extension> + <mime-type>application/oxps</mime-type> + </mime-mapping> + <mime-mapping> + <extension>oxt</extension> + <mime-type>application/vnd.openofficeorg.extension</mime-type> + </mime-mapping> + <mime-mapping> + <extension>p</extension> + <mime-type>text/x-pascal</mime-type> + </mime-mapping> + <mime-mapping> + <extension>p10</extension> + <mime-type>application/pkcs10</mime-type> + </mime-mapping> + <mime-mapping> + <extension>p12</extension> + <mime-type>application/x-pkcs12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>p7b</extension> + <mime-type>application/x-pkcs7-certificates</mime-type> + </mime-mapping> + <mime-mapping> + <extension>p7c</extension> + <mime-type>application/pkcs7-mime</mime-type> + </mime-mapping> + <mime-mapping> + <extension>p7m</extension> + <mime-type>application/pkcs7-mime</mime-type> + </mime-mapping> + <mime-mapping> + <extension>p7r</extension> + <mime-type>application/x-pkcs7-certreqresp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>p7s</extension> + <mime-type>application/pkcs7-signature</mime-type> + </mime-mapping> + <mime-mapping> + <extension>p8</extension> + <mime-type>application/pkcs8</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pas</extension> + <mime-type>text/x-pascal</mime-type> + </mime-mapping> + <mime-mapping> + <extension>paw</extension> + <mime-type>application/vnd.pawaafile</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pbd</extension> + <mime-type>application/vnd.powerbuilder6</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pbm</extension> + <mime-type>image/x-portable-bitmap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pcap</extension> + <mime-type>application/vnd.tcpdump.pcap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pcf</extension> + <mime-type>application/x-font-pcf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pcl</extension> + <mime-type>application/vnd.hp-pcl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pclxl</extension> + <mime-type>application/vnd.hp-pclxl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pct</extension> + <mime-type>image/pict</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pcurl</extension> + <mime-type>application/vnd.curl.pcurl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pcx</extension> + <mime-type>image/x-pcx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pdb</extension> + <mime-type>application/vnd.palm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pdf</extension> + <mime-type>application/pdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pfa</extension> + <mime-type>application/x-font-type1</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pfb</extension> + <mime-type>application/x-font-type1</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pfm</extension> + <mime-type>application/x-font-type1</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pfr</extension> + <mime-type>application/font-tdpfr</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pfx</extension> + <mime-type>application/x-pkcs12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pgm</extension> + <mime-type>image/x-portable-graymap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pgn</extension> + <mime-type>application/x-chess-pgn</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pgp</extension> + <mime-type>application/pgp-encrypted</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pic</extension> + <mime-type>image/pict</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pict</extension> + <mime-type>image/pict</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pkg</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pki</extension> + <mime-type>application/pkixcmp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pkipath</extension> + <mime-type>application/pkix-pkipath</mime-type> + </mime-mapping> + <mime-mapping> + <extension>plb</extension> + <mime-type>application/vnd.3gpp.pic-bw-large</mime-type> + </mime-mapping> + <mime-mapping> + <extension>plc</extension> + <mime-type>application/vnd.mobius.plc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>plf</extension> + <mime-type>application/vnd.pocketlearn</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pls</extension> + <mime-type>audio/x-scpls</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pml</extension> + <mime-type>application/vnd.ctc-posml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>png</extension> + <mime-type>image/png</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pnm</extension> + <mime-type>image/x-portable-anymap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pnt</extension> + <mime-type>image/x-macpaint</mime-type> + </mime-mapping> + <mime-mapping> + <extension>portpkg</extension> + <mime-type>application/vnd.macports.portpkg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pot</extension> + <mime-type>application/vnd.ms-powerpoint</mime-type> + </mime-mapping> + <mime-mapping> + <extension>potm</extension> + <mime-type>application/vnd.ms-powerpoint.template.macroenabled.12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>potx</extension> + <mime-type>application/vnd.openxmlformats-officedocument.presentationml.template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ppam</extension> + <mime-type>application/vnd.ms-powerpoint.addin.macroenabled.12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ppd</extension> + <mime-type>application/vnd.cups-ppd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ppm</extension> + <mime-type>image/x-portable-pixmap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pps</extension> + <mime-type>application/vnd.ms-powerpoint</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ppsm</extension> + <mime-type>application/vnd.ms-powerpoint.slideshow.macroenabled.12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ppsx</extension> + <mime-type>application/vnd.openxmlformats-officedocument.presentationml.slideshow</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ppt</extension> + <mime-type>application/vnd.ms-powerpoint</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pptm</extension> + <mime-type>application/vnd.ms-powerpoint.presentation.macroenabled.12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pptx</extension> + <mime-type>application/vnd.openxmlformats-officedocument.presentationml.presentation</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pqa</extension> + <mime-type>application/vnd.palm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>prc</extension> + <mime-type>application/x-mobipocket-ebook</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pre</extension> + <mime-type>application/vnd.lotus-freelance</mime-type> + </mime-mapping> + <mime-mapping> + <extension>prf</extension> + <mime-type>application/pics-rules</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ps</extension> + <mime-type>application/postscript</mime-type> + </mime-mapping> + <mime-mapping> + <extension>psb</extension> + <mime-type>application/vnd.3gpp.pic-bw-small</mime-type> + </mime-mapping> + <mime-mapping> + <extension>psd</extension> + <mime-type>image/vnd.adobe.photoshop</mime-type> + </mime-mapping> + <mime-mapping> + <extension>psf</extension> + <mime-type>application/x-font-linux-psf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pskcxml</extension> + <mime-type>application/pskc+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ptid</extension> + <mime-type>application/vnd.pvi.ptid1</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pub</extension> + <mime-type>application/x-mspublisher</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pvb</extension> + <mime-type>application/vnd.3gpp.pic-bw-var</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pwn</extension> + <mime-type>application/vnd.3m.post-it-notes</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pya</extension> + <mime-type>audio/vnd.ms-playready.media.pya</mime-type> + </mime-mapping> + <mime-mapping> + <extension>pyv</extension> + <mime-type>video/vnd.ms-playready.media.pyv</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qam</extension> + <mime-type>application/vnd.epson.quickanime</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qbo</extension> + <mime-type>application/vnd.intu.qbo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qfx</extension> + <mime-type>application/vnd.intu.qfx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qps</extension> + <mime-type>application/vnd.publishare-delta-tree</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qt</extension> + <mime-type>video/quicktime</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qti</extension> + <mime-type>image/x-quicktime</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qtif</extension> + <mime-type>image/x-quicktime</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qwd</extension> + <mime-type>application/vnd.quark.quarkxpress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qwt</extension> + <mime-type>application/vnd.quark.quarkxpress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qxb</extension> + <mime-type>application/vnd.quark.quarkxpress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qxd</extension> + <mime-type>application/vnd.quark.quarkxpress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qxl</extension> + <mime-type>application/vnd.quark.quarkxpress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>qxt</extension> + <mime-type>application/vnd.quark.quarkxpress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ra</extension> + <mime-type>audio/x-pn-realaudio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ram</extension> + <mime-type>audio/x-pn-realaudio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rar</extension> + <mime-type>application/x-rar-compressed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ras</extension> + <mime-type>image/x-cmu-raster</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rcprofile</extension> + <mime-type>application/vnd.ipunplugged.rcprofile</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rdf</extension> + <mime-type>application/rdf+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rdz</extension> + <mime-type>application/vnd.data-vision.rdz</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rep</extension> + <mime-type>application/vnd.businessobjects</mime-type> + </mime-mapping> + <mime-mapping> + <extension>res</extension> + <mime-type>application/x-dtbresource+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rgb</extension> + <mime-type>image/x-rgb</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rif</extension> + <mime-type>application/reginfo+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rip</extension> + <mime-type>audio/vnd.rip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ris</extension> + <mime-type>application/x-research-info-systems</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rl</extension> + <mime-type>application/resource-lists+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rlc</extension> + <mime-type>image/vnd.fujixerox.edmics-rlc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rld</extension> + <mime-type>application/resource-lists-diff+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rm</extension> + <mime-type>application/vnd.rn-realmedia</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rmi</extension> + <mime-type>audio/midi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rmp</extension> + <mime-type>audio/x-pn-realaudio-plugin</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rms</extension> + <mime-type>application/vnd.jcp.javame.midlet-rms</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rmvb</extension> + <mime-type>application/vnd.rn-realmedia-vbr</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rnc</extension> + <mime-type>application/relax-ng-compact-syntax</mime-type> + </mime-mapping> + <mime-mapping> + <extension>roa</extension> + <mime-type>application/rpki-roa</mime-type> + </mime-mapping> + <mime-mapping> + <extension>roff</extension> + <mime-type>text/troff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rp9</extension> + <mime-type>application/vnd.cloanto.rp9</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rpss</extension> + <mime-type>application/vnd.nokia.radio-presets</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rpst</extension> + <mime-type>application/vnd.nokia.radio-preset</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rq</extension> + <mime-type>application/sparql-query</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rs</extension> + <mime-type>application/rls-services+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rsd</extension> + <mime-type>application/rsd+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rss</extension> + <mime-type>application/rss+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rtf</extension> + <mime-type>application/rtf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>rtx</extension> + <mime-type>text/richtext</mime-type> + </mime-mapping> + <mime-mapping> + <extension>s</extension> + <mime-type>text/x-asm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>s3m</extension> + <mime-type>audio/s3m</mime-type> + </mime-mapping> + <mime-mapping> + <extension>saf</extension> + <mime-type>application/vnd.yamaha.smaf-audio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sbml</extension> + <mime-type>application/sbml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sc</extension> + <mime-type>application/vnd.ibm.secure-container</mime-type> + </mime-mapping> + <mime-mapping> + <extension>scd</extension> + <mime-type>application/x-msschedule</mime-type> + </mime-mapping> + <mime-mapping> + <extension>scm</extension> + <mime-type>application/vnd.lotus-screencam</mime-type> + </mime-mapping> + <mime-mapping> + <extension>scq</extension> + <mime-type>application/scvp-cv-request</mime-type> + </mime-mapping> + <mime-mapping> + <extension>scs</extension> + <mime-type>application/scvp-cv-response</mime-type> + </mime-mapping> + <mime-mapping> + <extension>scurl</extension> + <mime-type>text/vnd.curl.scurl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sda</extension> + <mime-type>application/vnd.stardivision.draw</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sdc</extension> + <mime-type>application/vnd.stardivision.calc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sdd</extension> + <mime-type>application/vnd.stardivision.impress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sdkd</extension> + <mime-type>application/vnd.solent.sdkm+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sdkm</extension> + <mime-type>application/vnd.solent.sdkm+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sdp</extension> + <mime-type>application/sdp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sdw</extension> + <mime-type>application/vnd.stardivision.writer</mime-type> + </mime-mapping> + <mime-mapping> + <extension>see</extension> + <mime-type>application/vnd.seemail</mime-type> + </mime-mapping> + <mime-mapping> + <extension>seed</extension> + <mime-type>application/vnd.fdsn.seed</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sema</extension> + <mime-type>application/vnd.sema</mime-type> + </mime-mapping> + <mime-mapping> + <extension>semd</extension> + <mime-type>application/vnd.semd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>semf</extension> + <mime-type>application/vnd.semf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ser</extension> + <mime-type>application/java-serialized-object</mime-type> + </mime-mapping> + <mime-mapping> + <extension>setpay</extension> + <mime-type>application/set-payment-initiation</mime-type> + </mime-mapping> + <mime-mapping> + <extension>setreg</extension> + <mime-type>application/set-registration-initiation</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sfd-hdstx</extension> + <mime-type>application/vnd.hydrostatix.sof-data</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sfs</extension> + <mime-type>application/vnd.spotfire.sfs</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sfv</extension> + <mime-type>text/x-sfv</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sgi</extension> + <mime-type>image/sgi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sgl</extension> + <mime-type>application/vnd.stardivision.writer-global</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sgm</extension> + <mime-type>text/sgml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sgml</extension> + <mime-type>text/sgml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sh</extension> + <mime-type>application/x-sh</mime-type> + </mime-mapping> + <mime-mapping> + <extension>shar</extension> + <mime-type>application/x-shar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>shf</extension> + <mime-type>application/shf+xml</mime-type> + </mime-mapping> + <!-- + <mime-mapping> + <extension>shtml</extension> + <mime-type>text/x-server-parsed-html</mime-type> + </mime-mapping> + --> + <mime-mapping> + <extension>sid</extension> + <mime-type>image/x-mrsid-image</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sig</extension> + <mime-type>application/pgp-signature</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sil</extension> + <mime-type>audio/silk</mime-type> + </mime-mapping> + <mime-mapping> + <extension>silo</extension> + <mime-type>model/mesh</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sis</extension> + <mime-type>application/vnd.symbian.install</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sisx</extension> + <mime-type>application/vnd.symbian.install</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sit</extension> + <mime-type>application/x-stuffit</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sitx</extension> + <mime-type>application/x-stuffitx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>skd</extension> + <mime-type>application/vnd.koan</mime-type> + </mime-mapping> + <mime-mapping> + <extension>skm</extension> + <mime-type>application/vnd.koan</mime-type> + </mime-mapping> + <mime-mapping> + <extension>skp</extension> + <mime-type>application/vnd.koan</mime-type> + </mime-mapping> + <mime-mapping> + <extension>skt</extension> + <mime-type>application/vnd.koan</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sldm</extension> + <mime-type>application/vnd.ms-powerpoint.slide.macroenabled.12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sldx</extension> + <mime-type>application/vnd.openxmlformats-officedocument.presentationml.slide</mime-type> + </mime-mapping> + <mime-mapping> + <extension>slt</extension> + <mime-type>application/vnd.epson.salt</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sm</extension> + <mime-type>application/vnd.stepmania.stepchart</mime-type> + </mime-mapping> + <mime-mapping> + <extension>smf</extension> + <mime-type>application/vnd.stardivision.math</mime-type> + </mime-mapping> + <mime-mapping> + <extension>smi</extension> + <mime-type>application/smil+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>smil</extension> + <mime-type>application/smil+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>smv</extension> + <mime-type>video/x-smv</mime-type> + </mime-mapping> + <mime-mapping> + <extension>smzip</extension> + <mime-type>application/vnd.stepmania.package</mime-type> + </mime-mapping> + <mime-mapping> + <extension>snd</extension> + <mime-type>audio/basic</mime-type> + </mime-mapping> + <mime-mapping> + <extension>snf</extension> + <mime-type>application/x-font-snf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>so</extension> + <mime-type>application/octet-stream</mime-type> + </mime-mapping> + <mime-mapping> + <extension>spc</extension> + <mime-type>application/x-pkcs7-certificates</mime-type> + </mime-mapping> + <mime-mapping> + <extension>spf</extension> + <mime-type>application/vnd.yamaha.smaf-phrase</mime-type> + </mime-mapping> + <mime-mapping> + <extension>spl</extension> + <mime-type>application/x-futuresplash</mime-type> + </mime-mapping> + <mime-mapping> + <extension>spot</extension> + <mime-type>text/vnd.in3d.spot</mime-type> + </mime-mapping> + <mime-mapping> + <extension>spp</extension> + <mime-type>application/scvp-vp-response</mime-type> + </mime-mapping> + <mime-mapping> + <extension>spq</extension> + <mime-type>application/scvp-vp-request</mime-type> + </mime-mapping> + <mime-mapping> + <extension>spx</extension> + <mime-type>audio/ogg</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sql</extension> + <mime-type>application/x-sql</mime-type> + </mime-mapping> + <mime-mapping> + <extension>src</extension> + <mime-type>application/x-wais-source</mime-type> + </mime-mapping> + <mime-mapping> + <extension>srt</extension> + <mime-type>application/x-subrip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sru</extension> + <mime-type>application/sru+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>srx</extension> + <mime-type>application/sparql-results+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ssdl</extension> + <mime-type>application/ssdl+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sse</extension> + <mime-type>application/vnd.kodak-descriptor</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ssf</extension> + <mime-type>application/vnd.epson.ssf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ssml</extension> + <mime-type>application/ssml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>st</extension> + <mime-type>application/vnd.sailingtracker.track</mime-type> + </mime-mapping> + <mime-mapping> + <extension>stc</extension> + <mime-type>application/vnd.sun.xml.calc.template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>std</extension> + <mime-type>application/vnd.sun.xml.draw.template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>stf</extension> + <mime-type>application/vnd.wt.stf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sti</extension> + <mime-type>application/vnd.sun.xml.impress.template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>stk</extension> + <mime-type>application/hyperstudio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>stl</extension> + <mime-type>application/vnd.ms-pki.stl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>str</extension> + <mime-type>application/vnd.pg.format</mime-type> + </mime-mapping> + <mime-mapping> + <extension>stw</extension> + <mime-type>application/vnd.sun.xml.writer.template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sub</extension> + <mime-type>text/vnd.dvb.subtitle</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sus</extension> + <mime-type>application/vnd.sus-calendar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>susp</extension> + <mime-type>application/vnd.sus-calendar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sv4cpio</extension> + <mime-type>application/x-sv4cpio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sv4crc</extension> + <mime-type>application/x-sv4crc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>svc</extension> + <mime-type>application/vnd.dvb.service</mime-type> + </mime-mapping> + <mime-mapping> + <extension>svd</extension> + <mime-type>application/vnd.svd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>svg</extension> + <mime-type>image/svg+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>svgz</extension> + <mime-type>image/svg+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>swa</extension> + <mime-type>application/x-director</mime-type> + </mime-mapping> + <mime-mapping> + <extension>swf</extension> + <mime-type>application/x-shockwave-flash</mime-type> + </mime-mapping> + <mime-mapping> + <extension>swi</extension> + <mime-type>application/vnd.aristanetworks.swi</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sxc</extension> + <mime-type>application/vnd.sun.xml.calc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sxd</extension> + <mime-type>application/vnd.sun.xml.draw</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sxg</extension> + <mime-type>application/vnd.sun.xml.writer.global</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sxi</extension> + <mime-type>application/vnd.sun.xml.impress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sxm</extension> + <mime-type>application/vnd.sun.xml.math</mime-type> + </mime-mapping> + <mime-mapping> + <extension>sxw</extension> + <mime-type>application/vnd.sun.xml.writer</mime-type> + </mime-mapping> + <mime-mapping> + <extension>t</extension> + <mime-type>text/troff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>t3</extension> + <mime-type>application/x-t3vm-image</mime-type> + </mime-mapping> + <mime-mapping> + <extension>taglet</extension> + <mime-type>application/vnd.mynfc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tao</extension> + <mime-type>application/vnd.tao.intent-module-archive</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tar</extension> + <mime-type>application/x-tar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tcap</extension> + <mime-type>application/vnd.3gpp2.tcap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tcl</extension> + <mime-type>application/x-tcl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>teacher</extension> + <mime-type>application/vnd.smart.teacher</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tei</extension> + <mime-type>application/tei+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>teicorpus</extension> + <mime-type>application/tei+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tex</extension> + <mime-type>application/x-tex</mime-type> + </mime-mapping> + <mime-mapping> + <extension>texi</extension> + <mime-type>application/x-texinfo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>texinfo</extension> + <mime-type>application/x-texinfo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>text</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tfi</extension> + <mime-type>application/thraud+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tfm</extension> + <mime-type>application/x-tex-tfm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tga</extension> + <mime-type>image/x-tga</mime-type> + </mime-mapping> + <mime-mapping> + <extension>thmx</extension> + <mime-type>application/vnd.ms-officetheme</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tif</extension> + <mime-type>image/tiff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tiff</extension> + <mime-type>image/tiff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tmo</extension> + <mime-type>application/vnd.tmobile-livetv</mime-type> + </mime-mapping> + <mime-mapping> + <extension>torrent</extension> + <mime-type>application/x-bittorrent</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tpl</extension> + <mime-type>application/vnd.groove-tool-template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tpt</extension> + <mime-type>application/vnd.trid.tpt</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tr</extension> + <mime-type>text/troff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tra</extension> + <mime-type>application/vnd.trueapp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>trm</extension> + <mime-type>application/x-msterminal</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tsd</extension> + <mime-type>application/timestamped-data</mime-type> + </mime-mapping> + <mime-mapping> + <extension>tsv</extension> + <mime-type>text/tab-separated-values</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ttc</extension> + <mime-type>application/x-font-ttf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ttf</extension> + <mime-type>application/x-font-ttf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ttl</extension> + <mime-type>text/turtle</mime-type> + </mime-mapping> + <mime-mapping> + <extension>twd</extension> + <mime-type>application/vnd.simtech-mindmapper</mime-type> + </mime-mapping> + <mime-mapping> + <extension>twds</extension> + <mime-type>application/vnd.simtech-mindmapper</mime-type> + </mime-mapping> + <mime-mapping> + <extension>txd</extension> + <mime-type>application/vnd.genomatix.tuxedo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>txf</extension> + <mime-type>application/vnd.mobius.txf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>txt</extension> + <mime-type>text/plain</mime-type> + </mime-mapping> + <mime-mapping> + <extension>u32</extension> + <mime-type>application/x-authorware-bin</mime-type> + </mime-mapping> + <mime-mapping> + <extension>udeb</extension> + <mime-type>application/x-debian-package</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ufd</extension> + <mime-type>application/vnd.ufdl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ufdl</extension> + <mime-type>application/vnd.ufdl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ulw</extension> + <mime-type>audio/basic</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ulx</extension> + <mime-type>application/x-glulx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>umj</extension> + <mime-type>application/vnd.umajin</mime-type> + </mime-mapping> + <mime-mapping> + <extension>unityweb</extension> + <mime-type>application/vnd.unity</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uoml</extension> + <mime-type>application/vnd.uoml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uri</extension> + <mime-type>text/uri-list</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uris</extension> + <mime-type>text/uri-list</mime-type> + </mime-mapping> + <mime-mapping> + <extension>urls</extension> + <mime-type>text/uri-list</mime-type> + </mime-mapping> + <mime-mapping> + <extension>ustar</extension> + <mime-type>application/x-ustar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>utz</extension> + <mime-type>application/vnd.uiq.theme</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uu</extension> + <mime-type>text/x-uuencode</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uva</extension> + <mime-type>audio/vnd.dece.audio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvd</extension> + <mime-type>application/vnd.dece.data</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvf</extension> + <mime-type>application/vnd.dece.data</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvg</extension> + <mime-type>image/vnd.dece.graphic</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvh</extension> + <mime-type>video/vnd.dece.hd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvi</extension> + <mime-type>image/vnd.dece.graphic</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvm</extension> + <mime-type>video/vnd.dece.mobile</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvp</extension> + <mime-type>video/vnd.dece.pd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvs</extension> + <mime-type>video/vnd.dece.sd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvt</extension> + <mime-type>application/vnd.dece.ttml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvu</extension> + <mime-type>video/vnd.uvvu.mp4</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvv</extension> + <mime-type>video/vnd.dece.video</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvva</extension> + <mime-type>audio/vnd.dece.audio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvd</extension> + <mime-type>application/vnd.dece.data</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvf</extension> + <mime-type>application/vnd.dece.data</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvg</extension> + <mime-type>image/vnd.dece.graphic</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvh</extension> + <mime-type>video/vnd.dece.hd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvi</extension> + <mime-type>image/vnd.dece.graphic</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvm</extension> + <mime-type>video/vnd.dece.mobile</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvp</extension> + <mime-type>video/vnd.dece.pd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvs</extension> + <mime-type>video/vnd.dece.sd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvt</extension> + <mime-type>application/vnd.dece.ttml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvu</extension> + <mime-type>video/vnd.uvvu.mp4</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvv</extension> + <mime-type>video/vnd.dece.video</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvx</extension> + <mime-type>application/vnd.dece.unspecified</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvvz</extension> + <mime-type>application/vnd.dece.zip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvx</extension> + <mime-type>application/vnd.dece.unspecified</mime-type> + </mime-mapping> + <mime-mapping> + <extension>uvz</extension> + <mime-type>application/vnd.dece.zip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vcard</extension> + <mime-type>text/vcard</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vcd</extension> + <mime-type>application/x-cdlink</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vcf</extension> + <mime-type>text/x-vcard</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vcg</extension> + <mime-type>application/vnd.groove-vcard</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vcs</extension> + <mime-type>text/x-vcalendar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vcx</extension> + <mime-type>application/vnd.vcx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vis</extension> + <mime-type>application/vnd.visionary</mime-type> + </mime-mapping> + <mime-mapping> + <extension>viv</extension> + <mime-type>video/vnd.vivo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vob</extension> + <mime-type>video/x-ms-vob</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vor</extension> + <mime-type>application/vnd.stardivision.writer</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vox</extension> + <mime-type>application/x-authorware-bin</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vrml</extension> + <mime-type>model/vrml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vsd</extension> + <mime-type>application/vnd.visio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vsf</extension> + <mime-type>application/vnd.vsf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vss</extension> + <mime-type>application/vnd.visio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vst</extension> + <mime-type>application/vnd.visio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vsw</extension> + <mime-type>application/vnd.visio</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vtu</extension> + <mime-type>model/vnd.vtu</mime-type> + </mime-mapping> + <mime-mapping> + <extension>vxml</extension> + <mime-type>application/voicexml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>w3d</extension> + <mime-type>application/x-director</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wad</extension> + <mime-type>application/x-doom</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wav</extension> + <mime-type>audio/x-wav</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wax</extension> + <mime-type>audio/x-ms-wax</mime-type> + </mime-mapping> + <mime-mapping> + <!-- Wireless Bitmap --> + <extension>wbmp</extension> + <mime-type>image/vnd.wap.wbmp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wbs</extension> + <mime-type>application/vnd.criticaltools.wbs+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wbxml</extension> + <mime-type>application/vnd.wap.wbxml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wcm</extension> + <mime-type>application/vnd.ms-works</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wdb</extension> + <mime-type>application/vnd.ms-works</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wdp</extension> + <mime-type>image/vnd.ms-photo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>weba</extension> + <mime-type>audio/webm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>webm</extension> + <mime-type>video/webm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>webp</extension> + <mime-type>image/webp</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wg</extension> + <mime-type>application/vnd.pmi.widget</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wgt</extension> + <mime-type>application/widget</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wks</extension> + <mime-type>application/vnd.ms-works</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wm</extension> + <mime-type>video/x-ms-wm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wma</extension> + <mime-type>audio/x-ms-wma</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wmd</extension> + <mime-type>application/x-ms-wmd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wmf</extension> + <mime-type>application/x-msmetafile</mime-type> + </mime-mapping> + <mime-mapping> + <!-- WML Source --> + <extension>wml</extension> + <mime-type>text/vnd.wap.wml</mime-type> + </mime-mapping> + <mime-mapping> + <!-- Compiled WML --> + <extension>wmlc</extension> + <mime-type>application/vnd.wap.wmlc</mime-type> + </mime-mapping> + <mime-mapping> + <!-- WML Script Source --> + <extension>wmls</extension> + <mime-type>text/vnd.wap.wmlscript</mime-type> + </mime-mapping> + <mime-mapping> + <!-- Compiled WML Script --> + <extension>wmlsc</extension> + <mime-type>application/vnd.wap.wmlscriptc</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wmv</extension> + <mime-type>video/x-ms-wmv</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wmx</extension> + <mime-type>video/x-ms-wmx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wmz</extension> + <mime-type>application/x-msmetafile</mime-type> + </mime-mapping> + <mime-mapping> + <extension>woff</extension> + <mime-type>application/x-font-woff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wpd</extension> + <mime-type>application/vnd.wordperfect</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wpl</extension> + <mime-type>application/vnd.ms-wpl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wps</extension> + <mime-type>application/vnd.ms-works</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wqd</extension> + <mime-type>application/vnd.wqd</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wri</extension> + <mime-type>application/x-mswrite</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wrl</extension> + <mime-type>model/vrml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wsdl</extension> + <mime-type>application/wsdl+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wspolicy</extension> + <mime-type>application/wspolicy+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wtb</extension> + <mime-type>application/vnd.webturbo</mime-type> + </mime-mapping> + <mime-mapping> + <extension>wvx</extension> + <mime-type>video/x-ms-wvx</mime-type> + </mime-mapping> + <mime-mapping> + <extension>x32</extension> + <mime-type>application/x-authorware-bin</mime-type> + </mime-mapping> + <mime-mapping> + <extension>x3d</extension> + <mime-type>model/x3d+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>x3db</extension> + <mime-type>model/x3d+binary</mime-type> + </mime-mapping> + <mime-mapping> + <extension>x3dbz</extension> + <mime-type>model/x3d+binary</mime-type> + </mime-mapping> + <mime-mapping> + <extension>x3dv</extension> + <mime-type>model/x3d+vrml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>x3dvz</extension> + <mime-type>model/x3d+vrml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>x3dz</extension> + <mime-type>model/x3d+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xaml</extension> + <mime-type>application/xaml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xap</extension> + <mime-type>application/x-silverlight-app</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xar</extension> + <mime-type>application/vnd.xara</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xbap</extension> + <mime-type>application/x-ms-xbap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xbd</extension> + <mime-type>application/vnd.fujixerox.docuworks.binder</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xbm</extension> + <mime-type>image/x-xbitmap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xdf</extension> + <mime-type>application/xcap-diff+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xdm</extension> + <mime-type>application/vnd.syncml.dm+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xdp</extension> + <mime-type>application/vnd.adobe.xdp+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xdssc</extension> + <mime-type>application/dssc+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xdw</extension> + <mime-type>application/vnd.fujixerox.docuworks</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xenc</extension> + <mime-type>application/xenc+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xer</extension> + <mime-type>application/patch-ops-error+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xfdf</extension> + <mime-type>application/vnd.adobe.xfdf</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xfdl</extension> + <mime-type>application/vnd.xfdl</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xht</extension> + <mime-type>application/xhtml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xhtml</extension> + <mime-type>application/xhtml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xhvml</extension> + <mime-type>application/xv+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xif</extension> + <mime-type>image/vnd.xiff</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xla</extension> + <mime-type>application/vnd.ms-excel</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xlam</extension> + <mime-type>application/vnd.ms-excel.addin.macroenabled.12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xlc</extension> + <mime-type>application/vnd.ms-excel</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xlf</extension> + <mime-type>application/x-xliff+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xlm</extension> + <mime-type>application/vnd.ms-excel</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xls</extension> + <mime-type>application/vnd.ms-excel</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xlsb</extension> + <mime-type>application/vnd.ms-excel.sheet.binary.macroenabled.12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xlsm</extension> + <mime-type>application/vnd.ms-excel.sheet.macroenabled.12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xlsx</extension> + <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xlt</extension> + <mime-type>application/vnd.ms-excel</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xltm</extension> + <mime-type>application/vnd.ms-excel.template.macroenabled.12</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xltx</extension> + <mime-type>application/vnd.openxmlformats-officedocument.spreadsheetml.template</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xlw</extension> + <mime-type>application/vnd.ms-excel</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xm</extension> + <mime-type>audio/xm</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xml</extension> + <mime-type>application/xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xo</extension> + <mime-type>application/vnd.olpc-sugar</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xop</extension> + <mime-type>application/xop+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xpi</extension> + <mime-type>application/x-xpinstall</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xpl</extension> + <mime-type>application/xproc+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xpm</extension> + <mime-type>image/x-xpixmap</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xpr</extension> + <mime-type>application/vnd.is-xpr</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xps</extension> + <mime-type>application/vnd.ms-xpsdocument</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xpw</extension> + <mime-type>application/vnd.intercon.formnet</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xpx</extension> + <mime-type>application/vnd.intercon.formnet</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xsl</extension> + <mime-type>application/xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xslt</extension> + <mime-type>application/xslt+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xsm</extension> + <mime-type>application/vnd.syncml+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xspf</extension> + <mime-type>application/xspf+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xul</extension> + <mime-type>application/vnd.mozilla.xul+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xvm</extension> + <mime-type>application/xv+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xvml</extension> + <mime-type>application/xv+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xwd</extension> + <mime-type>image/x-xwindowdump</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xyz</extension> + <mime-type>chemical/x-xyz</mime-type> + </mime-mapping> + <mime-mapping> + <extension>xz</extension> + <mime-type>application/x-xz</mime-type> + </mime-mapping> + <mime-mapping> + <extension>yang</extension> + <mime-type>application/yang</mime-type> + </mime-mapping> + <mime-mapping> + <extension>yin</extension> + <mime-type>application/yin+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>z</extension> + <mime-type>application/x-compress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>Z</extension> + <mime-type>application/x-compress</mime-type> + </mime-mapping> + <mime-mapping> + <extension>z1</extension> + <mime-type>application/x-zmachine</mime-type> + </mime-mapping> + <mime-mapping> + <extension>z2</extension> + <mime-type>application/x-zmachine</mime-type> + </mime-mapping> + <mime-mapping> + <extension>z3</extension> + <mime-type>application/x-zmachine</mime-type> + </mime-mapping> + <mime-mapping> + <extension>z4</extension> + <mime-type>application/x-zmachine</mime-type> + </mime-mapping> + <mime-mapping> + <extension>z5</extension> + <mime-type>application/x-zmachine</mime-type> + </mime-mapping> + <mime-mapping> + <extension>z6</extension> + <mime-type>application/x-zmachine</mime-type> + </mime-mapping> + <mime-mapping> + <extension>z7</extension> + <mime-type>application/x-zmachine</mime-type> + </mime-mapping> + <mime-mapping> + <extension>z8</extension> + <mime-type>application/x-zmachine</mime-type> + </mime-mapping> + <mime-mapping> + <extension>zaz</extension> + <mime-type>application/vnd.zzazz.deck+xml</mime-type> + </mime-mapping> + <mime-mapping> + <extension>zip</extension> + <mime-type>application/zip</mime-type> + </mime-mapping> + <mime-mapping> + <extension>zir</extension> + <mime-type>application/vnd.zul</mime-type> + </mime-mapping> + <mime-mapping> + <extension>zirz</extension> + <mime-type>application/vnd.zul</mime-type> + </mime-mapping> + <mime-mapping> + <extension>zmm</extension> + <mime-type>application/vnd.handheld-entertainment+xml</mime-type> + </mime-mapping> + + <!-- ==================== Default Welcome File List ===================== --> + <!-- When a request URI refers to a directory, the default servlet looks --> + <!-- for a "welcome file" within that directory and, if present, to the --> + <!-- corresponding resource URI for display. --> + <!-- If no welcome files are present, the default servlet either serves a --> + <!-- directory listing (see default servlet configuration on how to --> + <!-- customize) or returns a 404 status, depending on the value of the --> + <!-- listings setting. --> + <!-- --> + <!-- If you define welcome files in your own application's web.xml --> + <!-- deployment descriptor, that list *replaces* the list configured --> + <!-- here, so be sure to include any of the default values that you wish --> + <!-- to use within your application. --> + + <welcome-file-list> + <welcome-file>index.html</welcome-file> + <welcome-file>index.htm</welcome-file> + <welcome-file>index.jsp</welcome-file> + </welcome-file-list> + +</web-app> diff --git a/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/db/mysql/db-schema.sql b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/db/mysql/db-schema.sql new file mode 100644 index 00000000..26252227 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/deployment/src/main/release/db/mysql/db-schema.sql @@ -0,0 +1,56 @@ +-- +-- +-- Copyright (c) 2016, Nokia Corporation. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +/******************drop old database and user***************************/ +use mysql; +drop database IF EXISTS vnfm_db; +delete from user where User='vnfm'; +FLUSH PRIVILEGES; + +/******************create new database and user***************************/ +create database vnfm_db CHARACTER SET utf8; + +GRANT ALL PRIVILEGES ON vnfm_db.* TO 'vnfm'@'%' IDENTIFIED BY 'vnfm' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON mysql.* TO 'vnfm'@'%' IDENTIFIED BY 'vnfm' WITH GRANT OPTION; + +GRANT ALL PRIVILEGES ON vnfm_db.* TO 'vnfm'@'localhost' IDENTIFIED BY 'vnfm' WITH GRANT OPTION; +GRANT ALL PRIVILEGES ON mysql.* TO 'vnfm'@'localhost' IDENTIFIED BY 'vnfm' WITH GRANT OPTION; +FLUSH PRIVILEGES; + +use vnfm_db; +set Names 'utf8'; + +/******************drop old table and create new***************************/ + +DROP TABLE IF EXISTS vnfm_job_execution_record; +CREATE TABLE `vnfm_job_execution_record` ( + `jobId` int(11) auto_increment primary key, + `vnfInstanceId` varchar(60) DEFAULT NULL, + `vnfmExecutionId` varchar(60) DEFAULT NULL, + `vnfmInterfceName` varchar(60) DEFAULT NULL, + `status` varchar(24) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + + +DROP TABLE IF EXISTS vnfm_resource_record; +CREATE TABLE `vnfm_resource` ( + `id` int(11) auto_increment primary key, + `type` enum ('VDU','VL','CP','Storage') DEFAULT NULL, + `resourceDefinitionId` varchar(60) DEFAULT NULL, + `vdu` varchar(60) DEFAULT NULL, + `status` varchar(24) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/pom.xml b/nokia/vnfmdriver/vfcadaptorservice/pom.xml index ceea2dfb..a5d3da7d 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/pom.xml +++ b/nokia/vnfmdriver/vfcadaptorservice/pom.xml @@ -15,24 +15,41 @@ --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> + <parent> - <artifactId>vnfmadapter</artifactId> + <artifactId>vnfmdriver</artifactId> <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm</groupId> <version>1.0.0-SNAPSHOT</version> </parent> - <artifactId>vnfmadapter-service-root</artifactId> + + <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm</groupId> + <artifactId>vfcadaptor-service</artifactId> <version>1.0.0-SNAPSHOT</version> - <name>vfc/nfvo/drivers/vnfm/svnfm/nokia/vnfmdriver/vfcadaptorservice</name> + <name>vfc/nfvo/driver/vnfm/svnfm/nokia/vnfmdriver/vfcadaptorservice</name> <packaging>pom</packaging> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <package.name>vfcadaptor-service</package.name> + <package.name>vfcadaptor</package.name> </properties> + <dependencyManagement> + <dependencies> + <dependency> + <!-- Import dependency management from Spring Boot --> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-dependencies</artifactId> + <version>1.5.7.RELEASE</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + <modules> - <module>adaptor</module> - <module>docker</module> + <module>vfcadaptor</module> + <module>deployment</module> + </modules> - + </project> diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/pom.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/pom.xml index 85a1b18e..67503b3b 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/pom.xml +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/pom.xml @@ -14,176 +14,132 @@ limitations under the License. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> -<modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm</groupId> - <artifactId>vnfmadapter-service-root</artifactId> - <version>1.0.0-SNAPSHOT</version> - </parent> + <artifactId>vfcadaptor</artifactId> + <version>1.0.0-SNAPSHOT</version> + <packaging>war</packaging> - <artifactId>vfcadaptor</artifactId> - <name>vfc/nfvo/drivers/vnfm/svnfm/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor</name> - <packaging>war</packaging> - - <properties> - <springVersion>4.3.11.RELEASE</springVersion> - </properties> - - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>4.11</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-annotations</artifactId> - <version>2.6.5</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - <version>2.6.5</version> - </dependency> - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-mapper-asl</artifactId> - <version>1.9.13</version> - </dependency> - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-library</artifactId> - <version>1.3</version> - </dependency> - - <dependency> - <groupId>com.google.code.gson</groupId> - <artifactId>gson</artifactId> - <version>2.8.1</version> - </dependency> - - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> - <version>4.0.0</version> - </dependency> - - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-beans</artifactId> - <version>${springVersion}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-context</artifactId> - <version>${springVersion}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-core</artifactId> - <version>${springVersion}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-web</artifactId> - <version>${springVersion}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-webmvc</artifactId> - <version>${springVersion}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-expression</artifactId> - <version>${springVersion}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-aop</artifactId> - <version>${springVersion}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-jdbc</artifactId> - <version>${springVersion}</version> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-test</artifactId> - <version>${springVersion}</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.springframework</groupId> - <artifactId>spring-orm</artifactId> - <version>${springVersion}</version> - </dependency> - - <dependency> - <groupId>dom4j</groupId> - <artifactId>dom4j</artifactId> - <version>1.6.1</version> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> - <version>2.10.0</version> - <scope>test</scope> - </dependency> - <dependency> - <groupId>com.jayway.jsonpath</groupId> - <artifactId>json-path</artifactId> - <version>2.4.0</version> - <scope>test</scope> - </dependency> -<dependency> - <groupId>org.json</groupId> - <artifactId>json</artifactId> - <version>20170516</version> -</dependency> + <name>vfc/nfvo/driver/vnfm/svnfm/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor</name> + <description>svnfm vnfm driver</description> + + <parent> + <groupId>org.onap.vfc.nfvo.driver.vnfm.svnfm</groupId> + <artifactId>vfcadaptor-service</artifactId> + <version>1.0.0-SNAPSHOT</version> + </parent> - <dependency> - <groupId>ch.qos.logback</groupId> - <artifactId>logback-classic</artifactId> - <version>1.1.2</version> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + <java.version>1.8</java.version> + </properties> + + <dependencies> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-jpa</artifactId> + </dependency> +<!-- + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-data-rest</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-hateoas</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-integration</artifactId> + </dependency> +--> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-web</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter</artifactId> + <exclusions> + <exclusion> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-logging</artifactId> + </exclusion> + <!-- https://mvnrepository.com/artifact/com.vaadin.external.google/android-json --> + <exclusion> + <groupId>com.vaadin.external.google</groupId> + <artifactId>android-json</artifactId> + </exclusion> + + </exclusions> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-log4j2</artifactId> </dependency> - <dependency> + <dependency> + <groupId>mysql</groupId> + <artifactId>mysql-connector-java</artifactId> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-tomcat</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.apache.tomcat.embed</groupId> + <artifactId>tomcat-embed-jasper</artifactId> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-starter-test</artifactId> + <scope>test</scope> + </dependency> + + + <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpclient</artifactId> + <!-- <version>4.5.2</version> + --> </dependency> <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.12</version> + <groupId>com.google.code.gson</groupId> + <artifactId>gson</artifactId> + <!-- + <version>2.8.2</version> + --> </dependency> - <dependency> - <groupId>javax.persistence</groupId> - <artifactId>persistence-api</artifactId> - <version>1.0.2</version> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + <version>20170516</version> </dependency> - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate</artifactId> - <version>3.5.4-Final</version> - <type>pom</type> - </dependency> - <!-- - <dependency> - <groupId>org.hibernate</groupId> - <artifactId>hibernate-core</artifactId> - <version>5.2.11.Final</version> - </dependency> - --> - </dependencies> - <build> - <finalName>vfcadaptor</finalName> - </build> + </dependencies> + + + <build> + <plugins> + <plugin> + <groupId>org.springframework.boot</groupId> + <artifactId>spring-boot-maven-plugin</artifactId> + <version>1.5.7.RELEASE</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.5</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + </plugins> + </build> </project> diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Cbam2DriverResponseConverter.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Cbam2DriverResponseConverter.java deleted file mode 100644 index a6aca56d..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Cbam2DriverResponseConverter.java +++ /dev/null @@ -1,136 +0,0 @@ -/* -* Copyright 2016-2017 Nokia Corporation -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ -package com.nokia.vfcadaptor.adaptor; - -import java.util.ArrayList; -import java.util.List; - -import org.springframework.stereotype.Component; - -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfResponse; - -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMOperExecutVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMQueryVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfResponse; - -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.OperStatusVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.QueryVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ResponseDescriptor; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ResponseHistoryList; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.VnfInfo; - -@Component -public class Cbam2DriverResponseConverter { - - - public InstantiateVnfResponse createspConvert(CBAMCreateVnfResponse cbamResponse) { - - InstantiateVnfResponse response = new InstantiateVnfResponse(); - response.setJobId("1"); - response.setVnfInstanceId(cbamResponse.getVnfInfo().getId()); - - return response; - } - - public InstantiateVnfResponse instantspConvert(CBAMInstantiateVnfResponse cbamResponse) { - InstantiateVnfResponse response = new InstantiateVnfResponse(); - response.setJobId("1"); - response.setVnfInstanceId(cbamResponse.getProblemDetails().getInstance()); - return response; - } - - public TerminateVnfResponse terminaterspConvert(CBAMTerminateVnfResponse cbamResponse) { - - TerminateVnfResponse response = new TerminateVnfResponse(); - response.setJobId("1"); - return response; - } - - public QueryVnfResponse queryspConvert(CBAMQueryVnfResponse cbamResponse) { - QueryVnfResponse response = new QueryVnfResponse(); - VnfInfo vnf = new VnfInfo(); - vnf.setVnfdId(cbamResponse.getVnfInfo().getVnfdId()); - vnf.setVersion(cbamResponse.getVnfInfo().getVnfdVersion()); - vnf.setVnfInstanceId(cbamResponse.getVnfInfo().getId()); - vnf.setVnfInstanceName(cbamResponse.getVnfInfo().getName()); - vnf.setVnfInstanceDescription(cbamResponse.getVnfInfo().getDescription()); - vnf.setVnfPackageId(cbamResponse.getVnfInfo().getOnboardedVnfPkgInfoId()); - vnf.setVnfProvider(cbamResponse.getVnfInfo().getVnfProvider()); - vnf.setVnfStatus(cbamResponse.getVnfInfo().getInstantiationState()); - vnf.setVnfType(cbamResponse.getVnfInfo().getVnfSoftwareVersion()); - response.setVnfInfo(vnf); - return response; - } - - public OperStatusVnfResponse operspConvert(CBAMOperExecutVnfResponse cbamResponse) { - - OperStatusVnfResponse response = new OperStatusVnfResponse(); - List<OperationExecution> oper=cbamResponse.getOperationExecution(); - for(int i=0;i<oper.size();i++) { - response.setJobId(oper.get(i).getId()); - ResponseDescriptor er=new ResponseDescriptor(); - er.setProgress(i); - if(oper.get(i).getStatus().equals("STARTED")) { - er.setStatus("started"); - }else - if(oper.get(i).getStatus().equals("FINISHED")) { - er.setStatus("finished"); - }else - if(oper.get(i).getStatus().equals("FAILED")) { - er.setStatus("error"); - }else - if(oper.get(i).getStatus().equals("OTHER")) { - er.setStatus("processing"); - }else { - er.setStatus("error"); - } - er.setStatusDescription(""); - er.setErrorCode(null); - er.setResponseId(oper.get(i).getGrantId().hashCode()); - List<ResponseHistoryList> list=new ArrayList<ResponseHistoryList>(); - ResponseHistoryList relist=new ResponseHistoryList(); - relist.setProgress(i); - relist.setStatus(er.getStatus()); - relist.setStatusDescription(""); - relist.setErrorCode(null); - relist.setResponseId(er.getResponseId()); - list.add(relist); - er.setResponseHistoryList(list); - response.setResponseDescriptor(er); - } - return response; - } - - public HealVnfResponse healspconvert(CBAMHealVnfResponse cbamResponse) { - HealVnfResponse response=new HealVnfResponse(); - response.setJobId("1"); - return response; - } - - public ScaleVnfResponse scalespconvert(CBAMScaleVnfResponse cbamResponse) { - ScaleVnfResponse response=new ScaleVnfResponse(); - response.setJobId("1"); - return response; - } -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/TerminateVnfContinueRunnable.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/TerminateVnfContinueRunnable.java deleted file mode 100644 index de192c54..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/TerminateVnfContinueRunnable.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.nokia.vfcadaptor.adaptor; - -import java.io.IOException; - -import org.apache.http.client.ClientProtocolException; -import org.apache.log4j.Logger; - -import com.nokia.vfcadaptor.catalog.inf.CatalogMgmrInf; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; -import com.nokia.vfcadaptor.cbam.inf.CbamMgmrInf; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfRequest; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.inf.NslcmMgmrInf; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; - -public class TerminateVnfContinueRunnable implements Runnable { - private Logger logger = Logger.getLogger(TerminateVnfContinueRunnable.class); - - private CbamMgmrInf cbamMgmr; - private NslcmMgmrInf nslcmMgmr; - - private TerminateVnfRequest driverRequest; - private String vnfInstanceId; - - private Driver2CbamRequestConverter requestConverter; - - public TerminateVnfContinueRunnable(TerminateVnfRequest driverRequest, String vnfInstanceId, - NslcmMgmrInf nslcmMgmr, CbamMgmrInf cbamMgmr, Driver2CbamRequestConverter requestConverter) - { - this.driverRequest = driverRequest; - this.vnfInstanceId = vnfInstanceId; - this.nslcmMgmr = nslcmMgmr; - this.cbamMgmr = cbamMgmr; - this.requestConverter = requestConverter; - } - - public void run() { - try { - NslcmGrantVnfRequest grantRequest = new NslcmGrantVnfRequest(); - NslcmGrantVnfResponse grantResponse = nslcmMgmr.grantVnf(grantRequest); - handleNslcmGrantResponse(grantResponse); - - CBAMTerminateVnfRequest cbamRequest = requestConverter.terminaterqConvert(driverRequest); - CBAMTerminateVnfResponse cbamResponse = cbamMgmr.terminateVnf(cbamRequest, vnfInstanceId); - - cbamMgmr.deleteVnf(vnfInstanceId); - - } catch (ClientProtocolException e) { - logger.error("TerminateVnfContinueRunnable run error ClientProtocolException", e); - } catch (IOException e) { - logger.error("TerminateVnfContinueRunnable run error IOException", e); - } - - } - - private void handleNslcmGrantResponse(NslcmGrantVnfResponse grantResponse) { - // TODO Auto-generated method stub - - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/VnfmDriverMgmrIml.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/VnfmDriverMgmrIml.java deleted file mode 100644 index 6c332441..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/VnfmDriverMgmrIml.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.nokia.vfcadaptor.adaptor; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.apache.http.HttpStatus; -import org.apache.http.client.ClientProtocolException; -import org.apache.log4j.Logger; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; - -import com.nokia.vfcadaptor.catalog.inf.CatalogMgmrInf; -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMQueryVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; -import com.nokia.vfcadaptor.cbam.inf.CbamMgmrInf; -import com.nokia.vfcadaptor.constant.CommonConstants; -import com.nokia.vfcadaptor.exception.VnfmDriverException; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfRequest; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.bo.VnfmInfo; -import com.nokia.vfcadaptor.nslcm.inf.NslcmMgmrInf; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.OperStatusVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.QueryVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ResponseDescriptor; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ResponseHistoryList; -import com.nokia.vfcadaptor.vnfmdriver.inf.VnfmDriverMgmrInf; - -@Component -public class VnfmDriverMgmrIml implements VnfmDriverMgmrInf{ - private Logger logger = Logger.getLogger(VnfmDriverMgmrIml.class); - - @Autowired - Driver2CbamRequestConverter requestConverter; - - @Autowired - Cbam2DriverResponseConverter responseConverter; - - @Autowired - private CbamMgmrInf cbamMgmr; - - @Autowired - private CatalogMgmrInf catalogMgmr; - - @Autowired - private NslcmMgmrInf nslcmMgmr; - - public InstantiateVnfResponse instantiateVnf(InstantiateVnfRequest driverRequest, String vnfmId) throws VnfmDriverException { - InstantiateVnfResponse driverResponse; - try { - //step 1: query vnfm info - VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); - - if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) - { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - //step 3: create vnf - CBAMCreateVnfRequest cbamRequest = requestConverter.createrqConvert(driverRequest); - CBAMCreateVnfResponse cbamResponse = cbamMgmr.createVnf(cbamRequest); - driverResponse = responseConverter.createspConvert(cbamResponse); - - String vnfInstanceId = driverResponse.getVnfInstanceId(); - String jobId = driverResponse.getJobId(); - continueInstantiateVnf(driverRequest, vnfInstanceId, jobId); - - - } catch (Exception e) { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - return driverResponse; - } - - public void continueInstantiateVnf(InstantiateVnfRequest driverRequest, String vnfInstanceId, String jobId) { - InstantiateVnfContinueRunnable runnable = new InstantiateVnfContinueRunnable(driverRequest, vnfInstanceId, jobId, - nslcmMgmr, catalogMgmr, cbamMgmr, requestConverter); - - Thread thread = new Thread(runnable); - - thread.run(); - } - - public TerminateVnfResponse terminateVnf(TerminateVnfRequest driverRequest, String vnfmId, String vnfInstanceId) { - TerminateVnfResponse driverResponse; - try { - nslcmMgmr.queryVnfm(vnfmId); - driverResponse = generateTerminateVnfResponse(vnfInstanceId); - continueTerminateVnf(driverRequest, vnfInstanceId); - - } catch (Exception e) { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - return driverResponse; - } - - private TerminateVnfResponse generateTerminateVnfResponse(String vnfInstanceId) { - TerminateVnfResponse response = new TerminateVnfResponse(); - //TODO - response.setJobId(""); - return response; - } - - public void continueTerminateVnf(TerminateVnfRequest driverRequest, String vnfInstanceId) { - TerminateVnfContinueRunnable runnable = new TerminateVnfContinueRunnable(driverRequest, vnfInstanceId, - nslcmMgmr, cbamMgmr, requestConverter); - - Thread thread = new Thread(runnable); - - thread.run(); - } - - - public QueryVnfResponse queryVnf(String vnfmId, String vnfInstanceId) { - QueryVnfResponse driverResponse; - try { - nslcmMgmr.queryVnfm(vnfmId); - CBAMQueryVnfResponse cbamResponse = cbamMgmr.queryVnf(vnfInstanceId); - driverResponse = responseConverter.queryspConvert(cbamResponse); - } catch (Exception e) { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - return driverResponse; - } - - public OperStatusVnfResponse getOperStatus(String vnfmId, String jobId) { - OperStatusVnfResponse response = new OperStatusVnfResponse(); - - List<ResponseHistoryList> list=new ArrayList<ResponseHistoryList>(); - ResponseHistoryList relist=new ResponseHistoryList(); - relist.setErrorCode(41); - relist.setProgress(40); - relist.setResponseId(1); - relist.setStatus("proccessing"); - relist.setStatusDescription("OMC VMs are decommissioned in VIM"); - ResponseDescriptor res=new ResponseDescriptor(); - res.setErrorCode(41); - res.setProgress(40); - res.setResponseId(1); - res.setStatus("proccessing"); - res.setStatusDescription("OMC VMs are decommissioned in VIM"); - for(int i=0; i<2;i++) { - relist.setProgress(4+i); - list.add(relist); - } - res.setResponseHistoryList(list); - - response.setJobId("Jobid="+jobId); - response.setResponseDescriptor(res); - - return response; - } - - public ScaleVnfResponse scaleVnf(ScaleVnfRequest driverRequest, String vnfmId, String vnfInstanceId) throws VnfmDriverException { - ScaleVnfResponse driverResponse; - try { - nslcmMgmr.queryVnfm(vnfmId); - CBAMScaleVnfRequest cbamRequest = requestConverter.scaleconvert(driverRequest); - CBAMScaleVnfResponse cbamResponse = cbamMgmr.scaleVnf(cbamRequest, vnfInstanceId); - driverResponse = responseConverter.scalespconvert(cbamResponse); - } catch (Exception e) { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - return driverResponse; - } - - public HealVnfResponse healVnf(HealVnfRequest driverRequest, String vnfmId, String vnfInstanceId) throws VnfmDriverException { - HealVnfResponse driverResponse; - try { - nslcmMgmr.queryVnfm(vnfmId); - CBAMHealVnfRequest cbamRequest = requestConverter.healconvert(driverRequest); - CBAMHealVnfResponse cbamResponse = cbamMgmr.healVnf(cbamRequest, vnfInstanceId); - driverResponse = responseConverter.healspconvert(cbamResponse); - } catch (Exception e) { - throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); - } - - return driverResponse; - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/ResourceType.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/ResourceType.java deleted file mode 100644 index 0ce26da0..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/ResourceType.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.nokia.vfcadaptor.beans; - -public enum ResourceType { - VDU, - VL, - CP, - Storage -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfResponse.java deleted file mode 100644 index b4099da8..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfResponse.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; -import com.nokia.vfcadaptor.cbam.bo.entity.VnfInfo; - -public class CBAMCreateVnfResponse { - @JsonProperty("vnfdId") - private VnfInfo vnfInfo; - - @JsonProperty("problemDetails") - private ProblemDetails problemDetails; - - public VnfInfo getVnfInfo() { - return vnfInfo; - } - - public void setVnfInfo(VnfInfo vnfInfo) { - this.vnfInfo = vnfInfo; - } - - public ProblemDetails getProblemDetails() { - return problemDetails; - } - - public void setProblemDetails(ProblemDetails problemDetails) { - this.problemDetails = problemDetails; - } - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfResponse.java deleted file mode 100644 index 8629d543..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfResponse.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.nokia.vfcadaptor.cbam.bo; - -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; - -public class CBAMTerminateVnfResponse { - @JsonProperty("operationExecution") - private OperationExecution operationExecution; - - @JsonProperty("problemDetails") - private ProblemDetails problemDetails; - - public OperationExecution getOperationExecution() { - return operationExecution; - } - - public void setOperationExecution(OperationExecution operationExecution) { - this.operationExecution = operationExecution; - } - - public ProblemDetails getProblemDetails() { - return problemDetails; - } - - public void setProblemDetails(ProblemDetails problemDetails) { - this.problemDetails = problemDetails; - } - - - - - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/controller/CbamController.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/controller/CbamController.java deleted file mode 100644 index d0a9158e..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/controller/CbamController.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.nokia.vfcadaptor.cbam.controller; - -import org.springframework.http.MediaType; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; - -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMOperExecutVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMOperExecutVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMQueryVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; -import com.nokia.vfcadaptor.cbam.bo.entity.VnfInfo; - -@Controller -@RequestMapping(value = "/vnfm/lcm/v3") -public class CbamController { - - @RequestMapping(value = "/vnfs", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMCreateVnfResponse createVnf(CBAMInstantiateVnfRequest request) - { - CBAMCreateVnfResponse response = new CBAMCreateVnfResponse(); - VnfInfo op=new VnfInfo(); - op.setName("VNF_001"); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setVnfInfo(op); - response.setProblemDetails(pr); - return response; - } - @RequestMapping(value = "/vnfs/{vnfInstanceId}/instantiate", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMInstantiateVnfResponse initiateVnf(CBAMInstantiateVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) - { - CBAMInstantiateVnfResponse response = new CBAMInstantiateVnfResponse(); -// response.setJobid("11234"); - - return response; - } - - @RequestMapping(value = "/vnfs/{vnfInstanceId}/terminate", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMTerminateVnfResponse terminateVnf(CBAMTerminateVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) - { - CBAMTerminateVnfResponse response = new CBAMTerminateVnfResponse(); - OperationExecution op=new OperationExecution(); - op.setGrantId("89"); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setOperationExecution(op); - response.setProblemDetails(pr); - return response; - } - - @RequestMapping(value = "/vnfs/{vnfInstanceId}/scale", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMScaleVnfResponse scaleVnf(CBAMScaleVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) - { - CBAMScaleVnfResponse response = new CBAMScaleVnfResponse(); - OperationExecution op=new OperationExecution(); - op.setGrantId("89"); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setOperationExecution(op); - response.setProblemDetails(pr); - return response; - } - - @RequestMapping(value = "/vnfs/{vnfInstanceId}/heal", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMHealVnfResponse healVnf(CBAMHealVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) - { - CBAMHealVnfResponse response = new CBAMHealVnfResponse(); - OperationExecution op=new OperationExecution(); - op.setGrantId("89"); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setOperationExecution(op); - response.setProblemDetails(pr); - return response; - } - - - @RequestMapping(value = "/vnfs/{vnfInstanceId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMQueryVnfResponse queryVnf(@PathVariable("vnfInstanceId") String vnfInstanceId) - { - CBAMQueryVnfResponse response = new CBAMQueryVnfResponse(); - VnfInfo op=new VnfInfo(); - op.setName("VNF_001"); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setVnfInfo(op); - response.setProblemDetails(pr); - return response; - } - - - @RequestMapping(value = "/operation_executions/{operationExecutionId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMOperExecutVnfResponse operVnf(@PathVariable("operationExecutionId") String operationExecutionId) - { - CBAMOperExecutVnfResponse response = new CBAMOperExecutVnfResponse(); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setProblemDetails(pr); - return response; - } - - @RequestMapping(value = "/operation_executions/{operationExecutionId}/cancel", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE,consumes = MediaType.APPLICATION_JSON_VALUE) - @ResponseBody - public CBAMOperExecutVnfResponse operCancelVnf(CBAMOperExecutVnfRequest request,@PathVariable("operationExecutionId") String operationExecutionId) - { - CBAMOperExecutVnfResponse response = new CBAMOperExecutVnfResponse(); - ProblemDetails pr=new ProblemDetails(); - pr.setStatus(200); - response.setProblemDetails(pr); - return response; - } - - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/ServletInitializer.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/ServletInitializer.java new file mode 100644 index 00000000..b51f7cf4 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/ServletInitializer.java @@ -0,0 +1,29 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.vfc.nfvo.driver.vnfm.svnfm; + +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.boot.web.support.SpringBootServletInitializer; + +public class ServletInitializer extends SpringBootServletInitializer { + + @Override + protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { + return application.sources(VfcadaptorApplication.class); + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/VfcadaptorApplication.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/VfcadaptorApplication.java new file mode 100644 index 00000000..09aa8193 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/VfcadaptorApplication.java @@ -0,0 +1,33 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.vfc.nfvo.driver.vnfm.svnfm; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; + +@Configuration +@SpringBootApplication +//@ComponentScan(basePackages= {"org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.controller"}) +@ComponentScan +public class VfcadaptorApplication { + + public static void main(String[] args) { + SpringApplication.run(VfcadaptorApplication.class, args); + } +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java new file mode 100644 index 00000000..33d34d0f --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Cbam2DriverResponseConverter.java @@ -0,0 +1,150 @@ +/* +* Copyright 2016-2017 Nokia Corporation +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package org.onap.vfc.nfvo.driver.vnfm.svnfm.adaptor; + +import java.util.ArrayList; +import java.util.List; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean.VnfmJobExecutionInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.repository.VnfmJobExecutionRepository; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.OperStatusVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.QueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ResponseDescriptor; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ResponseHistoryList; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.VnfInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +@Component +public class Cbam2DriverResponseConverter { + + @Autowired + private VnfmJobExecutionRepository jobDbManager; + + public InstantiateVnfResponse createRspConvert(CBAMCreateVnfResponse cbamResponse) { + + VnfmJobExecutionInfo jobInfo = new VnfmJobExecutionInfo(); + jobInfo.setVnfInstanceId(cbamResponse.getId()); + jobInfo.setVnfmInterfceName(CommonConstants.NSLCM_OPERATION_INSTANTIATE); + jobInfo.setStatus(CommonConstants.CBAM_OPERATION_STATUS_START); + + VnfmJobExecutionInfo jobInfo1 = (VnfmJobExecutionInfo) jobDbManager.save(jobInfo); + Long jobId = jobInfo1.getJobId(); + + InstantiateVnfResponse response = new InstantiateVnfResponse(); + response.setJobId(jobId.longValue() + ""); + response.setVnfInstanceId(cbamResponse.getId()); + + return response; + } + + public InstantiateVnfResponse instantiateRspConvert(CBAMInstantiateVnfResponse cbamResponse) { + InstantiateVnfResponse response = new InstantiateVnfResponse(); + + VnfmJobExecutionInfo jobInfo = jobDbManager.findOne(Long.getLong(cbamResponse.getId())); + + response.setJobId("1"); + + response.setVnfInstanceId(""); + return response; + } + + public TerminateVnfResponse terminateRspConvert(CBAMTerminateVnfResponse cbamResponse) { + VnfmJobExecutionInfo jobInfo = new VnfmJobExecutionInfo(); + jobInfo.setVnfInstanceId(cbamResponse.getId()); + jobInfo.setVnfmInterfceName(CommonConstants.NSLCM_OPERATION_TERMINATE); + jobInfo.setStatus(CommonConstants.CBAM_OPERATION_STATUS_START); + + VnfmJobExecutionInfo jobInfo1 = (VnfmJobExecutionInfo) jobDbManager.save(jobInfo); + Long jobId = jobInfo1.getJobId(); + TerminateVnfResponse response = new TerminateVnfResponse(); + response.setJobId(jobId.longValue() + ""); + return response; + } + + public QueryVnfResponse queryRspConvert(CBAMQueryVnfResponse cbamResponse) { + QueryVnfResponse response = new QueryVnfResponse(); + VnfInfo vnf = new VnfInfo(); + vnf.setVnfdId(cbamResponse.getVnfdId()); + vnf.setVersion(cbamResponse.getVnfdVersion()); + vnf.setVnfInstanceId(cbamResponse.getId()); + vnf.setVnfInstanceName(cbamResponse.getName()); + vnf.setVnfInstanceDescription(cbamResponse.getDescription()); + vnf.setVnfPackageId(cbamResponse.getOnboardedVnfPkgInfoId()); + vnf.setVnfProvider(cbamResponse.getVnfProvider()); + vnf.setVnfStatus(cbamResponse.getInstantiationState()); + vnf.setVnfType(cbamResponse.getVnfSoftwareVersion()); + return response; + } + + public OperStatusVnfResponse operRspConvert(OperationExecution oper) { + + OperStatusVnfResponse response = new OperStatusVnfResponse(); + + response.setJobId(oper.getId()); + ResponseDescriptor er = new ResponseDescriptor(); + // TODO er.setProgress(i); + if (oper.getStatus().equals("STARTED")) { + er.setStatus("started"); + } else if (oper.getStatus().equals("FINISHED")) { + er.setStatus("finished"); + } else if (oper.getStatus().equals("FAILED")) { + er.setStatus("error"); + } else if (oper.getStatus().equals("OTHER")) { + er.setStatus("processing"); + } else { + er.setStatus("error"); + } + er.setStatusDescription(""); + er.setErrorCode(null); + er.setResponseId(oper.getGrantId().hashCode()); + List<ResponseHistoryList> list = new ArrayList<ResponseHistoryList>(); + ResponseHistoryList relist = new ResponseHistoryList(); + // TODO relist.setProgress(i); + relist.setStatus(er.getStatus()); + relist.setStatusDescription(""); + relist.setErrorCode(null); + relist.setResponseId(er.getResponseId()); + list.add(relist); + er.setResponseHistoryList(list); + response.setResponseDescriptor(er); + return response; + } + + public HealVnfResponse healRspConvert(CBAMHealVnfResponse cbamResponse) { + HealVnfResponse response = new HealVnfResponse(); + response.setJobId("1"); + return response; + } + + public ScaleVnfResponse scaleRspConvert(CBAMScaleVnfResponse cbamResponse) { + ScaleVnfResponse response = new ScaleVnfResponse(); + response.setJobId("1"); + return response; + } +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Driver2CbamRequestConverter.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Driver2CbamRequestConverter.java index 5a51917d..a6dcc0af 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/Driver2CbamRequestConverter.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/Driver2CbamRequestConverter.java @@ -14,37 +14,39 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.adaptor; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.adaptor; import java.util.ArrayList; import java.util.List; -import org.springframework.stereotype.Component; -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.entity.EndpointInfo; -import com.nokia.vfcadaptor.cbam.bo.entity.ExtVirtualLinkData; -import com.nokia.vfcadaptor.cbam.bo.entity.OPENSTACK_V3_INFO; -import com.nokia.vfcadaptor.cbam.bo.entity.OpenStackAccessInfoV3; -import com.nokia.vfcadaptor.cbam.bo.entity.VimInfo; -import com.nokia.vfcadaptor.cbam.bo.entity.VimInfoType; -import com.nokia.vfcadaptor.cbam.bo.entity.VnfExtCpData; -import com.nokia.vfcadaptor.constant.CommonEnum; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.bo.entity.GrantInfo; -import com.nokia.vfcadaptor.nslcm.bo.entity.VimComputeResourceFlavour; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.EndpointInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.ExtVirtualLinkData; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OPENSTACK_V3_INFO; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OpenStackAccessInfoV3; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VimInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VimInfoType; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VnfExtCpData; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.GrantInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VimComputeResourceFlavour; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfRequest; + +import org.springframework.stereotype.Component; @Component public class Driver2CbamRequestConverter { - public CBAMCreateVnfRequest createrqConvert(InstantiateVnfRequest driverRequest) { + public CBAMCreateVnfRequest createReqConvert(InstantiateVnfRequest driverRequest) { CBAMCreateVnfRequest request = new CBAMCreateVnfRequest(); request.setVnfdId("vnfd_001"); @@ -53,7 +55,7 @@ public class Driver2CbamRequestConverter { return request; } - public CBAMInstantiateVnfRequest InstantiateCqonvert(InstantiateVnfRequest driverRequest, + public CBAMInstantiateVnfRequest InstantiateReqConvert(InstantiateVnfRequest driverRequest, NslcmGrantVnfResponse nslc, GrantInfo grant, VimComputeResourceFlavour vimco) { CBAMInstantiateVnfRequest request = new CBAMInstantiateVnfRequest(); List<VimInfo> vims = new ArrayList<VimInfo>(); @@ -90,21 +92,21 @@ public class Driver2CbamRequestConverter { return request; } - public CBAMTerminateVnfRequest terminaterqConvert(TerminateVnfRequest driverRequest) { + public CBAMTerminateVnfRequest terminateReqConvert(TerminateVnfRequest driverRequest) { CBAMTerminateVnfRequest request = new CBAMTerminateVnfRequest(); request.setTerminationType(driverRequest.getTerminationType()); request.setGracefulTerminationTimeout(driverRequest.getGracefulTerminationTimeout()); return request; } - public CBAMHealVnfRequest healconvert(HealVnfRequest driverRequest) { + public CBAMHealVnfRequest healReqConvert(HealVnfRequest driverRequest) { CBAMHealVnfRequest request = new CBAMHealVnfRequest(); request.setCause(""); request.setAdditionalParams(""); return request; } - public CBAMScaleVnfRequest scaleconvert(ScaleVnfRequest driverRequest) { + public CBAMScaleVnfRequest scaleReqconvert(ScaleVnfRequest driverRequest) { CBAMScaleVnfRequest request = new CBAMScaleVnfRequest(); if (driverRequest.getType().equals("SCALE_OUT")) { request.setType(CommonEnum.ScaleDirection.OUT); diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/InstantiateVnfContinueRunnable.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/InstantiateVnfContinueRunnable.java index 7efb9e9d..954ab6b1 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/adaptor/InstantiateVnfContinueRunnable.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/InstantiateVnfContinueRunnable.java @@ -14,33 +14,35 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.adaptor; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.adaptor; import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.http.client.ClientProtocolException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.inf.CatalogMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.inf.CbamMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum.LifecycleOperation; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean.VnfmJobExecutionInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.repository.VnfmJobExecutionRepository; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmNotifyLCMEventsRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.ResourceDefinition; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VnfPackageInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.inf.NslcmMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.catalog.inf.CatalogMgmrInf; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.inf.CbamMgmrInf; -import com.nokia.vfcadaptor.constant.CommonConstants; -import com.nokia.vfcadaptor.constant.CommonEnum; -import com.nokia.vfcadaptor.constant.CommonEnum.LifecycleOperation; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfRequest; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.bo.NslcmNotifyLCMEventsRequest; -import com.nokia.vfcadaptor.nslcm.bo.entity.ResourceDefinition; -import com.nokia.vfcadaptor.nslcm.bo.entity.VnfPackageInfo; -import com.nokia.vfcadaptor.nslcm.inf.NslcmMgmrInf; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; public class InstantiateVnfContinueRunnable implements Runnable { - private Logger logger = Logger.getLogger(InstantiateVnfContinueRunnable.class); - + private static final Logger logger = LogManager.getLogger("InstantiateVnfContinueRunnable"); private CbamMgmrInf cbamMgmr; private CatalogMgmrInf catalogMgmr; private NslcmMgmrInf nslcmMgmr; @@ -49,10 +51,12 @@ public class InstantiateVnfContinueRunnable implements Runnable { private String vnfInstanceId; private String jobId; + private VnfmJobExecutionRepository jobDbMgmr; + private Driver2CbamRequestConverter requestConverter; public InstantiateVnfContinueRunnable(InstantiateVnfRequest driverRequest, String vnfInstanceId, String jobId, - NslcmMgmrInf nslcmMgmr, CatalogMgmrInf catalogMgmr, CbamMgmrInf cbamMgmr, Driver2CbamRequestConverter requestConverter) + NslcmMgmrInf nslcmMgmr, CatalogMgmrInf catalogMgmr, CbamMgmrInf cbamMgmr, Driver2CbamRequestConverter requestConverter, VnfmJobExecutionRepository dbManager) { this.driverRequest = driverRequest; this.vnfInstanceId = vnfInstanceId; @@ -61,6 +65,7 @@ public class InstantiateVnfContinueRunnable implements Runnable { this.catalogMgmr = catalogMgmr; this.cbamMgmr = cbamMgmr; this.requestConverter = requestConverter; + this.jobDbMgmr = dbManager; } public void run() { @@ -73,9 +78,9 @@ public class InstantiateVnfContinueRunnable implements Runnable { VnfPackageInfo vnfPackageInfo = catalogMgmr.queryVnfPackage(driverRequest.getVnfPackageId()); //step 5: instantiate vnf - CBAMInstantiateVnfRequest instantiateReq = requestConverter.InstantiateCqonvert(driverRequest, grantResponse, null, null); + CBAMInstantiateVnfRequest instantiateReq = requestConverter.InstantiateReqConvert(driverRequest, grantResponse, null, null); CBAMInstantiateVnfResponse cbamInstantiateResponse = cbamMgmr.instantiateVnf(instantiateReq, vnfInstanceId); - handleCbamInstantiateResponse(cbamInstantiateResponse); + handleCbamInstantiateResponse(cbamInstantiateResponse, jobId); NslcmNotifyLCMEventsRequest nslcmNotifyReq = buildNslcmNotifyLCMEventsRequest(cbamInstantiateResponse); nslcmMgmr.notifyVnf(nslcmNotifyReq, vnfInstanceId); @@ -90,7 +95,7 @@ public class InstantiateVnfContinueRunnable implements Runnable { private NslcmNotifyLCMEventsRequest buildNslcmNotifyLCMEventsRequest(CBAMInstantiateVnfResponse cbamInstantiateResponse) { NslcmNotifyLCMEventsRequest request = new NslcmNotifyLCMEventsRequest(); - if(CommonEnum.OperationStatus.STARTED == cbamInstantiateResponse.getOperationExecution().getStatus()) + if(CommonEnum.OperationStatus.STARTED == cbamInstantiateResponse.getStatus()) { request.setStatus(CommonEnum.status.start); } @@ -114,7 +119,6 @@ public class InstantiateVnfContinueRunnable implements Runnable { NslcmGrantVnfRequest request = new NslcmGrantVnfRequest(); request.setVnfInstanceId(vnfInstanceId); - request.setVnfDescriptorId(driverRequest.getVnfDescriptorId()); request.setLifecycleOperation(LifecycleOperation.Instantiate); request.setJobId(jobId); @@ -131,9 +135,11 @@ public class InstantiateVnfContinueRunnable implements Runnable { return null; } - private void handleCbamInstantiateResponse(CBAMInstantiateVnfResponse cbamInstantiateResponse) { - // TODO - //update job id record according to the executionId + private void handleCbamInstantiateResponse(CBAMInstantiateVnfResponse cbamInstantiateResponse, String jobId) { + VnfmJobExecutionInfo jobInfo = jobDbMgmr.findOne(Long.getLong(jobId)); + + jobInfo.setVnfmExecutionId(cbamInstantiateResponse.getId()); + jobDbMgmr.save(jobInfo); } private void handleNslcmGrantResponse(NslcmGrantVnfResponse grantResponse) { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/TerminateVnfContinueRunnable.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/TerminateVnfContinueRunnable.java new file mode 100644 index 00000000..ba7663d9 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/TerminateVnfContinueRunnable.java @@ -0,0 +1,136 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.vfc.nfvo.driver.vnfm.svnfm.adaptor; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.http.client.ClientProtocolException; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.inf.CbamMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum.LifecycleOperation; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.repository.VnfmJobExecutionRepository; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmNotifyLCMEventsRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.ResourceDefinition; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.inf.NslcmMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfRequest; + + + +public class TerminateVnfContinueRunnable implements Runnable { + private static final Logger logger = LogManager.getLogger("TerminateVnfContinueRunnable"); + + private CbamMgmrInf cbamMgmr; + private NslcmMgmrInf nslcmMgmr; + + private TerminateVnfRequest driverRequest; + private String vnfInstanceId; + private String jobId; + private VnfmJobExecutionRepository jobDbManager; + + private Driver2CbamRequestConverter requestConverter; + + public TerminateVnfContinueRunnable(TerminateVnfRequest driverRequest, String vnfInstanceId, String jobId, + NslcmMgmrInf nslcmMgmr, CbamMgmrInf cbamMgmr, Driver2CbamRequestConverter requestConverter, VnfmJobExecutionRepository dbManager) + { + this.driverRequest = driverRequest; + this.vnfInstanceId = vnfInstanceId; + this.nslcmMgmr = nslcmMgmr; + this.cbamMgmr = cbamMgmr; + this.requestConverter = requestConverter; + this.jobId = jobId; + this.jobDbManager = dbManager; + } + + public void run() { + try { + NslcmGrantVnfRequest grantRequest = buildNslcmGrantVnfRequest(); + NslcmGrantVnfResponse grantResponse = nslcmMgmr.grantVnf(grantRequest); + handleNslcmGrantResponse(grantResponse); + + CBAMTerminateVnfRequest cbamRequest = requestConverter.terminateReqConvert(driverRequest); + CBAMTerminateVnfResponse cbamResponse = cbamMgmr.terminateVnf(cbamRequest, vnfInstanceId); + + cbamMgmr.deleteVnf(vnfInstanceId); + + NslcmNotifyLCMEventsRequest nslcmNotifyReq = buildNslcmNotifyLCMEventsRequest(cbamResponse); + nslcmMgmr.notifyVnf(nslcmNotifyReq, vnfInstanceId); + + } catch (ClientProtocolException e) { + logger.error("TerminateVnfContinueRunnable run error ClientProtocolException", e); + } catch (IOException e) { + logger.error("TerminateVnfContinueRunnable run error IOException", e); + } + + } + + private NslcmGrantVnfRequest buildNslcmGrantVnfRequest() { + NslcmGrantVnfRequest request = new NslcmGrantVnfRequest(); + + request.setVnfInstanceId(vnfInstanceId); + request.setLifecycleOperation(LifecycleOperation.Instantiate); + request.setJobId(jobId); + + ResourceDefinition resource = getFreeVnfResource(); + List<ResourceDefinition> resourceList = new ArrayList<ResourceDefinition>(); + resourceList.add(resource); + request.setRemoveResource(resourceList); + + return request; + } + + private ResourceDefinition getFreeVnfResource() { + // TODO Auto-generated method stub + return null; + } + + private NslcmNotifyLCMEventsRequest buildNslcmNotifyLCMEventsRequest(CBAMTerminateVnfResponse cbamResponse) { + NslcmNotifyLCMEventsRequest request = new NslcmNotifyLCMEventsRequest(); + if(CommonEnum.OperationStatus.STARTED == cbamResponse.getStatus()) + { + request.setStatus(CommonEnum.status.start); + } + else + { + request.setStatus(CommonEnum.status.result); + + //TODO the following are for the result +// request.setAffectedVnfc(affectedVnfc); +// request.setAffectedVI(affectedVI); +// request.setAffectedVirtualStorage(affectedVirtualStorage); + } + + request.setVnfInstanceId(vnfInstanceId); + request.setOperation(CommonConstants.NSLCM_OPERATION_TERMINATE); + request.setJobId(jobId); + return request; + } + + private void handleNslcmGrantResponse(NslcmGrantVnfResponse grantResponse) { + // TODO Auto-generated method stub + + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/VnfmDriverMgmrIml.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/VnfmDriverMgmrIml.java new file mode 100644 index 00000000..fa274fee --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/adaptor/VnfmDriverMgmrIml.java @@ -0,0 +1,249 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.vfc.nfvo.driver.vnfm.svnfm.adaptor; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.http.HttpStatus; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.inf.CatalogMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMOperExecutVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryOperExecutionResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.inf.CbamMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean.VnfmJobExecutionInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.repository.VnfmJobExecutionRepository; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.exception.VnfmDriverException; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.VnfmInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.inf.NslcmMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.OperStatusVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.QueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ResponseDescriptor; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ResponseHistoryList; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.inf.VnfmDriverMgmrInf; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + + +@Component +public class VnfmDriverMgmrIml implements VnfmDriverMgmrInf{ + private static final Logger logger = LogManager.getLogger("VnfmDriverMgmrIml"); + + @Autowired + Driver2CbamRequestConverter requestConverter; + + @Autowired + Cbam2DriverResponseConverter responseConverter; + + @Autowired + private CbamMgmrInf cbamMgmr; + + @Autowired + private CatalogMgmrInf catalogMgmr; + + @Autowired + private NslcmMgmrInf nslcmMgmr; + + @Autowired + private VnfmJobExecutionRepository jobDbManager; + + public InstantiateVnfResponse instantiateVnf(InstantiateVnfRequest driverRequest, String vnfmId) throws VnfmDriverException { + InstantiateVnfResponse driverResponse; + try { + //step 1: query vnfm info + VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + //step 3: create vnf + CBAMCreateVnfRequest cbamRequest = requestConverter.createReqConvert(driverRequest); + CBAMCreateVnfResponse cbamResponse = cbamMgmr.createVnf(cbamRequest); + driverResponse = responseConverter.createRspConvert(cbamResponse); + + String vnfInstanceId = driverResponse.getVnfInstanceId(); + String jobId = driverResponse.getJobId(); + continueInstantiateVnf(driverRequest, vnfInstanceId, jobId); + + + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + return driverResponse; + } + + public void continueInstantiateVnf(InstantiateVnfRequest driverRequest, String vnfInstanceId, String jobId) { + InstantiateVnfContinueRunnable runnable = new InstantiateVnfContinueRunnable(driverRequest, vnfInstanceId, jobId, + nslcmMgmr, catalogMgmr, cbamMgmr, requestConverter, jobDbManager); + + Thread thread = new Thread(runnable); + + thread.run(); + } + + public TerminateVnfResponse terminateVnf(TerminateVnfRequest driverRequest, String vnfmId, String vnfInstanceId) { + TerminateVnfResponse driverResponse; + try { + VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + driverResponse = generateTerminateVnfResponse(vnfInstanceId); + String jobId = driverResponse.getJobId(); + continueTerminateVnf(driverRequest, vnfInstanceId, jobId); + + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + return driverResponse; + } + + private TerminateVnfResponse generateTerminateVnfResponse(String vnfInstanceId) { + VnfmJobExecutionInfo jobInfo = new VnfmJobExecutionInfo(); + jobInfo.setVnfInstanceId(vnfInstanceId); + jobInfo.setVnfmInterfceName(CommonConstants.NSLCM_OPERATION_TERMINATE); + jobInfo.setStatus(CommonConstants.CBAM_OPERATION_STATUS_START); + + VnfmJobExecutionInfo jobInfo1= jobDbManager.save(jobInfo); + Long jobId = jobInfo1.getJobId(); + + TerminateVnfResponse response = new TerminateVnfResponse(); + response.setJobId("" + jobId); + return response; + } + + public void continueTerminateVnf(TerminateVnfRequest driverRequest, String vnfInstanceId, String jobId) { + TerminateVnfContinueRunnable runnable = new TerminateVnfContinueRunnable(driverRequest, vnfInstanceId, jobId, + nslcmMgmr, cbamMgmr, requestConverter, jobDbManager); + + Thread thread = new Thread(runnable); + + thread.run(); + } + + + public QueryVnfResponse queryVnf(String vnfmId, String vnfInstanceId) { + QueryVnfResponse driverResponse; + try { + nslcmMgmr.queryVnfm(vnfmId); + VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + CBAMQueryVnfResponse cbamResponse = cbamMgmr.queryVnf(vnfInstanceId); + driverResponse = responseConverter.queryRspConvert(cbamResponse); + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + return driverResponse; + } + + public OperStatusVnfResponse getOperStatus(String vnfmId, String jobId) throws VnfmDriverException { + VnfmInfo vnfmInfo; + try { + vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + VnfmJobExecutionInfo jobInfo = jobDbManager.findOne(Long.getLong(jobId)); + String execId = jobInfo.getVnfmExecutionId(); + + CBAMQueryOperExecutionResponse cbamResponse; + + try { + cbamResponse = cbamMgmr.queryOperExecution(execId); + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + OperStatusVnfResponse response = responseConverter.operRspConvert(cbamResponse); + + return response; + } + + public ScaleVnfResponse scaleVnf(ScaleVnfRequest driverRequest, String vnfmId, String vnfInstanceId) throws VnfmDriverException { + ScaleVnfResponse driverResponse; + try { + VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + CBAMScaleVnfRequest cbamRequest = requestConverter.scaleReqconvert(driverRequest); + CBAMScaleVnfResponse cbamResponse = cbamMgmr.scaleVnf(cbamRequest, vnfInstanceId); + driverResponse = responseConverter.scaleRspConvert(cbamResponse); + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + return driverResponse; + } + + public HealVnfResponse healVnf(HealVnfRequest driverRequest, String vnfmId, String vnfInstanceId) throws VnfmDriverException { + HealVnfResponse driverResponse; + try { + VnfmInfo vnfmInfo = nslcmMgmr.queryVnfm(vnfmId); + + if(vnfmInfo == null || vnfmId.equalsIgnoreCase(vnfmInfo.getVnfmId())) + { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + CBAMHealVnfRequest cbamRequest = requestConverter.healReqConvert(driverRequest); + CBAMHealVnfResponse cbamResponse = cbamMgmr.healVnf(cbamRequest, vnfInstanceId); + driverResponse = responseConverter.healRspConvert(cbamResponse); + } catch (Exception e) { + throw new VnfmDriverException(HttpStatus.SC_INTERNAL_SERVER_ERROR, CommonConstants.HTTP_ERROR_DESC_500); + } + + return driverResponse; + } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfRequest.java index 8b47ac9e..82946b11 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfRequest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.catalog.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo; public class CatalogQueryVnfRequest { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfResponse.java index 761f54b0..f5d44ca7 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/CatalogQueryVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/CatalogQueryVnfResponse.java @@ -13,14 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.catalog.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo; import java.util.List; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.entity.ImageInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.entity.VnfInstanceInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VnfPackageInfo; + import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.catalog.bo.entity.ImageInfo; -import com.nokia.vfcadaptor.catalog.bo.entity.VnfInstanceInfo; -import com.nokia.vfcadaptor.nslcm.bo.entity.VnfPackageInfo; public class CatalogQueryVnfResponse { @JsonProperty("csarId") diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/ImageInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/ImageInfo.java index 568179bd..fe7f5f8a 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/ImageInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/ImageInfo.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.catalog.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/VnfInstanceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/VnfInstanceInfo.java index d3c81fdf..6ce4b07b 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/bo/entity/VnfInstanceInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/bo/entity/VnfInstanceInfo.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.catalog.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/impl/CatalogMgmrImpl.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/impl/CatalogMgmrImpl.java index c3553800..186a1720 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/impl/CatalogMgmrImpl.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/impl/CatalogMgmrImpl.java @@ -14,28 +14,29 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.catalog.impl; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.impl; import java.io.IOException; import org.apache.http.client.ClientProtocolException; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.CatalogQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.inf.CatalogMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo.AdaptorEnv; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.http.client.HttpRequestProcessor; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VnfPackageInfo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.RequestMethod; import com.google.gson.Gson; -import com.nokia.vfcadaptor.catalog.bo.CatalogQueryVnfResponse; -import com.nokia.vfcadaptor.catalog.inf.CatalogMgmrInf; -import com.nokia.vfcadaptor.common.bo.AdaptorEnv; -import com.nokia.vfcadaptor.constant.CommonConstants; -import com.nokia.vfcadaptor.http.client.HttpRequestProcessor; -import com.nokia.vfcadaptor.nslcm.bo.entity.VnfPackageInfo; @Component public class CatalogMgmrImpl implements CatalogMgmrInf{ - private Logger logger = Logger.getLogger(CatalogMgmrImpl.class); + private static final Logger logger = LogManager.getLogger("CatalogMgmrImpl"); private Gson gson = new Gson(); @@ -46,7 +47,7 @@ public class CatalogMgmrImpl implements CatalogMgmrInf{ private HttpClientBuilder httpClientBuilder; public VnfPackageInfo queryVnfPackage(String vnfPackageId) throws ClientProtocolException, IOException { - String url="http://" + adaptorEnv.getCatalogIp() + ":" + adaptorEnv.getCatalogPort() + String.format(CommonConstants.RetrieveVnfPackagePath, vnfPackageId); + String url=adaptorEnv.getCatalogApiUriFront() + String.format(CommonConstants.RetrieveVnfPackagePath, vnfPackageId); HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); String responseStr = processor.process(url); diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/inf/CatalogMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/inf/CatalogMgmrInf.java index bf7ae78c..5984aaaf 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/catalog/inf/CatalogMgmrInf.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/catalog/inf/CatalogMgmrInf.java @@ -14,13 +14,12 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.catalog.inf; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.inf; import java.io.IOException; import org.apache.http.client.ClientProtocolException; - -import com.nokia.vfcadaptor.nslcm.bo.entity.VnfPackageInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VnfPackageInfo; public interface CatalogMgmrInf { public VnfPackageInfo queryVnfPackage(String vnfPackageId) throws ClientProtocolException, IOException; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfRequest.java index 03578d66..d1c6a7bd 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMCreateVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfResponse.java new file mode 100644 index 00000000..a920fbca --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMCreateVnfResponse.java @@ -0,0 +1,47 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VnfInfo; + +public class CBAMCreateVnfResponse extends VnfInfo{ +// @JsonProperty("vnfdId") +// private VnfInfo vnfInfo; +// +// @JsonProperty("problemDetails") +// private ProblemDetails problemDetails; +// +// public VnfInfo getVnfInfo() { +// return vnfInfo; +// } +// +// public void setVnfInfo(VnfInfo vnfInfo) { +// this.vnfInfo = vnfInfo; +// } +// +// public ProblemDetails getProblemDetails() { +// return problemDetails; +// } +// +// public void setProblemDetails(ProblemDetails problemDetails) { +// this.problemDetails = problemDetails; +// } +// + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfRequest.java index 2918e3ce..152a124a 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfResponse.java index 4d9a4191..b3c1dee8 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMHealVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMHealVnfResponse.java @@ -14,14 +14,12 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; -public class CBAMHealVnfResponse { - @JsonProperty("operationExecution") +public class CBAMHealVnfResponse extends OperationExecution { + /*@JsonProperty("operationExecution") private OperationExecution operationExecution; @JsonProperty("problemDetails") @@ -42,7 +40,7 @@ public class CBAMHealVnfResponse { public void setProblemDetails(ProblemDetails problemDetails) { this.problemDetails = problemDetails; } - + */ } diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfRequest.java index 36628528..db79d190 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfRequest.java @@ -15,14 +15,15 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; import java.util.List; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.ExtManagedVirtualLinkData; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.ExtVirtualLinkData; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VimInfo; + import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.ExtManagedVirtualLinkData; -import com.nokia.vfcadaptor.cbam.bo.entity.ExtVirtualLinkData; -import com.nokia.vfcadaptor.cbam.bo.entity.VimInfo; public class CBAMInstantiateVnfRequest { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfResponse.java index 276586e8..f1b4ac82 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMInstantiateVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMInstantiateVnfResponse.java @@ -1,4 +1,3 @@ - /* * Copyright 2016-2017, Nokia Corporation * @@ -15,14 +14,12 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; -public class CBAMInstantiateVnfResponse { - @JsonProperty("operationExecution") +public class CBAMInstantiateVnfResponse extends OperationExecution{ +/* @JsonProperty("operationExecution") private OperationExecution operationExecution; @JsonProperty("problemDetails") @@ -43,7 +40,7 @@ public class CBAMInstantiateVnfResponse { public void setProblemDetails(ProblemDetails problemDetails) { this.problemDetails = problemDetails; } - +*/ diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfRequest.java index 211448c1..0c748cfd 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfRequest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; public class CBAMOperExecutVnfRequest { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfResponse.java index c0f00b1e..f0ae5b84 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMOperExecutVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMOperExecutVnfResponse.java @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; import java.util.List; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.ProblemDetails; + import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; public class CBAMOperExecutVnfResponse { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryOperExecutionResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryOperExecutionResponse.java new file mode 100644 index 00000000..8a11ea82 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryOperExecutionResponse.java @@ -0,0 +1,24 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; + +public class CBAMQueryOperExecutionResponse extends OperationExecution{ + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMQueryVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryVnfResponse.java index 61e23134..ce00715e 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMQueryVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMQueryVnfResponse.java @@ -15,14 +15,12 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; -import com.nokia.vfcadaptor.cbam.bo.entity.VnfInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VnfInfo; -public class CBAMQueryVnfResponse { - @JsonProperty("vnfInfo") +public class CBAMQueryVnfResponse extends VnfInfo { + /*@JsonProperty("vnfInfo") private VnfInfo vnfInfo; @JsonProperty("problemDetails") @@ -42,7 +40,7 @@ public class CBAMQueryVnfResponse { public void setProblemDetails(ProblemDetails problemDetails) { this.problemDetails = problemDetails; - } + }*/ diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfRequest.java index 1c2abf2c..399b3800 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfRequest.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class CBAMScaleVnfRequest { @JsonProperty("type") diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfResponse.java index c001f3af..ce524648 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMScaleVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMScaleVnfResponse.java @@ -14,14 +14,12 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.cbam.bo.entity.OperationExecution; -import com.nokia.vfcadaptor.cbam.bo.entity.ProblemDetails; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; -public class CBAMScaleVnfResponse { - @JsonProperty("operationExecution") +public class CBAMScaleVnfResponse extends OperationExecution { + /*@JsonProperty("operationExecution") private OperationExecution operationExecution; @JsonProperty("problemDetails") @@ -41,7 +39,7 @@ public class CBAMScaleVnfResponse { public void setProblemDetails(ProblemDetails problemDetails) { this.problemDetails = problemDetails; - } + }*/ diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfRequest.java index 7761f057..8552a160 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/CBAMTerminateVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfRequest.java @@ -15,10 +15,11 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class CBAMTerminateVnfRequest { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfResponse.java new file mode 100644 index 00000000..0ee100e9 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/CBAMTerminateVnfResponse.java @@ -0,0 +1,44 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; + +public class CBAMTerminateVnfResponse extends OperationExecution{ +// @JsonProperty("operationExecution") +// private OperationExecution operationExecution; +// +// @JsonProperty("problemDetails") +// private ProblemDetails problemDetails; +// +// public OperationExecution getOperationExecution() { +// return operationExecution; +// } +// +// public void setOperationExecution(OperationExecution operationExecution) { +// this.operationExecution = operationExecution; +// } +// +// public ProblemDetails getProblemDetails() { +// return problemDetails; +// } +// +// public void setProblemDetails(ProblemDetails problemDetails) { +// this.problemDetails = problemDetails; +// } + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/EndpointInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/EndpointInfo.java index 863920ac..30500a7c 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/EndpointInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/EndpointInfo.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtManagedVirtualLinkData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtManagedVirtualLinkData.java index 4a7ee81f..b20dbe51 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtManagedVirtualLinkData.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtManagedVirtualLinkData.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtVirtualLinkData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtVirtualLinkData.java index 3a7e4127..d981a77d 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ExtVirtualLinkData.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ExtVirtualLinkData.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import java.util.ArrayList; import java.util.List; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/Inputs.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/Inputs.java index d17d6cdc..29b6b473 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/Inputs.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/Inputs.java @@ -1,4 +1,20 @@ -package com.nokia.vfcadaptor.cbam.bo.entity; +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/InstantiatedVnfInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/InstantiatedVnfInfo.java index 1479e963..94fb6973 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/InstantiatedVnfInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/InstantiatedVnfInfo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; public class InstantiatedVnfInfo { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/NetworkAddress.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/NetworkAddress.java index b4ebb7f6..5a0649bf 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/NetworkAddress.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/NetworkAddress.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V2_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V2_INFO.java index 2cca3090..9fad8cb3 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V2_INFO.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V2_INFO.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V3_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V3_INFO.java index 11cdfdfc..d5cc23a8 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OPENSTACK_V3_INFO.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OPENSTACK_V3_INFO.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OTHER_VIM_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OTHER_VIM_INFO.java index 0578ba16..76651247 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OTHER_VIM_INFO.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OTHER_VIM_INFO.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV2.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV2.java index bc67a619..d4d5b7c1 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV2.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV2.java @@ -1,4 +1,4 @@ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; /* * Copyright 2016-2017 Nokia Corporation diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV3.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV3.java index 4cf5b6f9..3a9fc360 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OpenStackAccessInfoV3.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OpenStackAccessInfoV3.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OperationExecution.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OperationExecution.java index efb8f8a4..e6dfbc87 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/OperationExecution.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/OperationExecution.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class OperationExecution { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ProblemDetails.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ProblemDetails.java index ead7e11a..73dea4b4 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ProblemDetails.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ProblemDetails.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VCloudAccessInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VCloudAccessInfo.java index 32a3abbe..d67dfd15 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VCloudAccessInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VCloudAccessInfo.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VMWARE_VCLOUD_INFO.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VMWARE_VCLOUD_INFO.java index 866a31f4..2e417fec 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VMWARE_VCLOUD_INFO.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VMWARE_VCLOUD_INFO.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimComputeResourceFlavour.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimComputeResourceFlavour.java index 2add1c6f..f0d7fbc1 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimComputeResourceFlavour.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimComputeResourceFlavour.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfo.java index c68d3b3b..db55d95f 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfo.java @@ -14,10 +14,9 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class VimInfo { @JsonProperty("id") diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfoType.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfoType.java index 9e4aa88f..67e6ed76 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimInfoType.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimInfoType.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; public class VimInfoType { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimSoftwareImage.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimSoftwareImage.java index 53ea38b8..5b4521d1 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VimSoftwareImage.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VimSoftwareImage.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfExtCpData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfExtCpData.java index 85c4fbeb..bbd6287b 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfExtCpData.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfExtCpData.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import java.util.ArrayList; import java.util.List; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfInfo.java index 32cbcb26..1e5737cd 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfInfo.java @@ -15,13 +15,14 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import java.util.ArrayList; import java.util.List; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; + import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class VnfInfo { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfProperty.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfProperty.java index 8941c393..55444de1 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/VnfProperty.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/VnfProperty.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; public class VnfProperty { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ZoneInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ZoneInfo.java index 21c830c0..fc283b80 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/ZoneInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/ZoneInfo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/_links.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/_links.java index f7b2a4d4..3c8277ef 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/bo/entity/_links.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/bo/entity/_links.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/controller/CbamController.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/controller/CbamController.java new file mode 100644 index 00000000..9578e75f --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/controller/CbamController.java @@ -0,0 +1,188 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.controller; + +import java.io.IOException; + +import org.apache.http.client.ClientProtocolException; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.catalog.bo.CatalogQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMOperExecutVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMOperExecutVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.OperationExecution; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.ProblemDetails; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.entity.VnfInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo.AdaptorEnv; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.http.client.HttpRequestProcessor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.google.gson.Gson; + +@Controller +@RequestMapping(value = "/vnfm/lcm/v3") +public class CbamController { + private static final Logger logger = LogManager.getLogger("CbamController"); + @Autowired + private AdaptorEnv adaptorEnv; + + @Autowired + private HttpClientBuilder httpClientBuilder; + + private Gson gson = new Gson(); + + @RequestMapping(value = "/vnfs", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMCreateVnfResponse createVnf(CBAMInstantiateVnfRequest request) throws ClientProtocolException, IOException + { + CBAMCreateVnfResponse response = new CBAMCreateVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamCreateVnfPath); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> createVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + + + return response; + } + @RequestMapping(value = "/vnfs/{vnfInstanceId}/instantiate", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMInstantiateVnfResponse initiateVnf(CBAMInstantiateVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) throws ClientProtocolException, IOException + { + CBAMInstantiateVnfResponse response = new CBAMInstantiateVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamInstantiateVnfPath,vnfInstanceId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> initiateVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + + + return response; + } + + @RequestMapping(value = "/vnfs/{vnfInstanceId}/terminate", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMTerminateVnfResponse terminateVnf(CBAMTerminateVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) throws ClientProtocolException, IOException + { + CBAMTerminateVnfResponse response = new CBAMTerminateVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamTerminateVnfPath,vnfInstanceId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> terminateVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + return response; + } + + @RequestMapping(value = "/vnfs/{vnfInstanceId}/scale", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMScaleVnfResponse scaleVnf(CBAMScaleVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) throws ClientProtocolException, IOException + { + CBAMScaleVnfResponse response = new CBAMScaleVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamScaleVnfPath,vnfInstanceId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> scaleVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + return response; + } + + @RequestMapping(value = "/vnfs/{vnfInstanceId}/heal", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMHealVnfResponse healVnf(CBAMHealVnfRequest request, @PathVariable("vnfInstanceId") String vnfInstanceId) throws ClientProtocolException, IOException + { + CBAMHealVnfResponse response = new CBAMHealVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamHealVnfPath,vnfInstanceId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> healVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + return response; + } + + + @RequestMapping(value = "/vnfs/{vnfInstanceId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMQueryVnfResponse queryVnf(@PathVariable("vnfInstanceId") String vnfInstanceId) throws ClientProtocolException, IOException + { + CBAMQueryVnfResponse response = new CBAMQueryVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamQueryVnfPath, vnfInstanceId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> queryVnfPackage, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + + + return response; + } + + + @RequestMapping(value = "/operation_executions/{operationExecutionId}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public CBAMOperExecutVnfResponse operVnf(@PathVariable("operationExecutionId") String operationExecutionId) throws ClientProtocolException, IOException + { + CBAMOperExecutVnfResponse response = new CBAMOperExecutVnfResponse(); + String url=adaptorEnv.getCbamApiUriFront() + String.format(CommonConstants.CbamGetOperStatusPath,operationExecutionId); + HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); + + String responseStr = processor.process(url); + + logger.info("CbamMgmrImpl -> operVnf, responseStr is " + responseStr); + + CatalogQueryVnfResponse resp = gson.fromJson(responseStr, CatalogQueryVnfResponse.class); + return response; + } + + + + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/impl/CbamMgmrImpl.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/impl/CbamMgmrImpl.java index 50e265cd..bb56fc18 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/impl/CbamMgmrImpl.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/impl/CbamMgmrImpl.java @@ -14,40 +14,42 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.impl; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.impl; import java.io.IOException; import org.apache.http.client.ClientProtocolException; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.json.JSONException; import org.json.JSONObject; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryOperExecutionResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.inf.CbamMgmrInf; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo.AdaptorEnv; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.http.client.HttpRequestProcessor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.RequestMethod; import com.google.gson.Gson; -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMQueryVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; -import com.nokia.vfcadaptor.cbam.inf.CbamMgmrInf; -import com.nokia.vfcadaptor.common.bo.AdaptorEnv; -import com.nokia.vfcadaptor.constant.CommonConstants; -import com.nokia.vfcadaptor.http.client.HttpRequestProcessor; @Component public class CbamMgmrImpl implements CbamMgmrInf { - private Logger logger = Logger.getLogger(CbamMgmrImpl.class); - + private static final Logger logger = LogManager.getLogger("CbamMgmrImpl"); private Gson gson = new Gson(); @Autowired @@ -56,9 +58,9 @@ public class CbamMgmrImpl implements CbamMgmrInf { @Autowired private HttpClientBuilder httpClientBuilder; - private String retrieveToken() throws ClientProtocolException, IOException { + private String retrieveToken() throws ClientProtocolException, IOException, JSONException { String result = null; - String url="https://" + adaptorEnv.getCbamIp() + CommonConstants.RetrieveCbamTokenPath; + String url= adaptorEnv.getCbamApiUriFront() + CommonConstants.RetrieveCbamTokenPath; HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.POST); processor.addHdeader(CommonConstants.ACCEPT, "*/*"); processor.addHdeader(CommonConstants.CONTENT_TYPE, MediaType.APPLICATION_FORM_URLENCODED_VALUE); @@ -128,9 +130,6 @@ public class CbamMgmrImpl implements CbamMgmrInf { logger.info("CbamMgmrImpl -> deleteVnf."); } - /* (non-Javadoc) - * @see com.nokia.vfcadaptor.cbam.impl.CbamMgmrInf#scaleVnf(com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest, java.lang.String) - */ public CBAMScaleVnfResponse scaleVnf(CBAMScaleVnfRequest cbamRequest, String vnfInstanceId) throws ClientProtocolException, IOException { String httpPath = String.format(CommonConstants.CbamScaleVnfPath, vnfInstanceId); RequestMethod method = RequestMethod.POST; @@ -169,8 +168,14 @@ public class CbamMgmrImpl implements CbamMgmrInf { } public String operateCbamHttpTask(Object httpBodyObj, String httpPath, RequestMethod method) throws ClientProtocolException, IOException { - String token = retrieveToken(); - String url="https://" + adaptorEnv.getCbamIp() + httpPath; + String token = null; + try { + token = retrieveToken(); + } catch (JSONException e) { + logger.error("retrieveTokenError ", e); + } + + String url= adaptorEnv.getCbamApiUriFront() + httpPath; HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, method); processor.addHdeader(CommonConstants.AUTHORIZATION, "bearer " + token); processor.addHdeader(CommonConstants.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); @@ -181,5 +186,18 @@ public class CbamMgmrImpl implements CbamMgmrInf { return responseStr; } + + public CBAMQueryOperExecutionResponse queryOperExecution(String execId) throws ClientProtocolException, IOException{ + String httpPath = String.format(CommonConstants.CbamGetOperStatusPath, execId); + RequestMethod method = RequestMethod.GET; + + String responseStr = operateCbamHttpTask(null, httpPath, method); + + logger.info("CbamMgmrImpl -> CBAMQueryOperExecutionResponse, responseStr is " + responseStr); + + CBAMQueryOperExecutionResponse response = gson.fromJson(responseStr, CBAMQueryOperExecutionResponse.class); + + return response; + } } diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/inf/CbamMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/inf/CbamMgmrInf.java index fe0f424c..9c4bc6cc 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/cbam/inf/CbamMgmrInf.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/cbam/inf/CbamMgmrInf.java @@ -14,23 +14,23 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.cbam.inf; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.inf; import java.io.IOException; import org.apache.http.client.ClientProtocolException; - -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMCreateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMHealVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMInstantiateVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMQueryVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMScaleVnfResponse; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfRequest; -import com.nokia.vfcadaptor.cbam.bo.CBAMTerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMCreateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMHealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMInstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryOperExecutionResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMQueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.cbam.bo.CBAMTerminateVnfResponse; public interface CbamMgmrInf { @@ -51,4 +51,6 @@ public interface CbamMgmrInf { public CBAMQueryVnfResponse queryVnf(String vnfInstanceId) throws ClientProtocolException, IOException; public void deleteVnf(String vnfInstanceId) throws ClientProtocolException, IOException; + + public CBAMQueryOperExecutionResponse queryOperExecution(String execId) throws ClientProtocolException, IOException; }
\ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/AdaptorEnv.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/AdaptorEnv.java index 6400d7f3..93454329 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/AdaptorEnv.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/AdaptorEnv.java @@ -14,85 +14,63 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.common.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Component public class AdaptorEnv { - private String nslcmIp; - private String nslcmPort; - - //for retrieving token - private String cbamIp; + @Value("${nslcmApiUriFront}") + private String nslcmApiUriFront; + @Value("${catalogApiUriFront}") + private String catalogApiUriFront; + @Value("${cbamApiUriFront}") + private String cbamApiUriFront; + //for retrieving token from CBAM + @Value("${grantType}") private String grantType; + @Value("${clientId}") private String clientId; + @Value("${clientSecret}") private String clientSecret; - private String catalogIp; - private String catalogPort; - - public String getCbamIp() { - return cbamIp; + public String getNslcmApiUriFront() { + return nslcmApiUriFront; } - - public void setCbamIp(String cbamIp) { - this.cbamIp = cbamIp; + public void setNslcmApiUriFront(String nslcmApiUriFront) { + this.nslcmApiUriFront = nslcmApiUriFront; + } + public String getCatalogApiUriFront() { + return catalogApiUriFront; + } + public void setCatalogApiUriFront(String catalogApiUriFront) { + this.catalogApiUriFront = catalogApiUriFront; + } + public String getCbamApiUriFront() { + return cbamApiUriFront; + } + public void setCbamApiUriFront(String cbamApiUriFront) { + this.cbamApiUriFront = cbamApiUriFront; } - public String getGrantType() { return grantType; } - public void setGrantType(String grantType) { this.grantType = grantType; } - public String getClientId() { return clientId; } - public void setClientId(String clientId) { this.clientId = clientId; } - public String getClientSecret() { return clientSecret; } - public void setClientSecret(String clientSecret) { this.clientSecret = clientSecret; } - - public String getCatalogIp() { - return catalogIp; - } - - public void setCatalogIp(String catalogIp) { - this.catalogIp = catalogIp; - } - - public String getCatalogPort() { - return catalogPort; - } - - public void setCatalogPort(String catalogPort) { - this.catalogPort = catalogPort; - } - - public String getNslcmIp() { - return nslcmIp; - } - - public void setNslcmIp(String nslcmIp) { - this.nslcmIp = nslcmIp; - } - - public String getNslcmPort() { - return nslcmPort; - } - - public void setNslcmPort(String nslcmPort) { - this.nslcmPort = nslcmPort; - } - } diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/KeyValuePair.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/KeyValuePair.java index c883d932..0d5ee831 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/common/bo/KeyValuePair.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/common/bo/KeyValuePair.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.common.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonConstants.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonConstants.java index c4a9d4a8..c145e28c 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonConstants.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonConstants.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.constant; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.constant; public class CommonConstants { public static final String HTTP_ERROR_DESC_500 = "Internal Server Error"; @@ -49,9 +49,12 @@ public class CommonConstants { public static final String CbamHealVnfPath="/vnfs/%s/heal"; public static final String NSLCM_OPERATION_INSTANTIATE = "Instantiate"; + public static final String NSLCM_OPERATION_TERMINATE = "Terminal"; public static final String NSLCM_OPERATION_SCALE_OUT = "Scaleout"; public static final String NSLCM_OPERATION_SCALE_IN = "Scalein"; public static final String NSLCM_OPERATION_SCALE_UP = "Scaleup"; public static final String NSLCM_OPERATION_SCALE_DOWN = "Scaledown"; - public static final String NSLCM_OPERATION_SCALE_TERMINATE = "Terminal"; + + public static final String CBAM_OPERATION_STATUS_START = "start"; + public static final String CBAM_OPERATION_STATUS_FINISH = "finished"; } diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonEnum.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonEnum.java index dcf1b4b3..cbb94b94 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/constant/CommonEnum.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/constant/CommonEnum.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.constant; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.constant; public class CommonEnum { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/ResourceType.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/ResourceType.java new file mode 100644 index 00000000..afb726c3 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/ResourceType.java @@ -0,0 +1,24 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean; + +public enum ResourceType { + VDU, + VL, + CP, + Storage +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmJobExecutionInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmJobExecutionInfo.java index ad95b1ff..9c53c516 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmJobExecutionInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmJobExecutionInfo.java @@ -14,9 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.beans; - -import java.io.Serializable; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean; import javax.persistence.Column; import javax.persistence.Entity; @@ -28,7 +26,7 @@ import javax.persistence.Table; @Entity @Table(name = "vnfm_job_execution_record") -public class VnfmJobExecutionInfo implements Serializable{ +public class VnfmJobExecutionInfo{ private static final long serialVersionUID = -2880159539002942812L; @Id @@ -87,5 +85,19 @@ public class VnfmJobExecutionInfo implements Serializable{ this.status = status; } + @Override + public String toString() + { + return " VnfmJobRecord: [ " + + super.toString() + + ", jobId = " + jobId + + ", vnfInstanceId = " + vnfInstanceId + + ", vnfmExecutionId = " + vnfmExecutionId + + ", vnfmInterfceName = " + vnfmInterfceName + + ", status = " + status + + "]"; + + } + } diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmResourceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmResourceInfo.java index d969428f..b245f2b8 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/beans/VnfmResourceInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/bean/VnfmResourceInfo.java @@ -14,13 +14,17 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.beans; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean; +import javax.persistence.Entity; import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; +import javax.persistence.Table; +@Entity +@Table(name = "vnfm_resource_record") public class VnfmResourceInfo { @Id @GeneratedValue(strategy = GenerationType.AUTO) diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmJobExecutionRepository.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmJobExecutionRepository.java new file mode 100644 index 00000000..a499f452 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmJobExecutionRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.vfc.nfvo.driver.vnfm.svnfm.db.repository; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean.VnfmJobExecutionInfo; +import org.springframework.data.repository.CrudRepository; + +public interface VnfmJobExecutionRepository extends CrudRepository< VnfmJobExecutionInfo, Long> { + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmResourceRepository.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmResourceRepository.java new file mode 100644 index 00000000..52d41927 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/db/repository/VnfmResourceRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.onap.vfc.nfvo.driver.vnfm.svnfm.db.repository; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.db.bean.VnfmResourceInfo; +import org.springframework.data.repository.CrudRepository; + +public interface VnfmResourceRepository extends CrudRepository<VnfmResourceInfo, Integer> { + +} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/exception/VnfmDriverException.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/exception/VnfmDriverException.java index 9ce9f09d..8a465435 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/exception/VnfmDriverException.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/exception/VnfmDriverException.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.exception; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.exception; public class VnfmDriverException extends RuntimeException{ private static final long serialVersionUID = 14325435432545L; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpClientUtils.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpClientUtils.java index f00b5664..e3ed0c82 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpClientUtils.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpClientUtils.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.http.client; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.http.client; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; @@ -36,12 +36,15 @@ import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.ssl.SSLContextBuilder; import org.apache.http.ssl.TrustStrategy; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.springframework.context.annotation.Bean; import org.springframework.web.bind.annotation.RequestMethod; public class HttpClientUtils { - private final static Logger logger = Logger.getLogger(HttpClientUtils.class); + private static final Logger logger = LogManager.getLogger("HttpClientUtils"); + @Bean public static HttpClientBuilder createHttpClientBuilder() { HttpClientBuilder httpClientBuilder = HttpClientBuilder.create(); diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessor.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpRequestProcessor.java index 0e8903a8..b2414a52 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessor.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/http/client/HttpRequestProcessor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.http.client; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.http.client; import java.io.IOException; import java.net.URI; @@ -28,10 +28,9 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.util.EntityUtils; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; import org.springframework.web.bind.annotation.RequestMethod; -import com.nokia.vfcadaptor.constant.CommonConstants; - public class HttpRequestProcessor { private CloseableHttpClient httpClient; private HttpRequestBase httpRequest; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfRequest.java index b6d1f92f..c441cee6 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfRequest.java @@ -14,23 +14,21 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo; import java.util.List; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo.KeyValuePair; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.ResourceDefinition; + import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.common.bo.KeyValuePair; -import com.nokia.vfcadaptor.constant.CommonEnum; -import com.nokia.vfcadaptor.nslcm.bo.entity.ResourceDefinition; public class NslcmGrantVnfRequest { @JsonProperty("vnfInstanceId") private String vnfInstanceId; - @JsonProperty("vnfDescriptorId") - private String vnfDescriptorId; - @JsonProperty("lifecycleOperation") private CommonEnum.LifecycleOperation lifecycleOperation; @@ -54,13 +52,6 @@ public class NslcmGrantVnfRequest { this.vnfInstanceId = vnfInstanceId; } - public String getVnfDescriptorId() { - return vnfDescriptorId; - } - - public void setVnfDescriptorId(String vnfDescriptorId) { - this.vnfDescriptorId = vnfDescriptorId; - } public CommonEnum.LifecycleOperation getLifecycleOperation() { return lifecycleOperation; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfResponse.java index f4169c63..b5f0fec1 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmGrantVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmGrantVnfResponse.java @@ -13,14 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo; import java.util.List; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.ResourceDefinition; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VimAssets; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.VimInfo; + import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.nslcm.bo.entity.ResourceDefinition; -import com.nokia.vfcadaptor.nslcm.bo.entity.VimAssets; -import com.nokia.vfcadaptor.nslcm.bo.entity.VimInfo; public class NslcmGrantVnfResponse { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmNotifyLCMEventsRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmNotifyLCMEventsRequest.java index 9552cd81..bdfdf848 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/NslcmNotifyLCMEventsRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/NslcmNotifyLCMEventsRequest.java @@ -13,13 +13,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.AffectedVirtualLink; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.AffectedVirtualStorage; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity.AffectedVnfc; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; -import com.nokia.vfcadaptor.nslcm.bo.entity.AffectedVirtualLink; -import com.nokia.vfcadaptor.nslcm.bo.entity.AffectedVirtualStorage; -import com.nokia.vfcadaptor.nslcm.bo.entity.AffectedVnfc; public class NslcmNotifyLCMEventsRequest { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/VnfmInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/VnfmInfo.java index 1d0d295e..bf6608df 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/VnfmInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/VnfmInfo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AccessInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AccessInfo.java index 2d550227..ae89c82a 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AccessInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AccessInfo.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualLink.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualLink.java index 28020ed0..fc1ab047 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualLink.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualLink.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class AffectedVirtualLink { @JsonProperty("vlInstanceId") diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualStorage.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualStorage.java index 5080d4e0..6139adb8 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVirtualStorage.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVirtualStorage.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVnfc.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVnfc.java index 5f1fea01..e30f1513 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/AffectedVnfc.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/AffectedVnfc.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class AffectedVnfc { @JsonProperty("vnfcInstanceId") diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/GrantInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/GrantInfo.java index 47b41f97..cb6a255f 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/GrantInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/GrantInfo.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/InterfaceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/InterfaceInfo.java index b0a348ee..213bddd5 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/InterfaceInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/InterfaceInfo.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceDefinition.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceDefinition.java index 9b18b007..4a10ae99 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceDefinition.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceDefinition.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class ResourceDefinition { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceHandle.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceHandle.java index ce7f9ccb..72d3dbc3 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/ResourceHandle.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/ResourceHandle.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class ResourceHandle { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimAssets.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimAssets.java index 65ce3cfd..041e6413 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimAssets.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimAssets.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimComputeResourceFlavour.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimComputeResourceFlavour.java index ae27dd99..38b2e183 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimComputeResourceFlavour.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimComputeResourceFlavour.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimInfo.java index ef734a23..8bb63490 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimInfo.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimSoftwareImage.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimSoftwareImage.java index 5aba7761..a4f24a70 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VimSoftwareImage.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VimSoftwareImage.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VnfPackageInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VnfPackageInfo.java index 1793b148..53f80c1d 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/bo/entity/VnfPackageInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/bo/entity/VnfPackageInfo.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class VnfPackageInfo { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/impl/NslcmMgmrImpl.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/impl/NslcmMgmrImpl.java index e5b8180b..94be8d21 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/impl/NslcmMgmrImpl.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/impl/NslcmMgmrImpl.java @@ -14,31 +14,32 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.impl; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.impl; import java.io.IOException; import org.apache.http.client.ClientProtocolException; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.common.bo.AdaptorEnv; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonConstants; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.http.client.HttpRequestProcessor; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmNotifyLCMEventsRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.VnfmInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.inf.NslcmMgmrInf; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.RequestMethod; import com.google.gson.Gson; -import com.nokia.vfcadaptor.common.bo.AdaptorEnv; -import com.nokia.vfcadaptor.constant.CommonConstants; -import com.nokia.vfcadaptor.http.client.HttpRequestProcessor; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfRequest; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.bo.NslcmNotifyLCMEventsRequest; -import com.nokia.vfcadaptor.nslcm.bo.VnfmInfo; -import com.nokia.vfcadaptor.nslcm.inf.NslcmMgmrInf; @Component public class NslcmMgmrImpl implements NslcmMgmrInf{ - private Logger logger = Logger.getLogger(NslcmMgmrImpl.class); + private static final Logger logger = LogManager.getLogger("NslcmMgmrImpl"); @Autowired private AdaptorEnv adaptorEnv; @@ -83,7 +84,7 @@ public class NslcmMgmrImpl implements NslcmMgmrInf{ } public String operateNslcmHttpTask(Object httpBodyObj, String httpPath, RequestMethod method) throws ClientProtocolException, IOException { - String url="http://" + adaptorEnv.getNslcmIp() + ":" + adaptorEnv.getNslcmPort() + httpPath; + String url=adaptorEnv.getNslcmApiUriFront() + httpPath; HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, method); processor.addHdeader(CommonConstants.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/inf/NslcmMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/inf/NslcmMgmrInf.java index 98e27858..ca7fa449 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/nslcm/inf/NslcmMgmrInf.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/nslcm/inf/NslcmMgmrInf.java @@ -14,16 +14,15 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.nslcm.inf; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.inf; import java.io.IOException; import org.apache.http.client.ClientProtocolException; - -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfRequest; -import com.nokia.vfcadaptor.nslcm.bo.NslcmGrantVnfResponse; -import com.nokia.vfcadaptor.nslcm.bo.NslcmNotifyLCMEventsRequest; -import com.nokia.vfcadaptor.nslcm.bo.VnfmInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmGrantVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.NslcmNotifyLCMEventsRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.nslcm.bo.VnfmInfo; public interface NslcmMgmrInf { public VnfmInfo queryVnfm(String vnfmId) throws ClientProtocolException, IOException; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfRequest.java index 45dc5ed6..bdf55b46 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfRequest.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.Affectedvm; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.Affectedvm; public class HealVnfRequest { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfResponse.java index f2ec9e78..65e9f89a 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/HealVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/HealVnfResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfRequest.java index 267288d3..6f1325d3 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfRequest.java @@ -13,18 +13,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; -import java.util.ArrayList; import java.util.List; -import com.fasterxml.jackson.annotation.JsonBackReference; -import com.fasterxml.jackson.annotation.JsonIdentityInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.AdditionalParam; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ExtVirtualLinkData; + import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.ObjectIdGenerators; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.AdditionalParam; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ExtVirtualLinkData; //@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class,property = "@id") // -- zhouyufei added property id cause problem -- 415 Unsupported Media Type (UTF-8 is not supported) diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfResponse.java index c84cde2c..ea1a1902 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/InstantiateVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/InstantiateVnfResponse.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfRequest.java index aa663c80..5c140357 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; public class OperStatusVnfRequest { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfResponse.java index 2d84b21b..9f96bd38 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/OperStatusVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/OperStatusVnfResponse.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.ResponseDescriptor; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.ResponseDescriptor; public class OperStatusVnfResponse { @JsonProperty("jobId") diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfRequest.java index c693adfb..ce29605c 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfRequest.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfResponse.java index 7e3b462d..27645149 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/QueryVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/QueryVnfResponse.java @@ -1,4 +1,3 @@ - /* * Copyright 2016-2017, Nokia Corporation * @@ -14,13 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.VnfInfo; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.VnfInfo; -public class QueryVnfResponse { - @JsonProperty("vnfInfo") +public class QueryVnfResponse extends VnfInfo { + /*@JsonProperty("vnfInfo") private VnfInfo vnfInfo; @@ -30,7 +28,7 @@ public class QueryVnfResponse { public void setVnfInfo(VnfInfo vnfInfo) { this.vnfInfo = vnfInfo; - } + }*/ } diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfRequest.java index 396d2aaf..536af321 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfRequest.java @@ -14,11 +14,12 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity.AdditionalParam; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; -import com.nokia.vfcadaptor.vnfmdriver.bo.entity.AdditionalParam; public class ScaleVnfRequest { @JsonProperty("vnfInstanceId") diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfResponse.java index 4b05b9b9..5fdf9854 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/ScaleVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/ScaleVnfResponse.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfRequest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfRequest.java index 24963392..45acab42 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfRequest.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfRequest.java @@ -14,10 +14,11 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class TerminateVnfRequest { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfResponse.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfResponse.java index 143fdf58..a015abee 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/TerminateVnfResponse.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/TerminateVnfResponse.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AccessInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AccessInfo.java index 83cbde44..2f10c7e4 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AccessInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AccessInfo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AdditionalParam.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AdditionalParam.java index 3e3c25f8..8d1f44ed 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/AdditionalParam.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/AdditionalParam.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; public class AdditionalParam { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/Affectedvm.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/Affectedvm.java index 898404d9..b4841305 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/Affectedvm.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/Affectedvm.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ExtVirtualLinkData.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ExtVirtualLinkData.java index 7c52c5b1..3cbc9020 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ExtVirtualLinkData.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ExtVirtualLinkData.java @@ -13,10 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonTypeInfo; public class ExtVirtualLinkData { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/InterfaceInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/InterfaceInfo.java index b9464127..f046aa66 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/InterfaceInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/InterfaceInfo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseDescriptor.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseDescriptor.java index 197d466f..e1b8f967 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseDescriptor.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseDescriptor.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; import java.util.List; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseHistoryList.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseHistoryList.java index 5863985d..b9bbd6c4 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/ResponseHistoryList.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/ResponseHistoryList.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VimInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VimInfo.java index ea9a687f..bd4e9d7a 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VimInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VimInfo.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; import com.fasterxml.jackson.annotation.JsonProperty; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VnfInfo.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VnfInfo.java index 543f805d..01191f67 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/bo/entity/VnfInfo.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/bo/entity/VnfInfo.java @@ -13,10 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.bo.entity; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.entity; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.constant.CommonEnum; import com.fasterxml.jackson.annotation.JsonProperty; -import com.nokia.vfcadaptor.constant.CommonEnum; public class VnfInfo { @JsonProperty("vnfInstanceId") diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverController.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/controller/VnfmDriverController.java index ba2641b5..a3aee38e 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverController.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/controller/VnfmDriverController.java @@ -14,14 +14,27 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.controller; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.controller; import java.io.IOException; import javax.servlet.http.HttpServletResponse; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.exception.VnfmDriverException; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.OperStatusVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.QueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.inf.VnfmDriverMgmrInf; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; @@ -32,23 +45,11 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.google.gson.Gson; -import com.nokia.vfcadaptor.exception.VnfmDriverException; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.OperStatusVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.QueryVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.inf.VnfmDriverMgmrInf; @Controller @RequestMapping(value = "/nokiavnfm/v1") public class VnfmDriverController { - private Logger logger = Logger.getLogger(VnfmDriverController.class); + private static final Logger logger = LogManager.getLogger("VnfmDriverController"); @Autowired private VnfmDriverMgmrInf vnfmDriverMgmr; diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/inf/VnfmDriverMgmrInf.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/inf/VnfmDriverMgmrInf.java index 833712a0..01e7155f 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/com/nokia/vfcadaptor/vnfmdriver/inf/VnfmDriverMgmrInf.java +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vnfmdriver/inf/VnfmDriverMgmrInf.java @@ -14,19 +14,19 @@ * limitations under the License. */ -package com.nokia.vfcadaptor.vnfmdriver.inf; - -import com.nokia.vfcadaptor.exception.VnfmDriverException; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.HealVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.OperStatusVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.QueryVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.ScaleVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.inf; + +import org.onap.vfc.nfvo.driver.vnfm.svnfm.exception.VnfmDriverException; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.HealVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.InstantiateVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.OperStatusVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.QueryVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.ScaleVnfResponse; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfRequest; +import org.onap.vfc.nfvo.driver.vnfm.svnfm.vnfmdriver.bo.TerminateVnfResponse; public interface VnfmDriverMgmrInf { diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/ProxoolConf.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/ProxoolConf.xml deleted file mode 100644 index 1c58dcdc..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/ProxoolConf.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright 2016-2017, Nokia Corporation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> -<something-else-entirely> - <proxool> - - <alias>proxoolPool</alias> - <driver-url>jdbc:mysql://135.251.208.57:3306/aware_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=round -<!-- <driver-url>jdbc:mysql://10.134.120.95:3306/aware_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=round --> - - </driver-url> - <driver-class>com.mysql.jdbc.Driver</driver-class> - <driver-properties> - <property name="user" value="root" /> - <property name="password" value="irlaxjwrMLu03MNgih6czpllxKgnfk" /> - <property name="autoReconnect" value="true" /> - </driver-properties> - - <house-keeping-sleep-time>2700000</house-keeping-sleep-time> - <simultaneous-build-throttle>100</simultaneous-build-throttle> - <!-- - <maximum-new-connections>5</maximum-new-connections> - --> - <prototype-count>5</prototype-count> - <maximum-connection-count>50</maximum-connection-count> - - <maximum-active-time>2700000</maximum-active-time> - <maximum-connection-lifetime>7200000</maximum-connection-lifetime> - - <minimum-connection-count>2</minimum-connection-count> - <test-before-use>true</test-before-use> - <!-- - <test-after-use>true</test-after-use> - --> - <trace>true</trace> - <house-keeping-test-sql>select CURRENT_DATE from dual - </house-keeping-test-sql> - - </proxool> -</something-else-entirely>
\ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties new file mode 100644 index 00000000..0ae1288c --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/application.properties @@ -0,0 +1,45 @@ +############################################################################### +# Copyright 2016, Nokia Corporation +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +############################################################################### + +server.error.whitelabel.enabled=false +## for MySql Database begin ## +spring.datasource.url=jdbc:mysql://135.251.208.57:5029/aware_db?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=round +spring.datasource.username=root +spring.datasource.password=123456 + +spring.datasource.driver-class-name=com.mysql.jdbc.Driver +spring.datasource.tomcat.max-wait=30000 +spring.datasource.tomcat.max-active=50 +spring.datasource.tomcat.test-on-borrow=true +## for MySql Database end ## + +## for logging begin ## +com.fasterxml.jackson.core=jackson-databind +logging.file=D:/VfcadaptorApplication.log +logging.level.org.springframework.web=DEBUG +logging.level.org.hibernate=ERROR +## for logging end ## + +## common configuration for connections begin ## +nslcmApiHttpFront=http://1.2.3.4:88 +catalogApiUriFront=http://1.2.6.7:88 +cbamApiUriFront=https://1.2.5.4:88 + +## for retrieving token from CBAM ## +grantType=grantType1 +clientId=clientId1 +clientSecret=clientSecret1 +## common configuration for connections end ##
\ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/config.properties b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/config.properties deleted file mode 100644 index ad3ba369..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/config.properties +++ /dev/null @@ -1,27 +0,0 @@ -############################################################################### -# Copyright 2016, Nokia Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################### - -nslcmIp=1.2.3.4 -nslcmPort=88 - -catalogIp=1.2.3.4 -catalogPort=88 - -cbamIp=2.3.4.5 - -grant_type=lient_credentials -client_id=frontend -client_secret=secret
\ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_job_execution_map.hbm.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_job_execution_map.hbm.xml deleted file mode 100644 index 0977b94c..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_job_execution_map.hbm.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0"?> -<!-- - Copyright 2016-2017, Nokia Corporation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> -<!DOCTYPE hibernate-mapping PUBLIC - "-//Hibernate/Hibernate Mapping DTD 3.0//EN" - "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> -<hibernate-mapping> - <class name="com.nokia.vfcadaptor.beans.VnfmJobExecutioInfo" table="vnfm_job_execution_record" dynamic-update="true" lazy="true"> - <id name="jobId" column="jobId" /> - - <property name="vnfInstanceId" column="vnfInstanceId"/> - <property name="vnfmExecutionId" column="vnfmExecutionId"/> - - <property name="vnfmInterfceName" column="vnfmInterfceName"/> - <property name="status" column="status"/> - - </class> -</hibernate-mapping>
\ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_resource_record.hbm.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_resource_record.hbm.xml deleted file mode 100644 index c1e279e9..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/hdm/vnfm_resource_record.hbm.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0"?> -<!-- - Copyright 2016-2017, Nokia Corporation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> -<!DOCTYPE hibernate-mapping PUBLIC - "-//Hibernate/Hibernate Mapping DTD 3.0//EN" - "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> -<hibernate-mapping> - <class name="com.nokia.vfcadaptor.beans.VnfmResourceInfo" table="vnfm_resource_record" dynamic-update="true" lazy="true"> - <id name="id" column="id" /> - - <property name="type" column="type"/> - <property name="resourceDefinitionId" column="resourceDefinitionId"/> - <property name="vdu" column="vdu"/> - <property name="status" column="status"/> - - </class> -</hibernate-mapping>
\ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/log4j.properties b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/log4j.properties deleted file mode 100644 index 41230be3..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/resources/log4j.properties +++ /dev/null @@ -1,33 +0,0 @@ -############################################################################### -# Copyright 2016, Nokia Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -############################################################################### -log4j.rootLogger=info, stdout, R -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout - -# Pattern to output the caller's file name and line number. -log4j.appender.stdout.layout.ConversionPattern=%5p %d [%t] (%F:%L) - %m%n - -log4j.appender.R=org.apache.log4j.RollingFileAppender -log4j.appender.R.File=D:/tmp/vnfmdriver.log -log4j.appender.R.MaxFileSize= 10MB - -# Keep one backup file -log4j.appender.R.MaxBackupIndex=5 - -log4j.appender.R.layout=org.apache.log4j.PatternLayout -log4j.appender.R.layout.ConversionPattern=%5p %d [%t] (%F:%L) - %m%n - - diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/applicationContext-hibernate.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/applicationContext-hibernate.xml deleted file mode 100644 index 08a34c58..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/applicationContext-hibernate.xml +++ /dev/null @@ -1,43 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" -"http://www.springframework.org/dtd/spring-beans.dtd"> -<beans> - - <bean id="sessionFactory" - class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> - <property name="hibernateProperties"> - <props> - <prop key="hibernate.dialect"> - org.hibernate.dialect.MySQLDialect - </prop> - <prop key="hibernate.show_sql">false</prop> - <prop key="hibernate.jdbc.batch_size">100</prop> - <!--<prop key="hibernate.connection.autocommit">false</prop>--> - <prop key="hibernate.connection.autocommit">true</prop> - <prop key="hibernate.proxool.pool_alias">proxoolPool</prop> - <prop key="hibernate.proxool.xml">ProxoolConf.xml</prop> - <prop key="hibernate.connection.provider_class">org.hibernate.connection.ProxoolConnectionProvider</prop> - <prop key="hibernate.cache.provider_class"> - org.hibernate.cache.HashtableCacheProvider - </prop> - <prop key="hibernate.connection.release_mode">after_transaction</prop> - </props> - </property> - - <!-- mappingResources属性用来列出全部映射文件 --> - <property name="mappingResources"> - <list> - <!-- 配置所有PO映射文件 --> - <value>hbm/vnfm_job_execution_map.hbm.xml</value> - </list> - </property> - </bean> - <!-- 事务管理器 --> - <bean id="transactionManager" - class="org.springframework.orm.hibernate4.HibernateTransactionManager"> - <property name="sessionFactory"> - <ref local="sessionFactory" /> - </property> - </bean> - -</beans>
\ No newline at end of file diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/mvc-servlet.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/mvc-servlet.xml deleted file mode 100644 index f26ce071..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/mvc-servlet.xml +++ /dev/null @@ -1,100 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - Copyright 2016-2017, Nokia Corporation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> -<beans xmlns="http://www.springframework.org/schema/beans" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:context="http://www.springframework.org/schema/context" - xmlns:mvc="http://www.springframework.org/schema/mvc" - xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-4.3.xsd - http://www.springframework.org/schema/mvc - http://www.springframework.org/schema/mvc/spring-mvc-4.3.xsd - http://www.springframework.org/schema/context - http://www.springframework.org/schema/context/spring-context-4.3.xsd" - - default-lazy-init="true"> - - <bean id="propertyConfigurer" - class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> - <property name="location" value="classpath:config.properties"/> - </bean> - - <bean id="adaptorEnv" class="com.nokia.vfcadaptor.common.bo.AdaptorEnv" scope="singleton" > - <property name = "nslcmIp" value="${nslcmIp}" /> - <property name = "nslcmPort" value="${nslcmPort}" /> - <property name = "catalogIp" value="${catalogIp}" /> - <property name = "catalogPort" value="${catalogPort}" /> - <property name = "cbamIp" value="${cbamIp}" /> - <property name = "grantType" value="${grant_type}" /> - <property name = "clientId" value="${client_id}" /> - <property name = "clientSecret" value="${client_secret}" /> - </bean> - - <bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/> - - <bean name = "httpClientBuilder" class="com.nokia.vfcadaptor.http.client.HttpClientUtils" factory-method="createHttpClientBuilder"/> - - <context:component-scan base-package="com.nokia.vfcadaptor" /> - - <!-- 将StringHttpMessageCOnverter的默认编码设为UTF-8 --> - <mvc:annotation-driven> - <mvc:message-converters register-defaults="true"> - <bean class="org.springframework.http.converter.StringHttpMessageConverter"> - <constructor-arg value="UTF-8" /> - </bean> - </mvc:message-converters> - </mvc:annotation-driven> - - <!-- public part end --> - - <bean id="sessionFactory" - class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> - <property name="hibernateProperties"> - <props> - <prop key="hibernate.dialect"> - org.hibernate.dialect.MySQLDialect - </prop> - <prop key="hibernate.show_sql">false</prop> - <prop key="hibernate.jdbc.batch_size">100</prop> - <!--<prop key="hibernate.connection.autocommit">false</prop>--> - <prop key="hibernate.connection.autocommit">true</prop> - <prop key="hibernate.proxool.pool_alias">proxoolPool</prop> - <prop key="hibernate.proxool.xml">ProxoolConf.xml</prop> - <prop key="hibernate.connection.provider_class">org.hibernate.connection.ProxoolConnectionProvider</prop> - <prop key="hibernate.cache.provider_class"> - org.hibernate.cache.HashtableCacheProvider - </prop> - <prop key="hibernate.connection.release_mode">after_transaction</prop> - </props> - </property> - - <!-- mappingResources属性用来列出全部映射文件 --> - <property name="mappingResources"> - <list> - <!-- 配置所有PO映射文件 --> - <value>hbm/vnfm_job_execution_map.hbm.xml</value> - </list> - </property> - </bean> - <!-- 事务管理器 --> - <bean id="transactionManager" - class="org.springframework.orm.hibernate3.HibernateTransactionManager"> - <property name="sessionFactory"> - <ref local="sessionFactory" /> - </property> - </bean> - -</beans> diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/web.xml b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/web.xml index 124ec37e..e6aa9856 100644 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/web.xml +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/main/webapp/WEB-INF/web.xml @@ -1,68 +1,16 @@ <?xml version="1.0" encoding="UTF-8"?> - <!-- - Copyright 2016-2017, Nokia Corporation - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> -<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns="http://java.sun.com/xml/ns/javaee" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" - version="3.0"> - <display-name>vfcadaptor</display-name> - - <filter> - <filter-name>CharacterEncoding</filter-name> - <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> - <init-param> - <param-name>encoding</param-name> - <param-value>UTF-8</param-value> - </init-param> - <init-param> - <param-name>forceEncoding</param-name> - <param-value>true</param-value> - </init-param> - </filter> - - <filter-mapping> - <filter-name>CharacterEncoding</filter-name> - <url-pattern>/*</url-pattern> - </filter-mapping> - <!-- 设置servlet编码结束 --> -<!-- - <context-param> - <param-name>contextConfigLocation</param-name> - <param-value> - classpath:WEB-INF/applicationContext-hibernate.xml - </param-value> - </context-param> ---> - <servlet> - <servlet-name>springservlet</servlet-name> - <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> - <init-param> - <param-name>contextConfigLocation</param-name> - <param-value>/WEB-INF/mvc-servlet.xml</param-value> - </init-param> - <load-on-startup>1</load-on-startup> - </servlet> - <servlet-mapping> - <servlet-name>springservlet</servlet-name> - <url-pattern>/</url-pattern> - </servlet-mapping> +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> + <display-name>vfcadaptorsrc</display-name> - <session-config> - <session-timeout>60</session-timeout> - </session-config> + <!-- + <context-param> + <param-name>contextConfigLocation</param-name> + <param-value>/WEB-INF/spring/application-context.xml</param-value> + </context-param> + <listener> + <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> + </listener> +--> <welcome-file-list> <welcome-file>index.html</welcome-file> diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessorTest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessorTest.java deleted file mode 100644 index 61367505..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/http/client/HttpRequestProcessorTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.nokia.vfcadaptor.http.client; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.security.KeyManagementException; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; - -import org.apache.http.client.ClientProtocolException; -import org.apache.http.impl.client.HttpClientBuilder; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.web.WebAppConfiguration; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.context.WebApplicationContext; - -import com.google.gson.Gson; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(locations={"file:src/main/webapp/WEB-INF/mvc-servlet.xml"}) -@WebAppConfiguration -public class HttpRequestProcessorTest { - private String url; - private String basicUrl="http://localhost:8080/NvfmDriver/api/nokiavnfm/v1"; - private String funcPath; - - private Gson gson = new Gson(); - - @Autowired - private WebApplicationContext wac; - private MockMvc mockMvc; - @Before - public void setup() { - this.mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).build(); //MockMvc - } - - @Test - public void testP() - { - String message = "{\"vnfInstanceName\":\"vnfInstanceName_001\",\"vnfPackageId\":\"1\"}"; - InstantiateVnfRequest request = gson.fromJson(message, InstantiateVnfRequest.class); - - System.out.println("vnfInstanceName = " + request.getVnfInstanceName()); - - String result; - try { - result = mockMvc.perform(MockMvcRequestBuilders.post("/nokiavnfm/v1/vnfmId_001/vnfs") - .contentType(MediaType.APPLICATION_JSON).content(message) - .accept(MediaType.APPLICATION_JSON)) //ִ - .andReturn().getResponse().getContentAsString(); - System.out.println("result = " + result); - } catch (UnsupportedEncodingException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - - } -// -// @Test -// public void testProcess() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException, ClientProtocolException, IOException -// { -// funcPath = "/vnfmId_001/vnfs"; -// url = basicUrl + funcPath; -// String message = "{\"vnfInstanceName\":\"vnfInstanceName_001\",\"vnfPackageId\":\"1\"}"; -// -// HttpClientBuilder httpClientBuilder = HttpClientUtils.createHttpClientBuilder(); -// HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.POST); -// processor.addPostEntity(message); -// String result = processor.process(url); -// -// System.out.println(result); -// } -// -// @Test -// public void testHttps() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException, ClientProtocolException, IOException -// { -// url = "https://www.baidu.com"; -// HttpClientBuilder httpClientBuilder = HttpClientUtils.createHttpClientBuilder(); -// HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); -// -// String result = processor.process(url); -// -// System.out.println("The result is :" + result); -// } -// @Test -// public void testHome() throws KeyManagementException, NoSuchAlgorithmException, KeyStoreException, ClientProtocolException, IOException -// { -// url = "http://172.24.208.168/"; -// HttpClientBuilder httpClientBuilder = HttpClientUtils.createHttpClientBuilder(); -// HttpRequestProcessor processor = new HttpRequestProcessor(httpClientBuilder, RequestMethod.GET); -// -// String result = processor.process(url); -// -// System.out.println("The result is :" + result); -// } -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/BaseControllerTestCase.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/BaseControllerTestCase.java deleted file mode 100644 index 025949c0..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/BaseControllerTestCase.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.nokia.vfcadaptor.vnfmdriver.controller; - -import java.io.IOException; -import java.io.UnsupportedEncodingException; - -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; - -import org.apache.http.HttpEntity; -import org.apache.http.HttpResponse; -import org.apache.http.client.ClientProtocolException; -import org.apache.http.client.HttpClient; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.client.methods.HttpPost; -import org.apache.http.conn.scheme.Scheme; -import org.apache.http.conn.scheme.SchemeRegistry; -import org.apache.http.conn.ssl.SSLSocketFactory; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.DefaultHttpClient; -import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; -import org.apache.http.util.EntityUtils; -import org.junit.BeforeClass; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.http.MediaType; - -public class BaseControllerTestCase { - - private static final String CONTENT_TYPE = "Content-Type"; - private static final String AUTH = "auth"; - - private static final String UTF_8 = "utf-8"; - - protected static String serviceUrl = "http://127.0.0.1:8080/AppSenseAnalysisSystem"; - - protected static String baseUrl; - - protected static String pictureServerRootUrl = "http://localhost"; - - protected Logger log = LoggerFactory.getLogger(this.getClass()); - protected boolean isHttpsProtocol = false; - - @BeforeClass - public static void beforeClass() throws Exception { - baseUrl = serviceUrl; - } - - public static org.apache.http.client.HttpClient wrapClient(org.apache.http.client.HttpClient base) { - try { - SSLContext ctx = SSLContext.getInstance("TLS"); - X509TrustManager tm = new X509TrustManager() { - public java.security.cert.X509Certificate[] getAcceptedIssuers() { - return null; - } - public void checkClientTrusted( - java.security.cert.X509Certificate[] chain, - String authType) - throws java.security.cert.CertificateException { - // TODO Auto-generated method stub - - } - public void checkServerTrusted( - java.security.cert.X509Certificate[] chain, - String authType) - throws java.security.cert.CertificateException { - // TODO Auto-generated method stub - - } - }; - ctx.init(null, new TrustManager[] { tm }, null); - SSLSocketFactory ssf = new SSLSocketFactory(ctx, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); - SchemeRegistry registry = new SchemeRegistry(); - registry.register(new Scheme("https", 8089, ssf)); - ThreadSafeClientConnManager mgr = new ThreadSafeClientConnManager(registry); - return new DefaultHttpClient(mgr, base.getParams()); - } catch (Exception ex) { - ex.printStackTrace(); - return null; - } - } - - protected String sendPostMsg(String message, String url) throws UnsupportedEncodingException, - IOException, ClientProtocolException { - - HttpClient httpclient = new DefaultHttpClient(); - if(isHttpsProtocol) - { - httpclient = wrapClient(httpclient); - } - HttpPost httppost = new HttpPost(url); - StringEntity myEntity = new StringEntity(message, UTF_8); - String auth = ""; - httppost.addHeader(AUTH, auth); - httppost.addHeader(CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); -// httppost.addHeader(CONTENT_TYPE, MediaType.TEXT_XML_VALUE); - httppost.setEntity(myEntity); - HttpResponse response = httpclient.execute(httppost); - HttpEntity resEntity = response.getEntity(); - String responseContent = ""; - if (resEntity != null) { - responseContent = EntityUtils.toString(resEntity, "UTF-8"); - EntityUtils.consume(resEntity); - } - httpclient.getConnectionManager().shutdown(); - return responseContent; - } - - protected String sendGetMsg(String message, String url) throws UnsupportedEncodingException, - IOException, ClientProtocolException { - - HttpClient httpclient = new DefaultHttpClient(); - if(isHttpsProtocol) - { - httpclient = wrapClient(httpclient); - } - HttpGet httpGet = new HttpGet(url); - StringEntity myEntity = new StringEntity(message, UTF_8); - String auth = ""; - httpGet.addHeader(AUTH, auth); - httpGet.addHeader(CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); - //httppost.addHeader(CONTENT_TYPE, MediaType.TEXT_XML_VALUE); - //((HttpResponse) httpGet).setEntity(myEntity); - HttpResponse response = httpclient.execute(httpGet); - HttpEntity resEntity = response.getEntity(); - String responseContent = ""; - if (resEntity != null) { - responseContent = EntityUtils.toString(resEntity, "UTF-8"); - responseContent.replaceAll("\r", "");// - EntityUtils.consume(resEntity); - } - httpclient.getConnectionManager().shutdown(); - return responseContent; - } -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverAdaptorControllerTest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverAdaptorControllerTest.java deleted file mode 100644 index 69a5c853..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverAdaptorControllerTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.nokia.vfcadaptor.vnfmdriver.controller; - -import java.io.IOException; -import java.net.URISyntaxException; - -import org.apache.http.client.ClientProtocolException; -import org.junit.Before; -import org.junit.Test; - -public class VnfmDriverAdaptorControllerTest extends BaseControllerTestCase{ - - private String url; - private String basicUrl="http://localhost:8080/NvfmDriver/api/nokiavnfm/v1"; - private String funcPath; - - @Before - public void setUp() - { - isHttpsProtocol = false; - } - - @Test - public void testInstantiateVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/vnfs"; - url = basicUrl + funcPath; - String message = "{\"vnfInstanceName\":\"vnfInstanceName_001\",\"vnfPackageId\":\"1\"}"; - - String responseContent = sendPostMsg(message, url); - System.out.println("-------------------------------"); - System.out.println( " Initiate Response is " + responseContent); - } - - @Test - public void testTerminateVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/vnfs/vnfInstanceId_001/terminate"; - url = basicUrl + funcPath; - String message = "{\"terminationType\":\"graceful\"}"; - String responseContent = sendPostMsg(message, url); - System.out.println("-------------------------------"); - System.out.println("Terminate Response is " + responseContent); - } - - @Test - public void testQueryVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/vnfs/vnfInstanceId_001"; - url = basicUrl + funcPath; - String message = "{\"vnfInfo\":\"{\"nfInstanceId\":\"1\",\"vnfInstanceName\":\"vFW\",\"vnfInstanceDescription\":\"vFW in Nanjing TIC Edge\",\"vnfdId\":\"1\"}\"}"; - String responseContent = sendGetMsg(message, url); - - System.out.println("-------------------------------"); - System.out.println("QueryResponse is " + responseContent); - } - - @Test - public void testOperStatusVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/jobs/jobId_001&responseId=responseId_001"; - url = basicUrl + funcPath; - String message = "{\"jobId\":\"12345\",\"responseDescriptor\":\"{\"progress\":\"40\",\"status\":\"proccessing\"}\"}"; - String responseContent = sendGetMsg(message, url); - System.out.println("-------------------------------"); - System.out.println(" operStatus Response is " + responseContent); - } - - @Test - public void testScaleVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/vnfs/vnfInstanceId_001/scale"; - url = basicUrl + funcPath; - String message = "{\"type\":\"12345\",\"aspectId\":\"145\"}"; - String responseContent = sendPostMsg(message, url); - System.out.println("-------------------------------"); - System.out.println(" Scale Response is " + responseContent); - } - - @Test - public void testHealVnf() throws URISyntaxException, ClientProtocolException, IOException { - funcPath = "/vnfmId_001/vnfs/vnfInstanceId_001/heal"; - url = basicUrl + funcPath; - String message = "{\"action\":\"12345\"}"; - String responseContent = sendPostMsg(message, url); - System.out.println("-------------------------------"); - System.out.println(" Heal Response is " + responseContent); - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverControllerTest.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverControllerTest.java deleted file mode 100644 index cd6d93eb..00000000 --- a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/com/nokia/vfcadaptor/vnfmdriver/controller/VnfmDriverControllerTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 2016-2017, Nokia Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.nokia.vfcadaptor.vnfmdriver.controller; - - -import static org.mockito.Mockito.when; -import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; -import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print; -import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; - -import org.apache.http.HttpStatus; -import org.json.JSONObject; -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.mockito.MockitoAnnotations; -import org.springframework.http.MediaType; -import org.springframework.test.web.servlet.MockMvc; -import org.springframework.test.web.servlet.setup.MockMvcBuilders; - -import com.nokia.vfcadaptor.exception.VnfmDriverException; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.InstantiateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfRequest; -import com.nokia.vfcadaptor.vnfmdriver.bo.TerminateVnfResponse; -import com.nokia.vfcadaptor.vnfmdriver.inf.VnfmDriverMgmrInf; - -//@RunWith(SpringJUnit4ClassRunner.class) -//@ContextConfiguration(locations={"file:src/main/webapp/WEB-INF/mvc-servlet.xml"}) -//@WebAppConfiguration(value = "src/main/webapp") -public class VnfmDriverControllerTest { - - @Mock - private VnfmDriverMgmrInf vnfmDriverMgmr; - - @InjectMocks - private VnfmDriverController controller; - - private MockMvc mockMvc; - - @Before - public void setUp() { - MockitoAnnotations.initMocks(this); - mockMvc = MockMvcBuilders.standaloneSetup(controller).build(); - } - - @Test - public void testInstantiateVnf() throws Exception - { - InstantiateVnfResponse mockResponse = new InstantiateVnfResponse(); - mockResponse.setJobId("job_001"); - mockResponse.setVnfInstanceId("vnfInstanceId_001"); - String jsonString = "{\"vnfInstanceName\":\"vnfInstanceName_001\",\"vnfPackageId\":\"1\"}"; - when(vnfmDriverMgmr.instantiateVnf(Mockito.any(InstantiateVnfRequest.class), Mockito.anyString())).thenReturn(mockResponse); - - String responseString = mockMvc.perform( - post("/nokiavnfm/v1/vnfmId_001/vnfs"). - characterEncoding("UTF-8"). - accept(MediaType.APPLICATION_JSON). - contentType(MediaType.APPLICATION_JSON). - content(jsonString)) - .andDo(print()) - .andExpect(status().isCreated()) - .andReturn().getResponse().getContentAsString(); - - JSONObject jsonObj = new JSONObject(responseString); - Assert.assertEquals("jobId is ", mockResponse.getJobId(), jsonObj.get("jobId")); - Assert.assertEquals("vnfInstanceId is ", mockResponse.getVnfInstanceId(), jsonObj.get("vnfInstanceId")); - } - - @Test - public void testTerminateVnfSuccess() throws Exception - { - TerminateVnfResponse mockResponse = new TerminateVnfResponse(); - mockResponse.setJobId("job_002"); - String jsonString = "{\"vnfInstanceId\":\"vnfInstanceId_001\"}"; - when(vnfmDriverMgmr.terminateVnf(Mockito.any(TerminateVnfRequest.class), Mockito.anyString(), Mockito.anyString())).thenReturn(mockResponse); - - String responseString = mockMvc.perform( - post("/nokiavnfm/v1/vnfmId_001/vnfs/vnfInstanceId_001/terminate"). - characterEncoding("UTF-8"). - accept(MediaType.APPLICATION_JSON). - contentType(MediaType.APPLICATION_JSON). - content(jsonString)) - .andDo(print()) - .andExpect(status().isCreated()) - .andReturn().getResponse().getContentAsString(); - - JSONObject jsonObj = new JSONObject(responseString); - Assert.assertEquals("jobId is ", mockResponse.getJobId(), jsonObj.get("jobId")); - } - @Test - public void testTerminateVnfException() throws Exception - { - TerminateVnfResponse mockResponse = new TerminateVnfResponse(); - mockResponse.setJobId("job_002"); - String jsonString = "{\"vnfInstanceId\":\"vnfInstanceId_001\"}"; - VnfmDriverException exception = new VnfmDriverException(HttpStatus.SC_BAD_REQUEST, "vnfInstanceId is wrong"); - when(vnfmDriverMgmr.terminateVnf(Mockito.any(TerminateVnfRequest.class), Mockito.anyString(), Mockito.anyString())).thenThrow(exception); - - String erroMsg = mockMvc.perform( - post("/nokiavnfm/v1/vnfmId_001/vnfs/vnfInstanceId_001/terminate"). - characterEncoding("UTF-8"). - accept(MediaType.APPLICATION_JSON). - contentType(MediaType.APPLICATION_JSON). - content(jsonString)) - .andDo(print()) - .andExpect(status().isBadRequest()) - .andReturn().getResponse().getErrorMessage() - ; - Assert.assertEquals("Error Message is ", exception.getMessage(), erroMsg); - } - -} diff --git a/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfcadaptor/VfcadaptorApplicationTests.java b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfcadaptor/VfcadaptorApplicationTests.java new file mode 100644 index 00000000..288770f5 --- /dev/null +++ b/nokia/vnfmdriver/vfcadaptorservice/vfcadaptor/src/test/java/org/onap/vfc/nfvo/driver/vnfm/svnfm/vfcadaptor/VfcadaptorApplicationTests.java @@ -0,0 +1,32 @@ +/* + * Copyright 2016-2017, Nokia Corporation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.onap.vfc.nfvo.driver.vnfm.svnfm.vfcadaptor; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class VfcadaptorApplicationTests { + + @Test + public void contextLoads() { + } + +} |