From 9221702b86540d7fb44aa6185fef6f15602d7838 Mon Sep 17 00:00:00 2001 From: "Timoney, Dan (dt5972)" Date: Wed, 22 Aug 2018 10:46:23 -0400 Subject: Restore "Add VlantagApi Functional Component"" This reverts previous revert for VlantagApi functional component, with correction to pom.xml which had prevented jUnit tests from being counted. Change-Id: I8cff5d04949fe8e110565fb7f68f939caba2eff8 Signed-off-by: Timoney, Dan (dt5972) Issue-ID: CCSDK-475 --- ms/vlantag-api/.checkstyle | 3 + ms/vlantag-api/.gitignore | 26 + ms/vlantag-api/.mvn/wrapper/maven-wrapper.jar | Bin 0 -> 47610 bytes .../.mvn/wrapper/maven-wrapper.properties | 1 + ms/vlantag-api/README.md | 33 + ms/vlantag-api/mvnw | 225 + ms/vlantag-api/mvnw.cmd | 143 + ms/vlantag-api/pom.xml | 228 + ms/vlantag-api/src/main/docker/Dockerfile | 5 + ms/vlantag-api/src/main/docker/startService.sh | 4 + .../ccsdk/apps/ms/vlantagapi/core/Application.java | 34 + .../vlantagapi/core/ApplicationSecurityConfig.java | 97 + .../ms/vlantagapi/core/JerseyConfiguration.java | 35 + .../core/ResourceAssignmentInitializer.java | 192 + .../core/exception/VlantagApiException.java | 47 + .../core/extinf/pm/model/AllowedRanges.java | 57 + .../vlantagapi/core/extinf/pm/model/Elements.java | 96 + .../core/extinf/pm/model/PolicyConfig.java | 172 + .../core/extinf/pm/model/PolicyContent.java | 59 + .../core/extinf/pm/model/PolicyData.java | 20 + .../core/extinf/pm/model/PolicyEngineResponse.java | 141 + .../core/extinf/pm/model/RequestObject.java | 41 + .../core/extinf/pm/model/ResourceModel.java | 145 + .../core/model/AssignVlanTagRequest.java | 94 + .../core/model/AssignVlanTagRequestInput.java | 186 + .../core/model/AssignVlanTagResponse.java | 135 + .../core/model/AssignVlanTagResponseOutput.java | 153 + .../ms/vlantagapi/core/model/PingResponse.java | 39 + .../core/model/UnassignVlanTagRequest.java | 92 + .../core/model/UnassignVlanTagRequestInput.java | 130 + .../core/model/UnassignVlanTagResponse.java | 131 + .../core/model/UnassignVlanTagResponseOutput.java | 131 + .../apps/ms/vlantagapi/core/model/VlanTag.java | 149 + .../vlantagapi/core/service/VlantagApiService.java | 81 + .../core/service/VlantagApiServiceImpl.java | 561 + .../extinf/pm/PolicyDataDeserializer.java | 111 + .../vlantagapi/extinf/pm/PolicyManagerClient.java | 189 + .../resources/swagger-ui/dist/css/print.css | 1361 ++ .../resources/swagger-ui/dist/css/reset.css | 125 + .../resources/swagger-ui/dist/css/screen.css | 1488 ++ .../resources/swagger-ui/dist/css/style.css | 250 + .../resources/swagger-ui/dist/css/typography.css | 14 + .../swagger-ui/dist/fonts/DroidSans-Bold.ttf | Bin 0 -> 42480 bytes .../resources/swagger-ui/dist/fonts/DroidSans.ttf | Bin 0 -> 41028 bytes .../resources/swagger-ui/dist/images/collapse.gif | Bin 0 -> 69 bytes .../resources/swagger-ui/dist/images/expand.gif | Bin 0 -> 73 bytes .../swagger-ui/dist/images/explorer_icons.png | Bin 0 -> 5763 bytes .../swagger-ui/dist/images/favicon-16x16.png | Bin 0 -> 645 bytes .../swagger-ui/dist/images/favicon-32x32.png | Bin 0 -> 1654 bytes .../resources/swagger-ui/dist/images/favicon.ico | Bin 0 -> 5430 bytes .../swagger-ui/dist/images/logo_small.png | Bin 0 -> 770 bytes .../swagger-ui/dist/images/pet_store_api.png | Bin 0 -> 824 bytes .../resources/swagger-ui/dist/images/throbber.gif | Bin 0 -> 9257 bytes .../swagger-ui/dist/images/wordnik_api.png | Bin 0 -> 980 bytes .../META-INF/resources/swagger-ui/dist/index.html | 107 + .../META-INF/resources/swagger-ui/dist/lang/en.js | 56 + .../META-INF/resources/swagger-ui/dist/lang/es.js | 53 + .../META-INF/resources/swagger-ui/dist/lang/fr.js | 54 + .../META-INF/resources/swagger-ui/dist/lang/geo.js | 56 + .../META-INF/resources/swagger-ui/dist/lang/it.js | 52 + .../META-INF/resources/swagger-ui/dist/lang/ja.js | 53 + .../META-INF/resources/swagger-ui/dist/lang/pl.js | 53 + .../META-INF/resources/swagger-ui/dist/lang/pt.js | 53 + .../META-INF/resources/swagger-ui/dist/lang/ru.js | 56 + .../META-INF/resources/swagger-ui/dist/lang/tr.js | 53 + .../resources/swagger-ui/dist/lang/translator.js | 39 + .../resources/swagger-ui/dist/lang/zh-cn.js | 53 + .../resources/swagger-ui/dist/lib/backbone-min.js | 15 + .../swagger-ui/dist/lib/handlebars-2.0.0.js | 28 + .../swagger-ui/dist/lib/highlight.9.1.0.pack.js | 2 + .../dist/lib/highlight.9.1.0.pack_extended.js | 34 + .../swagger-ui/dist/lib/jquery-1.8.0.min.js | 2 + .../swagger-ui/dist/lib/jquery.ba-bbq.min.js | 18 + .../swagger-ui/dist/lib/jquery.slideto.min.js | 1 + .../swagger-ui/dist/lib/jquery.wiggle.min.js | 8 + .../resources/swagger-ui/dist/lib/js-yaml.min.js | 3 + .../swagger-ui/dist/lib/jsoneditor.min.js | 11 + .../resources/swagger-ui/dist/lib/lodash.min.js | 102 + .../resources/swagger-ui/dist/lib/marked.js | 1272 ++ .../resources/swagger-ui/dist/lib/swagger-oauth.js | 339 + .../META-INF/resources/swagger-ui/dist/o2c.html | 20 + .../resources/swagger-ui/dist/swagger-ui.js | 22284 +++++++++++++++++++ .../resources/swagger-ui/dist/swagger-ui.min.js | 9 + .../resources/swagger-ui/dist/swagger.json | 161 + .../src/main/resources/application.properties | 35 + ms/vlantag-api/src/main/resources/banner.txt | 11 + .../core/service/TestVlantagApiServiceImpl.java | 931 + .../ms/vlantagapi/util/MockResourceAllocator.java | 50 + 88 files changed, 33298 insertions(+) create mode 100644 ms/vlantag-api/.checkstyle create mode 100644 ms/vlantag-api/.gitignore create mode 100644 ms/vlantag-api/.mvn/wrapper/maven-wrapper.jar create mode 100644 ms/vlantag-api/.mvn/wrapper/maven-wrapper.properties create mode 100644 ms/vlantag-api/README.md create mode 100644 ms/vlantag-api/mvnw create mode 100644 ms/vlantag-api/mvnw.cmd create mode 100644 ms/vlantag-api/pom.xml create mode 100644 ms/vlantag-api/src/main/docker/Dockerfile create mode 100644 ms/vlantag-api/src/main/docker/startService.sh create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/Application.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ApplicationSecurityConfig.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/JerseyConfiguration.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ResourceAssignmentInitializer.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/exception/VlantagApiException.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/AllowedRanges.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/Elements.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfig.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContent.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyData.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponse.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObject.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ResourceModel.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequest.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequestInput.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponse.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponseOutput.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/PingResponse.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequest.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequestInput.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponse.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponseOutput.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/VlanTag.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiService.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyDataDeserializer.java create mode 100644 ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyManagerClient.java create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/print.css create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/reset.css create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/screen.css create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/style.css create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/typography.css create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans-Bold.ttf create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans.ttf create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/collapse.gif create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/expand.gif create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/explorer_icons.png create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-16x16.png create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-32x32.png create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon.ico create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/logo_small.png create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/pet_store_api.png create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/throbber.gif create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/wordnik_api.png create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/index.html create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/en.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/es.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/fr.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/geo.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/it.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ja.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pl.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pt.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ru.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/tr.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/translator.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/zh-cn.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/backbone-min.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/handlebars-2.0.0.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/highlight.9.1.0.pack.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/highlight.9.1.0.pack_extended.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery-1.8.0.min.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.ba-bbq.min.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.slideto.min.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jquery.wiggle.min.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/js-yaml.min.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/jsoneditor.min.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/lodash.min.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/marked.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/swagger-oauth.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/o2c.html create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger-ui.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger-ui.min.js create mode 100644 ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/swagger.json create mode 100644 ms/vlantag-api/src/main/resources/application.properties create mode 100644 ms/vlantag-api/src/main/resources/banner.txt create mode 100644 ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/TestVlantagApiServiceImpl.java create mode 100644 ms/vlantag-api/src/test/java/org/onap/ccsdk/apps/ms/vlantagapi/util/MockResourceAllocator.java (limited to 'ms/vlantag-api') diff --git a/ms/vlantag-api/.checkstyle b/ms/vlantag-api/.checkstyle new file mode 100644 index 00000000..e1faa438 --- /dev/null +++ b/ms/vlantag-api/.checkstyle @@ -0,0 +1,3 @@ + + + diff --git a/ms/vlantag-api/.gitignore b/ms/vlantag-api/.gitignore new file mode 100644 index 00000000..ea848562 --- /dev/null +++ b/ms/vlantag-api/.gitignore @@ -0,0 +1,26 @@ +/target/ +!.mvn/wrapper/maven-wrapper.jar + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/build/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +/target-ide/ diff --git a/ms/vlantag-api/.mvn/wrapper/maven-wrapper.jar b/ms/vlantag-api/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 00000000..9cc84ea9 Binary files /dev/null and b/ms/vlantag-api/.mvn/wrapper/maven-wrapper.jar differ diff --git a/ms/vlantag-api/.mvn/wrapper/maven-wrapper.properties b/ms/vlantag-api/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000..b573bb50 --- /dev/null +++ b/ms/vlantag-api/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1 @@ +distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.3/apache-maven-3.5.3-bin.zip diff --git a/ms/vlantag-api/README.md b/ms/vlantag-api/README.md new file mode 100644 index 00000000..e86fa0b7 --- /dev/null +++ b/ms/vlantag-api/README.md @@ -0,0 +1,33 @@ + + +## ONAP-CCSDK.apps-Vlantag API + +Micro-service to generate vlan tags for VNFs based on Vlan tag policies. + + + +### Build and test + +````bash +$ mvn clean install +```` + + diff --git a/ms/vlantag-api/mvnw b/ms/vlantag-api/mvnw new file mode 100644 index 00000000..5bf251c0 --- /dev/null +++ b/ms/vlantag-api/mvnw @@ -0,0 +1,225 @@ +#!/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. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Maven2 Start Up Batch script +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# M2_HOME - location of maven2's installed home dir +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "`uname`" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + export JAVA_HOME="`/usr/libexec/java_home`" + else + export JAVA_HOME="/Library/Java/Home" + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=`java-config --jre-home` + fi +fi + +if [ -z "$M2_HOME" ] ; then + ## resolve links - $0 may be a link to maven's home + PRG="$0" + + # need this for relative symlinks + 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 + + saveddir=`pwd` + + M2_HOME=`dirname "$PRG"`/.. + + # make it fully qualified + M2_HOME=`cd "$M2_HOME" && pwd` + + cd "$saveddir" + # echo Using m2 at $M2_HOME +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --unix "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --unix "$CLASSPATH"` +fi + +# For Migwn, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$M2_HOME" ] && + M2_HOME="`(cd "$M2_HOME"; pwd)`" + [ -n "$JAVA_HOME" ] && + JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" + # TODO classpath? +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="`which javac`" + if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=`which readlink` + if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then + if $darwin ; then + javaHome="`dirname \"$javaExecutable\"`" + javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" + else + javaExecutable="`readlink -f \"$javaExecutable\"`" + fi + javaHome="`dirname \"$javaExecutable\"`" + javaHome=`expr "$javaHome" : '\(.*\)/bin'` + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="`which java`" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=`cd "$wdir/.."; pwd` + fi + # end of workaround + done + echo "${basedir}" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + echo "$(tr -s '\n' ' ' < "$1")" + fi +} + +BASE_DIR=`find_maven_basedir "$(pwd)"` +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} +echo $MAVEN_PROJECTBASEDIR +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$M2_HOME" ] && + M2_HOME=`cygpath --path --windows "$M2_HOME"` + [ -n "$JAVA_HOME" ] && + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + [ -n "$CLASSPATH" ] && + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` +fi + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +exec "$JAVACMD" \ + $MAVEN_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/ms/vlantag-api/mvnw.cmd b/ms/vlantag-api/mvnw.cmd new file mode 100644 index 00000000..019bd74d --- /dev/null +++ b/ms/vlantag-api/mvnw.cmd @@ -0,0 +1,143 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Maven2 Start Up Batch script +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM M2_HOME - location of maven2's installed home dir +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" +if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" + +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" +if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%" == "on" pause + +if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% + +exit /B %ERROR_CODE% diff --git a/ms/vlantag-api/pom.xml b/ms/vlantag-api/pom.xml new file mode 100644 index 00000000..431d0a32 --- /dev/null +++ b/ms/vlantag-api/pom.xml @@ -0,0 +1,228 @@ + + + 4.0.0 + + org.onap.ccsdk.apps.ms.vlantagapi + vlantag-api + 0.3.0-SNAPSHOT + jar + + vlantag-api + Vlantag Api Service for Vlantag management of VNFs + + + ${basedir}/target/main/resources/META-INF/resources/swagger-ui/dist + 1.5.8 + 1.8 + 2.0.4.RELEASE + 5.1.46 + 0.3.0-SNAPSHOT + TBD:5100 + vlantagapi + + + jacoco + reuseReports + ${basedir}/target/surefire-reports + ${basedir}/target/failsafe-reports + ${basedir}/target/jacoco_report + ${basedir}/target/jacoco_itReport + ${basedir}/target/jacoco-ut.exec + ${basedir}/target/jacoco-it.exec + java + 2.0.7 + + + + org.springframework.boot + spring-boot-starter-parent + 2.0.4.RELEASE + + + + + + + org.springframework.boot + spring-boot-starter-jersey + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.springframework.boot + spring-boot-starter-actuator + + + + org.springframework.boot + spring-boot-starter-security + 2.0.1.RELEASE + + + + org.onap.ccsdk.sli.adaptors + resource-assignment-provider + ${ccsdk.sli.adaptors.version} + + + org.slf4j + slf4j-simple + + + + + + mysql + mysql-connector-java + 5.1.46 + + + + io.swagger + swagger-annotations + 1.5.8 + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + ${surefireArgLine} + ${skip.unit.tests} + + **/IT*.java + + + + + org.jacoco + jacoco-maven-plugin + 0.7.5.201505241946 + + + + pre-unit-test + + prepare-agent + + + + ${sonar.jacoco.reportPath} + surefireArgLine + + + + + post-unit-test + test + + report + + + + ${sonar.jacoco.reportPath} + + ${jacoco.path} + + + + + + com.github.kongchen + swagger-maven-plugin + 3.1.7 + + + + + http + https + + localhost:9091 + + org.onap.ccsdk.apps.ms.vlantagapi.core.service + org.onap.ccsdk.apps.ms.vlantagapi.core.model + + + /vlantagapi + + ${project.artifactId} Service + ${project.version} + + + + basicAuth + basic + + + ${swagger.directory} + + + + + + + package + + generate + + + + + + com.spotify + docker-maven-plugin + 0.4.11 + + ${docker.registry}/org.onap.ccsdk.apps/${serviceArtifactName} + src/main/docker + docker-hub + https://${docker.registry} + + ${project.version} + latest + + true + + + / + ${project.build.directory} + ${project.build.finalName}.jar + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${springboot.version} + + + + repackage + + + + + + + + + diff --git a/ms/vlantag-api/src/main/docker/Dockerfile b/ms/vlantag-api/src/main/docker/Dockerfile new file mode 100644 index 00000000..8b7e6153 --- /dev/null +++ b/ms/vlantag-api/src/main/docker/Dockerfile @@ -0,0 +1,5 @@ +FROM anapsix/alpine-java:8_jdk +ADD vlantag-api-0.3.0-SNAPSHOT.jar app.jar +ADD startService.sh /startService.sh +RUN chmod 700 /startService.sh +ENTRYPOINT ./startService.sh diff --git a/ms/vlantag-api/src/main/docker/startService.sh b/ms/vlantag-api/src/main/docker/startService.sh new file mode 100644 index 00000000..e7d31210 --- /dev/null +++ b/ms/vlantag-api/src/main/docker/startService.sh @@ -0,0 +1,4 @@ +#!/bin/sh +app_args=-Dspring.config.location=${APP_CONFIG_HOME} +echo "app_args ="${app_args} +java -Djava.security.egd=file:/dev/./urandom ${app_args} -Xms1024m -Xmx1024m -jar /app.jar diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/Application.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/Application.java new file mode 100644 index 00000000..bd18a986 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/Application.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * Application.java Purpose: Entry point for the micro-service -- it starts up the application. + * + * @author Saurav Paira + * @version 1.0 + */ +@SpringBootApplication(scanBasePackages={"org.onap.ccsdk.apps.ms.vlantagapi", "org.onap.ccsdk.sli.core", "org.onap.ccsdk.sli.adaptors"}) +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ApplicationSecurityConfig.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ApplicationSecurityConfig.java new file mode 100644 index 00000000..bd0abe6f --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ApplicationSecurityConfig.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core; + +import java.util.ArrayList; +import java.util.Base64; +import java.util.List; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.core.env.Environment; +import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; +import org.springframework.security.config.annotation.web.builders.HttpSecurity; +import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.config.http.SessionCreationPolicy; +import org.springframework.security.core.userdetails.User; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.crypto.factory.PasswordEncoderFactories; +import org.springframework.security.crypto.password.PasswordEncoder; +import org.springframework.security.provisioning.InMemoryUserDetailsManager; + +/** + * ApplicationSecurityConfig.java Purpose: Configures and validates + * Application Security configurations + * + * @author Saurav Paira + * @version 1.0 + */ +@Configuration +public class ApplicationSecurityConfig extends WebSecurityConfigurerAdapter{ + private Logger logger = LoggerFactory.getLogger(ApplicationSecurityConfig.class); + + @Autowired + private Environment environment; + + @Override + protected void configure(AuthenticationManagerBuilder auth) throws Exception { + List userDetails = new ArrayList<>(); + + PasswordEncoder encoder = PasswordEncoderFactories.createDelegatingPasswordEncoder(); + final User.UserBuilder userBuilder = User.builder().passwordEncoder(encoder::encode); + + String authString = environment.getProperty("application.authToken"); + String[] tokens = authString.split(";"); + for (int i = 0; i < tokens.length; i++) { + String token = tokens[i]; + String[] cred = token.split("~"); + String[] uidpwdarr = decode(cred[0]); + logger.info("------uid/pwd ----------------{}, {}",uidpwdarr[0],uidpwdarr[1]); + + UserDetails user = userBuilder + .username(uidpwdarr[0]) + .password(uidpwdarr[1]) + .roles(cred[1]) + .build(); + + userDetails.add(user); + } + + logger.info("-------------------------------{}",userDetails); + auth.userDetailsService(inMemoryUserDetailsManager(userDetails)); + } + + + public InMemoryUserDetailsManager inMemoryUserDetailsManager(List userDetails) { + return new InMemoryUserDetailsManager(userDetails); + } + + @Override + protected void configure(HttpSecurity http) throws Exception { + http.authorizeRequests().anyRequest().fullyAuthenticated(); + http.httpBasic().and().sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS); + http.csrf().disable(); + } + + private static String[] decode(String encoded) { + final byte[] decodedBytes + = Base64.getDecoder().decode(encoded.getBytes()); + final String pair = new String(decodedBytes); + return pair.split(":", 2); + } + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/JerseyConfiguration.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/JerseyConfiguration.java new file mode 100644 index 00000000..f4877233 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/JerseyConfiguration.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core; + +import org.glassfish.jersey.server.ResourceConfig; +import org.onap.ccsdk.apps.ms.vlantagapi.core.service.VlantagApiServiceImpl; +import org.springframework.stereotype.Component; + +/** + * JerseyConfiguration.java Purpose: Configuration of the REST framework. + * + * @author Saurav Paira + * @version 1.0 + */ +@Component +public class JerseyConfiguration extends ResourceConfig +{ + public JerseyConfiguration() + { + register(VlantagApiServiceImpl.class); + } +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ResourceAssignmentInitializer.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ResourceAssignmentInitializer.java new file mode 100644 index 00000000..3c845329 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/ResourceAssignmentInitializer.java @@ -0,0 +1,192 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.sql.DataSource; + +import org.onap.ccsdk.sli.adaptors.lock.comp.LockHelper; +import org.onap.ccsdk.sli.adaptors.lock.comp.LockHelperImpl; +import org.onap.ccsdk.sli.adaptors.lock.dao.ResourceLockDao; +import org.onap.ccsdk.sli.adaptors.lock.dao.ResourceLockDaoImpl; +import org.onap.ccsdk.sli.adaptors.ra.ResourceAllocator; +import org.onap.ccsdk.sli.adaptors.ra.alloc.DbAllocationRule; +import org.onap.ccsdk.sli.adaptors.ra.comp.AllocationRule; +import org.onap.ccsdk.sli.adaptors.ra.comp.EndPointAllocator; +import org.onap.ccsdk.sli.adaptors.ra.comp.EndPointAllocatorImpl; +import org.onap.ccsdk.sli.adaptors.ra.rule.dao.RangeRuleDao; +import org.onap.ccsdk.sli.adaptors.ra.rule.dao.RangeRuleDaoImpl; +import org.onap.ccsdk.sli.adaptors.ra.rule.dao.ResourceRuleDao; +import org.onap.ccsdk.sli.adaptors.ra.rule.dao.ResourceRuleDaoImpl; +import org.onap.ccsdk.sli.adaptors.rm.comp.ResourceManager; +import org.onap.ccsdk.sli.adaptors.rm.comp.ResourceManagerImpl; +import org.onap.ccsdk.sli.adaptors.rm.dao.ResourceDao; +import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.AllocationItemJdbcDao; +import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.AllocationItemJdbcDaoImpl; +import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.ResourceDaoImpl; +import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.ResourceJdbcDao; +import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.ResourceJdbcDaoImpl; +import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.ResourceLoadJdbcDao; +import org.onap.ccsdk.sli.adaptors.rm.dao.jdbc.ResourceLoadJdbcDaoImpl; +import org.onap.ccsdk.sli.adaptors.util.db.CachedDataSourceWrap; +import org.onap.ccsdk.sli.adaptors.util.db.DataSourceWrap; +import org.onap.ccsdk.sli.adaptors.util.speed.SpeedUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; +import org.springframework.stereotype.Component; + +/** + * ResourceAssignmentInitializer.java Purpose: Represents and Initializes + * Resource Assignment Spring Module Beans + * + * @author Saurav Paira + * @version 1.0 + */ + +@Component +@Configuration +public class ResourceAssignmentInitializer { + + private static final Logger log = LoggerFactory.getLogger(ResourceAssignmentInitializer.class); + + + @Bean + public JdbcTemplate getJdbcTemplate(DataSource dataSource) { + return new JdbcTemplate(dataSource); + } + + @Bean + public ResourceLockDaoImpl getResourceLockDaoImpl(JdbcTemplate jdbcTemplate) { + ResourceLockDaoImpl resourceLockDaoImpl = new ResourceLockDaoImpl(); + resourceLockDaoImpl.setJdbcTemplate(jdbcTemplate); + + return resourceLockDaoImpl; + } + + @Bean + public LockHelperImpl getLockHelperImpl(ResourceLockDao resourceLockDao) { + LockHelperImpl lockHelperImpl = new LockHelperImpl(); + lockHelperImpl.setLockWait(5); + lockHelperImpl.setRetryCount(10); + lockHelperImpl.setResourceLockDao(resourceLockDao); + + return lockHelperImpl; + } + + @Bean + public ResourceJdbcDaoImpl getResourceJdbcDaoImpl(JdbcTemplate jdbcTemplate) { + ResourceJdbcDaoImpl resourceJdbcDaoImpl = new ResourceJdbcDaoImpl(); + resourceJdbcDaoImpl.setJdbcTemplate(jdbcTemplate); + return resourceJdbcDaoImpl; + } + + @Bean + public AllocationItemJdbcDaoImpl getAllocationItemJdbcDaoImpl(JdbcTemplate jdbcTemplate) { + AllocationItemJdbcDaoImpl allocationItemJdbcDaoImpl = new AllocationItemJdbcDaoImpl(); + allocationItemJdbcDaoImpl.setJdbcTemplate(jdbcTemplate); + return allocationItemJdbcDaoImpl; + } + + @Bean + public ResourceLoadJdbcDaoImpl getResourceLoadJdbcDaoImpl(JdbcTemplate jdbcTemplate) { + ResourceLoadJdbcDaoImpl resourceLoadJdbcDaoImpl = new ResourceLoadJdbcDaoImpl(); + resourceLoadJdbcDaoImpl.setJdbcTemplate(jdbcTemplate); + return resourceLoadJdbcDaoImpl; + } + + + @Bean + public ResourceDaoImpl getResourceDaoImpl(ResourceJdbcDao resourceJdbcDao, AllocationItemJdbcDao allocationItemJdbcDao, ResourceLoadJdbcDao resourceLoadJdbcDao) { + ResourceDaoImpl resourceDaoImpl = new ResourceDaoImpl(); + resourceDaoImpl.setAllocationItemJdbcDao(allocationItemJdbcDao); + resourceDaoImpl.setResourceJdbcDao(resourceJdbcDao); + resourceDaoImpl.setResourceLoadJdbcDao(resourceLoadJdbcDao); + + return resourceDaoImpl; + } + + @Bean + public ResourceManagerImpl getResourceManagerImpl(LockHelper lockHelper, ResourceDao resourceDao) { + ResourceManagerImpl resourceManagerImpl = new ResourceManagerImpl(); + resourceManagerImpl.setLockHelper(lockHelper); + resourceManagerImpl.setLockTimeout(600); + resourceManagerImpl.setResourceDao(resourceDao); + + return resourceManagerImpl; + } + + @Bean + public ResourceRuleDaoImpl getResourceRuleDaoImpl(JdbcTemplate jdbcTemplate) { + ResourceRuleDaoImpl resourceRuleDaoImpl = new ResourceRuleDaoImpl(); + resourceRuleDaoImpl.setJdbcTemplate(jdbcTemplate); + + return resourceRuleDaoImpl; + } + + @Bean + public RangeRuleDaoImpl getRangeRuleDaoImpl(JdbcTemplate jdbcTemplate) { + RangeRuleDaoImpl rangeRuleDaoImpl = new RangeRuleDaoImpl(); + rangeRuleDaoImpl.setJdbcTemplate(jdbcTemplate); + + return rangeRuleDaoImpl; + } + + @Bean + public ResourceAllocator getResourceAllocator(ResourceManager resourceManager, EndPointAllocator endPointAllocator, SpeedUtil speedUtil) { + ResourceAllocator resourceAllocator = new ResourceAllocator(); + resourceAllocator.setEndPointAllocator(endPointAllocator); + resourceAllocator.setResourceManager(resourceManager); + resourceAllocator.setSpeedUtil(speedUtil); + + return resourceAllocator; + } + + @Bean + public SpeedUtil getSpeedUtil() { + return new SpeedUtil(); + } + + @Bean + public EndPointAllocatorImpl getEndPointAllocatorImpl(ResourceManager resourceManager, DbAllocationRule dbAllocationRule) { + EndPointAllocatorImpl endPointAllocatorImpl = new EndPointAllocatorImpl(); + + Map> allocationRuleMap = new HashMap<>(); + allocationRuleMap.put("DEFAULT", Arrays.asList(dbAllocationRule)); + + endPointAllocatorImpl.setResourceManager(resourceManager); + endPointAllocatorImpl.setAllocationRuleMap(allocationRuleMap); + + return endPointAllocatorImpl; + } + + @Bean + public DbAllocationRule getDbAllocationRule(ResourceRuleDao resourceRuleDao, RangeRuleDao rangeRuleDao) { + DbAllocationRule dbAllocationRule = new DbAllocationRule(); + dbAllocationRule.setRangeRuleDao(rangeRuleDao); + dbAllocationRule.setResourceRuleDao(resourceRuleDao); + + return dbAllocationRule; + } +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/exception/VlantagApiException.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/exception/VlantagApiException.java new file mode 100644 index 00000000..32ce1844 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/exception/VlantagApiException.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.exception; + +/** + * VlantagApiException.java Purpose: Represents application exceptions generated by this micro-service. + * + * @author Saurav Paira + * @version 1.0 + */ +public class VlantagApiException extends Exception { + + private static final long serialVersionUID = 1L; + + public VlantagApiException() + { + super(); + } + + public VlantagApiException(String message) + { + super(message); + } + + public VlantagApiException(String message, Throwable t) + { + super(message, t); + } + + public VlantagApiException(Throwable arg0) { + super(arg0); + } + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/AllowedRanges.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/AllowedRanges.java new file mode 100644 index 00000000..70f19c0f --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/AllowedRanges.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * AllowedRanges.java Purpose: POJO representing policy manager + * get-config response AllowedRanges model defines Vlantag Range + * + * @author Saurav Paira + * @version 1.0 + */ +public class AllowedRanges { + + @JsonProperty("min") + String min; + + @JsonProperty("max") + String max; + + public String getMin() { + return min; + } + + public void setMin(String min) { + this.min = min; + } + + public String getMax() { + return max; + } + + public void setMax(String max) { + this.max = max; + } + + @Override + public String toString() { + return "AllowedRanges [min=" + min + ", max=" + max + "]"; + } + + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/Elements.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/Elements.java new file mode 100644 index 00000000..20604634 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/Elements.java @@ -0,0 +1,96 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Elements.java Purpose: POJO representing policy manager + * get-config response Element model within a Resource Model + * + * @author Saurav Paira + * @version 1.0 + */ +public class Elements { + + @JsonProperty("recycle-vlantag-range") + String recycleVlantagRange; + + @JsonProperty("overwrite") + String overwrite; + + @JsonProperty("vlantag-name") + String vlantagName; + + @JsonProperty("allowed-range") + private List allowedRanges; + + @JsonProperty("element-vlan-role") + String elementVlanRole; + + + public String getRecycleVlantagRange() { + return recycleVlantagRange; + } + + public void setRecycleVlantagRange(String recycleVlantagRange) { + this.recycleVlantagRange = recycleVlantagRange; + } + + public String getOverwrite() { + return overwrite; + } + + public void setOverwrite(String overwrite) { + this.overwrite = overwrite; + } + + public String getVlantagName() { + return vlantagName; + } + + public void setVlantagName(String vlantagName) { + this.vlantagName = vlantagName; + } + + public List getAllowedRanges() { + return allowedRanges; + } + + public void setAllowedRanges(List allowedRanges) { + this.allowedRanges = allowedRanges; + } + + public String getElementVlanRole() { + return elementVlanRole; + } + + public void setElementVlanRole(String elementVlanRole) { + this.elementVlanRole = elementVlanRole; + } + + @Override + public String toString() { + return "Elements [recycleVlantagRange=" + recycleVlantagRange + ", overwrite=" + overwrite + ", vlantagName=" + + vlantagName + ", allowedRanges=" + allowedRanges + ", elementVlanRole=" + elementVlanRole + "]"; + } + + + + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfig.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfig.java new file mode 100644 index 00000000..354f83a3 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyConfig.java @@ -0,0 +1,172 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +import java.io.Serializable; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * PolicyConfig.java Purpose: POJO representing policy manager + * get-config response + * + * @author Saurav Paira + * @version 1.0 + */ +public class PolicyConfig implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 1L; + + @JsonProperty("configName") + private String configName; + + @JsonProperty("riskLevel") + private String riskLevel; + + @JsonProperty("policyName") + private String policyName; + + @JsonProperty("policyScope") + private String policyScope; + + @JsonProperty("guard") + private String guard; + + @JsonProperty("description") + private String description; + + @JsonProperty("priority") + private String priority; + + @JsonProperty("uuid") + private String uuid; + + @JsonProperty("version") + private String version; + + @JsonProperty("content") + private PolicyContent content; + + @JsonProperty("riskType") + private String riskType; + + @JsonProperty("service") + private String service; + + @JsonProperty("location") + private String location; + + @JsonProperty("templateVersion") + private String templateVersion; + + public String getConfigName() { + return configName; + } + public void setConfigName(String configName) { + this.configName = configName; + } + public String getRiskLevel() { + return riskLevel; + } + public void setRiskLevel(String riskLevel) { + this.riskLevel = riskLevel; + } + public String getPolicyName() { + return policyName; + } + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + public String getPolicyScope() { + return policyScope; + } + public void setPolicyScope(String policyScope) { + this.policyScope = policyScope; + } + public String getGuard() { + return guard; + } + public void setGuard(String guard) { + this.guard = guard; + } + public String getDescription() { + return description; + } + public void setDescription(String description) { + this.description = description; + } + public String getPriority() { + return priority; + } + public void setPriority(String priority) { + this.priority = priority; + } + public String getUuid() { + return uuid; + } + public void setUuid(String uuid) { + this.uuid = uuid; + } + public String getVersion() { + return version; + } + public void setVersion(String version) { + this.version = version; + } + + public PolicyContent getContent() { + return content; + } + public void setContent(PolicyContent content) { + this.content = content; + } + public String getRiskType() { + return riskType; + } + public void setRiskType(String riskType) { + this.riskType = riskType; + } + public String getService() { + return service; + } + public void setService(String service) { + this.service = service; + } + public String getLocation() { + return location; + } + public void setLocation(String location) { + this.location = location; + } + public String getTemplateVersion() { + return templateVersion; + } + public void setTemplateVersion(String templateVersion) { + this.templateVersion = templateVersion; + } + @Override + public String toString() { + return "PolicyConfig [configName=" + configName + ", riskLevel=" + riskLevel + ", policyName=" + policyName + + ", policyScope=" + policyScope + ", guard=" + guard + ", description=" + description + ", priority=" + + priority + ", uuid=" + uuid + ", version=" + version + ", content=" + content + ", riskType=" + + riskType + ", service=" + service + ", location=" + location + ", templateVersion=" + templateVersion + + "]"; + } + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContent.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContent.java new file mode 100644 index 00000000..2f60d8f5 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyContent.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * PolicyContent.java Purpose: POJO representing policy manager + * get-config response contents + * + * @author Saurav Paira + * @version 1.0 + */ +public class PolicyContent { + + @JsonProperty("resource-models") + private List resourceModels; + + @JsonProperty("policy-instance-name") + private String policyInstanceName; + + public String getPolicyInstanceName() { + return policyInstanceName; + } + + public void setPolicyInstanceName(String policyInstanceName) { + this.policyInstanceName = policyInstanceName; + } + + public List getResourceModels() { + return resourceModels; + } + + public void setResourceModels(List resourceModels) { + this.resourceModels = resourceModels; + } + + @Override + public String toString() { + return "PolicyContent [resourceModels=" + resourceModels + ", policyInstanceName=" + policyInstanceName + "]"; + } + + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyData.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyData.java new file mode 100644 index 00000000..5c328423 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyData.java @@ -0,0 +1,20 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +public interface PolicyData { + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponse.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponse.java new file mode 100644 index 00000000..0707cd34 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/PolicyEngineResponse.java @@ -0,0 +1,141 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +import java.io.Serializable; +import java.util.HashMap; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * PolicyEngineResponse.java Purpose: POJO representing policy manager get-config response + * + * @author Saurav Paira + * @version 1.0 + */ +public class PolicyEngineResponse implements Serializable { + + /** + * + */ + private static final long serialVersionUID = 1L; + + @JsonProperty("policyConfigMessage") + private String policyConfigMessage; + + @JsonProperty("policyConfigStatus") + private String policyConfigStatus; + + @JsonProperty("type") + private String type; + + @JsonProperty("config") + private String config; + + @JsonProperty("policyName") + private String policyName; + + @JsonProperty("policyType") + private String policyType; + + @JsonProperty("policyVersion") + private String policyVersion; + + @JsonProperty("matchingConditions") + private HashMap matchingConditions; + + @JsonProperty("responseAttributes") + private HashMap responseAttributes; + + @JsonProperty("property") + private String property; + + public PolicyEngineResponse() { + + } + + public String getPolicyConfigMessage() { + return policyConfigMessage; + } + public void setPolicyConfigMessage(String policyConfigMessage) { + this.policyConfigMessage = policyConfigMessage; + } + public String getPolicyConfigStatus() { + return policyConfigStatus; + } + public void setPolicyConfigStatus(String policyConfigStatus) { + this.policyConfigStatus = policyConfigStatus; + } + public String getType() { + return type; + } + public void setType(String type) { + this.type = type; + } + public String getConfig() { + return config; + } + @JsonProperty("config") + public void setConfig(String config) { + this.config = config; + } + public String getPolicyName() { + return policyName; + } + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + public String getPolicyType() { + return policyType; + } + public void setPolicyType(String type) { + this.policyType = type; + } + public String getPolicyVersion() { + return policyVersion; + } + public void setPolicyVersion(String policyVersion) { + this.policyVersion = policyVersion; + } + public HashMap getMatchingConditions() { + return matchingConditions; + } + @JsonProperty("matchingConditions") + public void setMatchingConditions(HashMap matchingConditions) { + this.matchingConditions = matchingConditions; + } + public HashMap getResponseAttributes() { + return responseAttributes; + } + public void setResponseAttributes(HashMap responseAttributes) { + this.responseAttributes = responseAttributes; + } + public String getProperty() { + return property; + } + public void setProperty(String property) { + this.property = property; + } + + @Override + public String toString() { + return "PolicyEngineResponse [policyConfigMessage=" + policyConfigMessage + ", policyConfigStatus=" + + policyConfigStatus + ", type=" + type + ", config=" + config + ", policyName=" + policyName + + ", policyType=" + policyType + ", policyVersion=" + policyVersion + ", matchingConditions=" + + matchingConditions + ", responseAttributes=" + responseAttributes + ", property=" + property + "]"; + } + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObject.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObject.java new file mode 100644 index 00000000..bd2fd6e0 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/RequestObject.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +/** + * RequestObject.java Purpose: POJO representing policy manager get-config request + * + * @author Saurav Paira + * @version 1.0 + */ +public class RequestObject { + + private String policyName; + + public String getPolicyName() { + return policyName; + } + + public void setPolicyName(String policyName) { + this.policyName = policyName; + } + + @Override + public String toString() { + return "RequestObject [policyName=" + policyName + "]"; + } + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ResourceModel.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ResourceModel.java new file mode 100644 index 00000000..8f865f9e --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/extinf/pm/model/ResourceModel.java @@ -0,0 +1,145 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model; + +import java.util.List; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * ResourceModel.java Purpose: POJO representing policy manager get-config response Resource Model + * + * @author Saurav Paira + * @version 1.0 + */ +@JsonDeserialize(as = ResourceModel.class) +public class ResourceModel implements PolicyData { + + @JsonProperty("key-type") + private String keyType; + + @JsonProperty("scope") + private String scope; + + @JsonProperty("resource-resolution-recipe") + private String resourceResolutionRecipe; + + @JsonProperty("resource-name") + private String resourceName; + + @JsonProperty("data-store-object") + private String dataStoreObject; + + @JsonProperty("data-store") + private String dataStore; + + @JsonProperty("elements") + private List elements; + + @JsonProperty("resource-vlan-role") + private String resourceVlanRole; + + @JsonProperty("vlan-type") + private String vlanType; + + + public String getKeyType() { + return keyType; + } + + public void setKeyType(String keyType) { + this.keyType = keyType; + } + + public String getScope() { + return scope; + } + + public void setScope(String scope) { + this.scope = scope; + } + + public String getResourceResolutionRecipe() { + return resourceResolutionRecipe; + } + + public void setResourceResolutionRecipe(String resourceResolutionRecipe) { + this.resourceResolutionRecipe = resourceResolutionRecipe; + } + + public String getResourceName() { + return resourceName; + } + + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + public String getDataStoreObject() { + return dataStoreObject; + } + + public void setDataStoreObject(String dataStoreObject) { + this.dataStoreObject = dataStoreObject; + } + + public String getDataStore() { + return dataStore; + } + + public void setDataStore(String dataStore) { + this.dataStore = dataStore; + } + + public List getElements() { + return elements; + } + + public void setElements(List elements) { + this.elements = elements; + } + + public String getResourceVlanRole() { + return resourceVlanRole; + } + + public void setResourceVlanRole(String resourceVlanRole) { + this.resourceVlanRole = resourceVlanRole; + } + + + public String getVlanType() { + return vlanType; + } + + public void setVlanType(String vlanType) { + this.vlanType = vlanType; + } + + @Override + public String toString() { + return "ResourceModel [keyType=" + keyType + ", scope=" + scope + ", resourceResolutionRecipe=" + + resourceResolutionRecipe + ", resourceName=" + resourceName + ", dataStoreObject=" + dataStoreObject + + ", dataStore=" + dataStore + ", elements=" + elements + ", resourceVlanRole=" + resourceVlanRole + + ", vlanType=" + vlanType + "]"; + } + + + + + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequest.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequest.java new file mode 100644 index 00000000..4b7a7146 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequest.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.model; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import javax.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModelProperty; + +/** + * AssignVlanTagRequest.java Purpose: Provide Assign VlanTag Request Model + * + * @author Saurav Paira + * @version 1.0 + */ +public class AssignVlanTagRequest { + + private @Valid List input = new ArrayList(); + + /** + **/ + public AssignVlanTagRequest input(List input) { + this.input = input; + return this; + } + + + @ApiModelProperty(value = "") + @JsonProperty("input") + public List getInput() { + return input; + } + public void setInput(List input) { + this.input = input; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssignVlanTagRequest assignVlanTagRequest = (AssignVlanTagRequest) o; + return Objects.equals(input, assignVlanTagRequest.input); + } + + @Override + public int hashCode() { + return Objects.hash(input); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignVlanTagRequest {\n"); + + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequestInput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequestInput.java new file mode 100644 index 00000000..682ba122 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagRequestInput.java @@ -0,0 +1,186 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.model; + +import javax.validation.Valid; +import java.util.Objects; +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModelProperty; + +/** + * AssignVlanTagRequestInput.java Purpose: Provide Assign VlanTag Request Input Model + * + * @author Saurav Paira + * @version 1.0 + */ +public class AssignVlanTagRequestInput { + private @Valid String policyInstanceName = null; + private @Valid String resourceName = null; + private @Valid String resourceValue = null; + private @Valid String scopeId = null; + private @Valid String key = null; + private @Valid String vlanType = null; + + + public AssignVlanTagRequestInput policyInstanceName(String policyInstanceName) { + this.policyInstanceName = policyInstanceName; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("policy-instance-name") + public String getPolicyInstanceName() { + return policyInstanceName; + } + + public void setPolicyInstanceName(String policyInstanceName) { + this.policyInstanceName = policyInstanceName; + } + + /** + **/ + public AssignVlanTagRequestInput resourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("resource-name") + public String getResourceName() { + return resourceName; + } + + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + /** + **/ + public AssignVlanTagRequestInput resourceValue(String resourceValue) { + this.resourceValue = resourceValue; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("resource-value") + public String getResourceValue() { + return resourceValue; + } + + public void setResourceValue(String resourceValue) { + this.resourceValue = resourceValue; + } + + /** + **/ + public AssignVlanTagRequestInput scopeId(String scopeId) { + this.scopeId = scopeId; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("scope-id") + public String getScopeId() { + return scopeId; + } + + public void setScopeId(String scopeId) { + this.scopeId = scopeId; + } + + /** + **/ + public AssignVlanTagRequestInput key(String key) { + this.key = key; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("key") + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + /** + **/ + public AssignVlanTagRequestInput vlanType(String vlanType) { + this.vlanType = vlanType; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("vlan-type") + public String getVlanType() { + return vlanType; + } + + public void setVlanType(String vlanType) { + this.vlanType = vlanType; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssignVlanTagRequestInput assignVlanTagRequestInput = (AssignVlanTagRequestInput) o; + return Objects.equals(policyInstanceName, assignVlanTagRequestInput.policyInstanceName) + && Objects.equals(resourceName, assignVlanTagRequestInput.resourceName) + && Objects.equals(resourceValue, assignVlanTagRequestInput.resourceValue) + && Objects.equals(scopeId, assignVlanTagRequestInput.scopeId) + && Objects.equals(key, assignVlanTagRequestInput.key) + && Objects.equals(vlanType, assignVlanTagRequestInput.vlanType); + } + + @Override + public int hashCode() { + return Objects.hash(policyInstanceName, resourceName, resourceValue, scopeId, key, vlanType); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignVlanTagRequestInput {\n"); + + sb.append(" policyInstanceName: ").append(toIndentedString(policyInstanceName)).append("\n"); + sb.append(" resourceName: ").append(toIndentedString(resourceName)).append("\n"); + sb.append(" resourceValue: ").append(toIndentedString(resourceValue)).append("\n"); + sb.append(" scopeId: ").append(toIndentedString(scopeId)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" vlanType: ").append(toIndentedString(vlanType)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponse.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponse.java new file mode 100644 index 00000000..5b5ea5c4 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponse.java @@ -0,0 +1,135 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.model; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import javax.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModelProperty; + +/** + * AssignVlanTagResponse.java Purpose: Provide Assign VlanTag Response Model + * + * @author Saurav Paira + * @version 1.0 + */ +public class AssignVlanTagResponse { + + private @Valid List output = new ArrayList(); + private @Valid Integer errorCode = null; + private @Valid String errorMessage = null; + + public AssignVlanTagResponse() {} + + /** + **/ + public AssignVlanTagResponse output(List output) { + this.output = output; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("output") + public List getOutput() { + return output; + } + + public void setOutput(List output) { + this.output = output; + } + + /** + **/ + public AssignVlanTagResponse errorCode(Integer errorCode) { + this.errorCode = errorCode; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("error-code") + public Integer getErrorCode() { + return errorCode; + } + + public void setErrorCode(Integer errorCode) { + this.errorCode = errorCode; + } + + /** + **/ + public AssignVlanTagResponse errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("error-message") + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssignVlanTagResponse assignVlanTagResponse = (AssignVlanTagResponse) o; + return Objects.equals(errorCode, assignVlanTagResponse.errorCode) + && Objects.equals(errorMessage, assignVlanTagResponse.errorMessage) + && Objects.equals(output, assignVlanTagResponse.output); + } + + @Override + public int hashCode() { + return Objects.hash(output, errorCode, errorMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignVlanTagResponse {\n"); + + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponseOutput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponseOutput.java new file mode 100644 index 00000000..b8b186b6 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/AssignVlanTagResponseOutput.java @@ -0,0 +1,153 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.model; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import javax.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModelProperty; + +/** + * AssignVlanTagResponseOutput.java Purpose: Provide Assign VlanTag Response Output Model + * + * @author Saurav Paira + * @version 1.0 + */ +public class AssignVlanTagResponseOutput { + + private @Valid String resourceName = null; + private @Valid String resourceValue = null; + private @Valid String resourceVlanRole = null; + private @Valid List storedElements = new ArrayList(); + + /** + **/ + public AssignVlanTagResponseOutput resourceName(String resourceName) { + this.resourceName = resourceName; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("resource-name") + public String getResourceName() { + return resourceName; + } + + public void setResourceName(String resourceName) { + this.resourceName = resourceName; + } + + /** + **/ + public AssignVlanTagResponseOutput resourceValue(String resourceValue) { + this.resourceValue = resourceValue; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("resource-value") + public String getResourceValue() { + return resourceValue; + } + + public void setResourceValue(String resourceValue) { + this.resourceValue = resourceValue; + } + + /** + **/ + public AssignVlanTagResponseOutput resourceVlanRole(String resourceVlanRole) { + this.resourceVlanRole = resourceVlanRole; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("resource-vlan-role") + public String getResourceVlanRole() { + return resourceVlanRole; + } + + public void setResourceVlanRole(String resourceVlanRole) { + this.resourceVlanRole = resourceVlanRole; + } + + /** + **/ + public AssignVlanTagResponseOutput storedElements(List storedElements) { + this.storedElements = storedElements; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("stored-elements") + public List getStoredElements() { + return storedElements; + } + + public void setStoredElements(List storedElements) { + this.storedElements = storedElements; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AssignVlanTagResponseOutput assignVlanTagResponseOutput = (AssignVlanTagResponseOutput) o; + return Objects.equals(resourceName, assignVlanTagResponseOutput.resourceName) + && Objects.equals(resourceValue, assignVlanTagResponseOutput.resourceValue) + && Objects.equals(resourceVlanRole, assignVlanTagResponseOutput.resourceVlanRole) + && Objects.equals(storedElements, assignVlanTagResponseOutput.storedElements); + } + + @Override + public int hashCode() { + return Objects.hash(resourceName, resourceValue, resourceVlanRole, storedElements); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AssignVlanTagResponseOutput {\n"); + + sb.append(" resourceName: ").append(toIndentedString(resourceName)).append("\n"); + sb.append(" resourceValue: ").append(toIndentedString(resourceValue)).append("\n"); + sb.append(" resourceVlanRole: ").append(toIndentedString(resourceVlanRole)).append("\n"); + sb.append(" storedElements: ").append(toIndentedString(storedElements)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/PingResponse.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/PingResponse.java new file mode 100644 index 00000000..d8ea0ecf --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/PingResponse.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.model; + +/** + * PingResponse.java Purpose: Provide VlanTag API Ping Response Model + * + * @author Saurav Paira + * @version 1.0 + */ +public class PingResponse { + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + private String message; + + public PingResponse() { + + } + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequest.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequest.java new file mode 100644 index 00000000..aa2f0ef9 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequest.java @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.model; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import javax.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModelProperty; + +/** + * UnassignVlanTagRequest.java Purpose: Provide Unassign VlanTag Request Model + * + * @author Saurav Paira + * @version 1.0 + */ +public class UnassignVlanTagRequest { + + private @Valid List input = new ArrayList(); + + /** + **/ + public UnassignVlanTagRequest input(List input) { + this.input = input; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("input") + public List getInput() { + return input; + } + + public void setInput(List input) { + this.input = input; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnassignVlanTagRequest unassignVlanTagRequest = (UnassignVlanTagRequest) o; + return Objects.equals(input, unassignVlanTagRequest.input); + } + + @Override + public int hashCode() { + return Objects.hash(input); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnassignVlanTagRequest {\n"); + + sb.append(" input: ").append(toIndentedString(input)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequestInput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequestInput.java new file mode 100644 index 00000000..64cc9113 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagRequestInput.java @@ -0,0 +1,130 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.model; + +import java.util.Objects; + +import javax.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModelProperty; + +/** + * UnassignVlanTagRequestInput.java Purpose: Provide Unassign VlanTag Request Input Model + * + * @author Saurav Paira + * @version 1.0 + */ +public class UnassignVlanTagRequestInput { + + private @Valid String policyInstanceName = null; + private @Valid String vlanType = null; + private @Valid String key = null; + + /** + **/ + public UnassignVlanTagRequestInput policyInstanceName(String policyInstanceName) { + this.policyInstanceName = policyInstanceName; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("policy-instance-name") + public String getPolicyInstanceName() { + return policyInstanceName; + } + + public void setPolicyInstanceName(String policyInstanceName) { + this.policyInstanceName = policyInstanceName; + } + + /** + **/ + public UnassignVlanTagRequestInput vlanType(String vlanType) { + this.vlanType = vlanType; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("vlan-type") + public String getVlanType() { + return vlanType; + } + + public void setVlanType(String vlanType) { + this.vlanType = vlanType; + } + + /** + **/ + public UnassignVlanTagRequestInput key(String key) { + this.key = key; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("key") + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnassignVlanTagRequestInput unassignVlanTagRequestInput = (UnassignVlanTagRequestInput) o; + return Objects.equals(policyInstanceName, unassignVlanTagRequestInput.policyInstanceName) + && Objects.equals(vlanType, unassignVlanTagRequestInput.vlanType) + && Objects.equals(key, unassignVlanTagRequestInput.key); + } + + @Override + public int hashCode() { + return Objects.hash(policyInstanceName, vlanType, key); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnassignVlanTagRequestInput {\n"); + + sb.append(" policyInstanceName: ").append(toIndentedString(policyInstanceName)).append("\n"); + sb.append(" vlanType: ").append(toIndentedString(vlanType)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponse.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponse.java new file mode 100644 index 00000000..2bc95daa --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponse.java @@ -0,0 +1,131 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.model; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +import javax.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModelProperty; + +/** + * UnassignVlanTagResponse.java Purpose: Provide Unassign VlanTag Response Model + * + * @author Saurav Paira + * @version 1.0 + */ +public class UnassignVlanTagResponse { + private @Valid List output = new ArrayList(); + private @Valid Integer errorCode = null; + private @Valid String errorMessage = null; + + /** + **/ + public UnassignVlanTagResponse output(List output) { + this.output = output; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("output") + public List getOutput() { + return output; + } + + public void setOutput(List output) { + this.output = output; + } + + /** + **/ + public UnassignVlanTagResponse errorCode(Integer errorCode) { + this.errorCode = errorCode; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("error-code") + public Integer getErrorCode() { + return errorCode; + } + + public void setErrorCode(Integer errorCode) { + this.errorCode = errorCode; + } + + /** + **/ + public UnassignVlanTagResponse errorMessage(String errorMessage) { + this.errorMessage = errorMessage; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("error-message") + public String getErrorMessage() { + return errorMessage; + } + + public void setErrorMessage(String errorMessage) { + this.errorMessage = errorMessage; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnassignVlanTagResponse unassignVlanTagResponse = (UnassignVlanTagResponse) o; + return Objects.equals(output, unassignVlanTagResponse.output) + && Objects.equals(errorCode, unassignVlanTagResponse.errorCode) + && Objects.equals(errorMessage, unassignVlanTagResponse.errorMessage); + } + + @Override + public int hashCode() { + return Objects.hash(output, errorCode, errorMessage); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnassignVlanTagResponse {\n"); + + sb.append(" output: ").append(toIndentedString(output)).append("\n"); + sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n"); + sb.append(" errorMessage: ").append(toIndentedString(errorMessage)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponseOutput.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponseOutput.java new file mode 100644 index 00000000..65420b94 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/UnassignVlanTagResponseOutput.java @@ -0,0 +1,131 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.model; + +import java.util.Objects; + +import javax.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModelProperty; + +/** + * UnassignVlanTagResponseOutput.java Purpose: Provide Unassign VlanTag Response Output Model + * + * @author Saurav Paira + * @version 1.0 + */ +public class UnassignVlanTagResponseOutput { + private @Valid String vlanType = null; + private @Valid String key = null; + private @Valid String vlantagName = null; + + /** + **/ + public UnassignVlanTagResponseOutput vlanType(String vlanType) { + this.vlanType = vlanType; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("vlan-type") + public String getVlanType() { + return vlanType; + } + + public void setVlanType(String vlanType) { + this.vlanType = vlanType; + } + + /** + **/ + public UnassignVlanTagResponseOutput key(String key) { + this.key = key; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("key") + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + /** + **/ + public UnassignVlanTagResponseOutput vlantagName(String vlantagName) { + this.vlantagName = vlantagName; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("vlantag-name") + public String getVlantagName() { + return vlantagName; + } + + public void setVlantagName(String vlantagName) { + this.vlantagName = vlantagName; + } + + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UnassignVlanTagResponseOutput unassignVlanTagResponseOutput = (UnassignVlanTagResponseOutput) o; + return Objects.equals(vlanType, unassignVlanTagResponseOutput.vlanType) + && Objects.equals(key, unassignVlanTagResponseOutput.key) + && Objects.equals(vlantagName, unassignVlanTagResponseOutput.vlantagName); + } + + @Override + public int hashCode() { + return Objects.hash(vlanType, key, vlantagName); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UnassignVlanTagResponseOutput {\n"); + + sb.append(" vlanType: ").append(toIndentedString(vlanType)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" vlantagName: ").append(toIndentedString(vlantagName)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/VlanTag.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/VlanTag.java new file mode 100644 index 00000000..1a207fd7 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/model/VlanTag.java @@ -0,0 +1,149 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.model; + +import java.util.Objects; + +import javax.validation.Valid; + +import com.fasterxml.jackson.annotation.JsonProperty; + +import io.swagger.annotations.ApiModelProperty; + +/** + * VlanTag.java Purpose: Provide VlanTag Model for the Assign Response Output + * + * @author Saurav Paira + * @version 1.0 + */ +public class VlanTag { + + private @Valid String vlanUuid = null; + private @Valid String vlantagName = null; + private @Valid String vlantagValue = null; + private @Valid String elementVlanRole = null; + + /** + **/ + public VlanTag vlanUuid(String vlanUuid) { + this.vlanUuid = vlanUuid; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("vlan-uuid") + public String getVlanUuid() { + return vlanUuid; + } + + public void setVlanUuid(String vlanUuid) { + this.vlanUuid = vlanUuid; + } + + /** + **/ + public VlanTag vlantagName(String vlantagName) { + this.vlantagName = vlantagName; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("vlantag-name") + public String getVlantagName() { + return vlantagName; + } + + public void setVlantagName(String vlantagName) { + this.vlantagName = vlantagName; + } + + /** + **/ + public VlanTag vlantagValue(String vlantagValue) { + this.vlantagValue = vlantagValue; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("vlantag-value") + public String getVlantagValue() { + return vlantagValue; + } + + public void setVlantagValue(String vlantagValue) { + this.vlantagValue = vlantagValue; + } + + /** + **/ + public VlanTag elementVlanRole(String elementVlanRole) { + this.elementVlanRole = elementVlanRole; + return this; + } + + @ApiModelProperty(value = "") + @JsonProperty("element-vlan-role") + public String getElementVlanRole() { + return elementVlanRole; + } + + public void setElementVlanRole(String elementVlanRole) { + this.elementVlanRole = elementVlanRole; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + VlanTag vlanTag = (VlanTag) o; + return Objects.equals(vlanUuid, vlanTag.vlanUuid) && Objects.equals(vlantagName, vlanTag.vlantagName) + && Objects.equals(vlantagValue, vlanTag.vlantagValue) + && Objects.equals(elementVlanRole, vlanTag.elementVlanRole); + } + + @Override + public int hashCode() { + return Objects.hash(vlanUuid, vlantagName, vlantagValue, elementVlanRole); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class VlanTag {\n"); + + sb.append(" vlanUuid: ").append(toIndentedString(vlanUuid)).append("\n"); + sb.append(" vlantagName: ").append(toIndentedString(vlantagName)).append("\n"); + sb.append(" vlantagValue: ").append(toIndentedString(vlantagValue)).append("\n"); + sb.append(" elementVlanRole: ").append(toIndentedString(elementVlanRole)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiService.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiService.java new file mode 100644 index 00000000..800346a7 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiService.java @@ -0,0 +1,81 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.service; + +import javax.validation.Valid; +import javax.ws.rs.Consumes; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import org.onap.ccsdk.apps.ms.vlantagapi.core.exception.VlantagApiException; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagRequest; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagResponse; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.PingResponse; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagRequest; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagResponse; + +/** + * VlantagApiService.java Purpose: Provide Vlantag Assignment & UnAssignment + * APIs interface for VNFs + * + * @author Saurav Paira + * @version 1.0 + */ +@Path("/") +public interface VlantagApiService { + + /** + * This is a assignVlanTag service to assign Vlantags based on the + * AssignVlanTagRequest and Policy instance. + * + * @param AssignVlanTagRequest + * @return AssignVlanTagResponse + */ + @POST + @Path("/v1/assign") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + AssignVlanTagResponse assignVlanTag(@Valid AssignVlanTagRequest body) throws VlantagApiException, Exception; + + /** + * This is a unassignVlanTag service to unassign Vlantags based on the + * UnassignVlanTagRequest and Policy instance. + * + * @param UnassignVlanTagRequest + * @return UnassignVlanTagResponse + */ + @POST + @Path("/v1/unassign") + @Consumes({ MediaType.APPLICATION_JSON }) + @Produces({ MediaType.APPLICATION_JSON }) + UnassignVlanTagResponse unassignVlanTag(@Valid UnassignVlanTagRequest body) throws VlantagApiException, Exception; + + /** + * This is a ping service to check the Vlantag Api is Up and running. + * + * @param name + * @return PingResponse + */ + @GET + @Path("/v1/ping/{name}") + @Produces(MediaType.APPLICATION_JSON) + PingResponse getPing(@PathParam("name") String name); + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java new file mode 100644 index 00000000..3b79cdc1 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/core/service/VlantagApiServiceImpl.java @@ -0,0 +1,561 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.core.service; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Optional; +import java.util.UUID; + +import org.onap.ccsdk.apps.ms.vlantagapi.core.exception.VlantagApiException; +import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.AllowedRanges; +import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.Elements; +import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.ResourceModel; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagRequest; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagRequestInput; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagResponse; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.AssignVlanTagResponseOutput; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.PingResponse; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagRequest; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagRequestInput; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagResponse; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.UnassignVlanTagResponseOutput; +import org.onap.ccsdk.apps.ms.vlantagapi.core.model.VlanTag; +import org.onap.ccsdk.apps.ms.vlantagapi.extinf.pm.PolicyManagerClient; +import org.onap.ccsdk.sli.adaptors.ra.ResourceAllocator; +import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceEntity; +import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceRequest; +import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceResponse; +import org.onap.ccsdk.sli.adaptors.ra.comp.ResourceTarget; +import org.onap.ccsdk.sli.adaptors.rm.data.AllocationStatus; +import org.onap.ccsdk.sli.adaptors.rm.data.Range; +import org.onap.ccsdk.sli.adaptors.rm.data.ResourceType; +import org.onap.ccsdk.sli.adaptors.util.str.StrUtil; + + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * VlantagApiServiceImpl.java Purpose: Provide Vlantag Assignment & UnAssignment + * APIs service implementation for VNFs + * + * @author Saurav Paira + * @version 1.0 + */ +@Service +public class VlantagApiServiceImpl implements VlantagApiService { + + private static final VlantagApiService INSTANCE = new VlantagApiServiceImpl(); + private static final Logger log = LoggerFactory.getLogger(VlantagApiServiceImpl.class); + private static final String BEGIN_SQUAREBRACKET_RC = "#BSB#"; + private static final String END_SQUAREBRACKET_RC = "#ESB#"; + + @Autowired + private ResourceAllocator resourceAllocator; + @Autowired + private PolicyManagerClient policyClient; + + public static VlantagApiService getInstance() { + return INSTANCE; + } + + /** + * This is a assignVlanTag service implementation to assign Vlantags based on the + * AssignVlanTagRequest and Policy instance. + * + * @param AssignVlanTagRequest + * @return AssignVlanTagResponse + */ + @Override + public AssignVlanTagResponse assignVlanTag(AssignVlanTagRequest request) throws Exception { + List outputList = new ArrayList<>(); + + try { + validateRequest(request); + List vlanTagRequests = request.getInput(); + + List reservedResources = new ArrayList<>(); + + for (AssignVlanTagRequestInput input : vlanTagRequests) { + log.info("PolicyManagerClient called..for policy : {}", input.getPolicyInstanceName()); + + List resourceModels = policyClient.getPolicy(input.getPolicyInstanceName()); + ResourceModel model = validate(resourceModels, input); + List rl = new ArrayList<>(); + + for (Elements elements : model.getElements()) { + + ResourceEntity re = new ResourceEntity(); + ResourceTarget rt = new ResourceTarget(); + ResourceRequest rr = new ResourceRequest(); + List rsList = new ArrayList<>(); + + prepareResourceAllocatorObjects(input, model, elements, re, rt, rr); + + if (resourceAllocator != null) { + AllocationStatus status = resourceAllocator.reserve(re, rt, rr, rsList); + + if (AllocationStatus.Success.equals(status)) + rl.addAll(rsList); + else { + rollbackVlanTags(reservedResources); + throw new VlantagApiException( + "Failed to reserve VlanTags for Element : {}. " + elements.getVlantagName() + + ". Rolling back vlantags for other elements (if any)."); + } + } else + throw new VlantagApiException( + "ResourceAllocator not available. Failed to Assign VlanTags for Element : " + + elements.getVlantagName() + + ". Rolling back vlantags for other elements (if any)."); + + } + reservedResources.add(input); + outputList.add(prepareVlanTagResponse(input, model, rl)); + } + + } catch (Exception e) { + log.error("Exception : " + e.getMessage(), e); + + AssignVlanTagResponse response = new AssignVlanTagResponse(); + response.setErrorCode(500); + response.setErrorMessage(e.getMessage()); + return response; + } + + AssignVlanTagResponse response = new AssignVlanTagResponse(); + response.setErrorCode(200); + response.setErrorMessage("Success"); + response.setOutput(outputList); + return response; + } + + private void prepareResourceAllocatorObjects(AssignVlanTagRequestInput input, ResourceModel model, Elements element, + ResourceEntity re, ResourceTarget rt, ResourceRequest rr) throws VlantagApiException { + log.info("Preparing RA Objects for Vlan Type : " + input.getVlanType() + " and Element : " + + element.getVlantagName()); + re.resourceEntityId = input.getKey(); + re.resourceEntityType = model.getKeyType() == null ? "DEFAULT" : model.getKeyType(); + re.resourceEntityVersion = "1"; + + rt.resourceTargetId = input.getScopeId(); + rt.resourceTargetType = model.getScope() == null ? "DEFAULT" : model.getScope(); + + rr.resourceName = input.getVlanType(); + rr.serviceModel = input.getPolicyInstanceName(); + rr.endPointPosition = element.getVlantagName(); + rr.resourceType = ResourceType.Range; + rr.applicationId = "SDNC"; + rr.rangeMaxOverride = -1; + rr.rangeMinOverride = -1; + + List rangeList = new ArrayList<>(); + for (AllowedRanges allowedRange : element.getAllowedRanges()) { + Range range = new Range(); + + if (allowedRange.getMin() != null && !allowedRange.getMin().isEmpty()) + range.min = Integer.parseInt(allowedRange.getMin()); + + if (allowedRange.getMax() != null && !allowedRange.getMax().isEmpty()) + range.max = Integer.parseInt(allowedRange.getMax()); + + rangeList.add(range); + } + + rr.rangeOverrideList = rangeList; + + String resourceValue = resolveResourceElementValue(input, model, element); + if (resourceValue != null) { + rr.rangeRequestedNumbers = resourceValue; /* Manually provided values */ + + /* + * If the override flag is TRUE, then add the resource value also in the range, + * so it will ignore the current range min-max in the policy. Persist in the DB + * if available else Fail. + */ + if (element.getOverwrite() != null && element.getOverwrite().equalsIgnoreCase("TRUE")) { + Range range = new Range(); + range.min = Integer.parseInt(resourceValue); + rangeList.add(range); + } + } + + StrUtil.info(log, re); + StrUtil.info(log, rt); + StrUtil.info(log, rr); + + } + + protected String resolveResourceElementValue(AssignVlanTagRequestInput input, ResourceModel model, Elements element) + throws VlantagApiException { + String recipe = trimBrackets(model.getResourceResolutionRecipe().trim()); + + if (input.getResourceValue() != null && !input.getResourceValue().trim().isEmpty() + && !input.getResourceValue().contains("$")) { + log.info("Resource Value : " + input.getResourceValue()); + String resourceValue = trimBrackets(input.getResourceValue()); + + String[] vlantagNames = recipe.split(","); + String[] resourceValues = resourceValue.split(","); + + try { + for (int i = 0; i < vlantagNames.length; i++) { + if (vlantagNames[i].trim().equalsIgnoreCase(element.getVlantagName().trim())) + return resourceValues[i].trim(); + } + } catch (IndexOutOfBoundsException e) { + throw new VlantagApiException("No Matching Resource Value found from Recipe : \"" + + model.getResourceResolutionRecipe() + "\" for Vlantag Name : " + element.getVlantagName()); + } + + } + return null; + } + + ResourceModel validate(List resourceModels, AssignVlanTagRequestInput input) + throws VlantagApiException { + ResourceModel targetModel = null; + if (resourceModels != null && !resourceModels.isEmpty()) { + for (ResourceModel model : resourceModels) { + if (model.getVlanType().equals(input.getVlanType())) { + targetModel = model; + break; + } + } + validateModel(targetModel, input); + } else + throw new VlantagApiException("No Resource Models available in Policy Manager for Policy Instance Name : " + + input.getPolicyInstanceName()); + return targetModel; + } + + void validateModel(ResourceModel model, AssignVlanTagRequestInput input) throws VlantagApiException { + + if (model == null) + throw new VlantagApiException( + "No Matching Policy Resource Model found for Vlan Type : " + input.getVlanType()); + else { + if (model.getResourceResolutionRecipe() == null || model.getResourceResolutionRecipe().isEmpty()) + throw new VlantagApiException( + "Resource Resolution Recipe is null in Resource Model for Vlan Type : " + input.getVlanType()); + + if (model.getScope() == null || model.getScope().isEmpty()) + throw new VlantagApiException("Scope is null in Resource Model for Vlan Type : " + input.getVlanType()); + + List elements = model.getElements(); + validateElements(elements, input); + } + + } + + void validateElements(List elements, AssignVlanTagRequestInput input) throws VlantagApiException { + if (elements != null && !elements.isEmpty()) { + for (Elements element : elements) { + if (element.getVlantagName() == null) + throw new VlantagApiException( + "Vlantag Name missing for Element in Resource Model Policy for Vlan Type : " + + input.getVlanType()); + if (element.getAllowedRanges() == null || element.getAllowedRanges().isEmpty()) + throw new VlantagApiException( + "Allowed Ranges missing for Element in Resource Model Policy for Vlan Type : " + + input.getVlanType()); + } + } else + throw new VlantagApiException( + "No Vlantag Elements found in Resource Model Policy for Vlan Type : " + input.getVlanType()); + + } + + PolicyManagerClient getPolicyManagerClient() { + return new PolicyManagerClient(); + } + + void validateRequest(AssignVlanTagRequest request) throws VlantagApiException { + if (request == null) + throw new VlantagApiException("VlanTag Assign Request is null."); + + List inputList = request.getInput(); + + if (inputList == null || inputList.isEmpty()) + throw new VlantagApiException("VlanTag Assign Request Input is null or empty."); + + for (AssignVlanTagRequestInput input : inputList) { + if (input.getPolicyInstanceName() == null || input.getPolicyInstanceName().isEmpty()) + throw new VlantagApiException("VlanTag Assign Request policy-instance-name is null."); + + if (input.getVlanType() == null || input.getVlanType().isEmpty()) + throw new VlantagApiException("VlanTag Assign Request vlan-type is null."); + + if (input.getScopeId() == null || input.getScopeId().isEmpty()) + throw new VlantagApiException("VlanTag Assign Request scope-id is null."); + + if (input.getKey() == null || input.getKey().isEmpty()) + throw new VlantagApiException("VlanTag Assign Request key is null."); + } + + } + + private AssignVlanTagResponseOutput prepareVlanTagResponse(AssignVlanTagRequestInput input, ResourceModel model, + List rl) { + AssignVlanTagResponseOutput ro = new AssignVlanTagResponseOutput(); + List vlanTagList = new ArrayList<>(); + + if (rl != null && !rl.isEmpty()) { + ro.setResourceName(input.getResourceName()); + ro.setResourceValue(resolveRecipe(model, rl)); + ro.setResourceVlanRole(model.getResourceVlanRole()); + if (model.getDataStore() != null && !model.getDataStore().isEmpty()) { + for (ResourceResponse rr : rl) { + VlanTag tag = new VlanTag(); + Optional optionalElements = model.getElements().stream() + .filter(element -> element.getVlantagName().equalsIgnoreCase(rr.endPointPosition)) + .findFirst(); + optionalElements.ifPresent(element -> tag.setElementVlanRole(element.getElementVlanRole())); + + tag.setVlanUuid(UUID.randomUUID().toString()); + tag.setVlantagName(rr.endPointPosition); + tag.setVlantagValue(rr.resourceAllocated); + vlanTagList.add(tag); + } + + } + ro.setStoredElements(vlanTagList); + } + + return ro; + } + + protected String resolveRecipe(ResourceModel model, List rl) { + String recipe = model.getResourceResolutionRecipe().trim(); + String resourceValue = recipe; + + if (recipe.contains(BEGIN_SQUAREBRACKET_RC)) { + recipe = recipe.replace(BEGIN_SQUAREBRACKET_RC, ""); + resourceValue = resourceValue.replace(BEGIN_SQUAREBRACKET_RC, "[ "); + } + + if (recipe.contains(END_SQUAREBRACKET_RC)) { + recipe = recipe.replace(END_SQUAREBRACKET_RC, ""); + resourceValue = resourceValue.replace(END_SQUAREBRACKET_RC, " ]"); + } + + String[] vlantagNames = recipe.split(","); + + for (String vlantagName : vlantagNames) { + for (ResourceResponse rr : rl) { + if (vlantagName.trim().equalsIgnoreCase(rr.endPointPosition)) { + resourceValue = resourceValue.replace(vlantagName, " " + rr.resourceAllocated); + break; + } + } + } + + log.info(resourceValue); + + return resourceValue; + } + + private void rollbackVlanTags(List reservedResources) throws Exception { + UnassignVlanTagRequest unassignRequest = new UnassignVlanTagRequest(); + List inputList = new ArrayList<>(); + + if (reservedResources != null && !reservedResources.isEmpty()) { + reservedResources.forEach(assignReqInput -> { + + UnassignVlanTagRequestInput input = new UnassignVlanTagRequestInput(); + input.setVlanType(assignReqInput.getVlanType()); + input.setKey(assignReqInput.getKey()); + input.setPolicyInstanceName(assignReqInput.getPolicyInstanceName()); + inputList.add(input); + }); + unassignRequest.setInput(inputList); + unassignVlanTag(unassignRequest); + } + + } + + /** + * This is a unassignVlanTag service implementation to unassign Vlantags based on the + * UnassignVlanTagRequest and Policy instance. + * + * @param UnassignVlanTagRequest + * @return UnassignVlanTagResponse + */ + @Override + public UnassignVlanTagResponse unassignVlanTag(UnassignVlanTagRequest request) throws Exception { + UnassignVlanTagResponse response = new UnassignVlanTagResponse(); + List output = new ArrayList<>(); + + try { + validateRequest(request); + List vlanTagRequests = request.getInput(); + + for (UnassignVlanTagRequestInput input : vlanTagRequests) { + List resourceModels = policyClient.getPolicy(input.getPolicyInstanceName()); + ResourceModel model = validate(resourceModels, input); + + for (Elements elements : model.getElements()) { + + ResourceEntity re = new ResourceEntity(); + re.resourceEntityId = input.getKey(); + re.resourceEntityType = model.getKeyType() == null ? "DEFAULT" : model.getKeyType(); + re.resourceEntityVersion = "1"; + + ResourceRequest rr = new ResourceRequest(); + rr.endPointPosition = elements.getVlantagName(); + + if (resourceAllocator != null) { + AllocationStatus status = resourceAllocator.release(re, rr); + + if (AllocationStatus.Success.equals(status)) { + UnassignVlanTagResponseOutput ro = new UnassignVlanTagResponseOutput(); + ro.setKey(input.getKey()); + ro.setVlanType(input.getVlanType()); + ro.setVlantagName(elements.getVlantagName()); + output.add(ro); + } else { + throw new VlantagApiException( + "Failed to release VlanTags for Element : " + elements.getVlantagName() + "."); + } + } else + throw new VlantagApiException( + "ResourceAllocator not available. Failed to Unassign VlanTags for Element : " + + elements.getVlantagName() + + ". Rolling back vlantags for other elements (if any)."); + } + } + } catch (Exception e) { + log.error("Exception : " + e.getMessage(), e); + + response.setErrorCode(500); + response.setErrorMessage(e.getMessage()); + return response; + } + + response.setOutput(output); + response.setErrorCode(200); + response.setErrorMessage("Success"); + return response; + } + + ResourceModel validate(List resourceModels, UnassignVlanTagRequestInput input) + throws VlantagApiException { + ResourceModel targetModel = null; + if (resourceModels != null && !resourceModels.isEmpty()) { + for (ResourceModel model : resourceModels) { + if (model.getVlanType().equals(input.getVlanType())) { + targetModel = model; + break; + } + } + validateModel(targetModel, input); + } else + throw new VlantagApiException("No Resource Models available in Policy Manager for Policy Instance Name : " + + input.getPolicyInstanceName()); + return targetModel; + } + + void validateModel(ResourceModel model, UnassignVlanTagRequestInput input) throws VlantagApiException { + if (model == null) + throw new VlantagApiException( + "No Matching Policy Resource Model found for Vlan Type : " + input.getVlanType()); + else { + if (model.getResourceResolutionRecipe() == null || model.getResourceResolutionRecipe().isEmpty()) + throw new VlantagApiException( + "Resource Resolution Recipe is null in Resource Model for Vlan Type : " + input.getVlanType()); + + if (model.getScope() == null || model.getScope().isEmpty()) + throw new VlantagApiException("Scope is null in Resource Model for Vlan Type : " + input.getVlanType()); + + List elements = model.getElements(); + validateElements(elements, input); + } + + } + + protected void validateElements(List elements, UnassignVlanTagRequestInput input) + throws VlantagApiException { + if (elements != null && !elements.isEmpty()) { + for (Elements element : elements) { + if (element.getVlantagName() == null) + throw new VlantagApiException( + "Vlantag Name missing for Element in Resource Model Policy for Vlan Type : " + + input.getVlanType()); + } + } else + throw new VlantagApiException( + "No Vlantag Elements found in Resource Model Policy for Vlan Type : " + input.getVlanType()); + + } + + protected void validateRequest(UnassignVlanTagRequest request) throws VlantagApiException { + if (request == null) + throw new VlantagApiException("VlanTag Unassign Request is null."); + + List inputList = request.getInput(); + if (inputList == null || inputList.isEmpty()) + throw new VlantagApiException("VlanTag Unassign Request Input is null or empty."); + + for (UnassignVlanTagRequestInput input : inputList) { + if (input.getPolicyInstanceName() == null || input.getPolicyInstanceName().isEmpty()) + throw new VlantagApiException("VlanTag Unassign Request policy-instance-name is null."); + + if (input.getVlanType() == null || input.getVlanType().isEmpty()) + throw new VlantagApiException("VlanTag Unassign Request resource-name is null."); + + if (input.getKey() == null || input.getKey().isEmpty()) + throw new VlantagApiException("VlanTag Unassign Request key is null."); + } + + } + + /** + * This is a ping service implementation to check the Vlantag Api is Up and running. + * + * @param name + * @return PingResponse + */ + @Override + public PingResponse getPing(String name) { + PingResponse ping = new PingResponse(); + ping.setMessage("Ping response : " + name + " Time : " + new Date()); + return ping; + } + + + protected void setResourceAllocator(ResourceAllocator ra) { + this.resourceAllocator = ra; + } + + protected String trimBrackets(String recipe) { + if (recipe != null) { + if (recipe.contains(BEGIN_SQUAREBRACKET_RC)) + recipe = recipe.replace(BEGIN_SQUAREBRACKET_RC, ""); + if (recipe.contains(END_SQUAREBRACKET_RC)) + recipe = recipe.replace(END_SQUAREBRACKET_RC, ""); + if (recipe.contains("[")) + recipe = recipe.replace("[", ""); + if (recipe.contains("]")) + recipe = recipe.replace("]", ""); + } + return recipe; + } + +} diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyDataDeserializer.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyDataDeserializer.java new file mode 100644 index 00000000..ebb5b296 --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyDataDeserializer.java @@ -0,0 +1,111 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.extinf.pm; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; + +import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.PolicyData; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.node.ObjectNode; + +/** + * PolicyDataDeserializer.java Purpose: + * This is a custom deserializer for "policy-data" element of the response from the Policy management REST call + * to get Policy details based on a policy name. + * + * The response will have different "child tree"s ( policy data) for different policy names. + * Each type of child is structurally, syntactically, semantically unique. + * However, there is no explicit way to identify the right child type in the "policy-data" element itself + * Hence , the hack is : assuming there is a unique property in each type of child of Policy-data, + * look for that property to determine the correct target child type to deserialize to. + * These unique properties are stored in polymorphicsRegistry and looked up against to find a match + * If a match is found, use that child type is used. + */ +public class PolicyDataDeserializer extends StdDeserializer { + + /** + * + */ + private static final long serialVersionUID = 1L; + + private static Logger log = LoggerFactory.getLogger(PolicyDataDeserializer.class); + + /* + * Keep a register of all extensions of PolicyData type by a unique attribute that distringuishes + * them from one another + */ + private Map> polymorphicsRegistry = + new HashMap<>(); + + public PolicyDataDeserializer() { + super(PolicyData.class); + } + + /* + * Method to add to the registry of PolicyData extensions by their distinguishing attribure + */ + public void registerExtendersByUniqueness(String uniqueAttribute, Class policyDataClass) { + polymorphicsRegistry.put(uniqueAttribute, policyDataClass); + } + + @Override + public PolicyData deserialize(JsonParser jp, DeserializationContext ctxt) + throws IOException { + + PolicyData retVal = null; + Class policyDataClass = null; + + ObjectMapper mapper = (ObjectMapper) jp.getCodec(); + ObjectNode root = mapper.readTree(jp); + + //Go through all the elements in this node. If a match is found in the registry of uniqueness, + // it means we identified what extension of PolicyData we are dealing with. If no match found, return null + Iterator> elementsIterator = root.fields(); + while (elementsIterator.hasNext()) + { + Entry element=elementsIterator.next(); + String name = element.getKey(); + + if (polymorphicsRegistry.containsKey(name)) + { + policyDataClass = polymorphicsRegistry.get(name); + break; + } + } + + //If we know what child type of PolicyData we are working on , use that class to deserialize this node + // from its root. If not, throw exception + if (policyDataClass != null) { + retVal = mapper.treeToValue(root, policyDataClass); + } + else { + log.info("No matching Child of PolicyData is present in this node tree"); + } + return retVal; + } +} + diff --git a/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyManagerClient.java b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyManagerClient.java new file mode 100644 index 00000000..2378584e --- /dev/null +++ b/ms/vlantag-api/src/main/java/org/onap/ccsdk/apps/ms/vlantagapi/extinf/pm/PolicyManagerClient.java @@ -0,0 +1,189 @@ +/******************************************************************************* + * Copyright © 2017-2018 AT&T Intellectual Property. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************/ +package org.onap.ccsdk.apps.ms.vlantagapi.extinf.pm; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import org.onap.ccsdk.apps.ms.vlantagapi.core.exception.VlantagApiException; +import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.PolicyConfig; +import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.PolicyData; +import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.PolicyEngineResponse; +import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.RequestObject; +import org.onap.ccsdk.apps.ms.vlantagapi.core.extinf.pm.model.ResourceModel; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.env.Environment; +import org.springframework.http.HttpEntity; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.ResponseEntity; +import org.springframework.http.client.BufferingClientHttpRequestFactory; +import org.springframework.http.client.SimpleClientHttpRequestFactory; +import org.springframework.http.converter.HttpMessageConverter; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.stereotype.Component; +import org.springframework.web.client.RestClientException; +import org.springframework.web.client.RestTemplate; + +import com.fasterxml.jackson.core.Version; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.module.SimpleModule; + +/** + * PolicyManagerClient.java Purpose: Client for Policy Manager applications and + * gets policies from policy manager. + * + * @author Saurav Paira + * @version 1.0 + */ +@Component +public class PolicyManagerClient { + + private static Logger log = LoggerFactory.getLogger(PolicyManagerClient.class); + + private static final String CLIENT_AUTH = "ClientAuth"; + private static final String ENVIRONMENT = "Environment"; + + private static final String POLICYMGR_URL_PN = "intf.pdp.policyengine.url"; + private static final String POLICYMGR_AUTHORIZATION_PN = "intf.pdp.policyengine.http.headers.authorization"; + private static final String POLICYMGR_CLIENTAUTH_PN = "intf.pdp.policyengine.http.headers.clientauth"; + private static final String POLICYMGR_ENVIRONMENT_PN = "intf.pdp.policyengine.http.headers.environment"; + + @Autowired + Environment env; + /* + * Main method to call to get the vlan tag selection policy data + */ + + public synchronized List getPolicy(final String policyName) throws VlantagApiException { + return getPolicyFromPDP(policyName); + } + + /* + * REST call to Policy Manager + */ + public PolicyEngineResponse[] getConfigUsingPost(RequestObject requestObject) throws VlantagApiException { + + PolicyEngineResponse[] result = null; + + String url = env.getProperty(POLICYMGR_URL_PN); + log.info("url si : {}", url); + HttpHeaders headers = getRequestHeaders(); + HttpEntity request = new HttpEntity<>(requestObject, headers); + RestTemplate restTemplate = getRestTemplate(); + + try { + ResponseEntity response = restTemplate.exchange(url, HttpMethod.POST, request, PolicyEngineResponse[].class); + result = response.getBody(); + + } catch (RestClientException rce) { + throw new VlantagApiException(rce.getLocalizedMessage()); + } + return result; + } + + private HttpHeaders getRequestHeaders() { + HttpHeaders headers = new HttpHeaders(); + //Read from application environment with appropriate profile + headers.add(HttpHeaders.AUTHORIZATION, env.getProperty(POLICYMGR_AUTHORIZATION_PN)); + headers.add(CLIENT_AUTH, env.getProperty(POLICYMGR_CLIENTAUTH_PN)); + headers.add(ENVIRONMENT, env.getProperty(POLICYMGR_ENVIRONMENT_PN)); + headers.add(HttpHeaders.ACCEPT, "application/json"); + headers.add(HttpHeaders.CONTENT_TYPE, "application/json"); + return headers; + } + + public List getPolicyFromPDP(String policyName) throws VlantagApiException { + + List retVal = null; + + try { + RequestObject requestObject = new RequestObject(); + requestObject.setPolicyName(policyName); + retVal = extractResourceModelsFromResponse(getConfigUsingPost(requestObject)); + } catch (IOException e) { + throw new VlantagApiException(e); + } + return retVal; + } + + public List extractResourceModelsFromResponse(PolicyEngineResponse[] result) + throws IOException { + + List retVal = null; + if (null != result && result.length > 0) { + + //There will be only one element in the result - confirmed with PDP developer + //Also, due to escaped duble quoted strings in the JSON, the config element will be deserialized + //as a String rather than as PolicyConfig. Which is good anyway for our processing, but FYI + // So , get the String and separately pass it through a new ObjectMapper + String configValue = result[0].getConfig(); + ObjectMapper om = getConfigDeserializerObjectMapper(); + PolicyConfig config = om.readValue(configValue, PolicyConfig.class); + retVal = config.getContent().getResourceModels(); + } + return retVal; + } + + private ObjectMapper getConfigDeserializerObjectMapper() { + + /// We need a special deserializer for Policy data. Depending on policy name sent as input, the policy data returned + // differs not only in content, but in structure too. In other words, Polymorphism!!! There will be a(n) abstract + // PolicyData and one child each for each policy. The SOLID ASSUMPTION here is that there is one unique attribute in each + // policy to distinguish it from one another. + // If that turns out to be wrong, we will need another desrialization policy and corresponding new deserializer + + PolicyDataDeserializer deserializer = new PolicyDataDeserializer(); + deserializer.registerExtendersByUniqueness("key-type", ResourceModel.class); + + SimpleModule module = new SimpleModule("PolymorphicPolicyDataDeserializerModule", + new Version(1, 0, 0, null, null, null)); + module.addDeserializer(PolicyData.class, deserializer); + + ObjectMapper om = new ObjectMapper(); + om.registerModule(module); + om.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + + return om; + } + + /* + * Get appropriately decorated REST template + */ + private RestTemplate getRestTemplate() { + RestTemplate restTemplate = new RestTemplate( + new BufferingClientHttpRequestFactory(new SimpleClientHttpRequestFactory())); + + ObjectMapper om = new ObjectMapper(); + om.configure(DeserializationFeature.ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT, true); + om.configure(DeserializationFeature.USE_JAVA_ARRAY_FOR_JSON_ARRAY, true); + om.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); + + MappingJackson2HttpMessageConverter convertor = new MappingJackson2HttpMessageConverter(om); + List> messageConvertors = new ArrayList<>(); + messageConvertors.add(convertor); + restTemplate.setMessageConverters(messageConvertors); + return restTemplate; + } + + public void setEnv(Environment env) { + this.env = env; + } + +} diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/print.css b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/print.css new file mode 100644 index 00000000..01299a1d --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/print.css @@ -0,0 +1,1361 @@ +/* Original style from softwaremaniacs.org (c) Ivan Sagalaev */ +.swagger-section pre code { + display: block; + padding: 0.5em; + background: #F0F0F0; +} +.swagger-section pre code, +.swagger-section pre .subst, +.swagger-section pre .tag .title, +.swagger-section pre .lisp .title, +.swagger-section pre .clojure .built_in, +.swagger-section pre .nginx .title { + color: black; +} +.swagger-section pre .string, +.swagger-section pre .title, +.swagger-section pre .constant, +.swagger-section pre .parent, +.swagger-section pre .tag .value, +.swagger-section pre .rules .value, +.swagger-section pre .rules .value .number, +.swagger-section pre .preprocessor, +.swagger-section pre .ruby .symbol, +.swagger-section pre .ruby .symbol .string, +.swagger-section pre .aggregate, +.swagger-section pre .template_tag, +.swagger-section pre .django .variable, +.swagger-section pre .smalltalk .class, +.swagger-section pre .addition, +.swagger-section pre .flow, +.swagger-section pre .stream, +.swagger-section pre .bash .variable, +.swagger-section pre .apache .tag, +.swagger-section pre .apache .cbracket, +.swagger-section pre .tex .command, +.swagger-section pre .tex .special, +.swagger-section pre .erlang_repl .function_or_atom, +.swagger-section pre .markdown .header { + color: #800; +} +.swagger-section pre .comment, +.swagger-section pre .annotation, +.swagger-section pre .template_comment, +.swagger-section pre .diff .header, +.swagger-section pre .chunk, +.swagger-section pre .markdown .blockquote { + color: #888; +} +.swagger-section pre .number, +.swagger-section pre .date, +.swagger-section pre .regexp, +.swagger-section pre .literal, +.swagger-section pre .smalltalk .symbol, +.swagger-section pre .smalltalk .char, +.swagger-section pre .go .constant, +.swagger-section pre .change, +.swagger-section pre .markdown .bullet, +.swagger-section pre .markdown .link_url { + color: #080; +} +.swagger-section pre .label, +.swagger-section pre .javadoc, +.swagger-section pre .ruby .string, +.swagger-section pre .decorator, +.swagger-section pre .filter .argument, +.swagger-section pre .localvars, +.swagger-section pre .array, +.swagger-section pre .attr_selector, +.swagger-section pre .important, +.swagger-section pre .pseudo, +.swagger-section pre .pi, +.swagger-section pre .doctype, +.swagger-section pre .deletion, +.swagger-section pre .envvar, +.swagger-section pre .shebang, +.swagger-section pre .apache .sqbracket, +.swagger-section pre .nginx .built_in, +.swagger-section pre .tex .formula, +.swagger-section pre .erlang_repl .reserved, +.swagger-section pre .prompt, +.swagger-section pre .markdown .link_label, +.swagger-section pre .vhdl .attribute, +.swagger-section pre .clojure .attribute, +.swagger-section pre .coffeescript .property { + color: #88F; +} +.swagger-section pre .keyword, +.swagger-section pre .id, +.swagger-section pre .phpdoc, +.swagger-section pre .title, +.swagger-section pre .built_in, +.swagger-section pre .aggregate, +.swagger-section pre .css .tag, +.swagger-section pre .javadoctag, +.swagger-section pre .phpdoc, +.swagger-section pre .yardoctag, +.swagger-section pre .smalltalk .class, +.swagger-section pre .winutils, +.swagger-section pre .bash .variable, +.swagger-section pre .apache .tag, +.swagger-section pre .go .typename, +.swagger-section pre .tex .command, +.swagger-section pre .markdown .strong, +.swagger-section pre .request, +.swagger-section pre .status { + font-weight: bold; +} +.swagger-section pre .markdown .emphasis { + font-style: italic; +} +.swagger-section pre .nginx .built_in { + font-weight: normal; +} +.swagger-section pre .coffeescript .javascript, +.swagger-section pre .javascript .xml, +.swagger-section pre .tex .formula, +.swagger-section pre .xml .javascript, +.swagger-section pre .xml .vbscript, +.swagger-section pre .xml .css, +.swagger-section pre .xml .cdata { + opacity: 0.5; +} +.swagger-section .hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} +.swagger-section .hljs, +.swagger-section .hljs-subst { + color: #444; +} +.swagger-section .hljs-keyword, +.swagger-section .hljs-attribute, +.swagger-section .hljs-selector-tag, +.swagger-section .hljs-meta-keyword, +.swagger-section .hljs-doctag, +.swagger-section .hljs-name { + font-weight: bold; +} +.swagger-section .hljs-built_in, +.swagger-section .hljs-literal, +.swagger-section .hljs-bullet, +.swagger-section .hljs-code, +.swagger-section .hljs-addition { + color: #1F811F; +} +.swagger-section .hljs-regexp, +.swagger-section .hljs-symbol, +.swagger-section .hljs-variable, +.swagger-section .hljs-template-variable, +.swagger-section .hljs-link, +.swagger-section .hljs-selector-attr, +.swagger-section .hljs-selector-pseudo { + color: #BC6060; +} +.swagger-section .hljs-type, +.swagger-section .hljs-string, +.swagger-section .hljs-number, +.swagger-section .hljs-selector-id, +.swagger-section .hljs-selector-class, +.swagger-section .hljs-quote, +.swagger-section .hljs-template-tag, +.swagger-section .hljs-deletion { + color: #880000; +} +.swagger-section .hljs-title, +.swagger-section .hljs-section { + color: #880000; + font-weight: bold; +} +.swagger-section .hljs-comment { + color: #888888; +} +.swagger-section .hljs-meta { + color: #2B6EA1; +} +.swagger-section .hljs-emphasis { + font-style: italic; +} +.swagger-section .hljs-strong { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap { + line-height: 1; + font-family: "Droid Sans", sans-serif; + min-width: 760px; + max-width: 960px; + margin-left: auto; + margin-right: auto; + /* JSONEditor specific styling */ +} +.swagger-section .swagger-ui-wrap b, +.swagger-section .swagger-ui-wrap strong { + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap q, +.swagger-section .swagger-ui-wrap blockquote { + quotes: none; +} +.swagger-section .swagger-ui-wrap p { + line-height: 1.4em; + padding: 0 0 10px; + color: #333333; +} +.swagger-section .swagger-ui-wrap q:before, +.swagger-section .swagger-ui-wrap q:after, +.swagger-section .swagger-ui-wrap blockquote:before, +.swagger-section .swagger-ui-wrap blockquote:after { + content: none; +} +.swagger-section .swagger-ui-wrap .heading_with_menu h1, +.swagger-section .swagger-ui-wrap .heading_with_menu h2, +.swagger-section .swagger-ui-wrap .heading_with_menu h3, +.swagger-section .swagger-ui-wrap .heading_with_menu h4, +.swagger-section .swagger-ui-wrap .heading_with_menu h5, +.swagger-section .swagger-ui-wrap .heading_with_menu h6 { + display: block; + clear: none; + float: left; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + width: 60%; +} +.swagger-section .swagger-ui-wrap table { + border-collapse: collapse; + border-spacing: 0; +} +.swagger-section .swagger-ui-wrap table thead tr th { + padding: 5px; + font-size: 0.9em; + color: #666666; + border-bottom: 1px solid #999999; +} +.swagger-section .swagger-ui-wrap table tbody tr:last-child td { + border-bottom: none; +} +.swagger-section .swagger-ui-wrap table tbody tr.offset { + background-color: #f0f0f0; +} +.swagger-section .swagger-ui-wrap table tbody tr td { + padding: 6px; + font-size: 0.9em; + border-bottom: 1px solid #cccccc; + vertical-align: top; + line-height: 1.3em; +} +.swagger-section .swagger-ui-wrap ol { + margin: 0px 0 10px; + padding: 0 0 0 18px; + list-style-type: decimal; +} +.swagger-section .swagger-ui-wrap ol li { + padding: 5px 0px; + font-size: 0.9em; + color: #333333; +} +.swagger-section .swagger-ui-wrap ol, +.swagger-section .swagger-ui-wrap ul { + list-style: none; +} +.swagger-section .swagger-ui-wrap h1 a, +.swagger-section .swagger-ui-wrap h2 a, +.swagger-section .swagger-ui-wrap h3 a, +.swagger-section .swagger-ui-wrap h4 a, +.swagger-section .swagger-ui-wrap h5 a, +.swagger-section .swagger-ui-wrap h6 a { + text-decoration: none; +} +.swagger-section .swagger-ui-wrap h1 a:hover, +.swagger-section .swagger-ui-wrap h2 a:hover, +.swagger-section .swagger-ui-wrap h3 a:hover, +.swagger-section .swagger-ui-wrap h4 a:hover, +.swagger-section .swagger-ui-wrap h5 a:hover, +.swagger-section .swagger-ui-wrap h6 a:hover { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap h1 span.divider, +.swagger-section .swagger-ui-wrap h2 span.divider, +.swagger-section .swagger-ui-wrap h3 span.divider, +.swagger-section .swagger-ui-wrap h4 span.divider, +.swagger-section .swagger-ui-wrap h5 span.divider, +.swagger-section .swagger-ui-wrap h6 span.divider { + color: #aaaaaa; +} +.swagger-section .swagger-ui-wrap a { + color: #547f00; +} +.swagger-section .swagger-ui-wrap a img { + border: none; +} +.swagger-section .swagger-ui-wrap article, +.swagger-section .swagger-ui-wrap aside, +.swagger-section .swagger-ui-wrap details, +.swagger-section .swagger-ui-wrap figcaption, +.swagger-section .swagger-ui-wrap figure, +.swagger-section .swagger-ui-wrap footer, +.swagger-section .swagger-ui-wrap header, +.swagger-section .swagger-ui-wrap hgroup, +.swagger-section .swagger-ui-wrap menu, +.swagger-section .swagger-ui-wrap nav, +.swagger-section .swagger-ui-wrap section, +.swagger-section .swagger-ui-wrap summary { + display: block; +} +.swagger-section .swagger-ui-wrap pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; +} +.swagger-section .swagger-ui-wrap pre code { + line-height: 1.6em; + background: none; +} +.swagger-section .swagger-ui-wrap .content > .content-type > div > label { + clear: both; + display: block; + color: #0F6AB4; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-section .swagger-ui-wrap .content pre { + font-size: 12px; + margin-top: 5px; + padding: 5px; +} +.swagger-section .swagger-ui-wrap .icon-btn { + cursor: pointer; +} +.swagger-section .swagger-ui-wrap .info_title { + padding-bottom: 10px; + font-weight: bold; + font-size: 25px; +} +.swagger-section .swagger-ui-wrap .footer { + margin-top: 20px; +} +.swagger-section .swagger-ui-wrap p.big, +.swagger-section .swagger-ui-wrap div.big p { + font-size: 1em; + margin-bottom: 10px; +} +.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input { + width: 500px !important; +} +.swagger-section .swagger-ui-wrap .info_license { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_tos { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .message-fail { + color: #cc0000; +} +.swagger-section .swagger-ui-wrap .info_url { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_email { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_name { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_description { + padding-bottom: 10px; + font-size: 15px; +} +.swagger-section .swagger-ui-wrap .markdown ol li, +.swagger-section .swagger-ui-wrap .markdown ul li { + padding: 3px 0px; + line-height: 1.4em; + color: #333333; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input { + display: block; + padding: 4px; + width: auto; + clear: both; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title { + font-size: 1.3em; +} +.swagger-section .swagger-ui-wrap table.fullwidth { + width: 100%; +} +.swagger-section .swagger-ui-wrap .model-signature { + font-family: "Droid Sans", sans-serif; + font-size: 1em; + line-height: 1.5em; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a { + text-decoration: none; + color: #AAA; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover { + text-decoration: underline; + color: black; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected { + color: black; + text-decoration: none; +} +.swagger-section .swagger-ui-wrap .model-signature .propType { + color: #5555aa; +} +.swagger-section .swagger-ui-wrap .model-signature pre:hover { + background-color: #ffffdd; +} +.swagger-section .swagger-ui-wrap .model-signature pre { + font-size: .85em; + line-height: 1.2em; + overflow: auto; + max-height: 200px; + cursor: pointer; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav { + display: block; + min-width: 230px; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child { + padding-right: 0; + border-right: none; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li { + float: left; + margin: 0 5px 5px 0; + padding: 2px 5px 2px 0; + border-right: 1px solid #ddd; +} +.swagger-section .swagger-ui-wrap .model-signature .propOpt { + color: #555; +} +.swagger-section .swagger-ui-wrap .model-signature .snippet small { + font-size: 0.75em; +} +.swagger-section .swagger-ui-wrap .model-signature .propOptKey { + font-style: italic; +} +.swagger-section .swagger-ui-wrap .model-signature .description .strong { + font-weight: bold; + color: #000; + font-size: .9em; +} +.swagger-section .swagger-ui-wrap .model-signature .description div { + font-size: 0.9em; + line-height: 1.5em; + margin-left: 1em; +} +.swagger-section .swagger-ui-wrap .model-signature .description .stronger { + font-weight: bold; + color: #000; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper { + border-spacing: 0; + position: absolute; + background-color: #ffffff; + border: 1px solid #bbbbbb; + display: none; + font-size: 11px; + max-width: 400px; + line-height: 30px; + color: black; + padding: 5px; + margin-left: 10px; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th { + text-align: center; + background-color: #eeeeee; + border: 1px solid #bbbbbb; + font-size: 11px; + color: #666666; + font-weight: bold; + padding: 5px; + line-height: 15px; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child, +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child { + display: inline; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before { + display: block; + content: ''; +} +.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child { + margin-right: -3px; +} +.swagger-section .swagger-ui-wrap .model-signature .propName { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-container { + clear: both; +} +.swagger-section .swagger-ui-wrap .body-textarea { + width: 300px; + height: 100px; + border: 1px solid #aaa; +} +.swagger-section .swagger-ui-wrap .markdown p code, +.swagger-section .swagger-ui-wrap .markdown li code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #f0f0f0; + color: black; + padding: 1px 3px; +} +.swagger-section .swagger-ui-wrap .required { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .editor_holder { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap .editor_holder label { + font-weight: normal!important; + /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */ +} +.swagger-section .swagger-ui-wrap .editor_holder label.required { + font-weight: bold!important; +} +.swagger-section .swagger-ui-wrap input.parameter { + width: 300px; + border: 1px solid #aaa; +} +.swagger-section .swagger-ui-wrap h1 { + color: black; + font-size: 1.5em; + line-height: 1.3em; + padding: 10px 0 10px 0; + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .heading_with_menu { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap .heading_with_menu ul { + display: block; + clear: none; + float: right; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + margin-top: 10px; +} +.swagger-section .swagger-ui-wrap h2 { + color: black; + font-size: 1.3em; + padding: 10px 0 10px 0; +} +.swagger-section .swagger-ui-wrap h2 a { + color: black; +} +.swagger-section .swagger-ui-wrap h2 span.sub { + font-size: 0.7em; + color: #999999; + font-style: italic; +} +.swagger-section .swagger-ui-wrap h2 span.sub a { + color: #777777; +} +.swagger-section .swagger-ui-wrap span.weak { + color: #666666; +} +.swagger-section .swagger-ui-wrap .message-success { + color: #89BF04; +} +.swagger-section .swagger-ui-wrap caption, +.swagger-section .swagger-ui-wrap th, +.swagger-section .swagger-ui-wrap td { + text-align: left; + font-weight: normal; + vertical-align: middle; +} +.swagger-section .swagger-ui-wrap .code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea { + font-family: "Droid Sans", sans-serif; + height: 250px; + padding: 4px; + display: block; + clear: both; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select { + display: block; + clear: both; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label { + display: block; + float: left; + clear: none; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input { + display: block; + float: left; + clear: none; + margin: 0 5px 0 0; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label { + color: black; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label { + display: block; + clear: both; + width: auto; + padding: 0 0 3px; + color: #666666; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr { + padding-left: 3px; + color: #888888; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints { + margin-left: 0; + font-style: italic; + font-size: 0.9em; + margin: 0; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons { + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap span.blank, +.swagger-section .swagger-ui-wrap span.empty { + color: #888888; + font-style: italic; +} +.swagger-section .swagger-ui-wrap .markdown h3 { + color: #547f00; +} +.swagger-section .swagger-ui-wrap .markdown h4 { + color: #666666; +} +.swagger-section .swagger-ui-wrap .markdown pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; + margin: 0 0 10px 0; +} +.swagger-section .swagger-ui-wrap .markdown pre code { + line-height: 1.6em; +} +.swagger-section .swagger-ui-wrap div.gist { + margin: 20px 0 25px 0 !important; +} +.swagger-section .swagger-ui-wrap ul#resources { + font-family: "Droid Sans", sans-serif; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource { + border-bottom: 1px solid #dddddd; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a, +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a, +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a { + color: #555555; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child { + border-bottom: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading { + border: 1px solid transparent; + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 14px 10px 0 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; + color: #666666; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a { + color: #aaaaaa; + text-decoration: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover { + text-decoration: underline; + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 { + color: #999999; + padding-left: 0; + display: block; + clear: none; + float: left; + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a { + color: #999999; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path { + padding-left: 10px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a { + color: black; + text-decoration: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a.toggleOperation.deprecated { + text-decoration: line-through; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a { + text-transform: uppercase; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span { + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { + text-decoration: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 { + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a { + padding: 4px 0 0 10px; + display: inline-block; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber { + background-image: url('../images/throbber.gif'); + width: 128px; + height: 16px; + display: block; + clear: none; + float: right; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error { + outline: 2px solid black; + outline-color: #cc0000; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] { + max-width: 300px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { + background-color: #f9f2e9; + border: 1px solid #f0e0ca; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { + background-color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0e0ca; + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { + background-color: #faf5ee; + border: 1px solid #f0e0ca; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #ffd20f; + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { + background-color: #f5e8e8; + border: 1px solid #e8c6c7; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #e8c6c7; + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + background-color: #f7eded; + border: 1px solid #e8c6c7; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { + color: #c8787a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { + background-color: #e7f6ec; + border: 1px solid #c3e8d1; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { + background-color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3e8d1; + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { + background-color: #ebf7f0; + border: 1px solid #c3e8d1; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { + background-color: #FCE9E3; + border: 1px solid #F5D5C3; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { + background-color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0cecb; + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { + background-color: #faf0ef; + border: 1px solid #f0cecb; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { + background-color: #e7f0f7; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { + background-color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3d9ec; + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { + color: #6fa5d2; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading { + background-color: #e7f0f7; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a { + background-color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3d9ec; + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a { + color: #6fa5d2; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + border-top: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap p#colophon { + margin: 0 15px 40px 15px; + padding: 10px 0; + font-size: 0.8em; + border-top: 1px solid #dddddd; + font-family: "Droid Sans", sans-serif; + color: #999999; + font-style: italic; +} +.swagger-section .swagger-ui-wrap p#colophon a { + text-decoration: none; + color: #547f00; +} +.swagger-section .swagger-ui-wrap h3 { + color: black; + font-size: 1.1em; + padding: 10px 0 10px 0; +} +.swagger-section .swagger-ui-wrap .markdown ol, +.swagger-section .swagger-ui-wrap .markdown ul { + font-family: "Droid Sans", sans-serif; + margin: 5px 0 10px; + padding: 0 0 0 18px; + list-style-type: disc; +} +.swagger-section .swagger-ui-wrap form.form_box { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; + padding: 10px; +} +.swagger-section .swagger-ui-wrap form.form_box label { + color: #0f6ab4 !important; +} +.swagger-section .swagger-ui-wrap form.form_box input[type=submit] { + display: block; + padding: 10px; +} +.swagger-section .swagger-ui-wrap form.form_box p.weak { + font-size: 0.8em; +} +.swagger-section .swagger-ui-wrap form.form_box p { + font-size: 0.9em; + padding: 0 0 15px; + color: #7e7b6d; +} +.swagger-section .swagger-ui-wrap form.form_box p a { + color: #646257; +} +.swagger-section .swagger-ui-wrap form.form_box p strong { + color: black; +} +.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child { + padding-bottom: 0; +} +.swagger-section .title { + font-style: bold; +} +.swagger-section .secondary_form { + display: none; +} +.swagger-section .main_image { + display: block; + margin-left: auto; + margin-right: auto; +} +.swagger-section .oauth_body { + margin-left: 100px; + margin-right: 100px; +} +.swagger-section .oauth_submit { + text-align: center; + display: inline-block; +} +.swagger-section .authorize-wrapper { + margin: 15px 0 10px; +} +.swagger-section .authorize-wrapper_operation { + float: right; +} +.swagger-section .authorize__btn:hover { + text-decoration: underline; + cursor: pointer; +} +.swagger-section .authorize__btn_operation:hover .authorize-scopes { + display: block; +} +.swagger-section .authorize-scopes { + position: absolute; + margin-top: 20px; + background: #FFF; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + max-width: 300px; + line-height: 30px; + color: black; + padding: 5px; +} +.swagger-section .authorize-scopes .authorize__scope { + text-decoration: none; +} +.swagger-section .authorize__btn_operation { + height: 18px; + vertical-align: middle; + display: inline-block; + background: url(../images/explorer_icons.png) no-repeat; +} +.swagger-section .authorize__btn_operation_login { + background-position: 0 0; + width: 18px; + margin-top: -6px; + margin-left: 4px; +} +.swagger-section .authorize__btn_operation_logout { + background-position: -30px 0; + width: 18px; + margin-top: -6px; + margin-left: 4px; +} +.swagger-section #auth_container { + color: #fff; + display: inline-block; + border: none; + padding: 5px; + width: 87px; + height: 13px; +} +.swagger-section #auth_container .authorize__btn { + color: #fff; +} +.swagger-section .auth_container { + padding: 0 0 10px; + margin-bottom: 5px; + border-bottom: solid 1px #CCC; + font-size: 0.9em; +} +.swagger-section .auth_container .auth__title { + color: #547f00; + font-size: 1.2em; +} +.swagger-section .auth_container .basic_auth__label { + display: inline-block; + width: 60px; +} +.swagger-section .auth_container .auth__description { + color: #999999; + margin-bottom: 5px; +} +.swagger-section .auth_container .auth__button { + margin-top: 10px; + height: 30px; +} +.swagger-section .auth_container .key_auth__field { + margin: 5px 0; +} +.swagger-section .auth_container .key_auth__label { + display: inline-block; + width: 60px; +} +.swagger-section .api-popup-dialog { + position: absolute; + display: none; +} +.swagger-section .api-popup-dialog-wrapper { + z-index: 1000; + width: 500px; + background: #FFF; + padding: 20px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 13px; + color: #777; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.swagger-section .api-popup-dialog-shadow { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0.2; + background-color: gray; + z-index: 900; +} +.swagger-section .api-popup-dialog .api-popup-title { + font-size: 24px; + padding: 10px 0; +} +.swagger-section .api-popup-dialog .api-popup-title { + font-size: 24px; + padding: 10px 0; +} +.swagger-section .api-popup-dialog .error-msg { + padding-left: 5px; + padding-bottom: 5px; +} +.swagger-section .api-popup-dialog .api-popup-content { + max-height: 500px; + overflow-y: auto; +} +.swagger-section .api-popup-dialog .api-popup-authbtn { + height: 30px; +} +.swagger-section .api-popup-dialog .api-popup-cancel { + height: 30px; +} +.swagger-section .api-popup-scopes { + padding: 10px 20px; +} +.swagger-section .api-popup-scopes li { + padding: 5px 0; + line-height: 20px; +} +.swagger-section .api-popup-scopes li input { + position: relative; + top: 2px; +} +.swagger-section .api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; +} +.swagger-section .api-popup-actions { + padding-top: 10px; +} +#header { + display: none; +} +.swagger-section .swagger-ui-wrap .model-signature pre { + max-height: none; +} +.swagger-section .swagger-ui-wrap .body-textarea { + width: 100px; +} +.swagger-section .swagger-ui-wrap input.parameter { + width: 100px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options { + display: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints { + display: block !important; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { + display: block !important; +} diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/reset.css b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/reset.css new file mode 100644 index 00000000..84ef0e67 --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/reset.css @@ -0,0 +1,125 @@ +/* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 */ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +ol, +ul { + list-style: none; +} +blockquote, +q { + quotes: none; +} +blockquote:before, +blockquote:after, +q:before, +q:after { + content: ''; + content: none; +} +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/screen.css b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/screen.css new file mode 100644 index 00000000..a5a1e5f2 --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/screen.css @@ -0,0 +1,1488 @@ +/* Original style from softwaremaniacs.org (c) Ivan Sagalaev */ +.swagger-section pre code { + display: block; + padding: 0.5em; + background: #F0F0F0; +} +.swagger-section pre code, +.swagger-section pre .subst, +.swagger-section pre .tag .title, +.swagger-section pre .lisp .title, +.swagger-section pre .clojure .built_in, +.swagger-section pre .nginx .title { + color: black; +} +.swagger-section pre .string, +.swagger-section pre .title, +.swagger-section pre .constant, +.swagger-section pre .parent, +.swagger-section pre .tag .value, +.swagger-section pre .rules .value, +.swagger-section pre .rules .value .number, +.swagger-section pre .preprocessor, +.swagger-section pre .ruby .symbol, +.swagger-section pre .ruby .symbol .string, +.swagger-section pre .aggregate, +.swagger-section pre .template_tag, +.swagger-section pre .django .variable, +.swagger-section pre .smalltalk .class, +.swagger-section pre .addition, +.swagger-section pre .flow, +.swagger-section pre .stream, +.swagger-section pre .bash .variable, +.swagger-section pre .apache .tag, +.swagger-section pre .apache .cbracket, +.swagger-section pre .tex .command, +.swagger-section pre .tex .special, +.swagger-section pre .erlang_repl .function_or_atom, +.swagger-section pre .markdown .header { + color: #800; +} +.swagger-section pre .comment, +.swagger-section pre .annotation, +.swagger-section pre .template_comment, +.swagger-section pre .diff .header, +.swagger-section pre .chunk, +.swagger-section pre .markdown .blockquote { + color: #888; +} +.swagger-section pre .number, +.swagger-section pre .date, +.swagger-section pre .regexp, +.swagger-section pre .literal, +.swagger-section pre .smalltalk .symbol, +.swagger-section pre .smalltalk .char, +.swagger-section pre .go .constant, +.swagger-section pre .change, +.swagger-section pre .markdown .bullet, +.swagger-section pre .markdown .link_url { + color: #080; +} +.swagger-section pre .label, +.swagger-section pre .javadoc, +.swagger-section pre .ruby .string, +.swagger-section pre .decorator, +.swagger-section pre .filter .argument, +.swagger-section pre .localvars, +.swagger-section pre .array, +.swagger-section pre .attr_selector, +.swagger-section pre .important, +.swagger-section pre .pseudo, +.swagger-section pre .pi, +.swagger-section pre .doctype, +.swagger-section pre .deletion, +.swagger-section pre .envvar, +.swagger-section pre .shebang, +.swagger-section pre .apache .sqbracket, +.swagger-section pre .nginx .built_in, +.swagger-section pre .tex .formula, +.swagger-section pre .erlang_repl .reserved, +.swagger-section pre .prompt, +.swagger-section pre .markdown .link_label, +.swagger-section pre .vhdl .attribute, +.swagger-section pre .clojure .attribute, +.swagger-section pre .coffeescript .property { + color: #88F; +} +.swagger-section pre .keyword, +.swagger-section pre .id, +.swagger-section pre .phpdoc, +.swagger-section pre .title, +.swagger-section pre .built_in, +.swagger-section pre .aggregate, +.swagger-section pre .css .tag, +.swagger-section pre .javadoctag, +.swagger-section pre .phpdoc, +.swagger-section pre .yardoctag, +.swagger-section pre .smalltalk .class, +.swagger-section pre .winutils, +.swagger-section pre .bash .variable, +.swagger-section pre .apache .tag, +.swagger-section pre .go .typename, +.swagger-section pre .tex .command, +.swagger-section pre .markdown .strong, +.swagger-section pre .request, +.swagger-section pre .status { + font-weight: bold; +} +.swagger-section pre .markdown .emphasis { + font-style: italic; +} +.swagger-section pre .nginx .built_in { + font-weight: normal; +} +.swagger-section pre .coffeescript .javascript, +.swagger-section pre .javascript .xml, +.swagger-section pre .tex .formula, +.swagger-section pre .xml .javascript, +.swagger-section pre .xml .vbscript, +.swagger-section pre .xml .css, +.swagger-section pre .xml .cdata { + opacity: 0.5; +} +.swagger-section .hljs { + display: block; + overflow-x: auto; + padding: 0.5em; + background: #F0F0F0; +} +.swagger-section .hljs, +.swagger-section .hljs-subst { + color: #444; +} +.swagger-section .hljs-keyword, +.swagger-section .hljs-attribute, +.swagger-section .hljs-selector-tag, +.swagger-section .hljs-meta-keyword, +.swagger-section .hljs-doctag, +.swagger-section .hljs-name { + font-weight: bold; +} +.swagger-section .hljs-built_in, +.swagger-section .hljs-literal, +.swagger-section .hljs-bullet, +.swagger-section .hljs-code, +.swagger-section .hljs-addition { + color: #1F811F; +} +.swagger-section .hljs-regexp, +.swagger-section .hljs-symbol, +.swagger-section .hljs-variable, +.swagger-section .hljs-template-variable, +.swagger-section .hljs-link, +.swagger-section .hljs-selector-attr, +.swagger-section .hljs-selector-pseudo { + color: #BC6060; +} +.swagger-section .hljs-type, +.swagger-section .hljs-string, +.swagger-section .hljs-number, +.swagger-section .hljs-selector-id, +.swagger-section .hljs-selector-class, +.swagger-section .hljs-quote, +.swagger-section .hljs-template-tag, +.swagger-section .hljs-deletion { + color: #880000; +} +.swagger-section .hljs-title, +.swagger-section .hljs-section { + color: #880000; + font-weight: bold; +} +.swagger-section .hljs-comment { + color: #888888; +} +.swagger-section .hljs-meta { + color: #2B6EA1; +} +.swagger-section .hljs-emphasis { + font-style: italic; +} +.swagger-section .hljs-strong { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap { + line-height: 1; + font-family: "Droid Sans", sans-serif; + min-width: 760px; + max-width: 960px; + margin-left: auto; + margin-right: auto; + /* JSONEditor specific styling */ +} +.swagger-section .swagger-ui-wrap b, +.swagger-section .swagger-ui-wrap strong { + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap q, +.swagger-section .swagger-ui-wrap blockquote { + quotes: none; +} +.swagger-section .swagger-ui-wrap p { + line-height: 1.4em; + padding: 0 0 10px; + color: #333333; +} +.swagger-section .swagger-ui-wrap q:before, +.swagger-section .swagger-ui-wrap q:after, +.swagger-section .swagger-ui-wrap blockquote:before, +.swagger-section .swagger-ui-wrap blockquote:after { + content: none; +} +.swagger-section .swagger-ui-wrap .heading_with_menu h1, +.swagger-section .swagger-ui-wrap .heading_with_menu h2, +.swagger-section .swagger-ui-wrap .heading_with_menu h3, +.swagger-section .swagger-ui-wrap .heading_with_menu h4, +.swagger-section .swagger-ui-wrap .heading_with_menu h5, +.swagger-section .swagger-ui-wrap .heading_with_menu h6 { + display: block; + clear: none; + float: left; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + width: 60%; +} +.swagger-section .swagger-ui-wrap table { + border-collapse: collapse; + border-spacing: 0; +} +.swagger-section .swagger-ui-wrap table thead tr th { + padding: 5px; + font-size: 0.9em; + color: #666666; + border-bottom: 1px solid #999999; +} +.swagger-section .swagger-ui-wrap table tbody tr:last-child td { + border-bottom: none; +} +.swagger-section .swagger-ui-wrap table tbody tr.offset { + background-color: #f0f0f0; +} +.swagger-section .swagger-ui-wrap table tbody tr td { + padding: 6px; + font-size: 0.9em; + border-bottom: 1px solid #cccccc; + vertical-align: top; + line-height: 1.3em; +} +.swagger-section .swagger-ui-wrap ol { + margin: 0px 0 10px; + padding: 0 0 0 18px; + list-style-type: decimal; +} +.swagger-section .swagger-ui-wrap ol li { + padding: 5px 0px; + font-size: 0.9em; + color: #333333; +} +.swagger-section .swagger-ui-wrap ol, +.swagger-section .swagger-ui-wrap ul { + list-style: none; +} +.swagger-section .swagger-ui-wrap h1 a, +.swagger-section .swagger-ui-wrap h2 a, +.swagger-section .swagger-ui-wrap h3 a, +.swagger-section .swagger-ui-wrap h4 a, +.swagger-section .swagger-ui-wrap h5 a, +.swagger-section .swagger-ui-wrap h6 a { + text-decoration: none; +} +.swagger-section .swagger-ui-wrap h1 a:hover, +.swagger-section .swagger-ui-wrap h2 a:hover, +.swagger-section .swagger-ui-wrap h3 a:hover, +.swagger-section .swagger-ui-wrap h4 a:hover, +.swagger-section .swagger-ui-wrap h5 a:hover, +.swagger-section .swagger-ui-wrap h6 a:hover { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap h1 span.divider, +.swagger-section .swagger-ui-wrap h2 span.divider, +.swagger-section .swagger-ui-wrap h3 span.divider, +.swagger-section .swagger-ui-wrap h4 span.divider, +.swagger-section .swagger-ui-wrap h5 span.divider, +.swagger-section .swagger-ui-wrap h6 span.divider { + color: #aaaaaa; +} +.swagger-section .swagger-ui-wrap a { + color: #547f00; +} +.swagger-section .swagger-ui-wrap a img { + border: none; +} +.swagger-section .swagger-ui-wrap article, +.swagger-section .swagger-ui-wrap aside, +.swagger-section .swagger-ui-wrap details, +.swagger-section .swagger-ui-wrap figcaption, +.swagger-section .swagger-ui-wrap figure, +.swagger-section .swagger-ui-wrap footer, +.swagger-section .swagger-ui-wrap header, +.swagger-section .swagger-ui-wrap hgroup, +.swagger-section .swagger-ui-wrap menu, +.swagger-section .swagger-ui-wrap nav, +.swagger-section .swagger-ui-wrap section, +.swagger-section .swagger-ui-wrap summary { + display: block; +} +.swagger-section .swagger-ui-wrap pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; +} +.swagger-section .swagger-ui-wrap pre code { + line-height: 1.6em; + background: none; +} +.swagger-section .swagger-ui-wrap .content > .content-type > div > label { + clear: both; + display: block; + color: #0F6AB4; + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-section .swagger-ui-wrap .content pre { + font-size: 12px; + margin-top: 5px; + padding: 5px; +} +.swagger-section .swagger-ui-wrap .icon-btn { + cursor: pointer; +} +.swagger-section .swagger-ui-wrap .info_title { + padding-bottom: 10px; + font-weight: bold; + font-size: 25px; +} +.swagger-section .swagger-ui-wrap .footer { + margin-top: 20px; +} +.swagger-section .swagger-ui-wrap p.big, +.swagger-section .swagger-ui-wrap div.big p { + font-size: 1em; + margin-bottom: 10px; +} +.swagger-section .swagger-ui-wrap form.fullwidth ol li.string input, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.url input, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.text textarea, +.swagger-section .swagger-ui-wrap form.fullwidth ol li.numeric input { + width: 500px !important; +} +.swagger-section .swagger-ui-wrap .info_license { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_tos { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .message-fail { + color: #cc0000; +} +.swagger-section .swagger-ui-wrap .info_url { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_email { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_name { + padding-bottom: 5px; +} +.swagger-section .swagger-ui-wrap .info_description { + padding-bottom: 10px; + font-size: 15px; +} +.swagger-section .swagger-ui-wrap .markdown ol li, +.swagger-section .swagger-ui-wrap .markdown ul li { + padding: 3px 0px; + line-height: 1.4em; + color: #333333; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input { + display: block; + padding: 4px; + width: auto; + clear: both; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.string input.title, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.url input.title, +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.numeric input.title { + font-size: 1.3em; +} +.swagger-section .swagger-ui-wrap table.fullwidth { + width: 100%; +} +.swagger-section .swagger-ui-wrap .model-signature { + font-family: "Droid Sans", sans-serif; + font-size: 1em; + line-height: 1.5em; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a { + text-decoration: none; + color: #AAA; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav a:hover { + text-decoration: underline; + color: black; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-nav .selected { + color: black; + text-decoration: none; +} +.swagger-section .swagger-ui-wrap .model-signature .propType { + color: #5555aa; +} +.swagger-section .swagger-ui-wrap .model-signature pre:hover { + background-color: #ffffdd; +} +.swagger-section .swagger-ui-wrap .model-signature pre { + font-size: .85em; + line-height: 1.2em; + overflow: auto; + max-height: 200px; + cursor: pointer; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav { + display: block; + min-width: 230px; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li:last-child { + padding-right: 0; + border-right: none; +} +.swagger-section .swagger-ui-wrap .model-signature ul.signature-nav li { + float: left; + margin: 0 5px 5px 0; + padding: 2px 5px 2px 0; + border-right: 1px solid #ddd; +} +.swagger-section .swagger-ui-wrap .model-signature .propOpt { + color: #555; +} +.swagger-section .swagger-ui-wrap .model-signature .snippet small { + font-size: 0.75em; +} +.swagger-section .swagger-ui-wrap .model-signature .propOptKey { + font-style: italic; +} +.swagger-section .swagger-ui-wrap .model-signature .description .strong { + font-weight: bold; + color: #000; + font-size: .9em; +} +.swagger-section .swagger-ui-wrap .model-signature .description div { + font-size: 0.9em; + line-height: 1.5em; + margin-left: 1em; +} +.swagger-section .swagger-ui-wrap .model-signature .description .stronger { + font-weight: bold; + color: #000; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper { + border-spacing: 0; + position: absolute; + background-color: #ffffff; + border: 1px solid #bbbbbb; + display: none; + font-size: 11px; + max-width: 400px; + line-height: 30px; + color: black; + padding: 5px; + margin-left: 10px; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper th { + text-align: center; + background-color: #eeeeee; + border: 1px solid #bbbbbb; + font-size: 11px; + color: #666666; + font-weight: bold; + padding: 5px; + line-height: 15px; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propWrap .optionsWrapper .optionName { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:first-child, +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:last-child { + display: inline; +} +.swagger-section .swagger-ui-wrap .model-signature .description .propDesc.markdown > p:not(:first-child):before { + display: block; + content: ''; +} +.swagger-section .swagger-ui-wrap .model-signature .description span:last-of-type.propDesc.markdown > p:only-child { + margin-right: -3px; +} +.swagger-section .swagger-ui-wrap .model-signature .propName { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .model-signature .signature-container { + clear: both; +} +.swagger-section .swagger-ui-wrap .body-textarea { + width: 300px; + height: 100px; + border: 1px solid #aaa; +} +.swagger-section .swagger-ui-wrap .markdown p code, +.swagger-section .swagger-ui-wrap .markdown li code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #f0f0f0; + color: black; + padding: 1px 3px; +} +.swagger-section .swagger-ui-wrap .required { + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .editor_holder { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap .editor_holder label { + font-weight: normal!important; + /* JSONEditor uses bold by default for all labels, we revert that back to normal to not give the impression that by default fields are required */ +} +.swagger-section .swagger-ui-wrap .editor_holder label.required { + font-weight: bold!important; +} +.swagger-section .swagger-ui-wrap input.parameter { + width: 300px; + border: 1px solid #aaa; +} +.swagger-section .swagger-ui-wrap h1 { + color: black; + font-size: 1.5em; + line-height: 1.3em; + padding: 10px 0 10px 0; + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap .heading_with_menu { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap .heading_with_menu ul { + display: block; + clear: none; + float: right; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; + margin-top: 10px; +} +.swagger-section .swagger-ui-wrap h2 { + color: black; + font-size: 1.3em; + padding: 10px 0 10px 0; +} +.swagger-section .swagger-ui-wrap h2 a { + color: black; +} +.swagger-section .swagger-ui-wrap h2 span.sub { + font-size: 0.7em; + color: #999999; + font-style: italic; +} +.swagger-section .swagger-ui-wrap h2 span.sub a { + color: #777777; +} +.swagger-section .swagger-ui-wrap span.weak { + color: #666666; +} +.swagger-section .swagger-ui-wrap .message-success { + color: #89BF04; +} +.swagger-section .swagger-ui-wrap caption, +.swagger-section .swagger-ui-wrap th, +.swagger-section .swagger-ui-wrap td { + text-align: left; + font-weight: normal; + vertical-align: middle; +} +.swagger-section .swagger-ui-wrap .code { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.text textarea { + font-family: "Droid Sans", sans-serif; + height: 250px; + padding: 4px; + display: block; + clear: both; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.select select { + display: block; + clear: both; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean label { + display: block; + float: left; + clear: none; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.boolean input { + display: block; + float: left; + clear: none; + margin: 0 5px 0 0; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li.required label { + color: black; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label { + display: block; + clear: both; + width: auto; + padding: 0 0 3px; + color: #666666; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li label abbr { + padding-left: 3px; + color: #888888; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.inputs ol li p.inline-hints { + margin-left: 0; + font-style: italic; + font-size: 0.9em; + margin: 0; +} +.swagger-section .swagger-ui-wrap form.formtastic fieldset.buttons { + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap span.blank, +.swagger-section .swagger-ui-wrap span.empty { + color: #888888; + font-style: italic; +} +.swagger-section .swagger-ui-wrap .markdown h3 { + color: #547f00; +} +.swagger-section .swagger-ui-wrap .markdown h4 { + color: #666666; +} +.swagger-section .swagger-ui-wrap .markdown pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + padding: 10px; + margin: 0 0 10px 0; +} +.swagger-section .swagger-ui-wrap .markdown pre code { + line-height: 1.6em; +} +.swagger-section .swagger-ui-wrap div.gist { + margin: 20px 0 25px 0 !important; +} +.swagger-section .swagger-ui-wrap ul#resources { + font-family: "Droid Sans", sans-serif; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource { + border-bottom: 1px solid #dddddd; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading h2 a, +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading h2 a { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource:hover div.heading ul.options li a, +.swagger-section .swagger-ui-wrap ul#resources li.resource.active div.heading ul.options li a { + color: #555555; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource:last-child { + border-bottom: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading { + border: 1px solid transparent; + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 14px 10px 0 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + border-right: 1px solid #dddddd; + color: #666666; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a { + color: #aaaaaa; + text-decoration: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover { + text-decoration: underline; + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:hover, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a:active, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li a.active { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading ul.options.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 { + color: #999999; + padding-left: 0; + display: block; + clear: none; + float: left; + font-family: "Droid Sans", sans-serif; + font-weight: bold; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a { + color: #999999; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0 0 10px; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading { + float: none; + clear: both; + overflow: hidden; + display: block; + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 { + display: block; + clear: none; + float: left; + width: auto; + margin: 0; + padding: 0; + line-height: 1.1em; + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path { + padding-left: 10px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a { + color: black; + text-decoration: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a.toggleOperation.deprecated { + text-decoration: line-through; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.path a:hover { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span.http_method a { + text-transform: uppercase; + text-decoration: none; + color: white; + display: inline-block; + width: 50px; + font-size: 0.7em; + text-align: center; + padding: 7px 0 4px; + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + -ms-border-radius: 2px; + -khtml-border-radius: 2px; + border-radius: 2px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading h3 span { + margin: 0; + padding: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options { + overflow: hidden; + padding: 0; + display: block; + clear: none; + float: right; + margin: 6px 10px 0 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li { + float: left; + clear: none; + margin: 0; + padding: 2px 10px; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li a { + text-decoration: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.heading ul.options li.access { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content { + border-top: none; + padding: 10px; + -moz-border-radius-bottomleft: 6px; + -webkit-border-bottom-left-radius: 6px; + -o-border-bottom-left-radius: 6px; + -ms-border-bottom-left-radius: 6px; + -khtml-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -moz-border-radius-bottomright: 6px; + -webkit-border-bottom-right-radius: 6px; + -o-border-bottom-right-radius: 6px; + -ms-border-bottom-right-radius: 6px; + -khtml-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + margin: 0 0 20px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content h4 { + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header { + float: none; + clear: both; + overflow: hidden; + display: block; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header a { + padding: 4px 0 0 10px; + display: inline-block; + font-size: 0.9em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header input.submit { + display: block; + clear: none; + float: left; + padding: 6px 8px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.sandbox_header span.response_throbber { + background-image: url('../images/throbber.gif'); + width: 128px; + height: 16px; + display: block; + clear: none; + float: right; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form input[type='text'].error { + outline: 2px solid black; + outline-color: #cc0000; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content form select[name='parameterContentType'] { + max-width: 300px; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation div.content div.response div.block pre { + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + padding: 10px; + font-size: 0.9em; + max-height: 400px; + overflow-y: auto; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading { + background-color: #f9f2e9; + border: 1px solid #f0e0ca; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading h3 span.http_method a { + background-color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0e0ca; + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li a { + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content { + background-color: #faf5ee; + border: 1px solid #f0e0ca; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content h4 { + color: #c5862b; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #ffd20f; + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li a { + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content { + background-color: #fcffcd; + border: 1px solid black; + border-color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content h4 { + color: #ffd20f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading { + background-color: #f5e8e8; + border: 1px solid #e8c6c7; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading h3 span.http_method a { + text-transform: uppercase; + background-color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #e8c6c7; + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li a { + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + background-color: #f7eded; + border: 1px solid #e8c6c7; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content h4 { + color: #a41e22; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content div.sandbox_header a { + color: #c8787a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading { + background-color: #e7f6ec; + border: 1px solid #c3e8d1; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading h3 span.http_method a { + background-color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3e8d1; + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li a { + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content { + background-color: #ebf7f0; + border: 1px solid #c3e8d1; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content h4 { + color: #10a54a; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content div.sandbox_header a { + color: #6fc992; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading { + background-color: #FCE9E3; + border: 1px solid #F5D5C3; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading h3 span.http_method a { + background-color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #f0cecb; + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li a { + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content { + background-color: #faf0ef; + border: 1px solid #f0cecb; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content h4 { + color: #D38042; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content div.sandbox_header a { + color: #dcb67f; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading { + background-color: #e7f0f7; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading h3 span.http_method a { + background-color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3d9ec; + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li a { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content h4 { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content div.sandbox_header a { + color: #6fa5d2; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading { + background-color: #e7f0f7; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading h3 span.http_method a { + background-color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li { + border-right: 1px solid #dddddd; + border-right-color: #c3d9ec; + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.heading ul.options li a { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content h4 { + color: #0f6ab4; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.options div.content div.sandbox_header a { + color: #6fa5d2; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.content, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.content { + border-top: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li:last-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.get div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.post div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.head div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.put div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.patch div.heading ul.options li.last, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations li.operation.delete div.heading ul.options li.last { + padding-right: 0; + border-right: none; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:hover, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a:active, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li a.active { + text-decoration: underline; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations ul.options li.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations:first-child, +.swagger-section .swagger-ui-wrap ul#resources li.resource ul.endpoints li.endpoint ul.operations.first { + padding-left: 0; +} +.swagger-section .swagger-ui-wrap p#colophon { + margin: 0 15px 40px 15px; + padding: 10px 0; + font-size: 0.8em; + border-top: 1px solid #dddddd; + font-family: "Droid Sans", sans-serif; + color: #999999; + font-style: italic; +} +.swagger-section .swagger-ui-wrap p#colophon a { + text-decoration: none; + color: #547f00; +} +.swagger-section .swagger-ui-wrap h3 { + color: black; + font-size: 1.1em; + padding: 10px 0 10px 0; +} +.swagger-section .swagger-ui-wrap .markdown ol, +.swagger-section .swagger-ui-wrap .markdown ul { + font-family: "Droid Sans", sans-serif; + margin: 5px 0 10px; + padding: 0 0 0 18px; + list-style-type: disc; +} +.swagger-section .swagger-ui-wrap form.form_box { + background-color: #ebf3f9; + border: 1px solid #c3d9ec; + padding: 10px; +} +.swagger-section .swagger-ui-wrap form.form_box label { + color: #0f6ab4 !important; +} +.swagger-section .swagger-ui-wrap form.form_box input[type=submit] { + display: block; + padding: 10px; +} +.swagger-section .swagger-ui-wrap form.form_box p.weak { + font-size: 0.8em; +} +.swagger-section .swagger-ui-wrap form.form_box p { + font-size: 0.9em; + padding: 0 0 15px; + color: #7e7b6d; +} +.swagger-section .swagger-ui-wrap form.form_box p a { + color: #646257; +} +.swagger-section .swagger-ui-wrap form.form_box p strong { + color: black; +} +.swagger-section .swagger-ui-wrap .operation-status td.markdown > p:last-child { + padding-bottom: 0; +} +.swagger-section .title { + font-style: bold; +} +.swagger-section .secondary_form { + display: none; +} +.swagger-section .main_image { + display: block; + margin-left: auto; + margin-right: auto; +} +.swagger-section .oauth_body { + margin-left: 100px; + margin-right: 100px; +} +.swagger-section .oauth_submit { + text-align: center; + display: inline-block; +} +.swagger-section .authorize-wrapper { + margin: 15px 0 10px; +} +.swagger-section .authorize-wrapper_operation { + float: right; +} +.swagger-section .authorize__btn:hover { + text-decoration: underline; + cursor: pointer; +} +.swagger-section .authorize__btn_operation:hover .authorize-scopes { + display: block; +} +.swagger-section .authorize-scopes { + position: absolute; + margin-top: 20px; + background: #FFF; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + max-width: 300px; + line-height: 30px; + color: black; + padding: 5px; +} +.swagger-section .authorize-scopes .authorize__scope { + text-decoration: none; +} +.swagger-section .authorize__btn_operation { + height: 18px; + vertical-align: middle; + display: inline-block; + background: url(../images/explorer_icons.png) no-repeat; +} +.swagger-section .authorize__btn_operation_login { + background-position: 0 0; + width: 18px; + margin-top: -6px; + margin-left: 4px; +} +.swagger-section .authorize__btn_operation_logout { + background-position: -30px 0; + width: 18px; + margin-top: -6px; + margin-left: 4px; +} +.swagger-section #auth_container { + color: #fff; + display: inline-block; + border: none; + padding: 5px; + width: 87px; + height: 13px; +} +.swagger-section #auth_container .authorize__btn { + color: #fff; +} +.swagger-section .auth_container { + padding: 0 0 10px; + margin-bottom: 5px; + border-bottom: solid 1px #CCC; + font-size: 0.9em; +} +.swagger-section .auth_container .auth__title { + color: #547f00; + font-size: 1.2em; +} +.swagger-section .auth_container .basic_auth__label { + display: inline-block; + width: 60px; +} +.swagger-section .auth_container .auth__description { + color: #999999; + margin-bottom: 5px; +} +.swagger-section .auth_container .auth__button { + margin-top: 10px; + height: 30px; +} +.swagger-section .auth_container .key_auth__field { + margin: 5px 0; +} +.swagger-section .auth_container .key_auth__label { + display: inline-block; + width: 60px; +} +.swagger-section .api-popup-dialog { + position: absolute; + display: none; +} +.swagger-section .api-popup-dialog-wrapper { + z-index: 1000; + width: 500px; + background: #FFF; + padding: 20px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 13px; + color: #777; + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.swagger-section .api-popup-dialog-shadow { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0.2; + background-color: gray; + z-index: 900; +} +.swagger-section .api-popup-dialog .api-popup-title { + font-size: 24px; + padding: 10px 0; +} +.swagger-section .api-popup-dialog .api-popup-title { + font-size: 24px; + padding: 10px 0; +} +.swagger-section .api-popup-dialog .error-msg { + padding-left: 5px; + padding-bottom: 5px; +} +.swagger-section .api-popup-dialog .api-popup-content { + max-height: 500px; + overflow-y: auto; +} +.swagger-section .api-popup-dialog .api-popup-authbtn { + height: 30px; +} +.swagger-section .api-popup-dialog .api-popup-cancel { + height: 30px; +} +.swagger-section .api-popup-scopes { + padding: 10px 20px; +} +.swagger-section .api-popup-scopes li { + padding: 5px 0; + line-height: 20px; +} +.swagger-section .api-popup-scopes li input { + position: relative; + top: 2px; +} +.swagger-section .api-popup-scopes .api-scope-desc { + padding-left: 20px; + font-style: italic; +} +.swagger-section .api-popup-actions { + padding-top: 10px; +} +.swagger-section .access { + float: right; +} +.swagger-section .auth { + float: right; +} +.swagger-section .api-ic { + height: 18px; + vertical-align: middle; + display: inline-block; + background: url(../images/explorer_icons.png) no-repeat; +} +.swagger-section .api-ic .api_information_panel { + position: relative; + margin-top: 20px; + margin-left: -5px; + background: #FFF; + border: 1px solid #ccc; + border-radius: 5px; + display: none; + font-size: 13px; + max-width: 300px; + line-height: 30px; + color: black; + padding: 5px; +} +.swagger-section .api-ic .api_information_panel p .api-msg-enabled { + color: green; +} +.swagger-section .api-ic .api_information_panel p .api-msg-disabled { + color: red; +} +.swagger-section .api-ic:hover .api_information_panel { + position: absolute; + display: block; +} +.swagger-section .ic-info { + background-position: 0 0; + width: 18px; + margin-top: -6px; + margin-left: 4px; +} +.swagger-section .ic-warning { + background-position: -60px 0; + width: 18px; + margin-top: -6px; + margin-left: 4px; +} +.swagger-section .ic-error { + background-position: -30px 0; + width: 18px; + margin-top: -6px; + margin-left: 4px; +} +.swagger-section .ic-off { + background-position: -90px 0; + width: 58px; + margin-top: -4px; + cursor: pointer; +} +.swagger-section .ic-on { + background-position: -160px 0; + width: 58px; + margin-top: -4px; + cursor: pointer; +} +.swagger-section #header { + background-color: #89bf04; + padding: 9px 14px 19px 14px; + height: 23px; + min-width: 775px; +} +.swagger-section #input_baseUrl { + width: 400px; +} +.swagger-section #api_selector { + display: block; + clear: none; + float: right; +} +.swagger-section #api_selector .input { + display: inline-block; + clear: none; + margin: 0 10px 0 0; +} +.swagger-section #api_selector input { + font-size: 0.9em; + padding: 3px; + margin: 0; +} +.swagger-section #input_apiKey { + width: 200px; +} +.swagger-section #explore, +.swagger-section #auth_container .authorize__btn { + display: block; + text-decoration: none; + font-weight: bold; + padding: 6px 8px; + font-size: 0.9em; + color: white; + background-color: #547f00; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + -o-border-radius: 4px; + -ms-border-radius: 4px; + -khtml-border-radius: 4px; + border-radius: 4px; +} +.swagger-section #explore:hover, +.swagger-section #auth_container .authorize__btn:hover { + background-color: #547f00; +} +.swagger-section #header #logo { + font-size: 1.5em; + font-weight: bold; + text-decoration: none; + color: white; +} +.swagger-section #header #logo .logo__img { + display: block; + float: left; + margin-top: 2px; +} +.swagger-section #header #logo .logo__title { + display: inline-block; + padding: 5px 0 0 10px; +} +.swagger-section #content_message { + margin: 10px 15px; + font-style: italic; + color: #999999; +} +.swagger-section #message-bar { + min-height: 30px; + text-align: center; + padding-top: 10px; +} +.swagger-section .swagger-collapse:before { + content: "-"; +} +.swagger-section .swagger-expand:before { + content: "+"; +} +.swagger-section .error { + outline-color: #cc0000; + background-color: #f2dede; +} diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/style.css b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/style.css new file mode 100644 index 00000000..2312a6c8 --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/style.css @@ -0,0 +1,250 @@ +.swagger-section #header a#logo { + font-size: 1.5em; + font-weight: bold; + text-decoration: none; + background: transparent url(../images/logo.png) no-repeat left center; + padding: 20px 0 20px 40px; +} +#text-head { + font-size: 80px; + font-family: 'Roboto', sans-serif; + color: #ffffff; + float: right; + margin-right: 20%; +} +.navbar-fixed-top .navbar-nav { + height: auto; +} +.navbar-fixed-top .navbar-brand { + height: auto; +} +.navbar-header { + height: auto; +} +.navbar-inverse { + background-color: #000; + border-color: #000; +} +#navbar-brand { + margin-left: 20%; +} +.navtext { + font-size: 10px; +} +.h1, +h1 { + font-size: 60px; +} +.navbar-default .navbar-header .navbar-brand { + color: #a2dfee; +} +/* tag titles */ +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a { + color: #393939; + font-family: 'Arvo', serif; + font-size: 1.5em; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover { + color: black; +} +.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 { + color: #525252; + padding-left: 0px; + display: block; + clear: none; + float: left; + font-family: 'Arvo', serif; + font-weight: bold; +} +.navbar-default .navbar-collapse, +.navbar-default .navbar-form { + border-color: #0A0A0A; +} +.container1 { + width: 1500px; + margin: auto; + margin-top: 0; + background-image: url('../images/shield.png'); + background-repeat: no-repeat; + background-position: -40px -20px; + margin-bottom: 210px; +} +.container-inner { + width: 1200px; + margin: auto; + background-color: rgba(223, 227, 228, 0.75); + padding-bottom: 40px; + padding-top: 40px; + border-radius: 15px; +} +.header-content { + padding: 0; + width: 1000px; +} +.title1 { + font-size: 80px; + font-family: 'Vollkorn', serif; + color: #404040; + text-align: center; + padding-top: 40px; + padding-bottom: 100px; +} +#icon { + margin-top: -18px; +} +.subtext { + font-size: 25px; + font-style: italic; + color: #08b; + text-align: right; + padding-right: 250px; +} +.bg-primary { + background-color: #00468b; +} +.navbar-default .nav > li > a, +.navbar-default .nav > li > a:focus { + color: #08b; +} +.navbar-default .nav > li > a, +.navbar-default .nav > li > a:hover { + color: #08b; +} +.navbar-default .nav > li > a, +.navbar-default .nav > li > a:focus:hover { + color: #08b; +} +.text-faded { + font-size: 25px; + font-family: 'Vollkorn', serif; +} +.section-heading { + font-family: 'Vollkorn', serif; + font-size: 45px; + padding-bottom: 10px; +} +hr { + border-color: #00468b; + padding-bottom: 10px; +} +.description { + margin-top: 20px; + padding-bottom: 200px; +} +.description li { + font-family: 'Vollkorn', serif; + font-size: 25px; + color: #525252; + margin-left: 28%; + padding-top: 5px; +} +.gap { + margin-top: 200px; +} +.troubleshootingtext { + color: rgba(255, 255, 255, 0.7); + padding-left: 30%; +} +.troubleshootingtext li { + list-style-type: circle; + font-size: 25px; + padding-bottom: 5px; +} +.overlay { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1000; +} +.block.response_body.json:hover { + cursor: pointer; +} +.backdrop { + color: blue; +} +#myModal { + height: 100%; +} +.modal-backdrop { + bottom: 0; + position: fixed; +} +.curl { + padding: 10px; + font-family: "Anonymous Pro", "Menlo", "Consolas", "Bitstream Vera Sans Mono", "Courier New", monospace; + font-size: 0.9em; + max-height: 400px; + margin-top: 5px; + overflow-y: auto; + background-color: #fcf6db; + border: 1px solid #e5e0c6; + border-radius: 4px; +} +.curl_title { + font-size: 1.1em; + margin: 0; + padding: 15px 0 5px; + font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif; + font-weight: 500; + line-height: 1.1; +} +.footer { + display: none; +} +.swagger-section .swagger-ui-wrap h2 { + padding: 0; +} +h2 { + margin: 0; + margin-bottom: 5px; +} +.markdown p { + font-size: 15px; + font-family: 'Arvo', serif; +} +.swagger-section .swagger-ui-wrap .code { + font-size: 15px; + font-family: 'Arvo', serif; +} +.swagger-section .swagger-ui-wrap b { + font-family: 'Arvo', serif; +} +#signin:hover { + cursor: pointer; +} +.dropdown-menu { + padding: 15px; +} +.navbar-right .dropdown-menu { + left: 0; + right: auto; +} +#signinbutton { + width: 100%; + height: 32px; + font-size: 13px; + font-weight: bold; + color: #08b; +} +.navbar-default .nav > li .details { + color: #000000; + text-transform: none; + font-size: 15px; + font-weight: normal; + font-family: 'Open Sans', sans-serif; + font-style: italic; + line-height: 20px; + top: -2px; +} +.navbar-default .nav > li .details:hover { + color: black; +} +#signout { + width: 100%; + height: 32px; + font-size: 13px; + font-weight: bold; + color: #08b; +} diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/typography.css b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/typography.css new file mode 100644 index 00000000..cdc330d1 --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/css/typography.css @@ -0,0 +1,14 @@ +/* Google Font's Droid Sans */ +@font-face { + font-family: 'Droid Sans'; + font-style: normal; + font-weight: 400; + src: local('Droid Sans'), local('DroidSans'), url('../fonts/DroidSans.ttf') format('truetype'); +} +/* Google Font's Droid Sans Bold */ +@font-face { + font-family: 'Droid Sans'; + font-style: normal; + font-weight: 700; + src: local('Droid Sans Bold'), local('DroidSans-Bold'), url('../fonts/DroidSans-Bold.ttf') format('truetype'); +} diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans-Bold.ttf b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans-Bold.ttf new file mode 100644 index 00000000..036c4d13 Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans-Bold.ttf differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans.ttf b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans.ttf new file mode 100644 index 00000000..e517a0c5 Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/fonts/DroidSans.ttf differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/collapse.gif b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/collapse.gif new file mode 100644 index 00000000..8843e8ce Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/collapse.gif differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/expand.gif b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/expand.gif new file mode 100644 index 00000000..477bf137 Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/expand.gif differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/explorer_icons.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/explorer_icons.png new file mode 100644 index 00000000..ed9d2fff Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/explorer_icons.png differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-16x16.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-16x16.png new file mode 100644 index 00000000..66b1a5bf Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-16x16.png differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-32x32.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-32x32.png new file mode 100644 index 00000000..32f319f8 Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon-32x32.png differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon.ico b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon.ico new file mode 100644 index 00000000..8b60bcf0 Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/favicon.ico differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/logo_small.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/logo_small.png new file mode 100644 index 00000000..5496a655 Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/logo_small.png differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/pet_store_api.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/pet_store_api.png new file mode 100644 index 00000000..f9f9cd4a Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/pet_store_api.png differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/throbber.gif b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/throbber.gif new file mode 100644 index 00000000..06393889 Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/throbber.gif differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/wordnik_api.png b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/wordnik_api.png new file mode 100644 index 00000000..dca4f145 Binary files /dev/null and b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/images/wordnik_api.png differ diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/index.html b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/index.html new file mode 100644 index 00000000..20c6c818 --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/index.html @@ -0,0 +1,107 @@ + + + + + Swagger UI + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
+
+ + diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/en.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/en.js new file mode 100644 index 00000000..afddab16 --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/en.js @@ -0,0 +1,56 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Warning: Deprecated", + "Implementation Notes":"Implementation Notes", + "Response Class":"Response Class", + "Status":"Status", + "Parameters":"Parameters", + "Parameter":"Parameter", + "Value":"Value", + "Description":"Description", + "Parameter Type":"Parameter Type", + "Data Type":"Data Type", + "Response Messages":"Response Messages", + "HTTP Status Code":"HTTP Status Code", + "Reason":"Reason", + "Response Model":"Response Model", + "Request URL":"Request URL", + "Response Body":"Response Body", + "Response Code":"Response Code", + "Response Headers":"Response Headers", + "Hide Response":"Hide Response", + "Headers":"Headers", + "Try it out!":"Try it out!", + "Show/Hide":"Show/Hide", + "List Operations":"List Operations", + "Expand Operations":"Expand Operations", + "Raw":"Raw", + "can't parse JSON. Raw result":"can't parse JSON. Raw result", + "Example Value":"Example Value", + "Model Schema":"Model Schema", + "Model":"Model", + "Click to set as parameter value":"Click to set as parameter value", + "apply":"apply", + "Username":"Username", + "Password":"Password", + "Terms of service":"Terms of service", + "Created by":"Created by", + "See more at":"See more at", + "Contact the developer":"Contact the developer", + "api version":"api version", + "Response Content Type":"Response Content Type", + "Parameter content type:":"Parameter content type:", + "fetching resource":"fetching resource", + "fetching resource list":"fetching resource list", + "Explore":"Explore", + "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Can't read from server. It may not have the appropriate access-control-origin settings.", + "Please specify the protocol for":"Please specify the protocol for", + "Can't read swagger JSON from":"Can't read swagger JSON from", + "Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI", + "Unable to read api":"Unable to read api", + "from path":"from path", + "server returned":"server returned" +}); diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/es.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/es.js new file mode 100644 index 00000000..634154f5 --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/es.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Advertencia: Obsoleto", + "Implementation Notes":"Notas de implementación", + "Response Class":"Clase de la Respuesta", + "Status":"Status", + "Parameters":"Parámetros", + "Parameter":"Parámetro", + "Value":"Valor", + "Description":"Descripción", + "Parameter Type":"Tipo del Parámetro", + "Data Type":"Tipo del Dato", + "Response Messages":"Mensajes de la Respuesta", + "HTTP Status Code":"Código de Status HTTP", + "Reason":"Razón", + "Response Model":"Modelo de la Respuesta", + "Request URL":"URL de la Solicitud", + "Response Body":"Cuerpo de la Respuesta", + "Response Code":"Código de la Respuesta", + "Response Headers":"Encabezados de la Respuesta", + "Hide Response":"Ocultar Respuesta", + "Try it out!":"Pruébalo!", + "Show/Hide":"Mostrar/Ocultar", + "List Operations":"Listar Operaciones", + "Expand Operations":"Expandir Operaciones", + "Raw":"Crudo", + "can't parse JSON. Raw result":"no puede parsear el JSON. Resultado crudo", + "Example Value":"Valor de Ejemplo", + "Model Schema":"Esquema del Modelo", + "Model":"Modelo", + "apply":"aplicar", + "Username":"Nombre de usuario", + "Password":"Contraseña", + "Terms of service":"Términos de Servicio", + "Created by":"Creado por", + "See more at":"Ver más en", + "Contact the developer":"Contactar al desarrollador", + "api version":"versión de la api", + "Response Content Type":"Tipo de Contenido (Content Type) de la Respuesta", + "fetching resource":"buscando recurso", + "fetching resource list":"buscando lista del recurso", + "Explore":"Explorar", + "Show Swagger Petstore Example Apis":"Mostrar Api Ejemplo de Swagger Petstore", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"No se puede leer del servidor. Tal vez no tiene la configuración de control de acceso de origen (access-control-origin) apropiado.", + "Please specify the protocol for":"Por favor, especificar el protocola para", + "Can't read swagger JSON from":"No se puede leer el JSON de swagger desde", + "Finished Loading Resource Information. Rendering Swagger UI":"Finalizada la carga del recurso de Información. Mostrando Swagger UI", + "Unable to read api":"No se puede leer la api", + "from path":"desde ruta", + "server returned":"el servidor retornó" +}); diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/fr.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/fr.js new file mode 100644 index 00000000..ed5b7daa --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/fr.js @@ -0,0 +1,54 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Avertissement : Obsolète", + "Implementation Notes":"Notes d'implémentation", + "Response Class":"Classe de la réponse", + "Status":"Statut", + "Parameters":"Paramètres", + "Parameter":"Paramètre", + "Value":"Valeur", + "Description":"Description", + "Parameter Type":"Type du paramètre", + "Data Type":"Type de données", + "Response Messages":"Messages de la réponse", + "HTTP Status Code":"Code de statut HTTP", + "Reason":"Raison", + "Response Model":"Modèle de réponse", + "Request URL":"URL appelée", + "Response Body":"Corps de la réponse", + "Response Code":"Code de la réponse", + "Response Headers":"En-têtes de la réponse", + "Hide Response":"Cacher la réponse", + "Headers":"En-têtes", + "Try it out!":"Testez !", + "Show/Hide":"Afficher/Masquer", + "List Operations":"Liste des opérations", + "Expand Operations":"Développer les opérations", + "Raw":"Brut", + "can't parse JSON. Raw result":"impossible de décoder le JSON. Résultat brut", + "Example Value":"Exemple la valeur", + "Model Schema":"Définition du modèle", + "Model":"Modèle", + "apply":"appliquer", + "Username":"Nom d'utilisateur", + "Password":"Mot de passe", + "Terms of service":"Conditions de service", + "Created by":"Créé par", + "See more at":"Voir plus sur", + "Contact the developer":"Contacter le développeur", + "api version":"version de l'api", + "Response Content Type":"Content Type de la réponse", + "fetching resource":"récupération de la ressource", + "fetching resource list":"récupération de la liste de ressources", + "Explore":"Explorer", + "Show Swagger Petstore Example Apis":"Montrer les Apis de l'exemple Petstore de Swagger", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Impossible de lire à partir du serveur. Il se peut que les réglages access-control-origin ne soient pas appropriés.", + "Please specify the protocol for":"Veuillez spécifier un protocole pour", + "Can't read swagger JSON from":"Impossible de lire le JSON swagger à partir de", + "Finished Loading Resource Information. Rendering Swagger UI":"Chargement des informations terminé. Affichage de Swagger UI", + "Unable to read api":"Impossible de lire l'api", + "from path":"à partir du chemin", + "server returned":"réponse du serveur" +}); diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/geo.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/geo.js new file mode 100644 index 00000000..29c45862 --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/geo.js @@ -0,0 +1,56 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"ყურადღება: აღარ გამოიყენება", + "Implementation Notes":"იმპლემენტაციის აღწერა", + "Response Class":"რესპონს კლასი", + "Status":"სტატუსი", + "Parameters":"პარამეტრები", + "Parameter":"პარამეტრი", + "Value":"მნიშვნელობა", + "Description":"აღწერა", + "Parameter Type":"პარამეტრის ტიპი", + "Data Type":"მონაცემის ტიპი", + "Response Messages":"პასუხი", + "HTTP Status Code":"HTTP სტატუსი", + "Reason":"მიზეზი", + "Response Model":"რესპონს მოდელი", + "Request URL":"მოთხოვნის URL", + "Response Body":"პასუხის სხეული", + "Response Code":"პასუხის კოდი", + "Response Headers":"პასუხის ჰედერები", + "Hide Response":"დამალე პასუხი", + "Headers":"ჰედერები", + "Try it out!":"ცადე !", + "Show/Hide":"გამოჩენა/დამალვა", + "List Operations":"ოპერაციების სია", + "Expand Operations":"ოპერაციები ვრცლად", + "Raw":"ნედლი", + "can't parse JSON. Raw result":"JSON-ის დამუშავება ვერ მოხერხდა. ნედლი პასუხი", + "Example Value":"მაგალითი", + "Model Schema":"მოდელის სტრუქტურა", + "Model":"მოდელი", + "Click to set as parameter value":"პარამეტრისთვის მნიშვნელობის მისანიჭებლად, დააკლიკე", + "apply":"გამოყენება", + "Username":"მოხმარებელი", + "Password":"პაროლი", + "Terms of service":"მომსახურების პირობები", + "Created by":"შექმნა", + "See more at":"ნახე ვრცლად", + "Contact the developer":"დაუკავშირდი დეველოპერს", + "api version":"api ვერსია", + "Response Content Type":"პასუხის კონტენტის ტიპი", + "Parameter content type:":"პარამეტრის კონტენტის ტიპი:", + "fetching resource":"რესურსების მიღება", + "fetching resource list":"რესურსების სიის მიღება", + "Explore":"ნახვა", + "Show Swagger Petstore Example Apis":"ნახე Swagger Petstore სამაგალითო Api", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"სერვერთან დაკავშირება ვერ ხერხდება. შეამოწმეთ access-control-origin.", + "Please specify the protocol for":"მიუთითეთ პროტოკოლი", + "Can't read swagger JSON from":"swagger JSON წაკითხვა ვერ მოხერხდა", + "Finished Loading Resource Information. Rendering Swagger UI":"რესურსების ჩატვირთვა სრულდება. Swagger UI რენდერდება", + "Unable to read api":"api წაკითხვა ვერ მოხერხდა", + "from path":"მისამართიდან", + "server returned":"სერვერმა დააბრუნა" +}); diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/it.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/it.js new file mode 100644 index 00000000..af9d0dd1 --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/it.js @@ -0,0 +1,52 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Attenzione: Deprecato", + "Implementation Notes":"Note di implementazione", + "Response Class":"Classe della risposta", + "Status":"Stato", + "Parameters":"Parametri", + "Parameter":"Parametro", + "Value":"Valore", + "Description":"Descrizione", + "Parameter Type":"Tipo di parametro", + "Data Type":"Tipo di dato", + "Response Messages":"Messaggi della risposta", + "HTTP Status Code":"Codice stato HTTP", + "Reason":"Motivo", + "Response Model":"Modello di risposta", + "Request URL":"URL della richiesta", + "Response Body":"Corpo della risposta", + "Response Code":"Oggetto della risposta", + "Response Headers":"Intestazioni della risposta", + "Hide Response":"Nascondi risposta", + "Try it out!":"Provalo!", + "Show/Hide":"Mostra/Nascondi", + "List Operations":"Mostra operazioni", + "Expand Operations":"Espandi operazioni", + "Raw":"Grezzo (raw)", + "can't parse JSON. Raw result":"non è possibile parsare il JSON. Risultato grezzo (raw).", + "Model Schema":"Schema del modello", + "Model":"Modello", + "apply":"applica", + "Username":"Nome utente", + "Password":"Password", + "Terms of service":"Condizioni del servizio", + "Created by":"Creato da", + "See more at":"Informazioni aggiuntive:", + "Contact the developer":"Contatta lo sviluppatore", + "api version":"versione api", + "Response Content Type":"Tipo di contenuto (content type) della risposta", + "fetching resource":"recuperando la risorsa", + "fetching resource list":"recuperando lista risorse", + "Explore":"Esplora", + "Show Swagger Petstore Example Apis":"Mostra le api di esempio di Swagger Petstore", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Non è possibile leggere dal server. Potrebbe non avere le impostazioni di controllo accesso origine (access-control-origin) appropriate.", + "Please specify the protocol for":"Si prega di specificare il protocollo per", + "Can't read swagger JSON from":"Impossibile leggere JSON swagger da:", + "Finished Loading Resource Information. Rendering Swagger UI":"Lettura informazioni risorse termianta. Swagger UI viene mostrata", + "Unable to read api":"Impossibile leggere la api", + "from path":"da cartella", + "server returned":"il server ha restituito" +}); diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ja.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ja.js new file mode 100644 index 00000000..cca27c07 --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ja.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"警告: 廃止予定", + "Implementation Notes":"実装メモ", + "Response Class":"レスポンスクラス", + "Status":"ステータス", + "Parameters":"パラメータ群", + "Parameter":"パラメータ", + "Value":"値", + "Description":"説明", + "Parameter Type":"パラメータタイプ", + "Data Type":"データタイプ", + "Response Messages":"レスポンスメッセージ", + "HTTP Status Code":"HTTPステータスコード", + "Reason":"理由", + "Response Model":"レスポンスモデル", + "Request URL":"リクエストURL", + "Response Body":"レスポンスボディ", + "Response Code":"レスポンスコード", + "Response Headers":"レスポンスヘッダ", + "Hide Response":"レスポンスを隠す", + "Headers":"ヘッダ", + "Try it out!":"実際に実行!", + "Show/Hide":"表示/非表示", + "List Operations":"操作一覧", + "Expand Operations":"操作の展開", + "Raw":"Raw", + "can't parse JSON. Raw result":"JSONへ解釈できません. 未加工の結果", + "Model Schema":"モデルスキーマ", + "Model":"モデル", + "apply":"実行", + "Username":"ユーザ名", + "Password":"パスワード", + "Terms of service":"サービス利用規約", + "Created by":"Created by", + "See more at":"See more at", + "Contact the developer":"開発者に連絡", + "api version":"APIバージョン", + "Response Content Type":"レスポンス コンテンツタイプ", + "fetching resource":"リソースの取得", + "fetching resource list":"リソース一覧の取得", + "Explore":"Explore", + "Show Swagger Petstore Example Apis":"SwaggerペットストアAPIの表示", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"サーバから読み込めません. 適切なaccess-control-origin設定を持っていない可能性があります.", + "Please specify the protocol for":"プロトコルを指定してください", + "Can't read swagger JSON from":"次からswagger JSONを読み込めません", + "Finished Loading Resource Information. Rendering Swagger UI":"リソース情報の読み込みが完了しました. Swagger UIを描画しています", + "Unable to read api":"APIを読み込めません", + "from path":"次のパスから", + "server returned":"サーバからの返答" +}); diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pl.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pl.js new file mode 100644 index 00000000..b789ef7a --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pl.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Uwaga: Wycofane", + "Implementation Notes":"Uwagi Implementacji", + "Response Class":"Klasa Odpowiedzi", + "Status":"Status", + "Parameters":"Parametry", + "Parameter":"Parametr", + "Value":"Wartość", + "Description":"Opis", + "Parameter Type":"Typ Parametru", + "Data Type":"Typ Danych", + "Response Messages":"Wiadomości Odpowiedzi", + "HTTP Status Code":"Kod Statusu HTTP", + "Reason":"Przyczyna", + "Response Model":"Model Odpowiedzi", + "Request URL":"URL Wywołania", + "Response Body":"Treść Odpowiedzi", + "Response Code":"Kod Odpowiedzi", + "Response Headers":"Nagłówki Odpowiedzi", + "Hide Response":"Ukryj Odpowiedź", + "Headers":"Nagłówki", + "Try it out!":"Wypróbuj!", + "Show/Hide":"Pokaż/Ukryj", + "List Operations":"Lista Operacji", + "Expand Operations":"Rozwiń Operacje", + "Raw":"Nieprzetworzone", + "can't parse JSON. Raw result":"nie można przetworzyć pliku JSON. Nieprzetworzone dane", + "Model Schema":"Schemat Modelu", + "Model":"Model", + "apply":"użyj", + "Username":"Nazwa użytkownika", + "Password":"Hasło", + "Terms of service":"Warunki używania", + "Created by":"Utworzone przez", + "See more at":"Zobacz więcej na", + "Contact the developer":"Kontakt z deweloperem", + "api version":"wersja api", + "Response Content Type":"Typ Zasobu Odpowiedzi", + "fetching resource":"ładowanie zasobu", + "fetching resource list":"ładowanie listy zasobów", + "Explore":"Eksploruj", + "Show Swagger Petstore Example Apis":"Pokaż Przykładowe Api Swagger Petstore", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Brak połączenia z serwerem. Może on nie mieć odpowiednich ustawień access-control-origin.", + "Please specify the protocol for":"Proszę podać protokół dla", + "Can't read swagger JSON from":"Nie można odczytać swagger JSON z", + "Finished Loading Resource Information. Rendering Swagger UI":"Ukończono Ładowanie Informacji o Zasobie. Renderowanie Swagger UI", + "Unable to read api":"Nie można odczytać api", + "from path":"ze ścieżki", + "server returned":"serwer zwrócił" +}); diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pt.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pt.js new file mode 100644 index 00000000..344dff5a --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/pt.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Aviso: Depreciado", + "Implementation Notes":"Notas de Implementação", + "Response Class":"Classe de resposta", + "Status":"Status", + "Parameters":"Parâmetros", + "Parameter":"Parâmetro", + "Value":"Valor", + "Description":"Descrição", + "Parameter Type":"Tipo de parâmetro", + "Data Type":"Tipo de dados", + "Response Messages":"Mensagens de resposta", + "HTTP Status Code":"Código de status HTTP", + "Reason":"Razão", + "Response Model":"Modelo resposta", + "Request URL":"URL requisição", + "Response Body":"Corpo da resposta", + "Response Code":"Código da resposta", + "Response Headers":"Cabeçalho da resposta", + "Headers":"Cabeçalhos", + "Hide Response":"Esconder resposta", + "Try it out!":"Tente agora!", + "Show/Hide":"Mostrar/Esconder", + "List Operations":"Listar operações", + "Expand Operations":"Expandir operações", + "Raw":"Cru", + "can't parse JSON. Raw result":"Falha ao analisar JSON. Resulto cru", + "Model Schema":"Modelo esquema", + "Model":"Modelo", + "apply":"Aplicar", + "Username":"Usuário", + "Password":"Senha", + "Terms of service":"Termos do serviço", + "Created by":"Criado por", + "See more at":"Veja mais em", + "Contact the developer":"Contate o desenvolvedor", + "api version":"Versão api", + "Response Content Type":"Tipo de conteúdo da resposta", + "fetching resource":"busca recurso", + "fetching resource list":"buscando lista de recursos", + "Explore":"Explorar", + "Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Não é possível ler do servidor. Pode não ter as apropriadas configurações access-control-origin", + "Please specify the protocol for":"Por favor especifique o protocolo", + "Can't read swagger JSON from":"Não é possível ler o JSON Swagger de", + "Finished Loading Resource Information. Rendering Swagger UI":"Carregar informação de recurso finalizada. Renderizando Swagger UI", + "Unable to read api":"Não foi possível ler api", + "from path":"do caminho", + "server returned":"servidor retornou" +}); diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ru.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ru.js new file mode 100644 index 00000000..92344fcf --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/ru.js @@ -0,0 +1,56 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Предупреждение: Устарело", + "Implementation Notes":"Заметки", + "Response Class":"Пример ответа", + "Status":"Статус", + "Parameters":"Параметры", + "Parameter":"Параметр", + "Value":"Значение", + "Description":"Описание", + "Parameter Type":"Тип параметра", + "Data Type":"Тип данных", + "HTTP Status Code":"HTTP код", + "Reason":"Причина", + "Response Model":"Структура ответа", + "Request URL":"URL запроса", + "Response Body":"Тело ответа", + "Response Code":"HTTP код ответа", + "Response Headers":"Заголовки ответа", + "Hide Response":"Спрятать ответ", + "Headers":"Заголовки", + "Response Messages":"Что может прийти в ответ", + "Try it out!":"Попробовать!", + "Show/Hide":"Показать/Скрыть", + "List Operations":"Операции кратко", + "Expand Operations":"Операции подробно", + "Raw":"В сыром виде", + "can't parse JSON. Raw result":"Не удается распарсить ответ:", + "Example Value":"Пример", + "Model Schema":"Структура", + "Model":"Описание", + "Click to set as parameter value":"Нажмите, чтобы испльзовать в качестве значения параметра", + "apply":"применить", + "Username":"Имя пользователя", + "Password":"Пароль", + "Terms of service":"Условия использования", + "Created by":"Разработано", + "See more at":"Еще тут", + "Contact the developer":"Связаться с разработчиком", + "api version":"Версия API", + "Response Content Type":"Content Type ответа", + "Parameter content type:":"Content Type параметра:", + "fetching resource":"Получение ресурса", + "fetching resource list":"Получение ресурсов", + "Explore":"Показать", + "Show Swagger Petstore Example Apis":"Показать примеры АПИ", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Не удается получить ответ от сервера. Возможно, проблема с настройками доступа", + "Please specify the protocol for":"Пожалуйста, укажите протокол для", + "Can't read swagger JSON from":"Не получается прочитать swagger json из", + "Finished Loading Resource Information. Rendering Swagger UI":"Загрузка информации о ресурсах завершена. Рендерим", + "Unable to read api":"Не удалось прочитать api", + "from path":"по адресу", + "server returned":"сервер сказал" +}); diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/tr.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/tr.js new file mode 100644 index 00000000..ab07616f --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/tr.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"Uyarı: Deprecated", + "Implementation Notes":"Gerçekleştirim Notları", + "Response Class":"Dönen Sınıf", + "Status":"Statü", + "Parameters":"Parametreler", + "Parameter":"Parametre", + "Value":"Değer", + "Description":"Açıklama", + "Parameter Type":"Parametre Tipi", + "Data Type":"Veri Tipi", + "Response Messages":"Dönüş Mesajı", + "HTTP Status Code":"HTTP Statü Kodu", + "Reason":"Gerekçe", + "Response Model":"Dönüş Modeli", + "Request URL":"İstek URL", + "Response Body":"Dönüş İçeriği", + "Response Code":"Dönüş Kodu", + "Response Headers":"Dönüş Üst Bilgileri", + "Hide Response":"Dönüşü Gizle", + "Headers":"Üst Bilgiler", + "Try it out!":"Dene!", + "Show/Hide":"Göster/Gizle", + "List Operations":"Operasyonları Listele", + "Expand Operations":"Operasyonları Aç", + "Raw":"Ham", + "can't parse JSON. Raw result":"JSON çözümlenemiyor. Ham sonuç", + "Model Schema":"Model Şema", + "Model":"Model", + "apply":"uygula", + "Username":"Kullanıcı Adı", + "Password":"Parola", + "Terms of service":"Servis şartları", + "Created by":"Oluşturan", + "See more at":"Daha fazlası için", + "Contact the developer":"Geliştirici ile İletişime Geçin", + "api version":"api versiyon", + "Response Content Type":"Dönüş İçerik Tipi", + "fetching resource":"kaynak getiriliyor", + "fetching resource list":"kaynak listesi getiriliyor", + "Explore":"Keşfet", + "Show Swagger Petstore Example Apis":"Swagger Petstore Örnek Api'yi Gör", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"Sunucudan okuma yapılamıyor. Sunucu access-control-origin ayarlarınızı kontrol edin.", + "Please specify the protocol for":"Lütfen istenen adres için protokol belirtiniz", + "Can't read swagger JSON from":"Swagger JSON bu kaynaktan okunamıyor", + "Finished Loading Resource Information. Rendering Swagger UI":"Kaynak baglantısı tamamlandı. Swagger UI gösterime hazırlanıyor", + "Unable to read api":"api okunamadı", + "from path":"yoldan", + "server returned":"sunucuya dönüldü" +}); diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/translator.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/translator.js new file mode 100644 index 00000000..3b7c91ea --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/translator.js @@ -0,0 +1,39 @@ +'use strict'; + +/** + * Translator for documentation pages. + * + * To enable translation you should include one of language-files in your index.html + * after . + * For example - + * + * If you wish to translate some new texsts you should do two things: + * 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too. + * 2. Mark that text it templates this way New Phrase or . + * The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate. + * + */ +window.SwaggerTranslator = { + + _words:[], + + translate: function(sel) { + var $this = this; + sel = sel || '[data-sw-translate]'; + + $(sel).each(function() { + $(this).html($this._tryTranslate($(this).html())); + + $(this).val($this._tryTranslate($(this).val())); + $(this).attr('title', $this._tryTranslate($(this).attr('title'))); + }); + }, + + _tryTranslate: function(word) { + return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word; + }, + + learn: function(wordsMap) { + this._words = wordsMap; + } +}; diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/zh-cn.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/zh-cn.js new file mode 100644 index 00000000..7b21d3ed --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lang/zh-cn.js @@ -0,0 +1,53 @@ +'use strict'; + +/* jshint quotmark: double */ +window.SwaggerTranslator.learn({ + "Warning: Deprecated":"警告:已过时", + "Implementation Notes":"实现备注", + "Response Class":"响应类", + "Status":"状态", + "Parameters":"参数", + "Parameter":"参数", + "Value":"值", + "Description":"描述", + "Parameter Type":"参数类型", + "Data Type":"数据类型", + "Response Messages":"响应消息", + "HTTP Status Code":"HTTP状态码", + "Reason":"原因", + "Response Model":"响应模型", + "Request URL":"请求URL", + "Response Body":"响应体", + "Response Code":"响应码", + "Response Headers":"响应头", + "Hide Response":"隐藏响应", + "Headers":"头", + "Try it out!":"试一下!", + "Show/Hide":"显示/隐藏", + "List Operations":"显示操作", + "Expand Operations":"展开操作", + "Raw":"原始", + "can't parse JSON. Raw result":"无法解析JSON. 原始结果", + "Model Schema":"模型架构", + "Model":"模型", + "apply":"应用", + "Username":"用户名", + "Password":"密码", + "Terms of service":"服务条款", + "Created by":"创建者", + "See more at":"查看更多:", + "Contact the developer":"联系开发者", + "api version":"api版本", + "Response Content Type":"响应Content Type", + "fetching resource":"正在获取资源", + "fetching resource list":"正在获取资源列表", + "Explore":"浏览", + "Show Swagger Petstore Example Apis":"显示 Swagger Petstore 示例 Apis", + "Can't read from server. It may not have the appropriate access-control-origin settings.":"无法从服务器读取。可能没有正确设置access-control-origin。", + "Please specify the protocol for":"请指定协议:", + "Can't read swagger JSON from":"无法读取swagger JSON于", + "Finished Loading Resource Information. Rendering Swagger UI":"已加载资源信息。正在渲染Swagger UI", + "Unable to read api":"无法读取api", + "from path":"从路径", + "server returned":"服务器返回" +}); diff --git a/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/backbone-min.js b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/backbone-min.js new file mode 100644 index 00000000..5b5b0fef --- /dev/null +++ b/ms/vlantag-api/src/main/resources/META-INF/resources/swagger-ui/dist/lib/backbone-min.js @@ -0,0 +1,15 @@ +// Backbone.js 1.1.2 + +(function(t,e){if(typeof define==="function"&&define.amd){define(["underscore","jquery","exports"],function(i,r,s){t.Backbone=e(t,s,i,r)})}else if(typeof exports!=="undefined"){var i=require("underscore");e(t,exports,i)}else{t.Backbone=e(t,{},t._,t.jQuery||t.Zepto||t.ender||t.$)}})(this,function(t,e,i,r){var s=t.Backbone;var n=[];var a=n.push;var o=n.slice;var h=n.splice;e.VERSION="1.1.2";e.$=r;e.noConflict=function(){t.Backbone=s;return this};e.emulateHTTP=false;e.emulateJSON=false;var u=e.Events={on:function(t,e,i){if(!c(this,"on",t,[e,i])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);r.push({callback:e,context:i,ctx:i||this});return this},once:function(t,e,r){if(!c(this,"once",t,[e,r])||!e)return this;var s=this;var n=i.once(function(){s.off(t,n);e.apply(this,arguments)});n._callback=e;return this.on(t,n,r)},off:function(t,e,r){var s,n,a,o,h,u,l,f;if(!this._events||!c(this,"off",t,[e,r]))return this;if(!t&&!e&&!r){this._events=void 0;return this}o=t?[t]:i.keys(this._events);for(h=0,u=o.length;h").attr(t);this.setElement(r,false)}else{this.setElement(i.result(this,"el"),false)}}});e.sync=function(t,r,s){var n=T[t];i.defaults(s||(s={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:n,dataType:"json"};if(!s.url){a.url=i.result(r,"url")||M()}if(s.data==null&&r&&(t==="create"||t==="update"||t==="patch")){a.contentType="application/json";a.data=JSON.stringify(s.attrs||r.toJSON(s))}if(s.emulateJSON){a.contentType="application/x-www-form-urlencoded";a.data=a.data?{model:a.data}:{}}if(s.emulateHTTP&&(n==="PUT"||n==="DELETE"||n==="PATCH")){a.type="POST";if(s.emulateJSON)a.data._method=n;var o=s.beforeSend;s.beforeSend=function(t){t.setRequestHeader("X-HTTP-Method-Override",n);if(o)return o.apply(this,arguments)}}if(a.type!=="GET"&&!s.emulateJSON){a.processData=false}if(a.type==="PATCH"&&k){a.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")}}var h=s.xhr=e.ajax(i.extend(a,s));r.trigger("request",r,h,s);return h};var k=typeof window!=="undefined"&&!!window.ActiveXObject&&!(window.XMLHttpRequest&&(new XMLHttpRequest).dispatchEvent);var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={});if(t.routes)this.routes=t.routes;this._bindRoutes();this.initialize.apply(this,arguments)};var S=/\((.*?)\)/g;var H=/(\(\?)?:\w+/g;var A=/\*\w+/g;var I=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,u,{initialize:function(){},route:function(t,r,s){if(!i.isRegExp(t))t=this._routeToRegExp(t);if(i.isFunction(r)){s=r;r=""}if(!s)s=this[r];var n=this;e.history.route(t,function(i){var a=n._extractParameters(t,i);n.execute(s,a);n.trigger.apply(n,["route:"+r].concat(a));n.trigger("route",r,a);e.history.trigger("route",n,r,a)});return this},execute:function(t,e){if(t)t.apply(this,e)},navigate:function(t,i){e.history.navigate(t,i);return this},_bindRoutes:function(){if(!this.routes)return;this.routes=i.result(this,"routes");var t,e=i.keys(this.routes);while((t=e.pop())!=null){this.route(t,this.routes[t])}},_routeToRegExp:function(t){t=t.replace(I,"\\$&").replace(S,"(?:$1)?").replace(H,function(t,e){return e?t:"([^/?]+)"}).replace(A,"([^?]*?)");return new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){if(e===r.length-1)return t||null;return t?decodeURIComponent(t):null})}});var N=e.History=function(){this.handlers=[];i.bindAll(this,"checkUrl");if(typeof window!=="undefined"){this.location=window.location;this.history=window.history}};var R=/^[#\/]|\s+$/g;var O=/^\/+|\/+$/g;var P=/msie [\w.]+/;var C=/\/$/;var j=/#.*$/;N.started=false;i.extend(N.prototype,u,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(t==null){if(this._hasPushState||!this._wantsHashChange||e){t=decodeURI(this.location.pathname+this.location.search);var i=this.root.replace(C,"");if(!t.indexOf(i))t=t.slice(i.length)}else{t=this.getHash()}}return t.replace(R,"")},start:function(t){if(N.started)throw new Error("Backbone.history has already been started");N.started=true;this.options=i.extend({root:"/"},this.options,t);this.root=this.options.root;this._wantsHashChange=this.options.hashChange!==false;this._wantsPushState=!!this.options.pushState;this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var r=this.getFragment();var s=document.documentMode;var n=P.exec(navigator.userAgent.toLowerCase())&&(!s||s<=7);this.root=("/"+this.root+"/").replace(O,"/");if(n&&this._wantsHashChange){var a=e.$('