summaryrefslogtreecommitdiffstats
path: root/vnfmarket-be
diff options
context:
space:
mode:
Diffstat (limited to 'vnfmarket-be')
-rw-r--r--vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile2
-rw-r--r--vnfmarket-be/deployment/install/.env4
-rw-r--r--vnfmarket-be/deployment/install/docker-compose.yml10
-rw-r--r--vnfmarket-be/deployment/zip/pom.xml8
-rw-r--r--vnfmarket-be/pom.xml1
-rw-r--r--vnfmarket-be/portal-marketplace/pom.xml38
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/Gruntfile.js192
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/README.md28
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/bower.json31
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/index.html210
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/karma.conf.js113
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/app.config.js62
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/app.js46
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/assets/images/open_o_diagram.pngbin127012 -> 0 bytes
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/about-test.js48
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/about.html91
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutCtrl.js47
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutModule.js31
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutRoute.js40
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutService.js41
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/dashboard.html100
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/home-test.js55
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/home.html108
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeCtrl.js51
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeModule.js30
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeRoute.js44
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeService.js754
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/main-page/main-page.html76
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/main-page/mainPageCtrl.js115
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/nav-bar/navBarService.js66
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenav.html46
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenavCtrl.js114
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenavService.js66
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplace-test.js48
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplace.html22
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceCtrl.js47
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceModule.js31
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceRoute.js40
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceService.js41
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/user-test.js48
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/user.html74
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userCtrl.js47
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userModule.js31
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userRoute.js40
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userService.js41
-rw-r--r--vnfmarket-be/portal-marketplace/src/main/webapp/package.json44
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/pom.xml407
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonConstant.java166
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonErrorResponse.java31
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/resource/PackageResource.java164
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java15
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java757
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/resources/generalconfig/OnBoardingSteps.json8
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/webapp/WEB-INF/web.xml23
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/webapp/apidocs/index.html61
55 files changed, 894 insertions, 3960 deletions
diff --git a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile
index 556bea48..2e3a7e46 100644
--- a/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile
+++ b/vnfmarket-be/deployment/docker/docker-refrepo/src/main/docker/Dockerfile
@@ -47,7 +47,7 @@ RUN add-apt-repository ppa:openjdk-r/ppa -y && \
# Set up tomcat
-RUN wget -q http://mirrors.ocf.berkeley.edu/apache/tomcat/tomcat-8/v8.0.50/bin/apache-tomcat-8.0.50.tar.gz && tar --strip-components=1 -xf apache-tomcat-8.0.50.tar.gz && rm -f apache-tomcat-8.0.50.tar.gz && rm -rf webapps && mkdir -p webapps/ROOT
+RUN wget -q http://mirrors.ocf.berkeley.edu/apache/tomcat/tomcat-8/v8.5.30/bin/apache-tomcat-8.5.30.tar.gz && tar --strip-components=1 -xf apache-tomcat-8.5.30.tar.gz && rm -f apache-tomcat-8.5.30.tar.gz && rm -rf webapps && mkdir -p webapps/ROOT
RUN echo 'export CATALINA_OPTS="$CATALINA_OPTS -Xms64m -Xmx256m -XX:MaxPermSize=64m"' > /service/bin/setenv.sh
ENV CATALINA_HOME /service
diff --git a/vnfmarket-be/deployment/install/.env b/vnfmarket-be/deployment/install/.env
index 637d667d..6f7aa333 100644
--- a/vnfmarket-be/deployment/install/.env
+++ b/vnfmarket-be/deployment/install/.env
@@ -6,7 +6,9 @@
REFREPO_TAG=1.1-STAGING-latest
POSTGRES_TAG=latest
-NEXUS_REPO=nexus3.onap.org:10001
+if [ -z "${NEXUS_DOCKER_REPO}" ]; then
+NEXUS_DOCKER_REPO=nexus3.onap.org:10001
+fi
export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
diff --git a/vnfmarket-be/deployment/install/docker-compose.yml b/vnfmarket-be/deployment/install/docker-compose.yml
index efffebf9..b9c55427 100644
--- a/vnfmarket-be/deployment/install/docker-compose.yml
+++ b/vnfmarket-be/deployment/install/docker-compose.yml
@@ -9,16 +9,18 @@ services:
postgres:
container_name: "postgres"
restart: "always"
- image: "${NEXUS_REPO}/onap/vnfsdk/refrepo/postgres:${POSTGRES_TAG}"
+ image: "${NEXUS_DOCKER_REPO}/onap/vnfsdk/refrepo/postgres:${POSTGRES_TAG}"
mem_limit: "1g"
memswap_limit: "1g"
ports:
- - "5432:5432"
+ - "5432:5432"
+ volumes:
+ - /data/refrepo/postgres:/var/lib/postgresql/data
refrepo:
container_name: "refrepo"
restart: "always"
- image: "${NEXUS_REPO}/onap/vnfsdk/refrepo:${REFREPO_TAG}"
+ image: "${NEXUS_DOCKER_REPO}/onap/vnfsdk/refrepo:${REFREPO_TAG}"
ports:
- "8702-8703:8702-8703"
- "8000:8000"
@@ -27,6 +29,6 @@ services:
JPDA_ADDRESS: 8000
JPDA_TRANSPORT: dt_socket
volumes:
- - /data/csars:/service/webapps/ROOT/WEB-INF/tomcat/webapps/ROOT/CSAR
+ - /data/refrepo/csars:/service/webapps/ROOT/WEB-INF/tomcat/webapps/ROOT/CSAR
links:
- postgres
diff --git a/vnfmarket-be/deployment/zip/pom.xml b/vnfmarket-be/deployment/zip/pom.xml
index e0b4e7e9..d2f562f7 100644
--- a/vnfmarket-be/deployment/zip/pom.xml
+++ b/vnfmarket-be/deployment/zip/pom.xml
@@ -69,6 +69,7 @@
ant.mkdir(dir: "${deployUnzip}/webapps/ROOT")
ant.mkdir(dir: "${deployUnzip}/webapps/onapui")
+ ant.mkdir(dir: "${deployUnzip}/webapps/apidocs")
ant.copy(todir: "${deployUnzip}") {
fileset(dir: "${basedir}/src/main/release"){
@@ -83,6 +84,13 @@
ant.copy(todir: "${deployUnzip}/webapps/onapui") {
fileset(dir: "${project.build.directory}/../../../../vnfmarket/src/main/webapp")
}
+
+ ant.copy(todir: "${deployUnzip}/webapps/apidocs") {
+ fileset(dir: "${project.build.directory}/../../../vnf-sdk-marketplace/target/swagger-ui-master/dist") {
+ exclude(name: "index.html")
+ }
+ fileset(dir: "${project.build.directory}/../../../vnf-sdk-marketplace/src/main/webapp/apidocs")
+ }
ant.zip(destfile: "${deployFolder}/${outfileName}") {
fileset(dir: "${deployUnzip}")
diff --git a/vnfmarket-be/pom.xml b/vnfmarket-be/pom.xml
index a8923376..e36bb78d 100644
--- a/vnfmarket-be/pom.xml
+++ b/vnfmarket-be/pom.xml
@@ -32,7 +32,6 @@
</scm>
<modules>
<module>vnf-sdk-marketplace</module>
- <module>portal-marketplace</module>
<module>deployment</module>
</modules>
</project>
diff --git a/vnfmarket-be/portal-marketplace/pom.xml b/vnfmarket-be/portal-marketplace/pom.xml
deleted file mode 100644
index 542d8f73..00000000
--- a/vnfmarket-be/portal-marketplace/pom.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright 2016-2017 Huawei Technologies Co., Ltd.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.onap.vnfsdk.refrepo</groupId>
- <artifactId>vnf-sdk-marketplace-core-parent</artifactId>
- <version>1.1.0</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>portal-marketplace</artifactId>
- <version>1.1.0</version>
- <packaging>war</packaging>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <failOnMissingWebXml>false</failOnMissingWebXml>
- </configuration>
- </plugin>
- </plugins>
- </build>
-<name>vnf-sdk-marketplace/portal-marketplace</name></project>
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/Gruntfile.js b/vnfmarket-be/portal-marketplace/src/main/webapp/Gruntfile.js
deleted file mode 100644
index 99673b10..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/Gruntfile.js
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-// Grunt tasks
-
-module.exports = function (grunt) {
- "use strict";
-
- // Project configuration.
- grunt.initConfig({
-
- pkg: grunt.file.readJSON('package.json'),
- banner: '/*!\n' +
- '* <%= pkg.name %> - v<%= pkg.version %> - MIT LICENSE <%= grunt.template.today("yyyy-mm-dd") %>. \n' +
- '* @author <%= pkg.author %>\n' +
- '*/\n',
-
- clean: {
- dist: ['src']
- },
-
- jshint: {
- options: {
- jshintrc: '.jshintrc'
- },
- gruntfile: {
- src: 'Gruntfile.js'
- },
- app: {
- src: ['app/modules/**/*.js']
- }
- },
-
- exec: {
- bowerInstaller: 'bower-installer'
- },
-
- concat: {
- options: {
- banner: '<%= banner %>',
- stripBanners: false
- },
- base: {
- src: [
- // Angular Project Dependencies,
- 'app/app.js',
- 'app/app.config.js',
- 'app/modules/**/*Module.js',
- 'app/modules/**/*Route.js',
- 'app/modules/**/*Ctrl.js',
- 'app/modules/**/*Service.js',
- 'app/modules/**/*Directive.js'
- ],
- dest: 'app/assets/js/<%= pkg.name %>-appbundle.js'
- },
- build: {
- src: [
- // Angular Project Dependencies,
- 'app/assets/libs/angular/angular.js',
- 'app/assets/libs/**/*.js'
-
- ],
- dest: 'app/assets/js/<%= pkg.name %>-angularbundle.js'
- }
- },
-
- uglify: {
- options: {
- banner: '<%= banner %>',
- report: 'min'
- },
- base: {
- src: ['<%= concat.base.dest %>'],
- dest: 'app/assets/js/<%= pkg.name %>-angscript.min.js'
- },
- basePlugin: {
- src: [ 'src/plugins/**/*.js' ],
- dest: 'app/assets/js/plugins/',
- expand: true,
- flatten: true,
- ext: '.min.js'
- }
- },
-
- connect: {
- server: {
- options: {
- keepalive: true,
- port: 4000,
- base: '.',
- hostname: 'localhost',
- debug: true,
- livereload: true,
- open: true
- }
- }
- },
- concurrent: {
- tasks: ['connect', 'watch'],
- options: {
- logConcurrentOutput: true
- }
- },
-
- watch: {
- app: {
- files: '<%= jshint.app.src %>',
- tasks: ['jshint:app'],
- options: {
- livereload: true
- }
- }
- },
-
- injector: {
- options: {},
- dev: {
- files: {
- 'index.html': [
- 'bower.json',
- 'app/app.js',
- 'app/app.config.js',
- 'app/**/*Module.js',
- 'app/**/*Route.js',
- 'app/**/*Ctrl.js',
- 'app/**/*Service.js',
- 'app/**/*Directive.js'
- ]
- }
- },
- production: {
- files: {
- 'index.html': [
- 'app/assets/css/**/*.css',
- 'app/assets/js/*.js'
- ]
-
- }
- }
- },
-
- ngtemplates: {
- app: {
- src: 'app/modules/**/*.html',
- dest: 'app/assets/js/templates.js',
- options: {
- module: '<%= pkg.name %>',
- root: 'app/',
- standAlone: false
- }
- }
- }
-
-
-
- });
-
- require('time-grunt')(grunt);
- require('load-grunt-tasks')(grunt);
-
- // Making grunt default to force in order not to break the project if something fail.
- grunt.option('force', true);
-
- // Register grunt tasks
- grunt.registerTask("build", [
- "jshint",
- "exec",
- "concat",
- "ngtemplates",
- "injector:production",
- "concurrent",
- "clean"
- ]);
-
- // Development task(s).
- grunt.registerTask('dev', ['injector:dev', 'concurrent']);
-
-};
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/README.md b/vnfmarket-be/portal-marketplace/src/main/webapp/README.md
deleted file mode 100644
index ac0ec86a..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-# VNF Marketplace.
-
-A GUI to a access and manage the VNF Marketplace.
-
-
-
-## Getting started
-
-Clone project:
-
- $ git clone https://github.com/
-
-Install dependencies:
-
- $ cd vnfmarketplace
- $ npm install
-
-Run development web-server:
-
- $ grunt dev
-
-## Features
-
-* List features here
-
-## Project structure and credits
-
-* Project credits here
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/bower.json b/vnfmarket-be/portal-marketplace/src/main/webapp/bower.json
deleted file mode 100644
index 4f2d96ab..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/bower.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "name": "vnfmarket",
- "description": "Marketplace UI for VNF Services",
- "version": "0.0.1",
- "install": {
- "path": {
- "js": "app/assets/libs",
- "css": "app/assets/css"
- }
- },
- "dependencies": {
- "json3": "3.3.1",
- "es5-shim": "3.1.0",
- "angular": ">=1.3.*",
- "angular-aria": ">=1.3.*",
- "angular-mocks": ">=1.3.*",
- "angular-cookies": ">=1.3.*",
- "angular-animate": ">=1.3.*",
- "angular-sanitize": ">=1.3.*",
- "angular-resource": ">=1.3.*",
- "angular-material-icons": "~0.6.0",
- "angular-messages": ">=1.3.*",
- "angular-material": ">=1.0.1",
- "angular-ui-router": "~0.2.10",
- "bootstrap": "3.3.7",
- "components-font-awesome": "^4.7.0"
- },
- "resolutions": {
- "angular": ">=1.3.*"
- }
-}
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/index.html b/vnfmarket-be/portal-marketplace/src/main/webapp/index.html
deleted file mode 100644
index 9e2cfb62..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/index.html
+++ /dev/null
@@ -1,210 +0,0 @@
-<!--
- Copyright 2016-2017 Huawei Technologies Co., Ltd.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-<!DOCTYPE html>
-<html lang="pt" ng-app="vnfmarket">
-<head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <base href="/">
- <title>VNF Marketplace</title>
- <meta name="description" content="Marketplace UI for VNF Services" />
- <meta name="author" content="" />
- <meta name="keywords" content="" />
- <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=yes" />
- <link rel="shortcut icon" href="app/assets/images/favicon.ico" />
- <link rel="apple-touch-icon" href="app/assets/images/apple-touch-icon.png" />
- <link rel="apple-touch-icon" sizes="72x72" href="app/assets/images/apple-touch-icon-72x72.png" />
- <link rel="apple-touch-icon" sizes="114x114" href="app/assets/images/apple-touch-icon-114x114.png" />
- <!-- injector:css -->
- <link rel="stylesheet" href="/src/bower_components/angular-material-icons/angular-material-icons.css">
- <link rel="stylesheet" href="/src/bower_components/angular-material/angular-material.css">
- <link rel="stylesheet" href="/src/bower_components/components-font-awesome/css/font-awesome.css">
- <!-- endinjector -->
- <link rel="stylesheet" href="/src/bower_components/bootstrap/dist/css/bootstrap.min.css">
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=RobotoDraft:300,400,500,700,400italic">
- <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
- <style>
- body, md-content.md-blue-grey-theme {
- background-color: #eee;
- }
-
- md-toolbar:not(.md-hue-1),
- .md-fab {
- fill: #fff;
- }
-
- md-sidenav {
- fill: #737373;
- }
-
- .user-avatar {
- border-radius: 99%;
- }
-
- md-toolbar.md-tall {
- height: 64px;
- max-height: 64px;
- min-height: 64px;
- }
- code {
- color: #4285f4;
- -webkit-font-smoothing: auto;
- font-weight: 300;
- background-color: #F2F2F2;
- padding: 10px;
- }
- .text-center {
- text-align: center!important
- }
- ul {
- list-style: none
- }
- </style>
-
-</head>
-<body ng-cloak>
-
-<!--Beginning-->
-<div ui-view layout="row" layout-fill></div>
-<!--End-->
-
-<!--Templates. Remove then to a better location -->
-
-<script type="text/ng-template" id="tabDialog.tmpl.html">
- <md-dialog
- aria-label="Profile">
- <form>
- <md-toolbar>
- <div class="md-toolbar-tools">
- <h2>Profile Settings</h2>
- <span flex></span>
- <md-button class="md-icon-button" ng-click="cancel()">
- <md-icon aria-label="Close dialog">close</md-icon>
- </md-button>
- </div>
- </md-toolbar>
- <md-dialog-content style="max-width:800px;max-height:810px; ">
- <md-tabs md-dynamic-height md-border-bottom>
- <md-tab label="one">
- <md-content class="md-padding">
- <h1 class="md-display-2">Tab One</h1>
-
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue.
- Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales
- pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies
- mi.</p>
- </md-content>
- </md-tab>
- <md-tab label="two">
- <md-content class="md-padding">
- <h1 class="md-display-2">Tab Two</h1>
-
- <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla venenatis ante augue.
- Phasellus volutpat neque ac dui mattis vulputate. Etiam consequat aliquam cursus. In sodales
- pretium ultrices. Maecenas lectus est, sollicitudin consectetur felis nec, feugiat ultricies
- mi. Aliquam erat volutpat. Nam placerat, tortor in ultrices porttitor, orci enim rutrum
- enim, vel tempor sapien arcu a tellus. Vivamus convallis sodales ante varius gravida.
- Curabitur a purus vel augue ultrices ultricies id a nisl. Nullam malesuada consequat diam, a
- facilisis tortor volutpat et. Sed urna dolor, aliquet vitae posuere vulputate, euismod ac
- lorem. Sed felis risus, pulvinar at interdum quis, vehicula sed odio. Phasellus in enim
- venenatis, iaculis tortor eu, bibendum ante. Donec ac tellus dictum neque volutpat blandit.
- Praesent efficitur faucibus risus, ac auctor purus porttitor vitae. Phasellus ornare dui nec
- orci posuere, nec luctus mauris semper.</p>
-
- <p>Morbi viverra, ante vel aliquet tincidunt, leo dolor pharetra quam, at semper massa orci nec
- magna. Donec posuere nec sapien sed laoreet. Etiam cursus nunc in condimentum facilisis.
- Etiam in tempor tortor. Vivamus faucibus egestas enim, at convallis diam pulvinar vel. Cras
- ac orci eget nisi maximus cursus. Nunc urna libero, viverra sit amet nisl at, hendrerit
- tempor turpis. Maecenas facilisis convallis mi vel tempor. Nullam vitae nunc leo. Cras sed
- nisl consectetur, rhoncus sapien sit amet, tempus sapien.</p>
-
- <p>Integer turpis erat, porttitor vitae mi faucibus, laoreet interdum tellus. Curabitur posuere
- molestie dictum. Morbi eget congue risus, quis rhoncus quam. Suspendisse vitae hendrerit
- erat, at posuere mi. Cras eu fermentum nunc. Sed id ante eu orci commodo volutpat non ac
- est. Praesent ligula diam, congue eu enim scelerisque, finibus commodo lectus.</p>
- </md-content>
- </md-tab>
- <md-tab label="three">
- <md-content class="md-padding">
- <h1 class="md-display-2">Tab Three</h1>
-
- <p>Integer turpis erat, porttitor vitae mi faucibus, laoreet interdum tellus. Curabitur posuere
- molestie dictum. Morbi eget congue risus, quis rhoncus quam. Suspendisse vitae hendrerit
- erat, at posuere mi. Cras eu fermentum nunc. Sed id ante eu orci commodo volutpat non ac
- est. Praesent ligula diam, congue eu enim scelerisque, finibus commodo lectus.</p>
- </md-content>
- </md-tab>
- </md-tabs>
- </md-dialog-content>
-
- <md-dialog-actions layout="row">
- <span flex></span>
- <md-button ng-click="answer('not useful')">
- Not Useful
- </md-button>
- <md-button ng-click="answer('useful')" style="margin-right:20px;">
- Useful
- </md-button>
- </md-dialog-actions>
- </form>
- </md-dialog>
-</script>
-<!-- End templates -->
-
-
-<!-- injector:js -->
-<script src="/src/bower_components/jquery/dist/jquery.js"></script>
-<script src="/src/bower_components/es5-shim/es5-shim.js"></script>
-<script src="/src/bower_components/json3/lib/json3.min.js"></script>
-<script src="/src/bower_components/angular/angular.js"></script>
-<script src="/src/bower_components/angular-aria/angular-aria.js"></script>
-<script src="/src/bower_components/angular-mocks/angular-mocks.js"></script>
-<script src="/src/bower_components/angular-cookies/angular-cookies.js"></script>
-<script src="/src/bower_components/angular-animate/angular-animate.js"></script>
-<script src="/src/bower_components/angular-sanitize/angular-sanitize.js"></script>
-<script src="/src/bower_components/angular-resource/angular-resource.js"></script>
-<script src="/src/bower_components/angular-material-icons/angular-material-icons.min.js"></script>
-<script src="/src/bower_components/angular-messages/angular-messages.js"></script>
-<script src="/src/bower_components/angular-material/angular-material.js"></script>
-<script src="/src/bower_components/angular-ui-router/release/angular-ui-router.js"></script>
-<script src="/src/bower_components/bootstrap/dist/js/bootstrap.js"></script>
-<script src="/app/app.js"></script>
-<script src="/app/app.config.js"></script>
-<script src="/app/modules/about/aboutModule.js"></script>
-<script src="/app/modules/home/homeModule.js"></script>
-<script src="/app/modules/marketplace/marketplaceModule.js"></script>
-<script src="/app/modules/user/userModule.js"></script>
-<script src="/app/modules/about/aboutRoute.js"></script>
-<script src="/app/modules/home/homeRoute.js"></script>
-<script src="/app/modules/marketplace/marketplaceRoute.js"></script>
-<script src="/app/modules/user/userRoute.js"></script>
-<script src="/app/modules/about/aboutCtrl.js"></script>
-<script src="/app/modules/home/homeCtrl.js"></script>
-<script src="/app/modules/layouts/main-page/mainPageCtrl.js"></script>
-<script src="/app/modules/layouts/side-nav/sidenavCtrl.js"></script>
-<script src="/app/modules/marketplace/marketplaceCtrl.js"></script>
-<script src="/app/modules/user/userCtrl.js"></script>
-<script src="/app/modules/about/aboutService.js"></script>
-<script src="/app/modules/home/homeService.js"></script>
-<script src="/app/modules/layouts/nav-bar/navBarService.js"></script>
-<script src="/app/modules/layouts/side-nav/sidenavService.js"></script>
-<script src="/app/modules/marketplace/marketplaceService.js"></script>
-<script src="/app/modules/user/userService.js"></script>
-<!-- endinjector -->
-
-
-</body>
-</html>
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/karma.conf.js b/vnfmarket-be/portal-marketplace/src/main/webapp/karma.conf.js
deleted file mode 100644
index ee858bba..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/karma.conf.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-
-
-'use strict';
-
-// Karma configuration
-module.exports = function (config) {
- config.set({
- // Frameworks to use
- frameworks: ['jasmine'],
-
- // List of files / patterns to load in the browser
- files: [
- 'src/bower_components/jquery/dist/jquery.js',
- 'src/bower_components/es5-shim/es5-shim.js',
- 'src/bower_components/json3/lib/json3.min.js',
- 'src/bower_components/angular/angular.js',
- 'src/bower_components/angular-aria/angular-aria.js',
- 'src/bower_components/angular-resource/angular-resource.js',
- 'src/bower_components/angular-mocks/angular-mocks.js',
- 'src/bower_components/angular-cookies/angular-cookies.js',
- 'src/bower_components/angular-sanitize/angular-sanitize.js',
- 'src/bower_components/angular-animate/angular-animate.js',
- 'src/bower_components/angular-touch/angular-touch.js',
- 'src/bower_components/angular-ui-router/release/angular-ui-router.js',
- 'src/bower_components/angular-aria/angular-aria.js',
- 'src/bower_components/angular-material/angular-material.js',
- 'src/bower_components/angular-messages/angular-messages.js',
- 'src/bower_components/angular-material-icons/angular-material-icons.js',
- 'app/app.js',
- 'app/modules/home/homeModule.js',
- 'app/modules/home/homeCtrl.js',
- 'app/modules/home/homeRoute.js',
- 'app/modules/home/homeService.js',
- 'app/modules/home/home-test.js',
- 'app/modules/user/userModule.js',
- 'app/modules/user/userCtrl.js',
- 'app/modules/user/userRoute.js',
- 'app/modules/user/userService.js',
- 'app/modules/user/user-test.js',
- 'app/modules/marketplace/marketplaceModule.js',
- 'app/modules/marketplace/marketplaceCtrl.js',
- 'app/modules/marketplace/marketplaceRoute.js',
- 'app/modules/marketplace/marketplaceService.js',
- 'app/modules/marketplace/marketplace-test.js',
- 'app/modules/about/aboutModule.js',
- 'app/modules/about/aboutCtrl.js',
- 'app/modules/about/aboutRoute.js',
- 'app/modules/about/aboutService.js',
- 'app/modules/about/about-test.js',
- ],
-
- // Test results reporter to use
- // Possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
- //reporters: ['progress'],
- reporters: ['spec'],
-
- plugins : [
- 'karma-jasmine',
- 'karma-coverage',
- 'karma-chrome-launcher',
- 'karma-firefox-launcher',
- 'karma-phantomjs-launcher',
- 'karma-spec-reporter'
- ],
-
- // Web server port
- port: 9876,
-
- // Enable / disable colors in the output (reporters and logs)
- colors: true,
-
- // Level of logging
- // Possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
- logLevel: config.LOG_INFO,
-
- // Enable / disable watching file and executing tests whenever any file changes
- autoWatch: true,
-
- // Start these browsers, currently available:
- // - Chrome
- // - ChromeCanary
- // - Firefox
- // - Opera
- // - Safari (only Mac)
- // - PhantomJS
- // - IE (only Windows)
- browsers: ['PhantomJS'],
-
- // If browser does not capture in given timeout [ms], kill it
- captureTimeout: 60000,
-
- // Continuous Integration mode
- // If true, it capture browsers, run tests and exit
- singleRun: true
- });
-};
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/app.config.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/app.config.js
deleted file mode 100644
index 74f2e7b1..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/app.config.js
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-
-
-
-(function () {
- 'use strict';
-
- /**
- * @ngdoc configuration file
- * @name app.config:config
- * @description
- * # Config and run block
- * Configutation of the app
- */
-
-
- angular
- .module('vnfmarket')
- .config(configure)
- .run(runBlock);
-
- configure.$inject = ['$stateProvider', '$urlRouterProvider', '$locationProvider', '$httpProvider'];
-
- function configure($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider) {
-
- $locationProvider.hashPrefix('!');
-
- // This is required for Browser Sync to work poperly
- $httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
-
-
- $urlRouterProvider
- .otherwise('/dashboard');
-
- }
-
- runBlock.$inject = ['$rootScope'];
-
- function runBlock($rootScope) {
- 'use strict';
-
- console.log('AngularJS run() function...');
- }
-
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/app.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/app.js
deleted file mode 100644
index 1b3b63fc..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/app.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-
-(function() {
- 'use strict';
-
- /**
- * @ngdoc index
- * @name app
- * @description
- * # app
- *
- * Main modules of the application.
- */
-
- angular.module('vnfmarket', [
- 'ngResource',
- 'ngAria',
- 'ngMaterial',
- 'ngMdIcons',
- 'ngCookies',
- 'ngAnimate',
- 'ngSanitize',
- 'ui.router',
- 'home',
- 'user',
- 'marketplace',
- 'about',
- ]);
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/assets/images/open_o_diagram.png b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/assets/images/open_o_diagram.png
deleted file mode 100644
index 676a6bf8..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/assets/images/open_o_diagram.png
+++ /dev/null
Binary files differ
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/about-test.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/about-test.js
deleted file mode 100644
index 04fe198f..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/about-test.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function () {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.test:aboutTest
- * @description
- * # aboutTest
- * Test of the app
- */
-
- describe('about test', function () {
- var controller = null, $scope = null;
-
- beforeEach(function () {
- module('vnfmarket');
- });
-
- beforeEach(inject(function ($controller, $rootScope) {
- $scope = $rootScope.$new();
- controller = $controller('AboutCtrl', {
- $scope: $scope
- });
- }));
-
- it('Should controller must be defined', function () {
- expect(controller).toBeDefined();
- });
-
- });
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/about.html b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/about.html
deleted file mode 100644
index 7ee0c1bf..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/about.html
+++ /dev/null
@@ -1,91 +0,0 @@
-<!--
- Copyright 2016-2017 Huawei Technologies Co., Ltd.
-
- 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.
--->
-<div class="md-padding" flex layout-sm="column">
- <md-card>
- <md-card-content>
- <h2 class="md-title">Welcome to Open-O.</h2>
- </md-card-content>
- </md-card>
- <!-- Start About Page -->
- <md-card>
- <md-card-content>
- <div class="row">
- <div class="col-md-4">
- <a href="#" data-toggle="modal" data-target="#open-o-diagram">
- <img class="img-responsive" src="app/assets/images/open_o_diagram.png" alt="open o Architecture">
- </a>
- </div>
- <div class="col-md-8">
- <div class="row">
- <div class="col-md-12 content clearfix">
- <div class="editContent">
- <h1>Open Orchestrator Project (OPEN-O)</h1>
- <h3>Any Service Over Any Network</h3>
- </div>
- <div class="editContent">
- <p class="lead">OPEN-O is seeking to offer network operators an incremental path to transform their networks, and OSS/BSS, through adoption of SDN and NFV without scrapping the vast investments in existing equipment and technologies.</p>
- </div>
-
- </div>
-
- </div><!-- /.row-->
- </div>
- </div>
- <div class="col-md-12">
- <div class="row pad15">
- <div class="col-xs-2">
- <span class="fa fa-rocket fa-4x"></span>
- </div>
- <div class="col-xs-10">
- <div class="editContent">
- <h3>Mission</h3>
- </div>
- <div class="editContent">
- <p>The mission of the OPEN-Orchestrator Project (OPEN-O) is to: enable end-to-end service agility across SDN, NFV, and legacy networks via a unified orchestration platform supporting NFV orchestration (NFVO and VNFM) and SDN orchestration.</p>
- </div>
- </div>
- </div><!-- /.row -->
- <div class="row pad15">
- <div class="col-xs-2">
- <span class="fa fa-users fa-4x"></span>
- </div>
- <div class="col-xs-10">
- <div class="editContent">
- <h3>Target Customers.</h3>
- </div>
- <div class="editContent">
- <p>OPEN-O is targeting the world’s most important and innovative telecommunications and cable operators, and the OEMs, systems integrators, and software firms who support them.</p>
- </div>
- </div>
- </div><!-- /.row -->
- <div class="row pad15">
- <div class="col-xs-2">
- <span class="fa fa-object-group fa-4x"></span>
- </div>
- <div class="col-xs-10">
- <div class="editContent">
- <h3>OPEN-O Architecture.</h3>
- </div>
- <div class="editContent">
- <p>The OPEN-O Architecture (shown in the Figure ), enables operators to orchestrate end-to- end composite services, leveraging virtualized (and physical network functions), and SDN and legacy connectivity services. The model-driven service framework uses standard modeling languages including TOSCA and YANG, and a modular approach to integrate with MANO building blocks (such as VIMs and VNFMs), along with Connectivity Services Management, including SDN Controllers, EMS’ and NMS’.</p>
- </div>
- </div>
- </div><!-- /.row -->
- </div>
- </md-card-content>
- </md-card>
- <!-- End About Page -->
-</div>
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutCtrl.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutCtrl.js
deleted file mode 100644
index c2f097e3..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutCtrl.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function() {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.controller:aboutCtrl
- * @description
- * # aboutCtrl
- * Controller of the app
- */
-
- angular
- .module('about')
- .controller('AboutCtrl', About);
-
- About.$inject = [];
-
- /*
- * recommend
- * Using function declarations
- * and bindable members up top.
- */
-
- function About() {
- /*jshint validthis: true */
- var vm = this;
-
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutModule.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutModule.js
deleted file mode 100644
index be524046..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutModule.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function () {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.module:aboutModule
- * @description
- * # aboutModule
- * Module of the app
- */
-
- angular.module('about', []);
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutRoute.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutRoute.js
deleted file mode 100644
index 50fb7b2b..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutRoute.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-'use strict';
-
-/**
- * @ngdoc function
- * @name app.route:aboutRoute
- * @description
- * # aboutRoute
- * Route of the app
- */
-
-angular.module('about')
- .config(['$stateProvider', function ($stateProvider) {
-
- $stateProvider
- .state('home.about', {
- url:'/about',
- templateUrl: 'app/modules/about/about.html',
- controller: 'AboutCtrl',
- controllerAs: 'vm'
- });
-
-
- }]);
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutService.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutService.js
deleted file mode 100644
index fb8770c5..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/about/aboutService.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function() {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.service:aboutService
- * @description
- * # aboutService
- * Service of the app
- */
-
- angular
- .module('about')
- .factory('AboutService', About);
- // Inject your dependencies as .$inject = ['$http', 'someSevide'];
- // function Name ($http, someSevide) {...}
-
- About.$inject = ['$http'];
-
- function About ($http) {
-
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/dashboard.html b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/dashboard.html
deleted file mode 100644
index b048c381..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/dashboard.html
+++ /dev/null
@@ -1,100 +0,0 @@
-<!--
- Copyright 2016-2017 Huawei Technologies Co., Ltd.
-
- 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.
--->
-<div class="md-padding" flex layout-sm="column">
- <md-card class="text-center">
- <md-card-content>
- <h1>{{ vm.title }}</h1>
- <h3>{{ vm.version }}</h3>
- <p>An Online MarketPlace (or online e-commerce marketplace) is a type of a e-commarce site where product of service information is proviced by multiple third parties,whereas transactions are processed by the marketplace operator.</p>
- <br>
- <md-divider class="margin-top-20"></md-divider>
- <!-- <h1 class="margin-top-50">Features</h1>
- <ul>
- <li class=" text-center" ng-repeat="item in vm.listFeatures">
- <p><ng-md-icon icon="check"></ng-md-icon> {{item.feature}}</p>
- </li>
- </ul> -->
- </md-card-content>
- </md-card>
- <!-- Start About Page -->
- <md-card>
- <md-card-content>
- <div class="row">
- <div class="col-md-4">
- <a href="#" data-toggle="modal" data-target="#open-o-diagram">
- <img class="img-responsive" src="app/assets/images/open_o_diagram.png" alt="open o Architecture">
- </a>
- </div>
- <div class="col-md-8">
- <div class="row">
- <div class="col-md-12 content clearfix">
- <div class="editContent">
- <h1>Open Orchestrator Project (OPEN-O)</h1>
- <h3>Any Service Over Any Network</h3>
- </div>
- <div class="editContent">
- <p class="lead">OPEN-O is seeking to offer network operators an incremental path to transform their networks, and OSS/BSS, through adoption of SDN and NFV without scrapping the vast investments in existing equipment and technologies.</p>
- </div>
-
- </div>
-
- </div><!-- /.row-->
- </div>
- </div>
- <div class="col-md-12">
- <div class="row pad15">
- <div class="col-xs-2">
- <span class="fa fa-rocket fa-4x"></span>
- </div>
- <div class="col-xs-10">
- <div class="editContent">
- <h3>Mission</h3>
- </div>
- <div class="editContent">
- <p>The mission of the OPEN-Orchestrator Project (OPEN-O) is to: enable end-to-end service agility across SDN, NFV, and legacy networks via a unified orchestration platform supporting NFV orchestration (NFVO and VNFM) and SDN orchestration.</p>
- </div>
- </div>
- </div><!-- /.row -->
- <div class="row pad15">
- <div class="col-xs-2">
- <span class="fa fa-users fa-4x"></span>
- </div>
- <div class="col-xs-10">
- <div class="editContent">
- <h3>Target Customers.</h3>
- </div>
- <div class="editContent">
- <p>OPEN-O is targeting the world’s most important and innovative telecommunications and cable operators, and the OEMs, systems integrators, and software firms who support them.</p>
- </div>
- </div>
- </div><!-- /.row -->
- <div class="row pad15">
- <div class="col-xs-2">
- <span class="fa fa-object-group fa-4x"></span>
- </div>
- <div class="col-xs-10">
- <div class="editContent">
- <h3>OPEN-O Architecture.</h3>
- </div>
- <div class="editContent">
- <p>The OPEN-O Architecture (shown in the Figure ), enables operators to orchestrate end-to- end composite services, leveraging virtualized (and physical network functions), and SDN and legacy connectivity services. The model-driven service framework uses standard modeling languages including TOSCA and YANG, and a modular approach to integrate with MANO building blocks (such as VIMs and VNFMs), along with Connectivity Services Management, including SDN Controllers, EMS’ and NMS’.</p>
- </div>
- </div>
- </div><!-- /.row -->
- </div>
- </md-card-content>
- </md-card>
-</div>
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/home-test.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/home-test.js
deleted file mode 100644
index cc9157ff..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/home-test.js
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function () {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.test:homeTest
- * @description
- * # homeTest
- * Test of the app
- */
-
- describe('homeCtrl', function () {
- var controller = null, $scope = null, $location;
-
- beforeEach(function () {
- module('vnfmarket');
- });
-
- beforeEach(inject(function ($controller, $rootScope, _$location_) {
- $scope = $rootScope.$new();
- $location = _$location_;
-
- controller = $controller('HomeCtrl', {
- $scope: $scope
- });
- }));
-
- it('Should HomeCtrl must be defined', function () {
- expect(controller).toBeDefined();
- });
-
- it('Should match the path Module name', function () {
- $location.path('/home');
- expect($location.path()).toBe('/home');
- });
-
- });
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/home.html b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/home.html
deleted file mode 100644
index 2ba4d768..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/home.html
+++ /dev/null
@@ -1,108 +0,0 @@
-<!--
- Copyright 2016-2017 Huawei Technologies Co., Ltd.
-
- 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.
--->
-<md-sidenav layout="column" class="md-sidenav-left md-whiteframe-z2" md-component-id="left" md-is-locked-open="$mdMedia('gt-md')">
- <div ng-controller="SidenavCtrl as vm" ng-cloak>
- <md-toolbar class="md-tall md-hue-2">
- <div layout="column" class="md-toolbar-tools-bottom inset">
- <div layout="row">
- <div flex="80" style="margin-top: 10px;">
- <div>VNF Marketplace</div>
- </div>
- </div>
- </div>
- </md-toolbar>
- <md-list>
- <md-list-item ui-sref="home.dashboard">
- <div class="inset">
- <ng-md-icon icon="apps"></ng-md-icon>
- </div>
- <p> Dashboard </p>
- </md-list-item>
- <md-list-item ng-repeat="item in vm.menu" ng-click="vm.navigateTo('home.' + item.link)">
- <div class="inset" ng-show="item.icon">
- <ng-md-icon icon="{{item.icon}}"></ng-md-icon>
- </div>
- <p > {{ item.name }}</p>
- </md-list-item>
- <md-divider></md-divider>
- <md-subheader>Admin</md-subheader>
- <md-list-item ng-repeat="item in vm.admin" ng-click="vm.showSettingsBottom($event)" >
- <div class="inset">
- <ng-md-icon icon="{{item.icon}}"></ng-md-icon>
- </div>
- <p> {{ item.title }}</p>
- </md-list-item>
- </md-list>
- </div>
-</md-sidenav>
-
-<div layout="column" class="relative" layout-fill role="main" ng-controller="LayoutCtrl as layout" ng-cloak>
- <md-toolbar ng-show="!showSearch">
- <div class="md-toolbar-tools">
- <md-button ng-click="layout.toggleSidenav('left')" hide-gt-md aria-label="Menu">
- <ng-md-icon icon="menu"></ng-md-icon>
- </md-button>
- <h3>VNF Marketplace</h3>
- <span flex></span>
- <md-button aria-label="Search" ng-click="showSearch = !showSearch">
- <ng-md-icon icon="search"></ng-md-icon>
- </md-button>
- <md-menu>
- <md-button aria-label="Open Settings" ng-click="layout.openMenu($mdOpenMenu, $event)">
- <md-icon> more_vert </md-icon>
- </md-button>
- <md-menu-content width="4">
- <md-menu-item>
- <md-button ng-click="layout.changeProfile($event)">
- <md-icon>face</md-icon>
- Profile
- </md-button>
- </md-menu-item>
- <md-menu-item>
- <md-button ng-click="layout.changePassword()">
- <md-icon>lock</md-icon>
- Password
- </md-button>
- </md-menu-item>
- <md-menu-divider></md-menu-divider>
- <md-menu-item>
- <md-button ng-click="layout.logOut()">
- <md-icon>power_settings_new</md-icon>
- Logout
- </md-button>
- </md-menu-item>
- </md-menu-content>
- </md-menu>
- </div>
- </md-toolbar>
- <md-toolbar class="md-hue-1" ng-show="showSearch">
- <div class="md-toolbar-tools">
- <md-button ng-click="showSearch = !showSearch" aria-label="Back">
- <ng-md-icon icon="arrow_back"></ng-md-icon>
- </md-button>
- <h3 flex="10">
- Back
- </h3>
- <md-input-container md-theme="input" flex>
- <label>&nbsp;</label>
- <input ng-model="search.who" placeholder="Search ...">
- </md-input-container>
- </div>
- </md-toolbar>
- <md-content layout="column" flex md-scroll-y style="background-color:#DCDCDC">
- <div ui-view></div>
- </md-content>
-</div>
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeCtrl.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeCtrl.js
deleted file mode 100644
index a4b88aa0..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeCtrl.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function () {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.controller:HomeCtrl
- * @description
- * # HomeCtrl
- * Controller of the app
- */
-
- angular
- .module('vnfmarket')
- .controller('HomeCtrl', Home);
-
- Home.$inject = ['homeService'];
-
- /*
- * recommend
- * Using function declarations
- * and bindable members up top.
- */
-
- function Home(homeService) {
- /*jshint validthis: true */
- var vm = this;
- vm.title = "Welcome to VNF Marketplace!";
- vm.version = "1.0.0";
- vm.listFeatures = homeService.getFeaturesList();
- console.log(vm.listFeatures);
-
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeModule.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeModule.js
deleted file mode 100644
index 93624644..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeModule.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function() {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.module:homeModule
- * @description
- * # homeModule
- * Module of the app
- */
-
- angular.module('home', []);
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeRoute.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeRoute.js
deleted file mode 100644
index 286d1ae3..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeRoute.js
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-'use strict';
-
- /**
- * @ngdoc function
- * @name app.route:HomeRoute
- * @description
- * # HomeRoute
- * Route of the app
- */
-
-angular.module('vnfmarket')
- .config(['$stateProvider', function ($stateProvider) {
- $stateProvider
-
- .state('home', {
- url: '',
- abstract: true,
- templateUrl: 'app/modules/home/home.html',
- controller: 'HomeCtrl',
- controllerAs: 'vm'
- })
- .state('home.dashboard', {
- url:'/dashboard',
- templateUrl: 'app/modules/home/dashboard.html'
- });
-
- }]);
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeService.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeService.js
deleted file mode 100644
index fb3ea3c0..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/home/homeService.js
+++ /dev/null
@@ -1,754 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function () {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.service:homeService
- * @description
- * # homeService
- * Service of the app
- */
-
- angular.module('vnfmarket')
- .factory('homeService', homeService);
-
- homeService.$inject = ['$http'];
-
- function homeService($http) {
-
- /*var list = [
- {"feature": "Implemented Best Practices, following: John Papa's Guide"},
- {"feature": "Using Controller AS syntax"},
- {"feature": "Wrap Angular components in an Immediately Invoked Function Expression (IIFE)"},
- {"feature": "Declare modules without a variable using the setter syntax"},
- {"feature": "Using named functions"},
- {"feature": "Including Unit test with Karma"},
- {"feature": "Including UI options for Bootstrap or Angular-Material"},
- {"feature": "Including Angular-Material-Icons for Angular-Material UI"},
- {"feature": "Dynamic Menu generator for both themes"},
- {"feature": "Grunt task for Production and Development"}
- ];*/
- var services = [
- {
- "name": "vEPC",
- "vendor": "Huawei",
- "date": "2016-11-21 23:06",
- "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed interdum fringilla laoreet. Nulla facilisi. Maecenas consequat tristique odio, in consectetur leo volutpat vitae. Ut porttitor iaculis metus sed tincidunt. Etiam facilisis nec nisi at tempus. Curabitur ultrices molestie dictum. Integer placerat varius lorem, id cursus augue vulputate quis. Nulla pulvinar vel nunc vel lacinia. Aliquam eleifend, ipsum in sodales dictum, mi risus dictum est, non hendrerit neque elit et turpis. Integer lacus massa, pulvinar eget porttitor vel, ultrices in elit. Ut convallis semper gravida. Sed mollis leo est, eget consectetur dui vestibulum a. Phasellus non augue id diam malesuada ultrices. Praesent id nunc vehicula, dapibus quam in, rhoncus lorem. Praesent mattis elit a ex elementum, vel imperdiet risus tempor. Aliquam laoreet mauris nec egestas eleifend.",
- "downloads": 20,
- "type":"gs-o",
- "size":"204800",
- "down_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 17:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 10:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 00:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:32"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 20:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ],
- "upl_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 15:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 14:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 10:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:12"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 02:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ]
- },
- {
- "name": "vFirewall",
- "vendor": "Huawei",
- "date": "2016-11-23 22:09",
- "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed interdum fringilla laoreet. Nulla facilisi. Maecenas consequat tristique odio, in consectetur leo volutpat vitae. Ut porttitor iaculis metus sed tincidunt. Etiam facilisis nec nisi at tempus. Curabitur ultrices molestie dictum. Integer placerat varius lorem, id cursus augue vulputate quis. Nulla pulvinar vel nunc vel lacinia. Aliquam eleifend, ipsum in sodales dictum, mi risus dictum est, non hendrerit neque elit et turpis. Integer lacus massa, pulvinar eget porttitor vel, ultrices in elit. Ut convallis semper gravida. Sed mollis leo est, eget consectetur dui vestibulum a. Phasellus non augue id diam malesuada ultrices. Praesent id nunc vehicula, dapibus quam in, rhoncus lorem. Praesent mattis elit a ex elementum, vel imperdiet risus tempor. Aliquam laoreet mauris nec egestas eleifend.",
- "downloads": 25,
- "type":"gs-o",
- "size":"204800",
- "down_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 17:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 10:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 00:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:32"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 20:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ],
- "upl_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 15:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 14:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 10:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:12"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 02:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ]
- },
- {
- "name": "vIMS",
- "vendor": "Huawei",
- "date": "2016-10-21 12:04",
- "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed interdum fringilla laoreet. Nulla facilisi. Maecenas consequat tristique odio, in consectetur leo volutpat vitae. Ut porttitor iaculis metus sed tincidunt. Etiam facilisis nec nisi at tempus. Curabitur ultrices molestie dictum. Integer placerat varius lorem, id cursus augue vulputate quis. Nulla pulvinar vel nunc vel lacinia. Aliquam eleifend, ipsum in sodales dictum, mi risus dictum est, non hendrerit neque elit et turpis. Integer lacus massa, pulvinar eget porttitor vel, ultrices in elit. Ut convallis semper gravida. Sed mollis leo est, eget consectetur dui vestibulum a. Phasellus non augue id diam malesuada ultrices. Praesent id nunc vehicula, dapibus quam in, rhoncus lorem. Praesent mattis elit a ex elementum, vel imperdiet risus tempor. Aliquam laoreet mauris nec egestas eleifend.",
- "downloads": 10,
- "type":"sdn-o",
- "size":"104800",
- "down_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 17:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 10:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 00:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:32"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 20:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ],
- "upl_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 15:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 14:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 10:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:12"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 02:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ]
- },
- {
- "name": "vLoadbalance",
- "vendor": "ZTE",
- "date": "2016-11-20 05:06",
- "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed interdum fringilla laoreet. Nulla facilisi. Maecenas consequat tristique odio, in consectetur leo volutpat vitae. Ut porttitor iaculis metus sed tincidunt. Etiam facilisis nec nisi at tempus. Curabitur ultrices molestie dictum. Integer placerat varius lorem, id cursus augue vulputate quis. Nulla pulvinar vel nunc vel lacinia. Aliquam eleifend, ipsum in sodales dictum, mi risus dictum est, non hendrerit neque elit et turpis. Integer lacus massa, pulvinar eget porttitor vel, ultrices in elit. Ut convallis semper gravida. Sed mollis leo est, eget consectetur dui vestibulum a. Phasellus non augue id diam malesuada ultrices. Praesent id nunc vehicula, dapibus quam in, rhoncus lorem. Praesent mattis elit a ex elementum, vel imperdiet risus tempor. Aliquam laoreet mauris nec egestas eleifend.",
- "downloads": 319,
- "type":"sdn-o",
- "size":"204800",
- "down_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 17:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 10:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 00:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:32"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 20:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ],
- "upl_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 15:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 14:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 10:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:12"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 02:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ]
- },
- {
- "name": "vCPE",
- "vendor": "ZTE",
- "date": "2016-11-03 23:06",
- "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed interdum fringilla laoreet. Nulla facilisi. Maecenas consequat tristique odio, in consectetur leo volutpat vitae. Ut porttitor iaculis metus sed tincidunt. Etiam facilisis nec nisi at tempus. Curabitur ultrices molestie dictum. Integer placerat varius lorem, id cursus augue vulputate quis. Nulla pulvinar vel nunc vel lacinia. Aliquam eleifend, ipsum in sodales dictum, mi risus dictum est, non hendrerit neque elit et turpis. Integer lacus massa, pulvinar eget porttitor vel, ultrices in elit. Ut convallis semper gravida. Sed mollis leo est, eget consectetur dui vestibulum a. Phasellus non augue id diam malesuada ultrices. Praesent id nunc vehicula, dapibus quam in, rhoncus lorem. Praesent mattis elit a ex elementum, vel imperdiet risus tempor. Aliquam laoreet mauris nec egestas eleifend.",
- "downloads": 234,
- "type":"nfv-o",
- "size":"204800",
- "down_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 17:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 10:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 00:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:32"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 20:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ],
- "upl_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 15:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 14:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 10:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:12"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 02:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ]
- },
- {
- "name": "openimscore",
- "vendor": "Intel",
- "date": "2016-11-20 17:06",
- "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed interdum fringilla laoreet. Nulla facilisi. Maecenas consequat tristique odio, in consectetur leo volutpat vitae. Ut porttitor iaculis metus sed tincidunt. Etiam facilisis nec nisi at tempus. Curabitur ultrices molestie dictum. Integer placerat varius lorem, id cursus augue vulputate quis. Nulla pulvinar vel nunc vel lacinia. Aliquam eleifend, ipsum in sodales dictum, mi risus dictum est, non hendrerit neque elit et turpis. Integer lacus massa, pulvinar eget porttitor vel, ultrices in elit. Ut convallis semper gravida. Sed mollis leo est, eget consectetur dui vestibulum a. Phasellus non augue id diam malesuada ultrices. Praesent id nunc vehicula, dapibus quam in, rhoncus lorem. Praesent mattis elit a ex elementum, vel imperdiet risus tempor. Aliquam laoreet mauris nec egestas eleifend.",
- "downloads": 45,
- "type":"nfv-o",
- "size":"204800",
- "down_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 17:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 10:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 00:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:32"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 20:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ],
- "upl_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 15:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 14:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 10:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:12"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 02:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ]
- },
- {
- "name": "openims",
- "vendor": "Intel",
- "date": "2016-11-20 12:06",
- "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed interdum fringilla laoreet. Nulla facilisi. Maecenas consequat tristique odio, in consectetur leo volutpat vitae. Ut porttitor iaculis metus sed tincidunt. Etiam facilisis nec nisi at tempus. Curabitur ultrices molestie dictum. Integer placerat varius lorem, id cursus augue vulputate quis. Nulla pulvinar vel nunc vel lacinia. Aliquam eleifend, ipsum in sodales dictum, mi risus dictum est, non hendrerit neque elit et turpis. Integer lacus massa, pulvinar eget porttitor vel, ultrices in elit. Ut convallis semper gravida. Sed mollis leo est, eget consectetur dui vestibulum a. Phasellus non augue id diam malesuada ultrices. Praesent id nunc vehicula, dapibus quam in, rhoncus lorem. Praesent mattis elit a ex elementum, vel imperdiet risus tempor. Aliquam laoreet mauris nec egestas eleifend.",
- "downloads": 21,
- "type":"sdn-o",
- "size":"204800",
- "down_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 17:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 10:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 00:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:32"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 20:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ],
- "upl_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 15:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 14:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 10:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:12"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 02:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ]
- },
- {
- "name": "vCPE",
- "vendor": "Huawei",
- "date": "2016-11-19 23:06",
- "desc": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed interdum fringilla laoreet. Nulla facilisi. Maecenas consequat tristique odio, in consectetur leo volutpat vitae. Ut porttitor iaculis metus sed tincidunt. Etiam facilisis nec nisi at tempus. Curabitur ultrices molestie dictum. Integer placerat varius lorem, id cursus augue vulputate quis. Nulla pulvinar vel nunc vel lacinia. Aliquam eleifend, ipsum in sodales dictum, mi risus dictum est, non hendrerit neque elit et turpis. Integer lacus massa, pulvinar eget porttitor vel, ultrices in elit. Ut convallis semper gravida. Sed mollis leo est, eget consectetur dui vestibulum a. Phasellus non augue id diam malesuada ultrices. Praesent id nunc vehicula, dapibus quam in, rhoncus lorem. Praesent mattis elit a ex elementum, vel imperdiet risus tempor. Aliquam laoreet mauris nec egestas eleifend.",
- "downloads": 408,
- "type":"nfv-o",
- "size":"204800",
- "down_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 17:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 10:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 00:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:32"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 20:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ],
- "upl_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 15:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 14:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 10:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:12"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 02:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ]
- },
- {
- "name": "vCPE",
- "vendor": "Siemens",
- "date": "2016-11-20 12:06",
- "desc": "Dolore ex deserunt aute fugiat aute nulla ea sunt aliqua nisi cupidatat eu. Nostrud in laboris labore nisi amet do dolor eu fugiat consectetur elit cillum esse",
- "downloads": 120,
- "type":"sdn-o",
- "size":"204800",
- "down_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 17:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 10:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 00:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:32"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 20:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ],
- "upl_history":[
- {
- "user":"user_001",
- "time": "2016-11-30 15:31"
- },
- {
- "user":"user_002",
- "time": "2016-11-30 14:31"
- },
- {
- "user":"user_003",
- "time": "2016-11-30 11:01"
- },
- {
- "user":"user_004",
- "time": "2016-11-30 14:03"
- },
- {
- "user":"user_005",
- "time": "2016-11-30 10:31"
- },
- {
- "user":"user_006",
- "time": "2016-11-29 19:12"
- },
- {
- "user":"user_007",
- "time": "2016-11-28 02:31"
- },
- {
- "user":"user_008",
- "time": "2016-11-20 09:11"
- }
- ]
- }
- ];
-
- return {
- getFeaturesList: getFeaturesList
- };
-
- function getFeaturesList() {
- return services;
- }
-
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/main-page/main-page.html b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/main-page/main-page.html
deleted file mode 100644
index ec86a647..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/main-page/main-page.html
+++ /dev/null
@@ -1,76 +0,0 @@
-<!--
- Copyright 2016-2017 Huawei Technologies Co., Ltd.
-
- 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.
--->
- <md-toolbar ng-show="!showSearch">
- <div class="md-toolbar-tools">
- <md-button ng-click="layout.toggleSidenav('left')" hide-gt-md aria-label="Menu">
- <ng-md-icon icon="menu"></ng-md-icon>
- </md-button>
- <h3>
- <a href="/">vnfmarket</a>
- </h3>
- <span flex></span>
- <md-button aria-label="Search" ng-click="showSearch = !showSearch">
- <ng-md-icon icon="search"></ng-md-icon>
- </md-button>
- <md-menu>
- <md-button aria-label="Open Settings" ng-click="layout.openMenu($mdOpenMenu, $event)">
- <md-icon> more_vert </md-icon>
- </md-button>
- <md-menu-content width="4">
- <md-menu-item>
- <md-button ng-click="layout.changeProfile($event)">
- <md-icon>face</md-icon>
- Profile
- </md-button>
- </md-menu-item>
- <md-menu-item>
- <md-button ng-click="layout.changePassword()">
- <md-icon>lock</md-icon>
- Password
- </md-button>
- </md-menu-item>
- <md-menu-divider></md-menu-divider>
- <md-menu-item>
- <md-button ng-click="layout.logOut()">
- <md-icon>power_settings_new</md-icon>
- Logout
- </md-button>
- </md-menu-item>
- </md-menu-content>
- </md-menu>
- </div>
- </md-toolbar>
- <md-toolbar class="md-hue-1" ng-show="showSearch">
- <div class="md-toolbar-tools">
- <md-button ng-click="showSearch = !showSearch" aria-label="Back">
- <ng-md-icon icon="arrow_back"></ng-md-icon>
- </md-button>
- <h3 flex="10">
- Back
- </h3>
- <md-input-container md-theme="input" flex>
- <label>&nbsp;</label>
- <input ng-model="search.who" placeholder="Search ...">
- </md-input-container>
-
- </div>
- </md-toolbar>
- <md-content class="md-blue-grey-theme" flex md-scroll-y>
- <ui-view layout="column" layout-fill layout-padding>
-
-
- </ui-view>
- </md-content>
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/main-page/mainPageCtrl.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/main-page/mainPageCtrl.js
deleted file mode 100644
index 24ae3ef2..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/main-page/mainPageCtrl.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function () {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.controller:LayoutCtrl
- * @description
- * # LayoutCtrl
- * Controller of the app
- */
-
- angular
- .module('vnfmarket')
- .controller('LayoutCtrl', Layout);
-
- Layout.$inject = ['$mdSidenav', '$cookies', '$state', '$mdToast', '$mdDialog'];
-
- /*
- * recommend
- * Using function declarations
- * and bindable members up top.
- */
-
- function Layout($mdSidenav, $cookies, $state, $mdToast, $mdDialog ) {
- /*jshint validthis: true */
- var vm = this;
-
- vm.toggleSidenav = function (menuId) {
- $mdSidenav(menuId).toggle();
- };
-
- vm.changePassword = function () {
- $mdToast.show(
- $mdToast.simple()
- .content('Password clicked!')
- .position('top right')
- .hideDelay(2000)
- );
- };
-
- vm.changeProfile = function (ev) {
- $mdDialog.show({
- controller: DialogController,
- templateUrl: 'tabDialog.tmpl.html',
- parent: angular.element(document.body),
- targetEvent: ev,
- clickOutsideToClose:true
- })
- .then(function(answer) {
- $mdToast.show(
- $mdToast.simple()
- .content('You said the information was "' + answer + '".')
- .position('top right')
- .hideDelay(2000)
- );
-
- }, function() {
- $mdToast.show(
- $mdToast.simple()
- .content('You cancelled the dialog.')
- .position('top right')
- .hideDelay(2000)
- );
- });
-
- function DialogController($scope, $mdDialog) {
- $scope.hide = function() {
- $mdDialog.hide();
- };
-
- $scope.cancel = function() {
- $mdDialog.cancel();
- };
-
- $scope.answer = function(answer) {
- $mdDialog.hide(answer);
- };
- }
- };
-
-
- vm.logOut = function () {
-
- alert('Implement your Function Here');
- // $cookies.put('dev_appserver_login', ' ');
- //$state.go('out', {}, {reload: true});
-
- };
-
- var originatorEv;
- vm.openMenu = function ($mdOpenMenu, ev) {
- originatorEv = ev;
- $mdOpenMenu(ev);
- };
-
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/nav-bar/navBarService.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/nav-bar/navBarService.js
deleted file mode 100644
index 4fecf269..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/nav-bar/navBarService.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function() {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.service:menuService
- * @description
- * # menuService
- * Service of the app
- */
-
- angular
- .module('vnfmarket')
- .factory('MenuService', Menu);
- // Inject your dependencies as .$inject = ['$http', 'someSevide'];
- // function Name ($http, someSevide) {...}
-
- Menu.$inject = ['$http'];
-
- function Menu ($http) {
-
- var menu = [
-
- {
- link: 'user',
- name: 'User'
- },
-
- {
- link: 'marketplace',
- name: 'Marketplace'
- },
-
- {
- link: 'about',
- name: 'About'
- },
-
- ];
-
- return {
- listMenu: function () {
- return menu;
- }
- }
-
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenav.html b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenav.html
deleted file mode 100644
index 9028bc06..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenav.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
- Copyright 2016-2017 Huawei Technologies Co., Ltd.
-
- 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.
--->
- <md-toolbar class="md-tall md-hue-2">
- <div layout="column" class="md-toolbar-tools-bottom inset">
- <div layout="row">
- <div flex="20">
- <img style="width: 36px; height: 36px; border-radius: 50%"
- actual-src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUDBAsMBgkICQcJCQgGCQcGBgYFBgcHBQkGBgUHCQcGBgcHChwXBwgaCQcHGCEMGhERHxMfBxciGCIeGBAeHxIBBQUFBwcFDAgIBxIIBQgSHhISEhISHhISEhISHh4SEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEv/AABEIAGAAYAMBIgACEQEDEQH/xAAcAAACAwEBAQEAAAAAAAAAAAAHCAMFBgQCAQD/xAA6EAABAgQDBQYFAQgDAQAAAAACAQMABBESBQYiByExMkETQlFSYWIIcXKBoSMzgpGSorLR8BQk4RX/xAAWAQEBAQAAAAAAAAAAAAAAAAAAAQL/xAAWEQEBAQAAAAAAAAAAAAAAAAAAARH/2gAMAwEAAhEDEQA/AG0WPx9I+RDOPIIqS+F0BVZyx5uUknZpw0RGBU9XTTCJbRs6zGI4icw66pNiRCwBUsFoVXSm7wpBF+JraOr75yDRr2LSkLpCVBMx7q06ekAFmbVCUV7yRETg4pP7y3B+YmfcRw7b6J3fNp7sRYPhrkxMCy2JEpeX/wAg97NdkjQEL02KHuG0D6FAAl3CnFqQtOKgr3RVRX3cIv8AD2Udl1lyAxcG20iFUG4e7SGvYy/Ltgggw2iD3bEivm8uS6uoX/GBFrdcI01faGGFJk5pyVnbhJW3GjuElGhad/VIcfYRtHHEJImjokzLgHaj5htp2iRgtoORWJlg9CA4IkQmA6rresCfY9i7mHZqbaKqC6RSrgFzEJlQa19YqnmU/GPKxzST1wpTjQf7Y6C9YCzJeMYra1mQJbCXSUqOECi343EOn7RsDPSvyhZfivxYhsADWggREIlu1ad6QC05mxHtZpwlJVUjMi+ojVbv49Ipe0W/0H+7uxYtYM8Uq5OtgJtMLa5aVXUu3dpZ4V6xYbOsrnPT7cu3dqISdMR5Wh5oygnfDlhaFMG6o8qW3W8ChjmJe2lOb3cvhGXy3l+Xw+TS3TYn6h8CX3LHO9tPkBPsldVLVISIh4xpWyqq+u/+rhHG/dduHqo/LzRVS2epAhEhnARfKW4rvWJix1shV1sk7MSAbxLStxaoD5ijaoBcV3W28Kwv+0PCSbxmUm03K66PL5rq7oOuPTwqFwEhXd4SSkYvMWFJMnJEttrU2yThdLL0ur9oA/5ecXsGitVFNpkv5mki2UvvEEkgoAiNEQUtbt5bB3D+I9ksBNiszawZr3RUrvaIwnXxD48B313uvl5tKNCX43Q1OfcQskHNNVMCBsB4qRpuhBNoc45/9F4Xq1E1HV0tKgjv9IlSrfIcyIybulVQQUCpyqJFXekEz4ZZFtDmnUFaitt3tMuVIHGxdgXH3mnBq2QFp9x7hgy7DcFclX5wTGjbpj2Hrq6xBqc/TAixruVvvCnFRgF5rxiVSYQBkyRT5SMKcxUhn5uSA+Iou7lIajGAzhk9tzWjQK4K/p6E3fKNKCOHygEe9qlpfLveEEzHHf8Aj5cuCo3qkWGXtnVrvbPnRSW+xOVfcsaTPuBg5hJs7lQQ/Tt8w8v3gFmHM0wswgBMm2hLaQ7zC2CfkybdZk0ecnEdR9wBbAh0jaSKVPWkU2GZaQXUvY1abdPH5+Mdue3OxGQZaoBOvkTg920RgybPBZhClWj43NgX8wJHSZxnsjTF2Fy5cbmw+1ookXarBoP9suYBZJv2XH7VtHm+dYS3PM528469uW8iK63vEVYZTbNid8/MNIKIjTdokZUERMKq4pQrOJLrIbkVLi1D1tKJUqyyDmY5KcR8BQ0pY60Y1EvLT1rDIbN8xI+0L279XVaPdK7lhTz3cPqgqbHMdtBWriuArvndEDRMTKrQkJNSR01HmXup1jL5exds2EqSItLSr0KPmP460AWm+gXppJev5jSu6YxVFNRbbv1W3CXDV0+0RYmikwfRaEP+pAj2g577AbZGZGpJc4Vur6fSKpdtF0kouCqviNpEnKXS6njAELD3hW8TFO0aXmLzf4gRbV8YQceYBa2sANxeBOrzfyxHge0G6a/UFRR1dX1d2MjnvEhexYzTeg2BcXtTV+YjJwdguPo9IKyW8pMrCIeoENwF86UglkaQuXwszSoUySVVugCJeJcF+0MK06hcOEVosnxOOqxihWFaM02gueojTTC9Tn7UqcCXTBo+JTGgfxFRQhPsG7bhKooRU4QF3G06kteYYlSvDqcBi0ydPk3ODQqXrq+mKevjXT4xNhy/9gfaoxEHbCMwUESQ046vWB/tEzI4/iPZNkqgCCIjdpQuscU2+4GneiElzZf4jKuvEjpFdRdRe6Au3cKdLTeirTmujyOX6ftHwH96Kg8UctQUdX/fGIXZkl5iUl90BMqiD9wlWxeaPMsqk7duVSLVd5iWORVrx/ej2waoS0410l4QDX/D480MujQigqQCJW0/aiWr8QYmpi3h4wpuw/GibnGxUuYv4kWlfxDQsPIo7+9qt8NMVSLYtMKRKJEpGXMRFUlisdqhJHTxNYgfSkBG+VY7cCbq+g9SSK5FjswmYQHQNa0FRut8sRBZl8IF2SQTAtCaTQe9GOxrKhXKo/1cywfNm5y78gBt0PSIkBeYh61SJsx4G0WgmkAi73h8oBYHsuOjxIaU/eirfbUVtXu96C/mvBVC4LPpXxGBfjrFrtsBV1j2A6V90fEj2qwF5lDGFYmAO7cC3W/T4QwmW9q0sQiJnYVBu7XoXpCwSyav93RMZrdcm5fNAf/Z"
- showloader="" loader-class="preload" loader-src="app/assets/images/loader.gif"
- src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUDBAsMBgkICQcJCQgGCQcGBgYFBgcHBQkGBgUHCQcGBgcHChwXBwgaCQcHGCEMGhERHxMfBxciGCIeGBAeHxIBBQUFBwcFDAgIBxIIBQgSHhISEhISHhISEhISHh4SEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEhISEv/AABEIAGAAYAMBIgACEQEDEQH/xAAcAAACAwEBAQEAAAAAAAAAAAAHCAMFBgQCAQD/xAA6EAABAgQDBQYFAQgDAQAAAAACAQMABBESBQYiByExMkETQlFSYWIIcXKBoSMzgpGSorLR8BQk4RX/xAAWAQEBAQAAAAAAAAAAAAAAAAAAAQL/xAAWEQEBAQAAAAAAAAAAAAAAAAAAARH/2gAMAwEAAhEDEQA/AG0WPx9I+RDOPIIqS+F0BVZyx5uUknZpw0RGBU9XTTCJbRs6zGI4icw66pNiRCwBUsFoVXSm7wpBF+JraOr75yDRr2LSkLpCVBMx7q06ekAFmbVCUV7yRETg4pP7y3B+YmfcRw7b6J3fNp7sRYPhrkxMCy2JEpeX/wAg97NdkjQEL02KHuG0D6FAAl3CnFqQtOKgr3RVRX3cIv8AD2Udl1lyAxcG20iFUG4e7SGvYy/Ltgggw2iD3bEivm8uS6uoX/GBFrdcI01faGGFJk5pyVnbhJW3GjuElGhad/VIcfYRtHHEJImjokzLgHaj5htp2iRgtoORWJlg9CA4IkQmA6rresCfY9i7mHZqbaKqC6RSrgFzEJlQa19YqnmU/GPKxzST1wpTjQf7Y6C9YCzJeMYra1mQJbCXSUqOECi343EOn7RsDPSvyhZfivxYhsADWggREIlu1ad6QC05mxHtZpwlJVUjMi+ojVbv49Ipe0W/0H+7uxYtYM8Uq5OtgJtMLa5aVXUu3dpZ4V6xYbOsrnPT7cu3dqISdMR5Wh5oygnfDlhaFMG6o8qW3W8ChjmJe2lOb3cvhGXy3l+Xw+TS3TYn6h8CX3LHO9tPkBPsldVLVISIh4xpWyqq+u/+rhHG/dduHqo/LzRVS2epAhEhnARfKW4rvWJix1shV1sk7MSAbxLStxaoD5ijaoBcV3W28Kwv+0PCSbxmUm03K66PL5rq7oOuPTwqFwEhXd4SSkYvMWFJMnJEttrU2yThdLL0ur9oA/5ecXsGitVFNpkv5mki2UvvEEkgoAiNEQUtbt5bB3D+I9ksBNiszawZr3RUrvaIwnXxD48B313uvl5tKNCX43Q1OfcQskHNNVMCBsB4qRpuhBNoc45/9F4Xq1E1HV0tKgjv9IlSrfIcyIybulVQQUCpyqJFXekEz4ZZFtDmnUFaitt3tMuVIHGxdgXH3mnBq2QFp9x7hgy7DcFclX5wTGjbpj2Hrq6xBqc/TAixruVvvCnFRgF5rxiVSYQBkyRT5SMKcxUhn5uSA+Iou7lIajGAzhk9tzWjQK4K/p6E3fKNKCOHygEe9qlpfLveEEzHHf8Aj5cuCo3qkWGXtnVrvbPnRSW+xOVfcsaTPuBg5hJs7lQQ/Tt8w8v3gFmHM0wswgBMm2hLaQ7zC2CfkybdZk0ecnEdR9wBbAh0jaSKVPWkU2GZaQXUvY1abdPH5+Mdue3OxGQZaoBOvkTg920RgybPBZhClWj43NgX8wJHSZxnsjTF2Fy5cbmw+1ookXarBoP9suYBZJv2XH7VtHm+dYS3PM528469uW8iK63vEVYZTbNid8/MNIKIjTdokZUERMKq4pQrOJLrIbkVLi1D1tKJUqyyDmY5KcR8BQ0pY60Y1EvLT1rDIbN8xI+0L279XVaPdK7lhTz3cPqgqbHMdtBWriuArvndEDRMTKrQkJNSR01HmXup1jL5exds2EqSItLSr0KPmP460AWm+gXppJev5jSu6YxVFNRbbv1W3CXDV0+0RYmikwfRaEP+pAj2g577AbZGZGpJc4Vur6fSKpdtF0kouCqviNpEnKXS6njAELD3hW8TFO0aXmLzf4gRbV8YQceYBa2sANxeBOrzfyxHge0G6a/UFRR1dX1d2MjnvEhexYzTeg2BcXtTV+YjJwdguPo9IKyW8pMrCIeoENwF86UglkaQuXwszSoUySVVugCJeJcF+0MK06hcOEVosnxOOqxihWFaM02gueojTTC9Tn7UqcCXTBo+JTGgfxFRQhPsG7bhKooRU4QF3G06kteYYlSvDqcBi0ydPk3ODQqXrq+mKevjXT4xNhy/9gfaoxEHbCMwUESQ046vWB/tEzI4/iPZNkqgCCIjdpQuscU2+4GneiElzZf4jKuvEjpFdRdRe6Au3cKdLTeirTmujyOX6ftHwH96Kg8UctQUdX/fGIXZkl5iUl90BMqiD9wlWxeaPMsqk7duVSLVd5iWORVrx/ej2waoS0410l4QDX/D480MujQigqQCJW0/aiWr8QYmpi3h4wpuw/GibnGxUuYv4kWlfxDQsPIo7+9qt8NMVSLYtMKRKJEpGXMRFUlisdqhJHTxNYgfSkBG+VY7cCbq+g9SSK5FjswmYQHQNa0FRut8sRBZl8IF2SQTAtCaTQe9GOxrKhXKo/1cywfNm5y78gBt0PSIkBeYh61SJsx4G0WgmkAi73h8oBYHsuOjxIaU/eirfbUVtXu96C/mvBVC4LPpXxGBfjrFrtsBV1j2A6V90fEj2qwF5lDGFYmAO7cC3W/T4QwmW9q0sQiJnYVBu7XoXpCwSyav93RMZrdcm5fNAf/Z">
- </div>
- <div flex="80" style="margin-top: 10px;font-size: 1em;">
- <div></div>
- </div>
- </div>
- </div>
- </md-toolbar>
- <md-list>
- <md-list-item ng-repeat="item in vm.menu" ng-click="vm.navigateTo(item.link)" >
- <div class="inset" ng-show="item.icon">
- <ng-md-icon icon="{{item.icon}}"></ng-md-icon>
- </div>
- <p> {{ item.name }}</p>
- </md-list-item>
- <md-divider></md-divider>
- <md-subheader>Admin</md-subheader>
- <md-list-item ng-repeat="item in vm.admin" ng-click="vm.showSettingsBottom($event)" >
- <div class="inset">
- <ng-md-icon icon="{{item.icon}}"></ng-md-icon>
- </div>
- <p> {{ item.title }}</p>
- </md-list-item>
- </md-list>
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenavCtrl.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenavCtrl.js
deleted file mode 100644
index 41756882..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenavCtrl.js
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function () {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.controller:SidenavCtrl
- * @description
- * # SidenavCtrl
- * Controller of the app
- */
- angular
- .module('vnfmarket')
- .controller('SidenavCtrl', SidenavCtrl)
- .controller('SettingsCtrl', SettingsCtrl);
-
- // Injecting Denpendencies
-
- SidenavCtrl.$inject = ['$mdSidenav', '$state', '$mdBottomSheet', '$mdToast', 'MenuService', '$scope'];
- SettingsCtrl.$inject = ['$mdBottomSheet'];
-
- /*
- * recommend
- * Using function declarations
- * and bindable members up top.
- */
-
- function SidenavCtrl($mdSidenav, $state, $mdBottomSheet, $mdToast, MenuService, $scope) {
- /*jshint validthis: true */
- var vm = this;
-
- vm.toggleSidenav = function (menuId) {
- $mdSidenav(menuId).toggle();
- };
-
- vm.closeSidenav = function() {
- $mdSidenav('left').close();
- };
-
- // Close menu on small screen after click on menu item.
- // Only use $scope in controllerAs when necessary; for example, publishing and subscribing events using $emit, $broadcast, $on or $watch.
- $scope.$on('$stateChangeSuccess', vm.closeSidenav);
-
- vm.menu = MenuService.listMenu();
-
- vm.admin = [
- {
- link: 'showListBottomSheet($event)',
- title: 'Settings',
- icon: 'settings'
- }
- ];
-
- vm.navigateTo = function (target) {
-
- var page = target;
-
- $state.go(page);
-
- };
-
- vm.showSettingsBottom = function ($event) {
- vm.alert = '';
- $mdBottomSheet.show({
- template: '<md-bottom-sheet class="md-grid" layout="column" ng-cloak><div layout="row" layout-align="center center"><h4>With clickOutsideToClose option, drag down or press ESC to close</h4></div><md-list flex layout="row" layout-align="center center"><md-list-item ng-repeat="item in vm.items"><md-button class="md-grid-item-content" ng-click="vm.listItemClick($index)"><md-icon class="md-48">{{item.icon}}</md-icon><div class="md-grid-text"> {{ item.name }} </div></md-button></md-list-item></md-list></md-bottom-sheet>',
- controller: 'SettingsCtrl',
- controllerAs: 'vm',
- targetEvent: $event
- }).then(function (clickedItem) {
- $mdToast.show(
- $mdToast.simple()
- .content(clickedItem.name + ' clicked!')
- .position('top right')
- .hideDelay(2000)
- );
- });
- };
-
- }
-
- function SettingsCtrl($mdBottomSheet) {
- /*jshint validthis: true */
- var vm = this;
-
- vm.items = [
- {name: 'Roles', icon: 'assignment_ind'},
- {name: 'Notes', icon: 'speaker_notes'},
- {name: 'Tasks', icon: 'view_list'},
- {name: 'Inbox', icon: 'inbox'}
- ];
-
- vm.listItemClick = function ($index) {
- var clickedItem = vm.items[$index];
- $mdBottomSheet.hide(clickedItem);
- };
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenavService.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenavService.js
deleted file mode 100644
index 4fecf269..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/layouts/side-nav/sidenavService.js
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function() {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.service:menuService
- * @description
- * # menuService
- * Service of the app
- */
-
- angular
- .module('vnfmarket')
- .factory('MenuService', Menu);
- // Inject your dependencies as .$inject = ['$http', 'someSevide'];
- // function Name ($http, someSevide) {...}
-
- Menu.$inject = ['$http'];
-
- function Menu ($http) {
-
- var menu = [
-
- {
- link: 'user',
- name: 'User'
- },
-
- {
- link: 'marketplace',
- name: 'Marketplace'
- },
-
- {
- link: 'about',
- name: 'About'
- },
-
- ];
-
- return {
- listMenu: function () {
- return menu;
- }
- }
-
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplace-test.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplace-test.js
deleted file mode 100644
index 1824af38..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplace-test.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function () {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.test:marketplaceTest
- * @description
- * # marketplaceTest
- * Test of the app
- */
-
- describe('marketplace test', function () {
- var controller = null, $scope = null;
-
- beforeEach(function () {
- module('vnfmarket');
- });
-
- beforeEach(inject(function ($controller, $rootScope) {
- $scope = $rootScope.$new();
- controller = $controller('MarketplaceCtrl', {
- $scope: $scope
- });
- }));
-
- it('Should controller must be defined', function () {
- expect(controller).toBeDefined();
- });
-
- });
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplace.html b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplace.html
deleted file mode 100644
index 2f4dc9ff..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplace.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
- Copyright 2016-2017 Huawei Technologies Co., Ltd.
-
- 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.
--->
-<div class="md-padding" flex layout-sm="column">
- <md-card>
- <md-card-content>
- <h2 class="md-title">Content from: marketplace page</h2>
- </md-card-content>
- </md-card>
-</div>
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceCtrl.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceCtrl.js
deleted file mode 100644
index eaca12b4..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceCtrl.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function() {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.controller:marketplaceCtrl
- * @description
- * # marketplaceCtrl
- * Controller of the app
- */
-
- angular
- .module('marketplace')
- .controller('MarketplaceCtrl', Marketplace);
-
- Marketplace.$inject = [];
-
- /*
- * recommend
- * Using function declarations
- * and bindable members up top.
- */
-
- function Marketplace() {
- /*jshint validthis: true */
- var vm = this;
-
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceModule.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceModule.js
deleted file mode 100644
index 26c5a98f..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceModule.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function () {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.module:marketplaceModule
- * @description
- * # marketplaceModule
- * Module of the app
- */
-
- angular.module('marketplace', []);
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceRoute.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceRoute.js
deleted file mode 100644
index a7b1dfe0..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceRoute.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-'use strict';
-
-/**
- * @ngdoc function
- * @name app.route:marketplaceRoute
- * @description
- * # marketplaceRoute
- * Route of the app
- */
-
-angular.module('marketplace')
- .config(['$stateProvider', function ($stateProvider) {
-
- $stateProvider
- .state('home.marketplace', {
- url:'/marketplace',
- templateUrl: 'app/modules/marketplace/marketplace.html',
- controller: 'MarketplaceCtrl',
- controllerAs: 'vm'
- });
-
-
- }]);
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceService.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceService.js
deleted file mode 100644
index 22fdb7b6..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/marketplace/marketplaceService.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function() {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.service:marketplaceService
- * @description
- * # marketplaceService
- * Service of the app
- */
-
- angular
- .module('marketplace')
- .factory('MarketplaceService', Marketplace);
- // Inject your dependencies as .$inject = ['$http', 'someSevide'];
- // function Name ($http, someSevide) {...}
-
- Marketplace.$inject = ['$http'];
-
- function Marketplace ($http) {
-
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/user-test.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/user-test.js
deleted file mode 100644
index 20693c1b..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/user-test.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function () {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.test:userTest
- * @description
- * # userTest
- * Test of the app
- */
-
- describe('user test', function () {
- var controller = null, $scope = null;
-
- beforeEach(function () {
- module('vnfmarket');
- });
-
- beforeEach(inject(function ($controller, $rootScope) {
- $scope = $rootScope.$new();
- controller = $controller('UserCtrl', {
- $scope: $scope
- });
- }));
-
- it('Should controller must be defined', function () {
- expect(controller).toBeDefined();
- });
-
- });
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/user.html b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/user.html
deleted file mode 100644
index 2fe411b5..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/user.html
+++ /dev/null
@@ -1,74 +0,0 @@
-<!--
- Copyright 2016-2017 Huawei Technologies Co., Ltd.
-
- 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.
--->
-<div class="md-padding" flex layout-sm="column">
- <md-card>
- <md-card-content>
- <h2 class="md-title">Content from: user page</h2>
- </md-card-content>
- </md-card>
- <md-card>
- <md-card-content>
- <div class="row-fluid">
- <div class="col-md-12">
- <!-- Nav tabs -->
- <ul class="nav nav-tabs" role="tablist">
- <li role="presentation" class="active"><a href="#download-hist-tab" aria-controls="download-hist-tab" role="tab" data-toggle="tab">Downloaded Services</a></li>
- <li role="presentation"><a href="#upload-hist-tab" aria-controls="upload-hist-tab" role="tab" data-toggle="tab">Uploaded History</a></li>
- </ul>
- <!-- Tab panes -->
- <div class="tab-content">
- <div role="tabpanel" class="tab-pane active" id="download-hist-tab">
- <table class="table table-striped">
- <thead>
- <th>Service Name</th>
- <th>Last Updated</th>
- <th>Vendor</th>
- <th>Type</th>
- </thead>
- <tbody>
- <tr ng-repeat="service in services">
- <td>{{service.name}}</td>
- <td>{{service.date}}</td>
- <td>{{service.vendor}}</td>
- <td>{{service.type}}</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div role="tabpanel" class="tab-pane" id="upload-hist-tab">
- <table class="table table-striped">
- <thead>
- <th>Service Name</th>
- <th>Last Updated</th>
- <th>Vendor</th>
- <th>Type</th>
- </thead>
- <tbody>
- <tr ng-repeat="service in services | limitTo: 6">
- <td>{{service.name}}</td>
- <td>{{service.date}}</td>
- <td>{{service.vendor}}</td>
- <td>{{service.type}}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- </md-card-content>
- </md-card>
-</div>
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userCtrl.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userCtrl.js
deleted file mode 100644
index 81de3904..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userCtrl.js
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function() {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.controller:userCtrl
- * @description
- * # userCtrl
- * Controller of the app
- */
-
- angular
- .module('user')
- .controller('UserCtrl', User);
-
- User.$inject = [];
-
- /*
- * recommend
- * Using function declarations
- * and bindable members up top.
- */
-
- function User() {
- /*jshint validthis: true */
- var vm = this;
-
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userModule.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userModule.js
deleted file mode 100644
index 290c1758..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userModule.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function () {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.module:userModule
- * @description
- * # userModule
- * Module of the app
- */
-
- angular.module('user', []);
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userRoute.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userRoute.js
deleted file mode 100644
index 3986c106..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userRoute.js
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-'use strict';
-
-/**
- * @ngdoc function
- * @name app.route:userRoute
- * @description
- * # userRoute
- * Route of the app
- */
-
-angular.module('user')
- .config(['$stateProvider', function ($stateProvider) {
-
- $stateProvider
- .state('home.user', {
- url:'/user',
- templateUrl: 'app/modules/user/user.html',
- controller: 'UserCtrl',
- controllerAs: 'vm'
- });
-
-
- }]);
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userService.js b/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userService.js
deleted file mode 100644
index a3a8f76c..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/marketplace/modules/user/userService.js
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-
- Copyright 2016-2017, Huawei Technologies Co., Ltd.
-
- 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.
-
-*/
-(function() {
- 'use strict';
-
- /**
- * @ngdoc function
- * @name app.service:userService
- * @description
- * # userService
- * Service of the app
- */
-
- angular
- .module('user')
- .factory('UserService', User);
- // Inject your dependencies as .$inject = ['$http', 'someSevide'];
- // function Name ($http, someSevide) {...}
-
- User.$inject = ['$http'];
-
- function User ($http) {
-
- }
-
-})();
diff --git a/vnfmarket-be/portal-marketplace/src/main/webapp/package.json b/vnfmarket-be/portal-marketplace/src/main/webapp/package.json
deleted file mode 100644
index 14923aff..00000000
--- a/vnfmarket-be/portal-marketplace/src/main/webapp/package.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "name": "vnfmarket",
- "description": "Marketplace UI for VNF Services",
- "version": "0.0.1",
- "author": "HTIPL",
- "engines": {
- "node": "0.10.x",
- "npm": "1.4.x"
- },
- "scripts": {
- "start": "grunt",
- "test": "karma start karma.conf.js",
- "postinstall": "bower install --config.interactive=false"
- },
- "dependencies": {
- "bower": "~1.3.8",
- "grunt-cli": "~0.1.13",
- "glob": "~4.0.5",
- "async": "~0.9.0",
- "chalk": "~0.5"
- },
- "devDependencies": {
- "grunt": "~0.4.1",
- "grunt-contrib-clean": "~0.5.0",
- "grunt-contrib-concat": "~0.3.0",
- "grunt-contrib-connect": "~0.5.0",
- "grunt-concurrent": "^1.0.0",
- "grunt-contrib-jshint": "~0.6.4",
- "grunt-contrib-uglify": "~0.2.4",
- "grunt-contrib-watch": "~0.5.3",
- "grunt-exec": "^0.4.6",
- "grunt-injector": "^0.5.4",
- "grunt-angular-templates": "^1.0.2",
- "load-grunt-tasks": "^0.5.0",
- "time-grunt": "^0.3.2",
- "karma": "~0.12.0",
- "karma-chrome-launcher": "~0.1.2",
- "karma-coverage": "~0.2.0",
- "karma-firefox-launcher": "~0.1.3",
- "karma-spec-reporter": "0.0.23",
- "karma-jasmine": "~0.2.1",
- "karma-phantomjs-launcher": "~0.1.2"
- }
-}
diff --git a/vnfmarket-be/vnf-sdk-marketplace/pom.xml b/vnfmarket-be/vnf-sdk-marketplace/pom.xml
index f78b00b8..6552e068 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/pom.xml
+++ b/vnfmarket-be/vnf-sdk-marketplace/pom.xml
@@ -1,206 +1,227 @@
<?xml version="1.0"?>
<!-- Copyright 2017 Huawei Technologies Co., Ltd. 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. -->
+ License, Version 2.0 (the "License"); you may not use this file except in
+ compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software distributed
+ under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
+ OR CONDITIONS OF ANY KIND, either express or implied. See the License for
+ the specific language governing permissions and limitations under the License. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <parent>
- <groupId>org.onap.vnfsdk.refrepo</groupId>
- <artifactId>vnf-sdk-marketplace-core-parent</artifactId>
- <version>1.1.0</version>
- </parent>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <parent>
+ <groupId>org.onap.vnfsdk.refrepo</groupId>
+ <artifactId>vnf-sdk-marketplace-core-parent</artifactId>
+ <version>1.1.0</version>
+ </parent>
- <modelVersion>4.0.0</modelVersion>
- <artifactId>vnf-sdk-marketplace</artifactId>
- <version>1.1.0</version>
- <name>vnf-sdk-marketplace/vnf-sdk-marketplace</name>
- <packaging>war</packaging>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>vnf-sdk-marketplace</artifactId>
+ <version>1.1.0</version>
+ <name>vnf-sdk-marketplace/vnf-sdk-marketplace</name>
+ <packaging>war</packaging>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <cxf.version>3.2.3</cxf.version>
- <!-- slf4j.version>1.6.1</slf4j.version> -->
- <maven.test.skip>false</maven.test.skip>
- <maven.test.failure.ignore>false</maven.test.failure.ignore>
- </properties>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <cxf.version>3.2.3</cxf.version>
+ <!-- slf4j.version>1.6.1</slf4j.version> -->
+ <maven.test.skip>false</maven.test.skip>
+ <maven.test.failure.ignore>false</maven.test.failure.ignore>
+ <swagger-ui.version>3.12.0</swagger-ui.version>
+ </properties>
- <dependencies>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-frontend-jaxrs</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-rs-client</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cxf</groupId>
- <artifactId>cxf-rt-transports-http-hc</artifactId>
- <version>${cxf.version}</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.16</version>
- </dependency>
- <dependency>
- <groupId>io.dropwizard</groupId>
- <artifactId>dropwizard-assets</artifactId>
- <version>1.2.4</version>
- </dependency>
- <dependency>
- <groupId>org.eclipse.persistence</groupId>
- <artifactId>javax.persistence</artifactId>
- <version>2.1.0</version>
- </dependency>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-client</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http-hc</artifactId>
+ <version>${cxf.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ </dependency>
- <dependency>
- <groupId>io.swagger</groupId>
- <artifactId>swagger-jersey2-jaxrs</artifactId>
- <version>1.5.18</version>
- </dependency>
- <!-- jersey -->
+ <dependency>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>javax.persistence</artifactId>
+ <version>2.1.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-jersey2-jaxrs</artifactId>
+ <version>1.5.19</version>
+ </dependency>
+ <!-- jersey -->
+
+ <dependency>
+ <groupId>org.glassfish.jersey.media</groupId>
+ <artifactId>jersey-media-multipart</artifactId>
+ <version>2.25.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-jetty-servlet</artifactId>
+ <version>2.25.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.bundles.repackaged</groupId>
+ <artifactId>jersey-guava</artifactId>
+ <version>2.25.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpmime</artifactId>
+ <version>4.5.3</version>
+ </dependency>
+ <!-- consumer -->
+ <dependency>
+ <groupId>com.eclipsesource.jaxrs</groupId>
+ <artifactId>consumer</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>com.eclipsesource.jaxrs</groupId>
+ <artifactId>jersey-all</artifactId>
+ </exclusion>
+ </exclusions>
+ <version>5.0</version>
+ </dependency>
+ <!-- gson -->
+ <dependency>
+ <groupId>com.google.code.gson</groupId>
+ <artifactId>gson</artifactId>
+ <version>2.8.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ <version>42.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.mybatis</groupId>
+ <artifactId>mybatis</artifactId>
+ <version>3.2.7</version>
+ </dependency>
+ <!-- UT -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <version>1.4.10</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <version>1.4.10</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jmockit</groupId>
+ <artifactId>jmockit</artifactId>
+ <version>1.19</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jmockit</groupId>
+ <artifactId>jmockit-coverage</artifactId>
+ <version>1.19</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ <version>1.8.2</version>
+ <scope>test</scope>
+ </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.media</groupId>
- <artifactId>jersey-media-multipart</artifactId>
- <version>2.25.1</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.containers</groupId>
- <artifactId>jersey-container-jetty-servlet</artifactId>
- <version>2.25.1</version>
- </dependency>
- <dependency>
- <groupId>org.apache.httpcomponents</groupId>
- <artifactId>httpmime</artifactId>
- <version>4.5.3</version>
- </dependency>
- <!-- consumer -->
- <dependency>
- <groupId>com.eclipsesource.jaxrs</groupId>
- <artifactId>consumer</artifactId>
- <exclusions>
- <exclusion>
- <groupId>com.eclipsesource.jaxrs</groupId>
- <artifactId>jersey-all</artifactId>
- </exclusion>
- </exclusions>
- <version>5.0</version>
- </dependency>
- <!-- gson -->
- <dependency>
- <groupId>com.google.code.gson</groupId>
- <artifactId>gson</artifactId>
- <version>2.3.1</version>
- </dependency>
- <dependency>
- <groupId>org.postgresql</groupId>
- <artifactId>postgresql</artifactId>
- <version>42.1.1</version>
- </dependency>
- <dependency>
- <groupId>org.mybatis</groupId>
- <artifactId>mybatis</artifactId>
- <version>3.2.7</version>
- </dependency>
- <!-- UT -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>1.4.10</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito</artifactId>
- <version>1.4.10</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jmockit</groupId>
- <artifactId>jmockit</artifactId>
- <version>1.19</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jmockit</groupId>
- <artifactId>jmockit-coverage</artifactId>
- <version>1.19</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.ant</groupId>
- <artifactId>ant</artifactId>
- <version>1.8.2</version>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>1.3.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.guava</groupId>
+ <artifactId>guava</artifactId>
+ <version>20.0</version>
+ </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-io</artifactId>
- <version>1.3.2</version>
- </dependency>
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- <version>2.4</version>
- </dependency>
- <dependency>
- <groupId>org.glassfish.jersey.bundles.repackaged</groupId>
- <artifactId>jersey-guava</artifactId>
- <version>2.6</version>
- </dependency>
- <!-- UT end -->
- <dependency>
- <groupId>org.onap.vnfsdk.validation</groupId>
- <artifactId>validation-csar</artifactId>
- <version>1.1.1</version>
- </dependency>
- </dependencies>
- <profiles>
- <profile>
- <id>all-tests</id>
- <properties>
- <build.profile.id>all-tests</build.profile.id>
- <skip.unit.tests>false</skip.unit.tests>
- </properties>
- </profile>
- </profiles>
- <build>
- <finalName>ROOT</finalName>
- <plugins>
- <!-- Used for unit tests -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.20</version>
- <configuration>
- <forkMode>always</forkMode>
- <argLine>${surefireArgLine}</argLine>
- <skip>${maven.test.skip}</skip>
- <testFailureIgnore>${maven.test.failure.ignore}</testFailureIgnore>
- <!-- Excludes integration tests when unit tests are run. -->
- <excludes>
- <exclude>**/IT*.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <!-- UT end -->
+ <dependency>
+ <groupId>org.onap.vnfsdk.validation</groupId>
+ <artifactId>validation-csar</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ </dependencies>
+ <profiles>
+ <profile>
+ <id>all-tests</id>
+ <properties>
+ <build.profile.id>all-tests</build.profile.id>
+ <skip.unit.tests>false</skip.unit.tests>
+ </properties>
+ </profile>
+ </profiles>
+ <build>
+ <finalName>ROOT</finalName>
+ <plugins>
+ <!-- Used for unit tests -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.20</version>
+ <configuration>
+ <forkMode>always</forkMode>
+ <argLine>${surefireArgLine}</argLine>
+ <skip>${maven.test.skip}</skip>
+ <testFailureIgnore>${maven.test.failure.ignore}</testFailureIgnore>
+ <!-- Excludes integration tests when unit tests are run. -->
+ <excludes>
+ <exclude>**/IT*.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>com.googlecode.maven-download-plugin</groupId>
+ <artifactId>download-maven-plugin</artifactId>
+ <version>1.2.1</version>
+ <executions>
+ <execution>
+ <id>swagger-ui</id>
+ <goals>
+ <goal>wget</goal>
+ </goals>
+ <configuration>
+ <url>https://github.com/swagger-api/swagger-ui/archive/master.tar.gz</url>
+ <unpack>true</unpack>
+ <outputDirectory>${project.build.directory}</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonConstant.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonConstant.java
index e167ae10..c9ea1945 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonConstant.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonConstant.java
@@ -13,125 +13,143 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.onap.vnfsdk.marketplace.common;
public class CommonConstant {
- // Package Status
- public static final String PACKAGE_STATUS_DELETING = "deleting";
+ // Package Status
+ public static final String PACKAGE_STATUS_DELETING = "deleting";
- public static final String PACKAGE_STATUS_DELETE_FAIL = "deleteFailed";
+ public static final String PACKAGE_STATUS_DELETE_FAIL = "deleteFailed";
- public static final String PACKAGE_XML_FORMAT = "xml";
+ public static final String PACKAGE_XML_FORMAT = "xml";
+ public static final String PACKAGE_YAML_FORMAT = "yaml";
- public static final String PACKAGE_YAML_FORMAT = "yaml";
+ // host image progress
- // host image progress
+ public static final String TOSCA_METADATA = "TOSCA-Metadata";
- public static final String TOSCA_METADATA = "TOSCA-Metadata";
+ public static final String CSAR_VERSION_META = "Version";
- public static final String CSAR_VERSION_META = "Version";
+ public static final String CSAR_TYPE_META = "Type";
- public static final String CSAR_TYPE_META = "Type";
+ public static final String CSAR_PROVIDER_META = "Provider";
- public static final String CSAR_PROVIDER_META = "Provider";
+ public static final String DEFINITIONS = "Definitions";
- public static final String DEFINITIONS = "Definitions";
+ public static final String CSAR_META = "csar.meta";
- public static final String CSAR_META = "csar.meta";
+ public static final String MANIFEST = ".mf";
- public static final String MANIFEST = ".mf";
+ public static final String MF_VERSION_META = "vnf_package_version";
- public static final String MF_VERSION_META = "vnf_package_version";
+ public static final String MF_PRODUCT_NAME = "vnf_product_name";
- public static final String MF_PRODUCT_NAME = "vnf_product_name";
+ public static final String MF_PROVIDER_META = "vnf_provider_id";
- public static final String MF_PROVIDER_META = "vnf_provider_id";
+ public static final String MF_RELEASE_DATETIME = "vnf_release_date_time";
- public static final String MF_RELEASE_DATETIME = "vnf_release_date_time";
+ public static final String CSAR_SUFFIX = ".csar";
- public static final String CSAR_SUFFIX = ".csar";
+ public static final String HTTP_HEADER_CONTENT_RANGE = "Content-Range";
- public static final String HTTP_HEADER_CONTENT_RANGE = "Content-Range";
+ public static final String CATALOG_CSAR_DIR_NAME = "/csar";
- public static final String CATALOG_CSAR_DIR_NAME = "/csar";
+ public static final String REPORT_CSAR_DIR_NAME = "/reports";
- public static final String REPORT_CSAR_DIR_NAME = "/reports";
+ public static final String COMETD_CHANNEL_PACKAGE_DELETE = "/package/delete";
- public static final String COMETD_CHANNEL_PACKAGE_DELETE = "/package/delete";
+ public static final String SUCCESS_STR = "SUCCESS";
- public static final String SUCCESS_STR = "SUCCESS";
+ public static final int ONBOARDING_THREAD_COUNT = 1;
- public static final int ONBOARDING_THREAD_COUNT = 1;
- public static final int SUCESS = 0;
- public static final int FAILED = -1;
+ public static final int SUCESS = 0;
- public static final String CATALOUGE_UPLOAD_URL = "/onapapi/catalog/v1/csars";
+ public static final int FAILED = -1;
- private CommonConstant (){
- // Cannot create instance of the class
- }
+ public static final int HTTP_PORT = 8702;
- public static class functionTest
- {
- public static final String FUNCTEST_URL = "/onapapi/vnfsdk/v1/functest/";
- public static final String FUNCTEST_RESULT_URL = "/onapapi/vnfsdk/v1/functest/download/";
- public static final String FUNCTEST_OPERTYPE_ID = "functiontest";
- public static final String FUNCTEST_PACKAGE_EXISTS = "packageExists";
- public static final String FUNCTEST_EXEC = "functestexec";
+ public static final int HTTPS_PORT = 8702;
- private functionTest() {
- }
- }
+ public static final String BASE_URL = "/onapui/vnfmarket";
- public static class HttpContext {
+ public static final String CATALOUGE_UPLOAD_URL = "/onapapi/catalog/v1/csars";
- public static final String CONTENT_TYPE = "Content-Type";
+ private CommonConstant() {
+ // Cannot create instance of the class
+ }
- public static final String MEDIA_TYPE_JSON = "application/json;charset=UTF-8";
+ public static class functionTest {
- public static final String URL = "url";
+ public static final String FUNCTEST_URL = "/onapapi/vnfsdk/v1/functest/";
- public static final String METHOD_TYPE = "methodType";
+ public static final String FUNCTEST_RESULT_URL = "/onapapi/vnfsdk/v1/functest/download/";
- private HttpContext() {
- }
- }
+ public static final String FUNCTEST_OPERTYPE_ID = "functiontest";
- public static class LifeCycleTest
- {
- public static final String LIFECYCLE_TEST_URL = "/onapapi/nslcm/v1/vnfpackage";
- public static final String LIFECYCLE_TEST_OPERTYPE_ID = "lifecycletest";
- public static final String LIFECYCLE_TEST_EXEC = "lifecycleTestexec";
- private LifeCycleTest() {
- }
- }
+ public static final String FUNCTEST_PACKAGE_EXISTS = "packageExists";
- public static class MethodType {
+ public static final String FUNCTEST_EXEC = "functestexec";
- public static final String POST = "post";
+ private functionTest() {
+ }
+ }
- public static final String DELETE = "delete";
+ public static class HttpContext {
- public static final String PUT = "put";
+ public static final String CONTENT_TYPE = "Content-Type";
- public static final String GET = "get";
+ public static final String MEDIA_TYPE_JSON = "application/json;charset=UTF-8";
- private MethodType() {
- }
- }
+ public static final String URL = "url";
- public static class MsbRegisterCode {
+ public static final String METHOD_TYPE = "methodType";
- public static final int MSDB_REGISTER_RETRIES = 12;
- public static final int MSDB_REGISTER_RETRY_SLEEP = 10000;
+ private HttpContext() {
+ }
+ }
- public static final int MSDB_REGISTER_FILE_NOT_EXISTS = 2;
- public static final int MSDB_REGISTER_SUCESS = 0;
- public static final int MSDB_REGISTER_FAILED = -1;
- private MsbRegisterCode() {
- }
- }
-}
+ public static class LifeCycleTest {
+
+ public static final String LIFECYCLE_TEST_URL = "/onapapi/nslcm/v1/vnfpackage";
+
+ public static final String LIFECYCLE_TEST_OPERTYPE_ID = "lifecycletest";
+
+ public static final String LIFECYCLE_TEST_EXEC = "lifecycleTestexec";
+
+ private LifeCycleTest() {
+ }
+ }
+
+ public static class MethodType {
+
+ public static final String POST = "post";
+
+ public static final String DELETE = "delete";
+
+ public static final String PUT = "put";
+ public static final String GET = "get";
+
+ private MethodType() {
+ }
+ }
+
+ public static class MsbRegisterCode {
+
+ public static final int MSDB_REGISTER_RETRIES = 12;
+
+ public static final int MSDB_REGISTER_RETRY_SLEEP = 10000;
+
+ public static final int MSDB_REGISTER_FILE_NOT_EXISTS = 2;
+
+ public static final int MSDB_REGISTER_SUCESS = 0;
+
+ public static final int MSDB_REGISTER_FAILED = -1;
+
+ private MsbRegisterCode() {
+ }
+ }
+}
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonErrorResponse.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonErrorResponse.java
index 967d0039..a78ebac5 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonErrorResponse.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/common/CommonErrorResponse.java
@@ -13,24 +13,29 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.onap.vnfsdk.marketplace.common;
+package org.onap.vnfsdk.marketplace.common;
public class CommonErrorResponse {
- private String message;
-
- public CommonErrorResponse(String message) {
- super();
- this.message = message;
- }
+ private String statusText;
- public String getMessage() {
- return message;
+ public CommonErrorResponse(String statusText) {
+ super();
+ this.statusText = statusText;
}
- public static Object failure(String message) {
- return message;
- }
-}
+ @Override
+ public String toString() {
+ return "CommonErrorResponse [statusText=" + statusText + "]";
+ }
+ public String getStatusText() {
+ return statusText;
+ }
+
+ public void setStatusText(String statusText) {
+ this.statusText = statusText;
+ }
+
+}
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/resource/PackageResource.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/resource/PackageResource.java
index 7e50eab8..f8f4f543 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/resource/PackageResource.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/resource/PackageResource.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.onap.vnfsdk.marketplace.resource;
import java.io.IOException;
@@ -35,11 +36,16 @@ import javax.ws.rs.core.Response;
import org.eclipse.jetty.http.HttpStatus;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.glassfish.jersey.media.multipart.FormDataParam;
+import org.onap.vnfsdk.marketplace.common.CommonConstant;
import org.onap.vnfsdk.marketplace.db.exception.MarketplaceResourceException;
+import org.onap.vnfsdk.marketplace.db.resource.PackageManager;
import org.onap.vnfsdk.marketplace.entity.response.CsarFileUriResponse;
import org.onap.vnfsdk.marketplace.entity.response.PackageMeta;
import org.onap.vnfsdk.marketplace.entity.response.UploadPackageResponse;
import org.onap.vnfsdk.marketplace.onboarding.entity.OnBoardingResult;
+import org.onap.vnfsdk.marketplace.rest.RestConstant;
+import org.onap.vnfsdk.marketplace.rest.RestResponse;
+import org.onap.vnfsdk.marketplace.rest.RestfulClient;
import org.onap.vnfsdk.marketplace.wrapper.PackageWrapper;
import io.swagger.annotations.Api;
@@ -52,7 +58,6 @@ import io.swagger.annotations.ApiResponses;
* csar package service.
*
* @author 10189609
- *
*/
@Path("/PackageResource")
@Api(tags = {"Package Resource"})
@@ -64,78 +69,59 @@ public class PackageResource {
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
@ApiResponses(value = {
- @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found",
- response = String.class),
- @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415,
- message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
- @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "update error",
- response = String.class)})
- public Response updateValidateStatus(
- @ApiParam(value = "http request body") @Context HttpServletRequest request,
- @ApiParam(value = "http header") @Context HttpHeaders head
- ) throws IOException {
+ @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", response = String.class),
+ @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+ @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "update error", response = String.class)})
+ public Response updateValidateStatus(@ApiParam(value = "http request body") @Context HttpServletRequest request,
+ @ApiParam(value = "http header") @Context HttpHeaders head) throws IOException {
InputStream input = request.getInputStream();
return PackageWrapper.getInstance().updateValidateStatus(input);
}
-
@Path("/csars")
@GET
- @ApiOperation(value = "get csar package list by condition", response = PackageMeta.class,
- responseContainer = "List")
+ @ApiOperation(value = "get csar package list by condition", response = PackageMeta.class, responseContainer = "List")
@Produces(MediaType.APPLICATION_JSON)
@ApiResponses(value = {
- @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found",
- response = String.class),
- @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415,
- message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
- @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error",
- response = String.class)})
- public Response queryPackageListByCond(
- @ApiParam(value = "csar name") @QueryParam("name") String name, @ApiParam(
- value = "csar provider") @QueryParam("provider") String provider, @ApiParam(
- value = "csar version") @QueryParam("version") String version, @ApiParam(
- value = "delay to delete") @QueryParam("deletionPending") String deletionPending,
+ @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", response = String.class),
+ @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+ @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error", response = String.class)})
+ public Response queryPackageListByCond(@ApiParam(value = "csar name") @QueryParam("name") String name,
+ @ApiParam(value = "csar provider") @QueryParam("provider") String provider,
+ @ApiParam(value = "csar version") @QueryParam("version") String version,
+ @ApiParam(value = "delay to delete") @QueryParam("deletionPending") String deletionPending,
@ApiParam(value = "csar type") @QueryParam("type") String type) {
- return PackageWrapper.getInstance().queryPackageListByCond(name, provider, version,
- deletionPending, type);
+ return PackageWrapper.getInstance().queryPackageListByCond(name, provider, version, deletionPending, type);
}
@Path("/csars/{csarId}")
@GET
- @ApiOperation(value = "get csar package list", response = PackageMeta.class,
- responseContainer = "List")
+ @ApiOperation(value = "get csar package list", response = PackageMeta.class, responseContainer = "List")
@Produces(MediaType.APPLICATION_JSON)
@ApiResponses(value = {
- @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found",
- response = String.class),
- @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415,
- message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
- @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error",
- response = String.class)})
- public Response queryPackageById(
- @ApiParam(value = "csar id") @PathParam("csarId") String csarId) {
+ @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", response = String.class),
+ @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+ @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error", response = String.class)})
+ public Response queryPackageById(@ApiParam(value = "csar id") @PathParam("csarId") String csarId) {
return PackageWrapper.getInstance().queryPackageById(csarId);
}
+
@Path("/csars")
@POST
@ApiOperation(value = "upload csar package", response = UploadPackageResponse.class)
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
@ApiResponses(value = {
- @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found",
- response = String.class),
- @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415,
- message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
- @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error",
- response = String.class)})
+ @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", response = String.class),
+ @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+ @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error", response = String.class)})
public Response uploadPackage(
- @ApiParam(value = "file inputstream",
- required = true) @FormDataParam("file") InputStream uploadedInputStream,@FormDataParam("params") String details,
- @ApiParam(value = "file detail",
- required = false) @FormDataParam("file") FormDataContentDisposition fileDetail,
- @ApiParam(value = "http header") @Context HttpHeaders head) throws IOException, MarketplaceResourceException {
+ @ApiParam(value = "file inputstream", required = true) @FormDataParam("file") InputStream uploadedInputStream,
+ @FormDataParam("params") String details,
+ @ApiParam(value = "file detail", required = false) @FormDataParam("file") FormDataContentDisposition fileDetail,
+ @ApiParam(value = "http header") @Context HttpHeaders head)
+ throws IOException, MarketplaceResourceException {
return PackageWrapper.getInstance().uploadPackage(uploadedInputStream, fileDetail, details, head);
}
@@ -143,12 +129,9 @@ public class PackageResource {
@DELETE
@ApiOperation(value = "delete a package")
@ApiResponses(value = {
- @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found",
- response = String.class),
- @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415,
- message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
- @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error",
- response = String.class)})
+ @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", response = String.class),
+ @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+ @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error", response = String.class)})
public Response delPackage(@ApiParam(value = "csar Id") @PathParam("csarId") String csarId) {
return PackageWrapper.getInstance().delPackage(csarId);
}
@@ -158,20 +141,16 @@ public class PackageResource {
@ApiOperation(value = "get csar file uri by csarId", response = CsarFileUriResponse.class)
@Produces(MediaType.APPLICATION_JSON)
@ApiResponses(value = {
- @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found",
- response = String.class),
- @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415,
- message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
- @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error",
- response = String.class)})
- public Response getCsarFileUri(
- @ApiParam(value = "csar Id", required = true) @PathParam("csarId") String csarId) {
+ @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", response = String.class),
+ @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+ @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error", response = String.class)})
+ public Response getCsarFileUri(@ApiParam(value = "csar Id", required = true) @PathParam("csarId") String csarId) {
return PackageWrapper.getInstance().getCsarFileUri(csarId);
}
@Path("/csars/{csarId}/downloaded")
@GET
- @ApiOperation(value = "update download count for a package",response = Response.class)
+ @ApiOperation(value = "update download count for a package", response = Response.class)
public Response updateDwonloadCount(@ApiParam(value = "csar Id") @PathParam("csarId") String csarId) {
return PackageWrapper.getInstance().updateDwonloadCount(csarId);
}
@@ -182,30 +161,25 @@ public class PackageResource {
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces(MediaType.APPLICATION_JSON)
@ApiResponses(value = {
- @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found",
- response = String.class),
- @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415,
- message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
- @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error",
- response = String.class)})
- public Response reUploadPackage(
- @ApiParam(value = "csar Id") @PathParam("csarId") String csarId,
- @ApiParam(value = "file inputstream",
- required = true) @FormDataParam("file") InputStream uploadedInputStream,@FormDataParam("params") String details,
- @ApiParam(value = "file detail",
- required = false) @FormDataParam("file") FormDataContentDisposition fileDetail,
- @ApiParam(value = "http header") @Context HttpHeaders head) throws IOException, MarketplaceResourceException {
- return PackageWrapper.getInstance().reUploadPackage(csarId,uploadedInputStream, fileDetail, details, head);
+ @ApiResponse(code = HttpStatus.NOT_FOUND_404, message = "microservice not found", response = String.class),
+ @ApiResponse(code = HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, message = "Unprocessable MicroServiceInfo Entity ", response = String.class),
+ @ApiResponse(code = HttpStatus.INTERNAL_SERVER_ERROR_500, message = "resource grant error", response = String.class)})
+ public Response reUploadPackage(@ApiParam(value = "csar Id") @PathParam("csarId") String csarId,
+ @ApiParam(value = "file inputstream", required = true) @FormDataParam("file") InputStream uploadedInputStream,
+ @FormDataParam("params") String details,
+ @ApiParam(value = "file detail", required = false) @FormDataParam("file") FormDataContentDisposition fileDetail,
+ @ApiParam(value = "http header") @Context HttpHeaders head)
+ throws IOException, MarketplaceResourceException {
+ return PackageWrapper.getInstance().reUploadPackage(csarId, uploadedInputStream, fileDetail, details, head);
}
@Path("/csars/{csarId}/onboardstatus")
@GET
- @ApiOperation(value="Get VNF OnBoarding Result", response=OnBoardingResult.class)
+ @ApiOperation(value = "Get VNF OnBoarding Result", response = OnBoardingResult.class)
@Produces(MediaType.APPLICATION_JSON)
public Response getOnBoardingResult(@ApiParam("csar Id") @PathParam("csarId") String csarId,
@ApiParam("operation type") @QueryParam("operTypeId") String operTypeId,
- @ApiParam("operation id") @QueryParam("operId") String operId)
- {
+ @ApiParam("operation id") @QueryParam("operId") String operId) {
return PackageWrapper.getInstance().getOnBoardingResult(csarId, operTypeId, operId);
}
@@ -215,16 +189,36 @@ public class PackageResource {
@Produces(MediaType.APPLICATION_JSON)
public Response getOperStatus(@ApiParam(value = "csar Id") @PathParam("csarId") String csarId,
@ApiParam(value = "operation type") @QueryParam("operTypeId") String operTypeId) {
- return PackageWrapper.getInstance().getOperResultByOperTypeId(csarId,operTypeId);
+ return PackageWrapper.getInstance().getOperResultByOperTypeId(csarId, operTypeId);
}
@Path("/csars/onboardsteps")
@GET
- @ApiOperation(value="Get VNF OnBoarded Steps", response=Response.class)
+ @ApiOperation(value = "Get VNF OnBoarded Steps", response = Response.class)
@Produces(MediaType.APPLICATION_JSON)
- public Response getOnBoardingSteps()
- {
+ public Response getOnBoardingSteps() {
return PackageWrapper.getInstance().getOnBoardingSteps();
}
-}
+ @Path("/healthcheck")
+ @GET
+ @ApiOperation(value = "Health for VNF Repository", response = Response.class)
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response healthCheck() {
+
+ // Step 1: Check whether tomcat server is up
+ RestResponse resp = RestfulClient.get("127.0.0.1", CommonConstant.HTTP_PORT, CommonConstant.BASE_URL);
+ if(RestConstant.RESPONSE_CODE_200 != resp.getStatusCode()) {
+ return Response.serverError().build();
+ }
+
+ // Step 2: Check whether postgres database is up
+ try {
+ PackageManager.getInstance().queryPackageByCsarId("01");
+ } catch(Exception e) {
+ return Response.serverError().build();
+ }
+
+ return Response.ok().build();
+ }
+}
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java
index 3fbdd94d..8feab3f8 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapper.java
@@ -38,6 +38,7 @@ import org.eclipse.jetty.http.HttpStatus;
import org.glassfish.jersey.media.multipart.FormDataContentDisposition;
import org.onap.validation.csar.CsarValidator;
import org.onap.vnfsdk.marketplace.common.CommonConstant;
+import org.onap.vnfsdk.marketplace.common.CommonErrorResponse;
import org.onap.vnfsdk.marketplace.common.FileUtil;
import org.onap.vnfsdk.marketplace.common.RestUtil;
import org.onap.vnfsdk.marketplace.common.ToolUtil;
@@ -257,7 +258,8 @@ public class PackageWrapper {
if(!bResult) {
LOG.error("Validation of Input received for Package Upload failed !!!");
return Response.status(Status.EXPECTATION_FAILED)
- .entity("Input package is empty or exception happened during validation").build();
+ .entity(new CommonErrorResponse("Input package is empty or exception happened during validation"))
+ .build();
}
String fileName = "temp_" + packageId + ".csar";
@@ -290,19 +292,22 @@ public class PackageWrapper {
String validationResp = cv.validateCsar();
if("SUCCESS" != validationResp) {
LOG.error("Could not validate failed");
- return Response.status(Status.EXPECTATION_FAILED).entity(validationResp).build();
+ return Response.status(Status.EXPECTATION_FAILED).entity(new CommonErrorResponse(validationResp))
+ .build();
}
} catch(Exception e) {
LOG.error("CSAR validation panicked", e);
- return Response.status(Status.EXPECTATION_FAILED)
- .entity("Exception occurred while validating csar package:" + e.getMessage()).build();
+ return Response.status(Status.EXPECTATION_FAILED).entity(
+ new CommonErrorResponse("Exception occurred while validating csar package:" + e.getMessage()))
+ .build();
}
UploadPackageResponse result = null;
try {
result = manageUpload(packageId, fileName, fileLocation, details, contentRange);
} catch(ErrorCodeException e) {
- return Response.status(Status.EXPECTATION_FAILED).entity("Package Name already exists").build();
+ return Response.status(Status.EXPECTATION_FAILED)
+ .entity(new CommonErrorResponse("Package Name already exists")).build();
}
if(null != result) {
return Response.ok(ToolUtil.objectToString(result), MediaType.APPLICATION_JSON).build();
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java
index ab94e983..3fbf584d 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/java/org/onap/vnfsdk/marketplace/wrapper/PackageWrapperUtil.java
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
package org.onap.vnfsdk.marketplace.wrapper;
import java.io.BufferedReader;
@@ -40,400 +41,398 @@ import org.slf4j.LoggerFactory;
import com.google.gson.internal.LinkedTreeMap;
-
public class PackageWrapperUtil {
- private static final Logger LOG = LoggerFactory.getLogger(PackageWrapperUtil.class);
-
- private PackageWrapperUtil() {
- }
-
- public static long getPacakgeSize(String fileLocation) {
- File file = new File(fileLocation);
- return file.length();
- }
-
- /**
- * change package metadata to fix database.
- * @param meta package metadata
- * @param details
- * @return package data in database
- */
- public static PackageData getPackageData(PackageMeta meta) {
- PackageData packageData = new PackageData();
- packageData.setCreateTime(meta.getCreateTime());
- packageData.setDeletionPending(String.valueOf(meta.isDeletionPending()));
- packageData.setDownloadUri(meta.getDownloadUri());
- packageData.setFormat(meta.getFormat());
- packageData.setModifyTime(meta.getModifyTime());
- packageData.setName(meta.getName());
- packageData.setCsarId(meta.getCsarId());
- packageData.setProvider(meta.getProvider());
- String fileSize = meta.getSize();
- packageData.setSize(fileSize);
- packageData.setType(meta.getType());
- packageData.setVersion(meta.getVersion());
- packageData.setDetails(meta.getDetails());
- packageData.setShortDesc(meta.getShortDesc());
- packageData.setRemarks(meta.getRemarks());
- return packageData;
- }
-
- /**
- * judge wether is the end of upload package.
- * @param contentRange package sise range
- * @param csarName package name
- * @return boolean
- */
- public static boolean isUploadEnd(String contentRange) {
- String range = contentRange;
- range = range.replace("bytes", "").trim();
- range = range.substring(0, range.indexOf("/"));
- String size =
- contentRange.substring(contentRange.indexOf("/") + 1, contentRange.length()).trim();
- int fileSize = Integer.parseInt(size);
- String[] ranges = range.split("-");
- int endPosition = Integer.parseInt(ranges[1]) + 1;
- if (endPosition >= fileSize) {
- return true;
+
+ private static final Logger LOG = LoggerFactory.getLogger(PackageWrapperUtil.class);
+
+ private PackageWrapperUtil() {
}
- return false;
- }
-
- /**
- * get package detail by package id.
- * @param csarId package id
- * @return package detail
- */
- public static PackageData getPackageInfoById(String csarId) {
- PackageData result = new PackageData();
- List<PackageData> packageDataList = new ArrayList<>();
- try {
- packageDataList = PackageManager.getInstance().queryPackageByCsarId(csarId);
- if (packageDataList != null && ! packageDataList.isEmpty()) {
- result = PackageManager.getInstance().queryPackageByCsarId(csarId).get(0);
- }
- } catch (MarketplaceResourceException e1) {
- LOG.error("query package by csarId from db error ! " + e1.getMessage(), e1);
+
+ public static long getPacakgeSize(String fileLocation) {
+ File file = new File(fileLocation);
+ return file.length();
}
- return result;
- }
-
- /**
- * get package metadata from basic info.
- * @param fileName package name
- * @param fileLocation the location of package
- * @param basic basic infomation of package. include version, type and provider
- * @return package metadata
- */
- public static PackageMeta getPackageMeta(String packageId, String fileName, String fileLocation,
- PackageBasicInfo basic, String details) {
- PackageMeta packageMeta = new PackageMeta();
- long size = getPacakgeSize(fileLocation);
- packageMeta.setFormat(basic.getFormat());
- String usedPackageId = packageId;
- if(null == packageId)
- {
- usedPackageId = ToolUtil.generateId();
+
+ /**
+ * change package metadata to fix database.
+ *
+ * @param meta package metadata
+ * @param details
+ * @return package data in database
+ */
+ public static PackageData getPackageData(PackageMeta meta) {
+ PackageData packageData = new PackageData();
+ packageData.setCreateTime(meta.getCreateTime());
+ packageData.setDeletionPending(String.valueOf(meta.isDeletionPending()));
+ packageData.setDownloadUri(meta.getDownloadUri());
+ packageData.setFormat(meta.getFormat());
+ packageData.setModifyTime(meta.getModifyTime());
+ packageData.setName(meta.getName());
+ packageData.setCsarId(meta.getCsarId());
+ packageData.setProvider(meta.getProvider());
+ String fileSize = meta.getSize();
+ packageData.setSize(fileSize);
+ packageData.setType(meta.getType());
+ packageData.setVersion(meta.getVersion());
+ packageData.setDetails(meta.getDetails());
+ packageData.setShortDesc(meta.getShortDesc());
+ packageData.setRemarks(meta.getRemarks());
+ return packageData;
}
- packageMeta.setCsarId(usedPackageId);
-
- packageMeta.setName(fileName.replace(CommonConstant.CSAR_SUFFIX, ""));
- packageMeta.setType(basic.getType().toString());
- packageMeta.setVersion(basic.getVersion());
- packageMeta.setProvider(basic.getProvider());
- packageMeta.setDeletionPending(false);
- String sizeStr = ToolUtil.getFormatFileSize(size);
- packageMeta.setSize(sizeStr);
- SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- String currentTime = sdf1.format(new Date());
- packageMeta.setCreateTime(currentTime);
- packageMeta.setModifyTime(currentTime);
- if(null != details)
- {
- LinkedTreeMap<String,String> csarDetails = ToolUtil.fromJson(details, LinkedTreeMap.class);
- packageMeta.setDetails(csarDetails.get("details"));
- packageMeta.setShortDesc(csarDetails.get("shortDesc"));
- packageMeta.setRemarks(csarDetails.get("remarks"));
+ /**
+ * judge wether is the end of upload package.
+ *
+ * @param contentRange package sise range
+ * @param csarName package name
+ * @return boolean
+ */
+ public static boolean isUploadEnd(String contentRange) {
+ String range = contentRange;
+ range = range.replace("bytes", "").trim();
+ range = range.substring(0, range.indexOf("/"));
+ String size = contentRange.substring(contentRange.indexOf("/") + 1, contentRange.length()).trim();
+ int fileSize = Integer.parseInt(size);
+ String[] ranges = range.split("-");
+ int endPosition = Integer.parseInt(ranges[1]) + 1;
+ if(endPosition >= fileSize) {
+ return true;
+ }
+ return false;
}
- return packageMeta;
- }
-
- /**
- * get downloadUri from package metadata.
- * @param csarId package id
- * @return download uri
- */
- public static String getPackagePath(String csarId) {
- List<PackageData> packageList = new ArrayList<>();
- String downloadUri = null;
- try {
- packageList = PackageManager.getInstance().queryPackageByCsarId(csarId);
- downloadUri = packageList.get(0).getDownloadUri();
- } catch (MarketplaceResourceException e1) {
- LOG.error("Query CSAR package by ID failed ! csarId = " + csarId, e1);
+
+ /**
+ * get package detail by package id.
+ *
+ * @param csarId package id
+ * @return package detail
+ */
+ public static PackageData getPackageInfoById(String csarId) {
+ PackageData result = new PackageData();
+ List<PackageData> packageDataList = new ArrayList<>();
+ try {
+ packageDataList = PackageManager.getInstance().queryPackageByCsarId(csarId);
+ if(packageDataList != null && !packageDataList.isEmpty()) {
+ result = packageDataList.get(0);
+ }
+ } catch(MarketplaceResourceException e1) {
+ LOG.error("query package by csarId from db error ! " + e1.getMessage(), e1);
+ }
+ return result;
}
- return downloadUri;
- }
-
-
- /**
- * get package name from ftpUrl.
- * @param ftpUrl ftp url
- * @return package name
- */
- public static String getPackageName(String ftpUrl) {
- int index = ftpUrl.lastIndexOf("/");
-
- return ftpUrl.substring(index);
- }
-
- /**
- * translate package data from database to package metadata.
- * @param dbResult data from database
- * @return package metadata list
- */
- public static List<PackageMeta> packageDataList2PackageMetaList(
- List<PackageData> dbResult) {
- ArrayList<PackageMeta> metas = new ArrayList<>();
- if (! dbResult.isEmpty()) {
- for (int i = 0; i < dbResult.size(); i++) {
- PackageData data = dbResult.get(i);
- PackageMeta meta = packageData2PackageMeta(data);
- metas.add(meta);
- }
+
+ /**
+ * get package metadata from basic info.
+ *
+ * @param fileName package name
+ * @param fileLocation the location of package
+ * @param basic basic infomation of package. include version, type and provider
+ * @return package metadata
+ */
+ public static PackageMeta getPackageMeta(String packageId, String fileName, String fileLocation,
+ PackageBasicInfo basic, String details) {
+ PackageMeta packageMeta = new PackageMeta();
+ long size = getPacakgeSize(fileLocation);
+ packageMeta.setFormat(basic.getFormat());
+ String usedPackageId = packageId;
+ if(null == packageId) {
+ usedPackageId = ToolUtil.generateId();
+ }
+
+ packageMeta.setCsarId(usedPackageId);
+
+ packageMeta.setName(fileName.replace(CommonConstant.CSAR_SUFFIX, ""));
+ packageMeta.setType(basic.getType().toString());
+ packageMeta.setVersion(basic.getVersion());
+ packageMeta.setProvider(basic.getProvider());
+ packageMeta.setDeletionPending(false);
+ String sizeStr = ToolUtil.getFormatFileSize(size);
+ packageMeta.setSize(sizeStr);
+ SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+ String currentTime = sdf1.format(new Date());
+ packageMeta.setCreateTime(currentTime);
+ packageMeta.setModifyTime(currentTime);
+ if(null != details) {
+ LinkedTreeMap<String, String> csarDetails = ToolUtil.fromJson(details, LinkedTreeMap.class);
+ packageMeta.setDetails(csarDetails.get("details"));
+ packageMeta.setShortDesc(csarDetails.get("shortDesc"));
+ packageMeta.setRemarks(csarDetails.get("remarks"));
+ }
+ return packageMeta;
}
- return metas;
- }
-
- public static PackageMeta packageData2PackageMeta(PackageData packageData) {
- PackageMeta meta = new PackageMeta();
- meta.setCsarId(packageData.getCsarId());
- meta.setCreateTime(packageData.getCreateTime());
- meta.setDeletionPending(Boolean.getBoolean(packageData.getDeletionPending()));
- String packageUri =
- packageData.getDownloadUri() + packageData.getName() + CommonConstant.CSAR_SUFFIX;
- String packageUrl = getUrl(packageUri);
- meta.setDownloadUri(packageUrl);
- meta.setReport(packageData.getReport());
- meta.setFormat(packageData.getFormat());
- meta.setModifyTime(packageData.getModifyTime());
- meta.setName(packageData.getName());
- meta.setDetails(packageData.getDetails());
- meta.setProvider(packageData.getProvider());
- meta.setSize(packageData.getSize());
- meta.setType(packageData.getType());
- meta.setShortDesc(packageData.getShortDesc());
- meta.setVersion(packageData.getVersion());
- meta.setRemarks(packageData.getRemarks());
- meta.setDownloadCount(packageData.getDownloadCount());
- return meta;
- }
-
- /**
- * add msb address as prefix to uri.
- * @param uri uri
- * @return url
- */
- public static String getUrl(String uri) {
- String url = getDownloadUriHead();
- if (url.endsWith("/") && uri.startsWith("/")) {
- url += uri.substring(1);
- } else {
- url += uri;
+
+ /**
+ * get downloadUri from package metadata.
+ *
+ * @param csarId package id
+ * @return download uri
+ */
+ public static String getPackagePath(String csarId) {
+ List<PackageData> packageList = new ArrayList<>();
+ String downloadUri = null;
+ try {
+ packageList = PackageManager.getInstance().queryPackageByCsarId(csarId);
+ downloadUri = packageList.get(0).getDownloadUri();
+ } catch(MarketplaceResourceException e1) {
+ LOG.error("Query CSAR package by ID failed ! csarId = " + csarId, e1);
+ }
+ return downloadUri;
}
- return url.replace("\\", "/");
- }
-
- public static String getDownloadUriHead() {
- return MsbAddrConfig.getMsbAddress() + "/files/catalog-http";
- }
-
- /**
- * get local path.
- * @param uri uri
- * @return local path
- */
- public static String getLocalPath(String uri) {
- File srcDir = new File(uri);
- String localPath = srcDir.getAbsolutePath();
- return localPath.replace("\\", "/");
- }
-
- /**
- * get package basic information.
- * @param fileLocation package location
- * @return package basic information
- */
- public static PackageBasicInfo getPacageBasicInfo(String fileLocation) {
- PackageBasicInfo basicInfo = new PackageBasicInfo();
- String unzipDir = ToolUtil.getUnzipDir(fileLocation);
- boolean isXmlCsar = false;
- try {
- String tempfolder = unzipDir;
- List<String> unzipFiles = FileUtil.unzip(fileLocation, tempfolder);
- if (unzipFiles.isEmpty()) {
- isXmlCsar = true;
- }
- for (String unzipFile : unzipFiles) {
- if (unzipFile.endsWith(CommonConstant.MANIFEST)) {
- basicInfo = readManifest(unzipFile);
+
+ /**
+ * get package name from ftpUrl.
+ *
+ * @param ftpUrl ftp url
+ * @return package name
+ */
+ public static String getPackageName(String ftpUrl) {
+ int index = ftpUrl.lastIndexOf("/");
+
+ return ftpUrl.substring(index);
+ }
+
+ /**
+ * translate package data from database to package metadata.
+ *
+ * @param dbResult data from database
+ * @return package metadata list
+ */
+ public static List<PackageMeta> packageDataList2PackageMetaList(List<PackageData> dbResult) {
+ ArrayList<PackageMeta> metas = new ArrayList<>();
+ if(!dbResult.isEmpty()) {
+ for(int i = 0; i < dbResult.size(); i++) {
+ PackageData data = dbResult.get(i);
+ PackageMeta meta = packageData2PackageMeta(data);
+ metas.add(meta);
+ }
}
-
- if (unzipFile.endsWith(CommonConstant.CSAR_META)) {
- basicInfo = readMetaData(unzipFile);
+ return metas;
+ }
+
+ public static PackageMeta packageData2PackageMeta(PackageData packageData) {
+ PackageMeta meta = new PackageMeta();
+ meta.setCsarId(packageData.getCsarId());
+ meta.setCreateTime(packageData.getCreateTime());
+ meta.setDeletionPending(Boolean.getBoolean(packageData.getDeletionPending()));
+ String packageUri = packageData.getDownloadUri() + packageData.getName() + CommonConstant.CSAR_SUFFIX;
+ String packageUrl = getUrl(packageUri);
+ meta.setDownloadUri(packageUrl);
+ meta.setReport(packageData.getReport());
+ meta.setFormat(packageData.getFormat());
+ meta.setModifyTime(packageData.getModifyTime());
+ meta.setName(packageData.getName());
+ meta.setDetails(packageData.getDetails());
+ meta.setProvider(packageData.getProvider());
+ meta.setSize(packageData.getSize());
+ meta.setType(packageData.getType());
+ meta.setShortDesc(packageData.getShortDesc());
+ meta.setVersion(packageData.getVersion());
+ meta.setRemarks(packageData.getRemarks());
+ meta.setDownloadCount(packageData.getDownloadCount());
+ return meta;
+ }
+
+ /**
+ * add msb address as prefix to uri.
+ *
+ * @param uri uri
+ * @return url
+ */
+ public static String getUrl(String uri) {
+ String url = getDownloadUriHead();
+ if(url.endsWith("/") && uri.startsWith("/")) {
+ url += uri.substring(1);
+ } else {
+ url += uri;
}
-
- if (ToolUtil.isYamlFile(new File(unzipFile))) {
- isXmlCsar = false;
+ return url.replace("\\", "/");
+ }
+
+ public static String getDownloadUriHead() {
+ return MsbAddrConfig.getMsbAddress() + "/files/catalog-http";
+ }
+
+ /**
+ * get local path.
+ *
+ * @param uri uri
+ * @return local path
+ */
+ public static String getLocalPath(String uri) {
+ File srcDir = new File(uri);
+ String localPath = srcDir.getAbsolutePath();
+ return localPath.replace("\\", "/");
+ }
+
+ /**
+ * get package basic information.
+ *
+ * @param fileLocation package location
+ * @return package basic information
+ */
+ public static PackageBasicInfo getPacageBasicInfo(String fileLocation) {
+ PackageBasicInfo basicInfo = new PackageBasicInfo();
+ String unzipDir = ToolUtil.getUnzipDir(fileLocation);
+ boolean isXmlCsar = false;
+ try {
+ String tempfolder = unzipDir;
+ List<String> unzipFiles = FileUtil.unzip(fileLocation, tempfolder);
+ if(unzipFiles.isEmpty()) {
+ isXmlCsar = true;
+ }
+ for(String unzipFile : unzipFiles) {
+ if(unzipFile.endsWith(CommonConstant.MANIFEST)) {
+ basicInfo = readManifest(unzipFile);
+ }
+
+ if(unzipFile.endsWith(CommonConstant.CSAR_META)) {
+ basicInfo = readMetaData(unzipFile);
+ }
+
+ if(ToolUtil.isYamlFile(new File(unzipFile))) {
+ isXmlCsar = false;
+ }
+ }
+ } catch(IOException e1) {
+ LOG.error("judge package type error ! " + e1.getMessage(), e1);
}
- }
- } catch (IOException e1) {
- LOG.error("judge package type error ! " + e1.getMessage(), e1);
+ if(isXmlCsar) {
+ basicInfo.setFormat(CommonConstant.PACKAGE_XML_FORMAT);
+ } else {
+ basicInfo.setFormat(CommonConstant.PACKAGE_YAML_FORMAT);
+ }
+ return basicInfo;
}
- if (isXmlCsar) {
- basicInfo.setFormat(CommonConstant.PACKAGE_XML_FORMAT);
- } else {
- basicInfo.setFormat(CommonConstant.PACKAGE_YAML_FORMAT);
+
+ /**
+ * Reads the manifest file in the package and fills the basic infor about package
+ *
+ * @param unzipFile
+ * @return basic infor about package
+ */
+ private static PackageBasicInfo readMetaData(String unzipFile) {
+
+ // Fix the package type to CSAR, temporary
+ PackageBasicInfo basicInfo = new PackageBasicInfo();
+ basicInfo.setType(EnumType.CSAR);
+
+ File file = new File(unzipFile);
+ try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
+
+ for(String tempString; (tempString = reader.readLine()) != null;) {
+ // If line is empty, ignore
+ if("".equals(tempString)) {
+ continue;
+ }
+
+ int count1 = tempString.indexOf(":");
+ String meta = tempString.substring(0, count1).trim();
+
+ // Check for the package provider name
+ if(meta.equalsIgnoreCase(CommonConstant.CSAR_PROVIDER_META)) {
+ int count = tempString.indexOf(":") + 1;
+ basicInfo.setProvider(tempString.substring(count).trim());
+ }
+
+ // Check for package version
+ if(meta.equalsIgnoreCase(CommonConstant.CSAR_VERSION_META)) {
+ int count = tempString.indexOf(":") + 1;
+ basicInfo.setVersion(tempString.substring(count).trim());
+ }
+
+ // Check for package type
+ if(meta.equalsIgnoreCase(CommonConstant.CSAR_TYPE_META)) {
+ int count = tempString.indexOf(":") + 1;
+
+ basicInfo.setType(getEnumType(tempString.substring(count).trim()));
+ }
+ }
+
+ reader.close();
+ } catch(IOException e) {
+ LOG.error("Exception while parsing manifest file" + e, e);
+ }
+
+ return basicInfo;
+ }
+
+ private static EnumType getEnumType(String type) {
+ EnumType vnfType = EnumType.CSAR;
+ if(type == "CSAR") {
+ vnfType = EnumType.CSAR;
+ }
+
+ if(type == "GSAR") {
+ vnfType = EnumType.GSAR;
+ }
+
+ if(type == "NSAR") {
+ vnfType = EnumType.NSAR;
+ }
+
+ if(type == "SSAR") {
+ vnfType = EnumType.SSAR;
+ }
+
+ if(type == "NFAR") {
+ vnfType = EnumType.NFAR;
+ }
+
+ return vnfType;
}
- return basicInfo;
- }
-
- /**
- * Reads the manifest file in the package and fills the basic infor about package
- * @param unzipFile
- * @return basic infor about package
- */
- private static PackageBasicInfo readMetaData(String unzipFile) {
-
- // Fix the package type to CSAR, temporary
- PackageBasicInfo basicInfo = new PackageBasicInfo();
- basicInfo.setType(EnumType.CSAR);
-
- File file = new File(unzipFile);
- try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
-
- for(String tempString; (tempString = reader.readLine()) != null;)
- {
- // If line is empty, ignore
- if ("".equals(tempString)) {
- continue;
- }
-
- int count1 = tempString.indexOf(":");
- String meta = tempString.substring(0, count1).trim();
-
- // Check for the package provider name
- if (meta.equalsIgnoreCase(CommonConstant.CSAR_PROVIDER_META)) {
- int count = tempString.indexOf(":") + 1;
- basicInfo.setProvider(tempString.substring(count).trim());
- }
-
- // Check for package version
- if (meta.equalsIgnoreCase(CommonConstant.CSAR_VERSION_META)) {
- int count = tempString.indexOf(":") + 1;
- basicInfo.setVersion(tempString.substring(count).trim());
- }
-
- // Check for package type
- if (meta.equalsIgnoreCase(CommonConstant.CSAR_TYPE_META)) {
- int count = tempString.indexOf(":") + 1;
-
- basicInfo.setType(getEnumType(tempString.substring(count).trim()));
- }
- }
-
- reader.close();
- } catch (IOException e) {
- LOG.error("Exception while parsing manifest file" + e, e);
+
+ private static PackageBasicInfo readManifest(String unzipFile) {
+
+ // Fix the package type to CSAR, temporary
+ PackageBasicInfo basicInfo = new PackageBasicInfo();
+ basicInfo.setType(EnumType.CSAR);
+
+ File file = new File(unzipFile);
+ try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
+
+ for(String tempString; (tempString = reader.readLine()) != null;) {
+ // If line is empty, ignore
+ if("".equals(tempString)) {
+ continue;
+ }
+
+ int count1 = tempString.indexOf(":");
+ String meta = tempString.substring(0, count1).trim();
+
+ // Check for the package provider name
+ if(meta.equalsIgnoreCase(CommonConstant.MF_PROVIDER_META)) {
+ int count = tempString.indexOf(":") + 1;
+ basicInfo.setProvider(tempString.substring(count).trim());
+ }
+
+ // Check for package version
+ if(meta.equalsIgnoreCase(CommonConstant.MF_VERSION_META)) {
+ int count = tempString.indexOf(":") + 1;
+ basicInfo.setVersion(tempString.substring(count).trim());
+ }
+ }
+
+ reader.close();
+ } catch(IOException e) {
+ LOG.error("Exception while parsing manifest file" + e, e);
+ }
+
+ return basicInfo;
}
- return basicInfo;
- }
-
- private static EnumType getEnumType (String type)
- {
- EnumType vnfType = EnumType.CSAR;
- if (type == "CSAR")
- {
- vnfType = EnumType.CSAR;
- }
-
- if (type == "GSAR")
- {
- vnfType = EnumType.GSAR;
- }
-
- if (type == "NSAR")
- {
- vnfType = EnumType.NSAR;
- }
-
- if (type == "SSAR")
- {
- vnfType = EnumType.SSAR;
- }
-
- if (type == "NFAR")
- {
- vnfType = EnumType.NFAR;
- }
-
- return vnfType;
- }
-
- private static PackageBasicInfo readManifest(String unzipFile) {
-
- // Fix the package type to CSAR, temporary
- PackageBasicInfo basicInfo = new PackageBasicInfo();
- basicInfo.setType(EnumType.CSAR);
-
- File file = new File(unzipFile);
- try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
-
- for(String tempString; (tempString = reader.readLine()) != null;)
- {
- // If line is empty, ignore
- if ("".equals(tempString)) {
- continue;
- }
-
- int count1 = tempString.indexOf(":");
- String meta = tempString.substring(0, count1).trim();
-
- // Check for the package provider name
- if (meta.equalsIgnoreCase(CommonConstant.MF_PROVIDER_META)) {
- int count = tempString.indexOf(":") + 1;
- basicInfo.setProvider(tempString.substring(count).trim());
- }
-
- // Check for package version
- if (meta.equalsIgnoreCase(CommonConstant.MF_VERSION_META)) {
- int count = tempString.indexOf(":") + 1;
- basicInfo.setVersion(tempString.substring(count).trim());
- }
- }
-
- reader.close();
- } catch (IOException e) {
- LOG.error("Exception while parsing manifest file" + e, e);
- }
-
- return basicInfo;
- }
- /**
- * get package format enum.
- * @param format package format
- * @return package format enum
- */
- public static EnumPackageFormat getPackageFormat(String format) {
- if ("xml".equals(format)) {
- return EnumPackageFormat.TOSCA_XML;
- } else if ("yml".equals(format) || "yaml".equals(format)) {
- return EnumPackageFormat.TOSCA_YAML;
- } else {
- return null;
+ /**
+ * get package format enum.
+ *
+ * @param format package format
+ * @return package format enum
+ */
+ public static EnumPackageFormat getPackageFormat(String format) {
+ if("xml".equals(format)) {
+ return EnumPackageFormat.TOSCA_XML;
+ } else if("yml".equals(format) || "yaml".equals(format)) {
+ return EnumPackageFormat.TOSCA_YAML;
+ } else {
+ return null;
+ }
}
- }
}
-
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/generalconfig/OnBoardingSteps.json b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/generalconfig/OnBoardingSteps.json
index ca69f285..729e700d 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/generalconfig/OnBoardingSteps.json
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/generalconfig/OnBoardingSteps.json
@@ -6,19 +6,19 @@
"oper":[
{
"operId":"upload_id_1",
- "operName":"Validation Step 1 Execute"
+ "operName":"Validation Step 1: Extract the CSAR package"
},
{
"operId":"upload_id_2",
- "operName":"Validation Step 2 Execute"
+ "operName":"Validation Step 2: Check CSAR Integrity"
},
{
"operId":"upload_id_3",
- "operName":"Validation Step 3 Execute"
+ "operName":"Validation Step 3: Validate CSAR Meta Data file or MainService file"
},
{
"operId":"upload_id_4",
- "operName":"Validation Step 4 Execute"
+ "operName":"Validation Step 4: Validate and scan TOSCA Meta Data"
}
]
},
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/webapp/WEB-INF/web.xml b/vnfmarket-be/vnf-sdk-marketplace/src/main/webapp/WEB-INF/web.xml
index 8dc5575c..e9ab3ca3 100644
--- a/vnfmarket-be/vnf-sdk-marketplace/src/main/webapp/WEB-INF/web.xml
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/webapp/WEB-INF/web.xml
@@ -9,17 +9,34 @@
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
- <param-value>org.onap.vnfsdk.marketplace.resource</param-value>
+ <param-value>io.swagger.jaxrs.listing,
+ org.onap.vnfsdk.marketplace.resource
+ </param-value>
</init-param>
<init-param>
<param-name>jersey.config.server.provider.classnames</param-name>
<param-value>org.glassfish.jersey.media.multipart.MultiPartFeature</param-value>
- </init-param>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey RESTful Application</servlet-name>
<url-pattern>/onapapi/vnfsdk-marketplace/v1/*</url-pattern>
- </servlet-mapping>
+ </servlet-mapping>
+
+ <servlet>
+ <servlet-name>Jersey2Config</servlet-name>
+ <servlet-class>io.swagger.jersey.config.JerseyJaxrsConfig</servlet-class>
+ <init-param>
+ <param-name>api.version</param-name>
+ <param-value>1.0.0</param-value>
+ </init-param>
+ <init-param>
+ <param-name>swagger.api.basepath</param-name>
+ <param-value>/onapapi/vnfsdk-marketplace/v1</param-value>
+ </init-param>
+ <load-on-startup>2</load-on-startup>
+ </servlet>
<filter>
<filter-name>CorsFilter</filter-name>
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/webapp/apidocs/index.html b/vnfmarket-be/vnf-sdk-marketplace/src/main/webapp/apidocs/index.html
new file mode 100644
index 00000000..d6005ca1
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/webapp/apidocs/index.html
@@ -0,0 +1,61 @@
+<!-- HTML for static distribution bundle build -->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="UTF-8">
+ <title>Swagger UI</title>
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet">
+ <link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
+ <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
+ <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
+ <style>
+ html
+ {
+ box-sizing: border-box;
+ overflow: -moz-scrollbars-vertical;
+ overflow-y: scroll;
+ }
+
+ *,
+ *:before,
+ *:after
+ {
+ box-sizing: inherit;
+ }
+
+ body
+ {
+ margin:0;
+ background: #fafafa;
+ }
+ </style>
+ </head>
+
+ <body>
+ <div id="swagger-ui"></div>
+
+ <script src="./swagger-ui-bundle.js"> </script>
+ <script src="./swagger-ui-standalone-preset.js"> </script>
+ <script>
+ window.onload = function() {
+
+ // Build a system
+ const ui = SwaggerUIBundle({
+ url: "/onapapi/vnfsdk-marketplace/v1/swagger.json",
+ dom_id: '#swagger-ui',
+ deepLinking: true,
+ presets: [
+ SwaggerUIBundle.presets.apis,
+ SwaggerUIStandalonePreset
+ ],
+ plugins: [
+ SwaggerUIBundle.plugins.DownloadUrl
+ ],
+ layout: "StandaloneLayout"
+ })
+
+ window.ui = ui
+ }
+ </script>
+ </body>
+</html>