Merge "update jquery.dataTables.js version to 1.10.11"
diff --git a/openo-portal/portal-auth/src/main/webapp/user/changePassword.html b/openo-portal/portal-auth/src/main/webapp/user/changePassword.html
index 3b98703..1cf987b 100644
--- a/openo-portal/portal-auth/src/main/webapp/user/changePassword.html
+++ b/openo-portal/portal-auth/src/main/webapp/user/changePassword.html
@@ -20,7 +20,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="/openoui/auth/v1/user/css/component.css">
<link rel="stylesheet" type="text/css" href="/openoui/auth/v1/user/css/user.css">
- <script type="text/javascript" src="/openoui/auth/v1/user/3rd_lib/jquery-1.11.1.min.js"></script>
+ <script type="text/javascript" src="/openoui/common/thirdparty/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="/openoui/auth/v1/user/js/userTools.js"></script>
<script type="text/javascript" src="/openoui/auth/v1/user/js/changePassword.js"></script>
</head>
diff --git a/openo-portal/portal-auth/src/main/webapp/user/createUser.html b/openo-portal/portal-auth/src/main/webapp/user/createUser.html
index ff12593..14283fd 100644
--- a/openo-portal/portal-auth/src/main/webapp/user/createUser.html
+++ b/openo-portal/portal-auth/src/main/webapp/user/createUser.html
@@ -21,7 +21,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="/openoui/auth/v1/user/css/component.css">
<link rel="stylesheet" type="text/css" href="/openoui/auth/v1/user/css/user.css">
- <script type="text/javascript" src="/openoui/auth/v1/user/3rd_lib/jquery-1.11.1.min.js"></script>
+ <script type="text/javascript" src="/openoui/common/thirdparty/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="/openoui/auth/v1/user/js/userTools.js"></script>
<script type="text/javascript" src="/openoui/auth/v1/user/js/createUser.js"></script>
</head>
diff --git a/openo-portal/portal-auth/src/main/webapp/user/modifyUser.html b/openo-portal/portal-auth/src/main/webapp/user/modifyUser.html
index 2c3bdca..6a4abba 100644
--- a/openo-portal/portal-auth/src/main/webapp/user/modifyUser.html
+++ b/openo-portal/portal-auth/src/main/webapp/user/modifyUser.html
@@ -21,7 +21,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="stylesheet" type="text/css" href="/openoui/auth/v1/user/css/component.css">
<link rel="stylesheet" type="text/css" href="/openoui/auth/v1/user/css/user.css">
- <script type="text/javascript" src="/openoui/auth/v1/user/3rd_lib/jquery-1.11.1.min.js"></script>
+ <script type="text/javascript" src="/openoui/common/thirdparty/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="/openoui/auth/v1/user/js/userTools.js"></script>
<script type="text/javascript" src="/openoui/auth/v1/user/js/modifyUser.js"></script>
diff --git a/openo-portal/portal-auth/src/main/webapp/user/user.html b/openo-portal/portal-auth/src/main/webapp/user/user.html
index 3905063..dbd0adc 100644
--- a/openo-portal/portal-auth/src/main/webapp/user/user.html
+++ b/openo-portal/portal-auth/src/main/webapp/user/user.html
@@ -19,10 +19,10 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <link rel="stylesheet" type="text/css" href="/openoui/auth/v1/user/3rd_lib/jquery.dataTables.min.css">
- <script type="text/javascript" src="/openoui/auth/v1/user/3rd_lib/jquery-1.11.1.min.js"></script>
- <script type="text/javascript" src="/openoui/auth/v1/user/3rd_lib/bootbox.min.js"></script>
- <script type="text/javascript" charset="utf8" src="/openoui/auth/v1/user/3rd_lib/jquery.dataTables.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="/openoui/common/thirdparty/data-table/jquery.dataTables.min.css">
+ <script type="text/javascript" src="/openoui/common/thirdparty/jquery/jquery-1.11.2.min.js"></script>
+ <script type="text/javascript" src="/openoui/common/thirdparty/bootbox/bootbox.min.js"></script>
+ <script type="text/javascript" charset="utf8" src="/openoui/common/thirdparty/data-table/jquery.dataTables.min.js"></script>
<link rel="stylesheet" type="text/css" href="/openoui/auth/v1/user/css/component.css">
<script type="text/javascript" src="/openoui/auth/v1/user/js/userTools.js"></script>
<script type="text/javascript" src="/openoui/auth/v1/user/js/user.js"></script>
diff --git a/openo-portal/portal-catalog/pom.xml b/openo-portal/portal-catalog/pom.xml
index cca1acb..c49813b 100644
--- a/openo-portal/portal-catalog/pom.xml
+++ b/openo-portal/portal-catalog/pom.xml
@@ -23,8 +23,6 @@
<artifactId>openo-portal</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
- <groupId>oopeno-portal.catalog</groupId>
- <artifactId>catalog</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <artifactId>portal-catalog</artifactId>
<packaging>pom</packaging>
</project>
diff --git a/openo-portal/portal-common/pom.xml b/openo-portal/portal-common/pom.xml
index ba32aaa..d5444ed 100644
--- a/openo-portal/portal-common/pom.xml
+++ b/openo-portal/portal-common/pom.xml
@@ -21,7 +21,6 @@
<groupId>org.openo.gso.gui</groupId>
<artifactId>openo-portal</artifactId>
<version>1.0.0-SNAPSHOT</version>
- <relativePath></relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
diff --git a/openo-portal/portal-extsys/pom.xml b/openo-portal/portal-extsys/pom.xml
index ded01b8..c59e720 100644
--- a/openo-portal/portal-extsys/pom.xml
+++ b/openo-portal/portal-extsys/pom.xml
@@ -19,14 +19,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>openo-portal</groupId>
- <artifactId>openo-portal</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <relativePath/>
+ <groupId>org.openo.gso.gui</groupId>
+ <artifactId>openo-portal</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
</parent>
-
- <groupId>openo-portal.module.extsys</groupId>
- <artifactId>module-extsys</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <artifactId>portal-extsys</artifactId>
<packaging>pom</packaging>
</project>
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/css/sdn.css b/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/css/sdn.css
deleted file mode 100644
index 558ac20..0000000
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/css/sdn.css
+++ /dev/null
@@ -1,492 +0,0 @@
-/**
- * Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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.
- */
-body {
- font-family: microsoft yahei !important;
-}
-
-/* blue pill (inspired by iTunes)
-*******************************************************************************/
-
-.grey {
- background-color: #e5e5e5;
- color: #333;
-}
-
-.blue {
-
- background-color: #5b9bd1;
- border-radius: 20px;
- color: #fff;
- font-weight: bold;
- padding: 8px 0;
- text-align: center;
- width: 100px;
-}
-
-.blue:hover {
- background-color: #e8f3fd;
- color: #5b9bd1;
-}
-
-.blue.selected {
- border: 0;
- background-color: #5b9bd1;
- color: #fff;
-}
-
-.blue.selected:hover {
- border: 0;
- background-color: #5b9bd1;
- color: #fff;
-}
-
-p {
- color: #444;
- font-size: 14px;
- font-weight: normal;
- line-height: 21px;
- margin: 0 0 12px 0;
-}
-
-p.credit {
- border-top: 1px solid #ccc;
- font-size: 14px;
- line-height: 140%;
- margin: 36px 0 12px 0;
- padding: 8px 0 0 0;
- text-align: center;
-}
-
-ul.column {
- float: left;
- list-style: none;
- width: 675px;
-}
-
-ul.column li {
- background: #eee;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- -webkit-box-shadow: inset 0 1px 1px 0 #c7c7c7;
- box-shadow: inset 0 1px 1px 0 #c7c7c7;
- float: left;
- margin: 10px 0 0 10px;
- display: block;
- height: 150px;
- text-align: center;
- width: 215px;
-}
-
-/* Clear Floated Elements
-------------------------------------------------------------------------------*/
-.column:after,.button-collection:after,.clearfix:after,div.project-info:after
- {
- clear: both;
- content: ' ';
- display: block;
- font-size: 0;
- line-height: 0;
- visibility: hidden;
- width: 0;
- height: 0;
-}
-
-.container-fluid {
- background-color:white !important;
- min-height:500px;
-}
-
-.nav-tabs {
- border: 0;
-}
-
-.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus
- {
- border: 0;
- border-top: 3px solid #F3565D;
-}
-
-.nav-tabs>li>a {
- border-radius: 0;
-}
-
-.nav-tabs>li>a:hover {
- background-color: #f1f3fa;
- border: 1Px solid #f1f3fa;
-}
-
-.c3 {
- margin-top: 120px;
-}
-
-.skills-chart-breadcrumb {
-
-}
-
-.blue:selected {
- border: 0;
- background-color: #5b9bd1;
-}
-
-.btn {
- /* border-width: 0; */
- /* padding: 7px 14px; */
- /* font-size: 14px; */
- /* outline: none !important; */
- /* background-image: none !important; */
- /* filter: none; */
- /* -webkit-box-shadow: none; */
- -moz-box-shadow: none;
- /* box-shadow: none; */
- /* text-shadow: none; */
-}
-
-select {
- border-width: 1px;
- padding: 4px 1px;
- border-radius: 4px;
-}
-
-.input-sm {
- padding: 4px 10px;
-}
-
-.btn-block {
- display: block;
- width: 100%;
- padding-left: 0;
- padding-right: 0;
-}
-
-/* Bootstrap buttons */
-
-
-.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active
- {
- color: #333;
- background-color: #ededed;
- border-color: #b3b3b3;
-}
-
-.open .btn-default.dropdown-toggle {
- color: #333;
- background-color: #ededed;
- border-color: #b3b3b3;
-}
-
-.btn-default:active,.btn-default.active {
- background-image: none;
- background-color: #e0e0e0;
- font-weight: bold;
-}
-
-.btn-default:active:hover,.btn-default.active:hover {
- background-color: #e6e6e6;
-}
-
-.open .btn-default.dropdown-toggle {
- background-image: none;
-}
-
-.btn-default.disabled,.btn-default.disabled:hover,.btn-default.disabled:focus,.btn-default.disabled:active,.btn-default.disabled.active,.btn-default[disabled],.btn-default[disabled]:hover,.btn-default[disabled]:focus,.btn-default[disabled]:active,.btn-default[disabled].active,fieldset[disabled] .btn-default,fieldset[disabled] .btn-default:hover,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:active,fieldset[disabled] .btn-default.active
- {
- background-color: #fff;
- border-color: #ccc;
-}
-
-.btn-default .badge {
- color: #fff;
- background-color: #333;
-}
-
-
-.btn-default>i[class^="icon-"],.btn-default>i[class*="icon-"] {
- color: #8c8c8c;
-}
-
-div[data-name="tab_zone"] div {
- background-color: #f1f3fa;
- padding: 0px;
-}
-
-div[data-name="cond_zone"] div {
- background-color: #fff;
- margin-top: 15px;
- margin-bottom: 15px;
-}
-
-div[data-name="res-conds-zone"] {
- display: inline;
-}
-
-div[data-name="res-conds-zone"] select,div[data-name="res-conds-zone"] span
- {
- /**height:33px;*/
- margin-left: 15px;
- color: #5b9bd1;
- border-color: #ccc;
- font-weight: bold;
-}
-
-.input{
- width:250px;
- height: 34px;
- padding: 6px 12px;
- font-size: 14px;
- line-height: 1.42857143;
- color: #555;
- background-color: #fff;
- background-image: none;
- border: 1px solid #ccc;
- border-radius: 4px;
- -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
- -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
- transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
-}
-
-div.separator {
- margin: 20px;
-}
-
-div.separator div {
- text-align: center;
- line-height: 0;
-}
-
-div.separator-line {
- height: 1px !important;
- width: 100%;
- background: #ddd;
- overflow: hidden;
-}
-
-.dropdown-toggle {
- color: #5b9bd1;
-}
-
-.calendar-date {
- color: #5b9bd1;
-}
-
-.range_inputs {
- color: #5b9bd1;
-}
-
-.btn.dropdown-toggle,.btn-group .btn.dropdown-toggle,.btn:hover,.btn:disabled,.btn[disabled],.btn:focus,.btn:active,.btn.active
- {
- outline: none !important;
- background-image: none !important;
- filter: none;
- -webkit-box-shadow: none;
- -moz-box-shadow: none;
- box-shadow: none;
- text-shadow: none;
-}
-
-#skills-chart-breadcrumb {
- margin-bottom: 10px
-}
-
-/*增加daterangepicker的css*/
-input[name="daterange"] {
- width: 220px;
- line-height: 0;
- height: 31px;
- vertical-align: top;
- margin-top: 2px;
-}
-
-.daterangepicker .ranges {
- width: 205px;
-}
-
-.daterangepicker .ranges input {
- width: 95px !important;
-}
-
-td.details-control {
- background: url('../images/details_open.png') no-repeat center center;
- cursor: pointer;
-}
-
-tr.shown td.details-control {
- background: url('../images/details_close.png') no-repeat center center;
-}
-
-.details table td {
- word-wrap: break-word;
- word-break: normal;
- border-top: 1px solid #dddddd;
-}
-
-.details table tr:first-child td {
- border-top: none;
-}
-
-.details table {
- table-layout: fixed;
- width: 100%;
-}
-
-td.title {
- width: 10%;
-}
-
-table.dataTable tbody th,table.dataTable tbody td {
- padding: 8px 10px;
-}
-
-div.dataTables_length,div.dataTables_info {
- display: inline;
-}
-
-div.dataTables_paginate {
- display: inline;
- float: right;
-}
-
-div.pagination-panel {
- margin-right: 10px;
-}
-
-input.pagination-panel-input {
- width: 50px;
-}
-
-#ict_res_table_div {
- margin-top: 15px;
-}
-
-#ict_res_table_div label {
- font-weight: 100;
-}
-
-.daterangepicker .daterangepicker_start_input label,.daterangepicker .daterangepicker_end_input label
- {
- color: #5b9bd1;
-}
-
-.daterangepicker .ranges .input-mini {
- color: #5b9bd1;
-}
-
-.cancelBtn {
- padding: 5px 10px 5px 10px;
-}
-
-.btn:focus,.btn:active:focus,.btn.active:focus {
- outline: 0;
-}
-
-#ict_res_table_div table {
- width: 100% !important;
-}
-
-.control-label .required {
- color: #e02222;
- font-size: 12px;
- padding-left: 2px;
-}
-
-#ict_vim_table tbody tr{
- cursor:pointer;
-}
-
-
-/*卡片面板样式*/
-.animated-panel {
- -webkit-animation-duration: .5s;
- animation-duration: .5s;
- -webkit-animation-fill-mode: both;
- animation-fill-mode: both;
-}
-
-.hpanel {
- background-color: none;
- border: none;
- box-shadow: none;
- margin-bottom: 25px;
-
-}
-
-.hpanel .panel-body {
- border: 1px solid #e4e5e7;
- border-radius: 2px;
- padding: 20px;
- position: relative;
-}
-.h-200 {
- min-height: 220px;
-}
-
-.m-t-xl {
- margin-top: 40px;
-}
-
-.m-t-xl div {
- margin-bottom: 15px;
-}
-
-.text-success {
- color: #0d638f;
-}
-.hpanel > .panel-footer {
- color: inherit;
- border: 1px solid #e4e5e7;
- border-top: none;
- font-size: 90%;
- background: #f7f9fa;
- height:40px;
- padding: 5px 15px;
-}
-.color_cloud{
- color:#ccc;
-}
-.stats-title{
-
-}
-
-h3{
- margin-top: 10px;
- margin-bottom: 40px;
- font-weight: 200;
-}
-
-.blue-font{
- color:#428bca;
-}
-
-.hpanel > .panel-footer .pull-right a{
- margin-left: 5px;
-}
-
-.hpanel > .panel-footer .pull-right .btn{
- min-width: 30px !important;
-}
-
-.font-bold {
- font-weight: 600;
- margin-bottom: 15px;
-}
-
-.hpanel_show{
- background-color: #f7f9fa;
-}
-
-.sdn-padding {
- padding-left: 0;
-}
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/i18n/loadi18nApp.js b/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/i18n/loadi18nApp.js
deleted file mode 100644
index df99343..0000000
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/i18n/loadi18nApp.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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 loadPropertiesSideMenu(lang, propertiesFileNamePrefix, propertiesFilePath){
- jQuery.i18n.properties({
- language:lang,
- name:propertiesFileNamePrefix,
- path:propertiesFilePath,
- mode:'map',
- callback: function() {
- var i18nItems = $('[name_i18n=org_openo_nfv_roc_ui_i18n]');
- for(var i=0;i<i18nItems.length;i++){
- var $item = $(i18nItems.eq(i));
- var itemId = $item.attr('id');
- var itemTitle = $item.attr('title');
- if(typeof($item.attr("title")) == "string"){
- $item.attr("title", ($.i18n.prop(itemTitle)));
- }
- if(undefined != itemId && typeof($item.attr("placeholder"))=="undefined"){
- $item.text($.i18n.prop(itemId));
- }else if(undefined != itemId && typeof($item.attr("placeholder"))!="undefined"){
- $item.attr("placeholder", $.i18n.prop(itemId));
- }
- }
- }
- });
-}
-var lang = getLanguage();
-loadPropertiesSideMenu(lang, 'roc-sdn-iui-i18n', 'i18n/');
-
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/i18n/roc-sdn-iui-i18n-en-US.properties b/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/i18n/roc-sdn-iui-i18n-en-US.properties
deleted file mode 100644
index efdaea5..0000000
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/i18n/roc-sdn-iui-i18n-en-US.properties
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)
-#
-# 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.
-#
-
-roc-sdn-iui-common-tip=Tip:
-
-roc-sdn-iui-text-register=Register SDN controller info
-
-roc-sdn-iui-message-growl-msg-title=SDN controller info
-roc-sdn-iui-message-query-fail=Query SDN controller failed.
-roc-sdn-iui-message-save-success=Save successfully.
-roc-sdn-iui-message-save-fail=Save failed.
-roc-sdn-iui-message-update-success=Update successfully.
-roc-sdn-iui-message-update-fail=Update failed.
-roc-sdn-iui-message-delete-confirm=Do you want to delete the current SDN controller?
-roc-sdn-iui-message-delete-success=SDN controller deleted successfully.
-roc-sdn-iui-message-delete-fail=SDN controller deleted failed.
-
-roc-sdn-iui-text-update=Modify SDN controller info
-roc-sdn-iui-text-registerBtn=Register
-roc-sdn-iui-text-name=Name
-roc-sdn-iui-text-type=Type
-roc-sdn-iui-text-userName=Username
-roc-sdn-iui-text-password=Password
-roc-sdn-iui-text-cancelBtn=Cancel
-roc-sdn-iui-text-saveBtn=Save
-roc-sdn-iui-text-status-normal=Normal
-roc-sdn-iui-text-status-fail=Alarm
-roc-sdn-iui-text-total=Total
-roc-sdn-iui-text-total-sdn= of SDN Controller
-
-roc-sdn-iui-validate-name=Please enter a name
-roc-sdn-iui-validate-url-required=Please enter the right URL
-roc-sdn-iui-validate-url=Example: http://10.0.0.1:8181
-roc-sdn-iui-validate-username=Please enter a username
-roc-sdn-iui-validate-password=Please enter a password
-roc-sdn-iui-text-url-tip=Example: http://10.0.0.1:8181
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/i18n/roc-sdn-iui-i18n-zh-CN.properties b/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/i18n/roc-sdn-iui-i18n-zh-CN.properties
deleted file mode 100644
index a8e7dbc..0000000
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/i18n/roc-sdn-iui-i18n-zh-CN.properties
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)
-#
-# 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.
-#
-
-roc-sdn-iui-common-tip=提示:
-
-roc-sdn-iui-text-register=注册SDN控制器信息
-
-roc-sdn-iui-message-growl-msg-title=SDN控制器信息
-roc-sdn-iui-message-query-fail=查询SDN控制器失败。
-roc-sdn-iui-message-save-success=保存成功。
-roc-sdn-iui-message-save-fail=保存失败。
-roc-sdn-iui-message-update-success=修改成功。
-roc-sdn-iui-message-update-fail=修改失败。
-roc-sdn-iui-message-delete-confirm=确定删除所选SDN控制器信息?
-roc-sdn-iui-message-delete-success=删除成功。
-roc-sdn-iui-message-delete-fail=删除失败。
-
-roc-sdn-iui-text-update=修改SDN控制器信息
-roc-sdn-iui-text-registerBtn=注册
-roc-sdn-iui-text-name=名称
-roc-sdn-iui-text-type=类型
-roc-sdn-iui-text-userName=用户名
-roc-sdn-iui-text-password=密码
-roc-sdn-iui-text-cancelBtn=取消
-roc-sdn-iui-text-saveBtn=保存
-roc-sdn-iui-text-status-normal=正常
-roc-sdn-iui-text-status-fail=报警
-roc-sdn-iui-text-total=共
-roc-sdn-iui-text-total-sdn= SDN控制器
-
-roc-sdn-iui-validate-name=请输入名称
-roc-sdn-iui-validate-url-required=请输入正确的URL
-roc-sdn-iui-validate-url=例如:http://10.0.0.1:8181
-roc-sdn-iui-validate-username=请输入用户名
-roc-sdn-iui-validate-password=请输入密码
-roc-sdn-iui-text-url-tip=例如:http://10.0.0.1:8181
\ No newline at end of file
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/js/sdn-validate.js b/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/js/sdn-validate.js
deleted file mode 100644
index 21b711a..0000000
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/js/sdn-validate.js
+++ /dev/null
@@ -1,67 +0,0 @@
-$(function () {
- var form = $('#sdn_form');
- var error = $('.alert-danger', form);
- var success = $('.alert-success', form);
-
- form.validate({
- doNotHideMessage : true, //this option enables to show the error/success messages on tab switch.
- errorElement : 'span', //default input error message container
- errorClass : 'help-block', // default input error message class
- focusInvalid : false, // do not focus the last invalid input
- rules : {
- name : {
- required : true,
- maxlength : 20
- },
- url : {
- required : true,
- url : true
- },
- userName : {
- required : true,
- maxlength : 20
- },
- password : {
- required : true,
- maxlength : 20
- }
- },
- messages : {
- name : {
- required : $.i18n.prop("roc-sdn-iui-validate-name")
- },
- url : {
- required : $.i18n.prop("roc-sdn-iui-validate-url-required"),
- url : $.i18n.prop("roc-sdn-iui-validate-url")
- },
- userName : {
- required : $.i18n.prop('roc-sdn-iui-validate-username')
- },
- password : {
- required : $.i18n.prop('roc-sdn-iui-validate-password')
- }
- },
- errorPlacement : function (error, element) { // render error placement for each input type
- error.insertAfter(element); // for other inputs, just perform default behavior
- },
- invalidHandler : function (event, validator) { //display error alert on form submit
- success.hide();
- error.show();
- },
- highlight : function (element) { // hightlight error inputs
- $(element).closest('.form-group').removeClass('has-success').addClass('has-error'); // set error class to the control group
- },
- unhighlight : function (element) { // revert the change done by hightlight
- $(element).closest('.form-group').removeClass('has-error'); // set error class to the control group
- },
- success : function (label) {
- label.addClass('valid') // mark the current input as valid and display OK icon
- .closest('.form-group').removeClass('has-error'); // set success class to the control group
- },
- submitHandler : function (form) {
- success.show();
- error.hide();
- //add here some ajax code to submit your form or just call form.submit() if you want to submit the form without ajax
- }
- });
-});
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/js/sdnController.js b/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/js/sdnController.js
deleted file mode 100644
index 0b6c5c2..0000000
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/js/sdnController.js
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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.
- */
-
-var vm = avalon
- .define({
- $id : "sdnController",
- sdnInfo : [],
- server_rtn : {
- info_block : false,
- warning_block : false,
- rtn_info : "",
- $RTN_SUCCESS : "RTN_SUCCESS",
- $RTN_FAILED : "RTN_FAILED"
- },
- $Status : {
- success : "active",
- failed : "inactive"
- },
- $restUrl : {
- querySdnControllerInfoUrl : '/openoapi/extsys/v1/sdncontrollers',
- addSdnControllerInfoUrl : '/openoapi/extsys/v1/sdncontrollers',
- updateSdnControllerInfoUrl : '/openoapi/extsys/v1/sdncontrollers',
- delSdnControllerInfoUrl : '/openoapi/extsys/v1/sdncontrollers'
- },
- $htmlText : {
- saveSuccess : $.i18n.prop("roc-sdn-iui-message-save-success"),
- saveFail : $.i18n.prop("roc-sdn-iui-message-save-fail"),
- updateSuccess : $.i18n.prop("roc-sdn-iui-message-update-success"),
- updateFail : $.i18n.prop("roc-sdn-iui-message-update-fail")
- },
- $initTable : function () {
- $.ajax({
- "type" : 'GET',
- "url" : vm.$restUrl.querySdnControllerInfoUrl,
- "dataType" : "json",
- "success" : function (resp) {
- if (resp.operationResult == "SUCCESS") {
- vm.sdnInfo = (resp == null) ? [] : resp.data;
- } else {
- vm.sdnInfo = [];
- bootbox.alert($.i18n.prop("roc-sdn-iui-message-query-fail"));
- return;
- }
- },
- error : function (XMLHttpRequest, textStatus, errorThrown) {
- bootbox.alert($.i18n.prop("roc-sdn-iui-message-query-fail") + ":" + textStatus + ":" + errorThrown);
- return;
- },
- complete : function () {
- sdnUtil.tooltipSdnStatus();
- }
- });
- },
- $sdnType : {
- condName : $.i18n.prop("roc-sdn-iui-text-type"),
- component_type : 'select',
- selectItems : [{
- cond_value : 'ODL',
- name : "ODL",
- value : true
- }, {
- cond_value : 'ONOS',
- name : "ONOS",
- value : true
- }
- ]
- },
- addSdn : {
- title : $.i18n.prop("roc-sdn-iui-text-register"),
- sdnId : "",
- name : "",
- type : "ODL",
- typeDisabled : false,
- url : "",
- urlTip : $.i18n.prop("roc-sdn-iui-text-url-tip"),
- userName : "",
- password : "",
- saveType : "add"
- },
- $showSdnTable : function () {
- vm.addSdn.title = $.i18n.prop("roc-sdn-iui-text-register"),
- vm.addSdn.sdnId = "";
- vm.addSdn.name = "";
- vm.addSdn.type = "ODL";
- vm.addSdn.typeDisabled = false;
- vm.addSdn.url = "";
- vm.addSdn.userName = "";
- vm.addSdn.password = "";
- vm.addSdn.saveType = "add";
- vm.server_rtn.warning_block = false;
- vm.server_rtn.info_block = false;
-
- $(".form-group").each(function () {
- $(this).removeClass('has-success');
- $(this).removeClass('has-error');
- $(this).find(".help-block[id]").remove();
- });
- $("#addSdnDlg").modal("show");
- },
- $saveSdn : function () {
- var form = $('#sdn_form');
- if (form.valid() == false) {
- return false;
- }
- vm.server_rtn.info_block = true;
- vm.server_rtn.warning_block = false;
- vm.addSdn.status = vm.$Status.success;
-
- var param = {
- name : vm.addSdn.name,
- controllerType : $("#type").val(),
- url : vm.addSdn.url,
- userName : vm.addSdn.userName,
- password : vm.addSdn.password
- }
- if (vm.addSdn.saveType == "add") {
- for( var i = 0; i < vm.sdnInfo.length; i ++ ){
- if(vm.addSdn.url == vm.sdnInfo[i].url){
- sdnUtil.growl($.i18n.prop("roc-sdn-iui-message-growl-msg-title") + 'already exist',"info");
- $('#addSdnDlg').modal('hide');
- return;
- }
- }
- $.ajax({
- type : "POST",
- url : vm.$restUrl.addSdnControllerInfoUrl,
- data : JSON.stringify(param),
- dataType : "json",
- contentType : "application/json",
- success : function (data) {
- vm.server_rtn.info_block = false;
- vm.server_rtn.warning_block = false;
- if (data) {
- vm.sdnInfo = [];
- vm.$initTable();
-
- $('#addSdnDlg').modal('hide');
- sdnUtil.showMessage(vm.$htmlText.saveSuccess, "success");
- } else {
- vm.server_rtn.warning_block = true;
- vm.server_rtn.rtn_info = vm.$htmlText.saveFail;
- sdnUtil.showMessage(vm.$htmlText.saveFail, "failed");
- }
- },
- error : function (XMLHttpRequest, textStatus, errorThrown) {
- vm.server_rtn.warning_block = true;
- vm.server_rtn.rtn_info = textStatus + ":" + errorThrown;
- vm.server_rtn.info_block = false;
- }
- });
- } else {
- $.ajax({
- type : "PUT",
- url : vm.$restUrl.updateSdnControllerInfoUrl + vm.addSdn.sdnId,
- data : JSON.stringify(param),
- dataType : "json",
- contentType : "application/json",
- success : function (data) {
- vm.server_rtn.info_block = false;
- vm.server_rtn.warning_block = false;
- if (data) {
- for (var i = 0; i < vm.sdnInfo.length; i++) {
- if (vm.sdnInfo[i].sdnControllerInstanceId == vm.addSdn.sdnId) {
- vm.sdnInfo[i].name = vm.addSdn.name;
- vm.sdnInfo[i].type = $("#type").val();
- vm.sdnInfo[i].url = vm.addSdn.url;
- vm.sdnInfo[i].userName = vm.addSdn.userName;
- vm.sdnInfo[i].password = vm.addSdn.password;
- }
- }
- $('#addSdnDlg').modal('hide');
- sdnUtil.showMessage(vm.$htmlText.updateSuccess, "success");
- } else {
- vm.server_rtn.warning_block = true;
- vm.server_rtn.rtn_info = vm.$htmlText.updateFail;
- sdnUtil.showMessage(vm.$htmlText.updateFail, "failed");
- }
- },
- error : function (XMLHttpRequest, textStatus, errorThrown) {
- vm.server_rtn.warning_block = true;
- vm.server_rtn.rtn_info = textStatus + ":" + errorThrown;
- vm.server_rtn.info_block = false;
- }
- });
- }
- },
- });
-avalon.scan();
-vm.$initTable();
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/js/sdnUtil.js b/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/js/sdnUtil.js
deleted file mode 100644
index 59062fc..0000000
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/js/sdnUtil.js
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)
- *
- * 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.
- */
-var sdnUtil = {};
-
-sdnUtil.delSdn = function (el) {
- bootbox.confirm($.i18n.prop("roc-sdn-iui-message-delete-confirm"), function (result) {
- if (result) {
- $.ajax({
- type : "DELETE",
- url : vm.$restUrl.delSdnControllerInfoUrl + el.sdnControllerInstanceId,
- dataType : "json",
- success : function (data) {
- if (data) {
- for (var i = 0; i < vm.sdnInfo.length; i++) {
- if (el.sdnControllerInstanceId == vm.sdnInfo[i].sdnControllerInstanceId) {
- vm.sdnInfo.splice(i, 1);
- break;
- }
- }
- sdnUtil.showMessage($.i18n.prop("roc-sdn-iui-message-delete-success"), "success");
- } else {
- sdnUtil.showMessage($.i18n.prop("roc-sdn-iui-message-delete-fail"), "warning");
- }
- },
- error : function () {
- sdnUtil.showMessage($.i18n.prop("roc-sdn-iui-message-delete-fail"), "warning");
- }
- });
- }
- });
-}
-
-sdnUtil.updateSdn = function (data) {
- vm.addSdn.sdnId = data.sdnControllerInstanceId;
- vm.addSdn.name = data.name;
- vm.addSdn.type = data.controllerType;
- vm.addSdn.typeDisabled = true;
- vm.addSdn.url = data.url;
- vm.addSdn.userName = data.userName;
- vm.addSdn.password = data.password;
- vm.addSdn.saveType = "update";
- vm.addSdn.title = $.i18n.prop("roc-sdn-iui-text-update");
- vm.server_rtn.info_block = false;
- vm.server_rtn.warning_block = false;
-
- $(".form-group").each(function () {
- $(this).removeClass('has-success');
- $(this).removeClass('has-error');
- $(this).find(".help-block[id]").remove();
- });
- $("#addSdnDlg").modal("show");
-}
-
-sdnUtil.tooltipSdnStatus = function () {
- $("[data-toggle='tooltip']").tooltip();
-}
-
-sdnUtil.growl = function (message, type) {
- $.growl({
- icon : "fa fa-envelope-o fa-lg",
- title : " Notice: ",
- message : message + " "
- }, {
- type : type
- });
-}
-
-sdnUtil.showMessage = function(message, type) {
- $.growl({
- icon: "fa fa-envelope-o fa-lg",
- title: " " + $.i18n.prop("roc-sdn-iui-common-tip"),
- message: message
- },{
- type: type
- });
-};
diff --git a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/sdnView.html b/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/sdnView.html
deleted file mode 100644
index 16fc12e..0000000
--- a/openo-portal/portal-extsys/src/main/webapp/extsys/sdn/sdnView.html
+++ /dev/null
@@ -1,173 +0,0 @@
-<!--
-
- Copyright (C) 2015 ZTE, Inc. and others. All rights reserved. (ZTE)
-
- 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>
-<head lang="en">
-<meta charset="UTF-8">
-<title></title>
-<link href="../component/thirdparty/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
-<link href="../component/thirdparty/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
-<link href="../component/thirdparty/uniform/css/uniform.default.min.css" rel="stylesheet" type="text/css"/>
-<link href="../component/css/ZteIctIcons/style.css" rel="stylesheet" type="text/css"/>
-<link href="../framework/css/ngict-component.css" rel="stylesheet" type="text/css"/>
-<link href="../vendor/animate/animate.min.css" rel="stylesheet" type="text/css"/>
-<link href="css/sdn.css" rel="stylesheet" type="text/css"/>
-<style>
-.ms-controller {
- visibility: hidden
-}
-</style>
-
-</head>
-<body>
- <div class="ms-controller container-fluid" ms-controller="sdnController" >
- <div id="addSdnDlg" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
- <div class="modal-dialog">
- <div class="modal-content Changepasswd">
- <div class="content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4 id="myModalLabel">{{addSdn.title}}</h4>
- </div>
- <div class="modal-body">
- <form class="form-horizontal" id="sdn_form" role="form">
- <input type="hidden" ms-duplex="addSdn.sdnId" name="sdnId" class="form-control" />
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="roc-sdn-iui-text-name" name_i18n="org_openo_nfv_roc_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addSdn.name" name="name" class="form-control"/>
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="roc-sdn-iui-text-type" name_i18n="org_openo_nfv_roc_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <select class="form-control" id="type" ms-each="$sdnType.selectItems" ms-duplex="addSdn.type" ms-attr-disabled="addSdn.typeDisabled">
- <option ms-attr-value='el.cond_value'>{{el.name}}</option>
- </select>
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span>URL</span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addSdn.url" name="url" class="form-control"
- ms-attr-placeholder="addSdn.urlTip"/>
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="roc-sdn-iui-text-userName" name_i18n="org_openo_nfv_roc_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="text" ms-duplex="addSdn.userName" name="userName" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- <div class="form-group">
- <label class="control-label col-sm-3">
- <span id="roc-sdn-iui-text-password" name_i18n="org_openo_nfv_roc_ui_i18n"></span>
- <span class="required" aria-required="true">*</span>
- </label>
- <div class="col-sm-7">
- <input type="password" ms-duplex="addSdn.password" name="password" class="form-control" />
- <span class="help-block"></span>
- </div>
- </div>
- </form>
- </div>
- <div class="modal-footer">
- <button class="btn" data-dismiss="modal" aria-hidden="true" id="roc-sdn-iui-text-cancelBtn" name_i18n="org_openo_nfv_roc_ui_i18n"></button>
- <button class="btn btn-primary" type="submit" ms-click="$saveSdn" id="roc-sdn-iui-text-saveBtn" name_i18n="org_openo_nfv_roc_ui_i18n"></button>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="row-fluid" data-name="cond_zone">
- <div class="col-md-12">
- <button class="btn white radius_l" id="app-new-btn" ms-click="$showSdnTable" >
- <i class="ict-new"></i> <span id="roc-sdn-iui-text-registerBtn" name_i18n="org_openo_nfv_roc_ui_i18n"></span>
- </button>
- </div>
- </div>
-
- <div class="col-sm-12 sdn-padding" ms-each-el="sdnInfo">
-
- <div class="col-sm-4 animated-panel zoomIn" style="-webkit-animation-delay: 0.1s;">
- <div class="hpanel stats" >
- <div class="panel-body h-200" ms-hover="hpanel_show" >
- <div class="pull-left">
- <span class="label label-success" id="roc-sdn-iui-text-status-normal" name_i18n="org_openo_nfv_roc_ui_i18n"></span>
- </div>
- <div class="stats-icon pull-right">
- <i class="fa fa-server fa-5x color_cloud"></i>
- </div>
- <div class="m-t-xl">
- <h3 ms-text="el.name"></h3>
- <div><span id="roc-sdn-iui-text-type" name_i18n="org_openo_nfv_roc_ui_i18n"></span> : <span ms-text="el.controllerType"></span></div>
- <div>URL : <span ms-text="el.url"></span></div>
- </div>
- </div>
- <div class="panel-footer">
- <div class="pull-right">
- <a class="btn btn-default btn-sm" ms-click="sdnUtil.updateSdn(el.$model)"><i class="fa fa-pencil-square-o fa-lg"></i></a>
- <a class="btn btn-default btn-sm" ms-click="sdnUtil.delSdn(el)"><i class="fa fa-trash-o fa-lg"> </i></a>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="col-sm-12">
- <div class="pull-left text-muted">
- <small><span id="roc-sdn-iui-text-total" name_i18n="org_openo_nfv_roc_ui_i18n"></span> <span class="blue-font" ms-text="sdnInfo.size()"></span> <span id="roc-sdn-iui-text-total-sdn" name_i18n="org_openo_nfv_roc_ui_i18n"></span></small>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="../component/thirdparty/jquery/jquery-1.10.2.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/jquery.i18n/jquery.i18n.properties-1.0.9.js"></script>
- <script type="text/javascript" src="../component/thirdparty/bootstrap/js/bootstrap.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/bootbox/bootbox.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/jquery-validation/js/jquery.validate.min.js"></script>
- <script type="text/javascript" src="../component/thirdparty/jquery-validation/js/additional-methods.min.js"></script>
-
- <script type="text/javascript" src="../vendor/bootstrap-growl/bootstrap-growl.min.js"></script>
- <script type="text/javascript" src="../vendor/cometd/cometd.js"></script>
- <script type="text/javascript" src="../vendor/cometd/jquery.cometd.js"></script>
- <script type="text/javascript" src="../vendor/avalon/avalon.js"></script>
-
- <script type="text/javascript" src="../framework/js/tools.js"></script>
-
- <script type="text/javascript" src="i18n/loadi18nApp.js"></script>
-
- <script type="text/javascript" src="js/sdn-validate.js"></script>
- <script type="text/javascript" src="js/sdnUtil.js"></script>
- <script type="text/javascript" src="js/sdnController.js"></script>
-</body>
-</html>
\ No newline at end of file
diff --git a/servicegateway/deployment/pom.xml b/servicegateway/deployment/pom.xml
index 01a1af5..88d6f4e 100644
--- a/servicegateway/deployment/pom.xml
+++ b/servicegateway/deployment/pom.xml
@@ -1,4 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2016 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">
<modelVersion>4.0.0</modelVersion>
<parent>
@@ -18,7 +33,7 @@
<dependency>
<groupId>org.openo.common-services.common-utilities</groupId>
<artifactId>commonlib-cbb</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
diff --git a/servicegateway/deployment/src/main/release/Swagger.json b/servicegateway/deployment/src/main/release/Swagger.json
new file mode 100644
index 0000000..211a954
--- /dev/null
+++ b/servicegateway/deployment/src/main/release/Swagger.json
@@ -0,0 +1,304 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "version": "1.0",
+ "contact": {
+ "name": "Xiangli Jia",
+ "email": "jiaxiangli@huawei.com"
+ },
+ "title": "ServiceGateway Northbound Interface",
+ "description": "Northbound Interface of ServiceGateway to be used by LifecycleMgr GUI. only service instantiation and termination.\nAll operations are synchronous.",
+ "license": {
+ "name": "Apache 2.0",
+ "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
+ }
+ },
+ "schemes": [
+ "http"
+ ],
+ "basePath": "/openoapi/servicegateway/v1",
+ "consumes": [
+ "application/json"
+ ],
+ "produces": [
+ "application/json"
+ ],
+ "paths": {
+ "/services": {
+ "post": {
+ "summary": "Send the create request to the corresponding module.",
+ "description": "it will send create request to the corresponding module.",
+ "operationId": "guiCreationPost",
+ "consumes": [
+ "application/json;charset=UTF-8"
+ ],
+ "produces": [
+ "application/json;charset=UTF-8"
+ ],
+ "parameters": [
+ {
+ "in": "body",
+ "name": "guiRequest",
+ "description": "the request used to create a service instance with the specified uri.",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/CreationRequest"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "create service instance success.",
+ "schema": {
+ "$ref": "#/definitions/CreationResponse"
+ }
+ },
+ "400": {
+ "description": "create service instance failure as parameters invalid.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ },
+ "401": {
+ "description": "unauthorized.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ },
+ "404": {
+ "description": "create service instance failure as can't reach server.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ },
+ "500": {
+ "description": "create service instance failure as internal error.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ },
+ "/services/{serviceId}/terminate": {
+ "post": {
+ "summary": "Send the delete request to the corresponding module",
+ "description": "it will send a terminate request to the corresponding module.",
+ "operationId": "guiTerminationPost",
+ "consumes": [
+ "application/json;charset=UTF-8"
+ ],
+ "produces": [
+ "application/json;charset=UTF-8"
+ ],
+ "parameters": [
+ {
+ "name": "serviceId",
+ "in": "path",
+ "description": "ID of the service instance to be terminated",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "body",
+ "name": "guiTerminationRequest",
+ "description": "the request used to terminate a service instance",
+ "required": true,
+ "schema": {
+ "$ref": "#/definitions/TerminationRequest"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "service instance is under-terminating. Job id is returned.",
+ "schema": {
+ "$ref": "#/definitions/LongOperationResponse"
+ }
+ },
+ "400": {
+ "description": "terminate service instance failure as parameters invalid.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ },
+ "401": {
+ "description": "unauthorized.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ },
+ "404": {
+ "description": "terminate service instance failure as can't reach server.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ },
+ "500": {
+ "description": "terminate service instance failure as internal error.",
+ "schema": {
+ "$ref": "#/definitions/Error"
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "CreationRequest": {
+ "description": "Service Instance Creation Request",
+ "type": "object",
+ "required": [
+ "gatewayUri"
+ ],
+ "properties": {
+ "nsdId": {
+ "type": "string",
+ "description": "ID of the template in catalog used to create the SDN-O/NFV-O service instance"
+ },
+ "gatewayUri": {
+ "type": "string",
+ "description": "uri of the corresponding service restful API to be created for GSO/SDN-O/NFV-O"
+ },
+ "description": {
+ "type": "string",
+ "description": "description of the GSO/SDN-O/NFV-O service instance to be created"
+ },
+ "parentid": {
+ "type": "string",
+ "description": "ID of the GSO service instance to be created"
+ },
+ "name": {
+ "type": "string",
+ "description": "name of the GSO service instance to be created"
+ },
+ "serviceDefId": {
+ "type": "string",
+ "description": "ID of the GSO service instance to be created"
+ },
+ "templateId": {
+ "type": "string",
+ "description": "ID of the GSO service instance to be created"
+ },
+ "templateName": {
+ "type": "string",
+ "description": "ID of the GSO service instance to be created"
+ },
+ "nsName": {
+ "type": "string",
+ "description": "ID of the GSO service instance to be created"
+ },
+ "nsInstanceId": {
+ "type": "string",
+ "description": "ID of the GSO service instance to be created"
+ },
+ "additionalParamForNs": {
+ "description": "parameters used to instantiate this SDN-O/NFV-O service instance",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/TemplateParameter"
+ }
+ },
+ "parameters": {
+ "description": "parameters used to instantiate this GSO service instance",
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/TemplateParameter"
+ }
+ }
+ }
+ },
+ "CreationResponse": {
+ "description": "Service Instance Creation Response",
+ "type": "object",
+ "required": [
+ "serviceId"
+ ],
+ "properties": {
+ "serviceId": {
+ "type": "string",
+ "description": "ID of the service instance that is created."
+ }
+ }
+ },
+ "TemplateParameter": {
+ "description": "parameter used to instantiate its service instance. it's fundamentally a name-value pair.",
+ "type": "object",
+ "required": [
+ "name",
+ "value"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "name of the parameter"
+ },
+ "value": {
+ "type": "string",
+ "description": "value of the parameter"
+ }
+ }
+ },
+ "LongOperationResponse": {
+ "description": "Response for operation that takes a long time, i.e., a job id.",
+ "type": "object",
+ "required": [
+ "jobId"
+ ],
+ "properties": {
+ "jobId": {
+ "type": "string",
+ "description": "ID of the job that is executing some long operation"
+ }
+ }
+ },
+ "TerminationRequest": {
+ "description": "Service Instance Termination Request.",
+ "type": "object",
+ "required": [
+ "operation",
+ "gatewayUri"
+ ],
+ "properties": {
+ "operation": {
+ "type": "string",
+ "description": "type of the GSO/SDN-O/NFV-O service instance to be terminated"
+ },
+ "gatewayUri": {
+ "type": "string",
+ "description": "uri of the GSO/SDN-O/NFV-O service instance to be terminated"
+ },
+ "nsInstanceId": {
+ "type": "string",
+ "description": "id of the SDN-O/NFV-O service instance to be terminated"
+ },
+ "terminationType": {
+ "type": "string",
+ "description": "type of SDN-O/NFV-O termination. graceful or not, etc."
+ },
+ "gracefulTerminationTimeout": {
+ "type": "string",
+ "description": "timeout value for a graceful timeout,just only SDN-O."
+ }
+ }
+ },
+ "Error": {
+ "type": "object",
+ "required": [
+ "errorCode"
+ ],
+ "properties": {
+ "errorCode": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "status": {
+ "type": "string"
+ },
+ "statusDescription": {
+ "type": "string"
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/servicegateway/deployment/src/main/release/bin/start.sh b/servicegateway/deployment/src/main/release/bin/start.sh
index ffb4528..235b319 100644
--- a/servicegateway/deployment/src/main/release/bin/start.sh
+++ b/servicegateway/deployment/src/main/release/bin/start.sh
@@ -1,52 +1,19 @@
+#*******************************************************************************
+# Copyright 2016 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.
+#*******************************************************************************
#!/bin/bash
-#check user
-CUR_PATH=$(cd `dirname $0`;pwd)
-SCRIPT_PATH=$0
-IPMC_USER="`stat -c '%U' ${SCRIPT_PATH}`"
-export IPMC_USER
-CURRENT_USER="`/usr/bin/id -u -n`"
-if [ "${IPMC_USER}" != "${CURRENT_USER}" ]
-then
- echo "only ${IPMC_USER} can execute this script."
- exit 1
-fi
-
-umask 027
-
-if [ -z "$JAVA_HOME" ]
-then
- echo "There is no JAVA_HOME"
- exit 1
-fi
-
-if [ -z "$CATALINA_HOME" ]
-then
- echo "There is no CATALINA_HOME"
- exit 1
-fi
-
-if [ -z "$APP_ROOT" ]
-then
- echo "There is no APP_ROOT"
- exit 1
-fi
-
-
-
-export CATALINA_BASE=$APP_ROOT
-export COMPLETE_PROCESS_NAME=$PROCESS_NAME-$NODE_ID-$PROCESS_SLOT
-LOG_PATH=$_APP_LOG_DIR/$COMPLETE_PROCESS_NAME
-
-JAVA_OPTS="-Dfile.encoding=UTF-8"
-JAVA_OPTS="$JAVA_OPTS -Dlog.dir=$LOG_PATH"
-export TOMCAT_LOG_DIR=$_APP_LOG_DIR/$COMPLETE_PROCESS_NAME/tomcatlog
-mkdir -p $TOMCAT_LOG_DIR
-export TOMCAT_WORK_DIR=$_APP_SHARE_DIR/$COMPLETE_PROCESS_NAME/tomcatwork
-export CATALINA_OUT=$TOMCAT_LOG_DIR/catalina.out
-JAVA_OPTS="$JAVA_OPTS -DTOMCAT_LOG_DIR=$TOMCAT_LOG_DIR -DTOMCAT_WORK_DIR=$TOMCAT_WORK_DIR -DNFW=$COMPLETE_PROCESS_NAME -Dprocname=$COMPLETE_PROCESS_NAME "
-export JAVA_OPTS="$JAVA_OPTS -server -Xms32m -Xmx256m -XX:InitialCodeCacheSize=32m -XX:ReservedCodeCacheSize=64m -XX:MetaspaceSize=32m -XX:MaxMetaspaceSize=128m -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=62 -XX:-UseLargePages -XX:+UseFastAccessorMethods -XX:+CMSClassUnloadingEnabled -Dbsp.app.datasource=ServiceGatewaydb"
-export LOGGING_CONFIG="-DNFW=$COMPLETE_PROCESS_NAME -Djava.util.logging.config.file=$CATALINA_BASE/conf/logging.properties"
-
-$CATALINA_HOME/bin/catalina.sh start
-
-result=0;$CUR_PATH/../../../../manager/agent/tools/shscript/syslogutils.sh "$(basename $0)" "$result" "Execute($#):$CUR_PATH/$0 $@";exit $result
+cd ..
+export CATALINA_BASE=$(cd `dirname $0`; pwd)
+catalina.sh start
\ No newline at end of file
diff --git a/servicegateway/deployment/src/main/release/bin/stop.sh b/servicegateway/deployment/src/main/release/bin/stop.sh
index 9ac855f..bcc6043 100644
--- a/servicegateway/deployment/src/main/release/bin/stop.sh
+++ b/servicegateway/deployment/src/main/release/bin/stop.sh
@@ -1,15 +1,19 @@
+#*******************************************************************************
+# Copyright 2016 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.
+#*******************************************************************************
#!/bin/bash
-#check user
-CUR_PATH=$(cd `dirname $0`;pwd)
-SCRIPT_PATH=$0
-IPMC_USER="`stat -c '%U' ${SCRIPT_PATH}`"
-export IPMC_USER
-CURRENT_USER="`/usr/bin/id -u -n`"
-if [ "${IPMC_USER}" != "${CURRENT_USER}" ]
-then
- echo "only ${IPMC_USER} can execute this script."
- exit 1
-fi
-kill -9 $PID
-
-result=0;$CUR_PATH/../../../../manager/agent/tools/shscript/syslogutils.sh "$(basename $0)" "$result" "Execute($#):$CUR_PATH/$0 $@";exit $result
+cd ..
+export CATALINA_BASE=$(cd `dirname $0`; pwd)
+catalina.sh stop
\ No newline at end of file
diff --git a/servicegateway/deployment/src/main/release/conf/catalina.policy b/servicegateway/deployment/src/main/release/conf/catalina.policy
index 244334e..89f49d8 100644
--- a/servicegateway/deployment/src/main/release/conf/catalina.policy
+++ b/servicegateway/deployment/src/main/release/conf/catalina.policy
@@ -1,32 +1,18 @@
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-// ============================================================================
-// catalina.policy - Security Policy Permissions for Tomcat 7
-//
-// This file contains a default set of security policies to be enforced (by the
-// JVM) when Catalina is executed with the "-security" option. In addition
-// to the permissions granted here, the following additional permissions are
-// granted to each web application:
-//
-// * Read access to the web application's document root directory
-// * Read, write and delete access to the web application's working directory
-// ============================================================================
-
-
-// ========== SYSTEM CODE PERMISSIONS =========================================
+/*
+ * Copyright 2016 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.
+ */
// These permissions apply to javac
diff --git a/servicegateway/deployment/src/main/release/conf/catalina.properties b/servicegateway/deployment/src/main/release/conf/catalina.properties
index ef375e1..a833f71 100644
--- a/servicegateway/deployment/src/main/release/conf/catalina.properties
+++ b/servicegateway/deployment/src/main/release/conf/catalina.properties
@@ -1,12 +1,11 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
+# Copyright 2016 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.
diff --git a/servicegateway/deployment/src/main/release/conf/context.xml b/servicegateway/deployment/src/main/release/conf/context.xml
index 79ad60d..2c8f59c 100644
--- a/servicegateway/deployment/src/main/release/conf/context.xml
+++ b/servicegateway/deployment/src/main/release/conf/context.xml
@@ -1,11 +1,19 @@
<?xml version='1.0' encoding='utf-8'?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under
- the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may
- obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to
- in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
- ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under
- the License. -->
+<!--
+ Copyright 2016 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.
+-->
<!-- The contents of this file will be loaded for each web application -->
<Context>
diff --git a/servicegateway/deployment/src/main/release/conf/server.xml b/servicegateway/deployment/src/main/release/conf/server.xml
index ffd05e8..40eb5ff 100644
--- a/servicegateway/deployment/src/main/release/conf/server.xml
+++ b/servicegateway/deployment/src/main/release/conf/server.xml
@@ -1,92 +1,46 @@
-<?xml version='1.0' encoding='utf-8'?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under
- the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may
- obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to
- in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
- ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under
- the License. -->
-<!-- Note: A "Server" is not itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation
- at /docs/config/server.html -->
-<Server port="-1" shutdown="SHUTDOWN">
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2016 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.
+-->
+<!-- Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" at this level.
+ Documentation at /docs/config/server.html
+ -->
+<Server port="8306" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener" />
- <!-- Security listener. Documentation at /docs/config/listeners.html <Listener className="org.apache.catalina.security.SecurityListener"
- /> -->
- <!--APR library loader. Documentation at /docs/apr.html -->
- <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
- <!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html -->
- <Listener className="org.apache.catalina.core.JasperListener" />
- <!-- Prevent memory leaks due to use of particular java/javax APIs -->
+ <Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
-
- <!-- Global JNDI resources Documentation at /docs/jndi-resources-howto.html -->
<GlobalNamingResources>
- <!-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -->
- <Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be updated and saved"
- factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml" />
+ <Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
+ name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase" />
</GlobalNamingResources>
-
- <!-- A "Service" is a collection of one or more "Connectors" that share a single "Container" Note: A "Service" is not
- itself a "Container", so you may not define subcomponents such as "Valves" at this level. Documentation at /docs/config/service.html -->
<Service name="Catalina">
-
- <!--The connectors can use a shared executor, you can define one or more named thread pools -->
- <!-- <Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="150" minSpareThreads="4"/> -->
-
-
- <!-- A "Connector" represents an endpoint by which requests are received and responses are returned. Documentation
- at : Java HTTP Connector: /docs/config/http.html (blocking & non-blocking) Java AJP Connector: /docs/config/ajp.html APR
- (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL/TLS HTTP/1.1 Connector on port 8080 -->
-
- <Connector port="8300" protocol="org.openo.cloudsop.initconfig.tool.CustomHttp11Protocol" scheme="https"
- sslEnabledProtocols="TLSv1.2" connectionTimeout="20000" maxPostSize="2097152" maxHttpHeaderSize="8192"
- allowTrace="false" />
-
- <!-- A "Connector" using the shared thread pool -->
- <!-- <Connector executor="tomcatThreadPool" port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"
- /> -->
- <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 This connector uses the NIO implementation that requires the
- JSSE style configuration. When using the APR/native implementation, the OpenSSL style configuration is required as described
- in the APR/native documentation -->
- <!-- <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="150" SSLEnabled="true"
- scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" /> -->
-
- <!-- Define an AJP 1.3 Connector on port 8009 -->
- <!-- <Connector port="18009" protocol="AJP/1.3" redirectPort="8443" /> -->
-
-
- <!-- An Engine represents the entry point (within Catalina) that processes every request. The Engine implementation
- for Tomcat stand alone analyzes the HTTP headers included with the request, and passes them on to the appropriate Host (virtual
- host). Documentation at /docs/config/engine.html -->
-
- <!-- You should set jvmRoute to support load-balancing via AJP ie : <Engine name="Catalina" defaultHost="localhost"
- jvmRoute="jvm1"> -->
- <Engine name="Catalina" defaultHost="localhost">
-
- <!--For clustering, please take a look at documentation at: /docs/cluster-howto.html (simple how to) /docs/config/cluster.html
- (reference documentation) -->
- <!-- <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/> -->
-
- <!-- Use the LockOutRealm to prevent attempts to guess user passwords via a brute-force attack -->
+ <Connector connectionTimeout="20000" port="8503" protocol="HTTP/1.1" redirectPort="8443" />
+ <Connector port="8305" protocol="AJP/1.3" redirectPort="8443" />
+ <Engine defaultHost="localhost" name="Catalina">
<Realm className="org.apache.catalina.realm.LockOutRealm">
- <!-- This Realm uses the UserDatabase configured in the global JNDI resources under the key "UserDatabase".
- Any edits that are performed against this UserDatabase are immediately available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase" />
</Realm>
- <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="false" deployOnStartup="false">
- <!-- SingleSignOn valve, share authentication between web applications Documentation at: /docs/config/valve.html -->
- <!-- <Valve className="org.apache.catalina.authenticator.SingleSignOn" /> -->
- <Context path="/" reloadable="false" docBase="ROOT" workDir="${TOMCAT_WORK_DIR}">
- <Manager className="com.huawei.cloudsop.tomcat.api.session.StandardManagerExt" />
- </Context>
- <!-- Access log processes all example. Documentation at: /docs/config/valve.html Note: The pattern used is
- equivalent to using pattern="common" -->
- <Valve className="com.huawei.cloudsop.tomcat.api.log.AccessLogValveExt" pattern="%h %l %u %t "%r" %s %b %{x-request-id}i" />
-
+ <Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
+ <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
+ pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log" suffix=".txt" />
+ <Context docBase="ROOT" path="" reloadable="true" />
</Host>
</Engine>
</Service>
-</Server>
+</Server>
\ No newline at end of file
diff --git a/servicegateway/deployment/src/main/release/conf/web.xml b/servicegateway/deployment/src/main/release/conf/web.xml
index c763600..4cd9d09 100644
--- a/servicegateway/deployment/src/main/release/conf/web.xml
+++ b/servicegateway/deployment/src/main/release/conf/web.xml
@@ -1,11 +1,19 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
-<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under
- the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may
- obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to
- in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
- ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under
- the License. -->
+<!--
+ Copyright 2016 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.
+-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
diff --git a/servicegateway/deployment/src/main/release/etc/conf/license.txt b/servicegateway/deployment/src/main/release/etc/conf/license.txt
new file mode 100644
index 0000000..bebcc7f
--- /dev/null
+++ b/servicegateway/deployment/src/main/release/etc/conf/license.txt
@@ -0,0 +1,473 @@
+THIS LICENSE FILE CONTAINS THE LICENSE APPLICABLE DEPENDING ON THE TYPE OF CONTRIBUTIONS.
+
+APACHE LICENSE 2 IS APPLICABLE FOR SOURCE CODE, CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL FOR DOCUMENTATION
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Attribution 4.0 International
+
+https://creativecommons.org/licenses/by/4.0/legalcode
+
+---------------------------------------------------------------------------------------
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More_considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+
+---------------------------------------------------------------------------------------
+
+Creative Commons Attribution 4.0 International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution 4.0 International Public License ("Public License"). To the
+extent this Public License may be interpreted as a contract, You are
+granted the Licensed Rights in consideration of Your acceptance of
+these terms and conditions, and the Licensor grants You such rights in
+consideration of benefits the Licensor receives from making the
+Licensed Material available under these terms and conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+
+ c. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+
+ d. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+
+ f. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+
+ g. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+
+ h. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+
+ i. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+
+ j. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+
+ k. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+ a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part; and
+
+ b. produce, reproduce, and Share Adapted Material.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+
+ b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+ a. Attribution.
+
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+
+ 4. If You Share Adapted Material You produce, the Adapter's
+ License You apply must not prevent recipients of the Adapted
+ Material from complying with this Public License.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database;
+
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+
+---------------------------------------------------------------------------------------
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the "Licensor." The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org.
diff --git a/servicegateway/deployment/src/main/release/etc/framework/tracker.properties b/servicegateway/deployment/src/main/release/etc/framework/tracker.properties
deleted file mode 100644
index 68eddf2..0000000
--- a/servicegateway/deployment/src/main/release/etc/framework/tracker.properties
+++ /dev/null
@@ -1 +0,0 @@
-roa.tracker.class=org.openo.gso.commonsvc.servicegateway.talc.impl.TrackerManagerImpl
diff --git a/servicegateway/deployment/src/main/release/etc/log4j/log4j-app.properties b/servicegateway/deployment/src/main/release/etc/log4j/log4j-app.properties
deleted file mode 100644
index 1653372..0000000
--- a/servicegateway/deployment/src/main/release/etc/log4j/log4j-app.properties
+++ /dev/null
@@ -1,50 +0,0 @@
-log4j.rootLogger=WARN,root
-log4j.logger.access=WARN,access
-log4j.logger.org.openo.baseservice.log4operation.System=info,log4operation
-log4j.logger.org.openo.baseservice.base.launcher=info,apploader
-log4j.logger.org.openo.baseservice.framework.appmgr=info,apploader
-log4j.logger.org.openo.baseservice.framework.apploader=info,apploader
-log4j.logger.org.openo.baseservice.framework.appmgrimpl=info,apploader
-
-log4j.additivity.access=true
-log4j.additivity.org.openo.baseservice.log4operation.System=false
-log4j.additivity.org.openo.baseservice.base.launcher=false
-log4j.additivity.org.openo.baseservice.framework.appmgr=false
-log4j.additivity.org.openo.baseservice.framework.apploader=false
-log4j.additivity.org.openo.baseservice.framework.appmgrimpl=false
-
-log4j.appender.access.Append=true
-log4j.appender.access.File=log/access
-log4j.appender.access.layout.ConversionPattern=%d %-5p [%t][%X{moduleID}][%C %L] %m%n
-log4j.appender.access.layout=org.apache.log4j.PatternLayout
-log4j.appender.access.MaxBackupIndex=50
-log4j.appender.access.MaxFileSize=20MB
-log4j.appender.access=org.openo.baseservice.log4j.extend.OssRollingFileAppender
-
-
-log4j.appender.root.Append=true
-log4j.appender.root.File=log/root
-log4j.appender.root.layout.ConversionPattern=%d %-5p [%t][%X{moduleID}][%C %L] %m%n
-log4j.appender.root.layout=org.apache.log4j.PatternLayout
-log4j.appender.root.MaxBackupIndex=50
-log4j.appender.root.MaxFileSize=20MB
-log4j.appender.root=org.openo.baseservice.log4j.extend.OssRollingFileAppender
-
-
-log4j.appender.log4operation=org.openo.baseservice.log4j.extend.OssRollingFileAppender
-log4j.appender.log4operation.useNewThread4Zip=false
-log4j.appender.log4operation.File=operation/log4operation-System
-log4j.appender.log4operation.MaxFileSize=10MB
-log4j.appender.log4operation.MaxBackupIndex=10
-log4j.appender.log4operation.layout=org.apache.log4j.PatternLayout
-log4j.appender.log4operation.layout.ConversionPattern=%d %p [%c] - %m%n
-log4j.appender.log4operation.permission=600
-
-log4j.appender.apploader=org.openo.baseservice.log4j.extend.OssRollingFileAppender
-log4j.appender.apploader.File=log/apploader
-log4j.appender.apploader.MaxFileSize=50MB
-log4j.appender.apploader.MaxBackupIndex=30
-log4j.appender.apploader.Append=true
-log4j.appender.apploader.layout=org.apache.log4j.PatternLayout
-log4j.appender.apploader.layout.ConversionPattern=%d %-5p [%t][%X{moduleID}][%C %L] %m%n
-log4j.appender.apploader.moduleID=Apploader
diff --git a/servicegateway/deployment/src/main/release/etc/platformversion.xml b/servicegateway/deployment/src/main/release/etc/platformversion.xml
deleted file mode 100644
index add9ab0..0000000
--- a/servicegateway/deployment/src/main/release/etc/platformversion.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<config name="version">
- <param name="PLATFORM_VERSION">CloudSOP @{PLATFORM_VERSION}</param>
- <param name="VERSION_TIME">@{VERSION_TIME}</param>
-</config>
diff --git a/servicegateway/deployment/src/main/release/etc/register/license.txt b/servicegateway/deployment/src/main/release/etc/register/license.txt
new file mode 100644
index 0000000..bebcc7f
--- /dev/null
+++ b/servicegateway/deployment/src/main/release/etc/register/license.txt
@@ -0,0 +1,473 @@
+THIS LICENSE FILE CONTAINS THE LICENSE APPLICABLE DEPENDING ON THE TYPE OF CONTRIBUTIONS.
+
+APACHE LICENSE 2 IS APPLICABLE FOR SOURCE CODE, CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL FOR DOCUMENTATION
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Attribution 4.0 International
+
+https://creativecommons.org/licenses/by/4.0/legalcode
+
+---------------------------------------------------------------------------------------
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More_considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+
+---------------------------------------------------------------------------------------
+
+Creative Commons Attribution 4.0 International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution 4.0 International Public License ("Public License"). To the
+extent this Public License may be interpreted as a contract, You are
+granted the Licensed Rights in consideration of Your acceptance of
+these terms and conditions, and the Licensor grants You such rights in
+consideration of benefits the Licensor receives from making the
+Licensed Material available under these terms and conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+
+ c. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+
+ d. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+
+ f. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+
+ g. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+
+ h. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+
+ i. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+
+ j. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+
+ k. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+ a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part; and
+
+ b. produce, reproduce, and Share Adapted Material.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+
+ b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+ a. Attribution.
+
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+
+ 4. If You Share Adapted Material You produce, the Adapter's
+ License You apply must not prevent recipients of the Adapted
+ Material from complying with this Public License.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database;
+
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+
+---------------------------------------------------------------------------------------
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the "Licensor." The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org.
diff --git a/servicegateway/deployment/src/main/release/etc/register/service.json b/servicegateway/deployment/src/main/release/etc/register/service.json
index 5d32dd0..ef7fc16 100644
--- a/servicegateway/deployment/src/main/release/etc/register/service.json
+++ b/servicegateway/deployment/src/main/release/etc/register/service.json
@@ -7,7 +7,7 @@
"nodes" : [
{
"ip" : "getInputIP",
- "port" : "8301",
+ "port" : "8305",
"ttl" : 0
}
]
diff --git a/servicegateway/deployment/src/main/release/init/post_install.sh b/servicegateway/deployment/src/main/release/init/post_install.sh
deleted file mode 100644
index 959acc5..0000000
--- a/servicegateway/deployment/src/main/release/init/post_install.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-#check user
-if [ "root" = "`/usr/bin/id -u -n`" ];then
- echo "root has been forbidden to execute the shell."
- exit 1
-fi
-
-if [[ -z ${APP_ROOT} ]];then
- echo "APP_ROOT is empty."
- exit 1
-fi
-
-if [[ -z ${_APP_LOG_DIR} ]];then
- echo "_APP_LOG_DIR is empty."
- exit 1
-fi
-
-#HORNETQ_CONF=$APP_ROOT/etc
-
-#chmod 400 $HORNETQ_CONF/engine.json
diff --git a/servicegateway/deployment/src/main/release/license.txt b/servicegateway/deployment/src/main/release/license.txt
new file mode 100644
index 0000000..bebcc7f
--- /dev/null
+++ b/servicegateway/deployment/src/main/release/license.txt
@@ -0,0 +1,473 @@
+THIS LICENSE FILE CONTAINS THE LICENSE APPLICABLE DEPENDING ON THE TYPE OF CONTRIBUTIONS.
+
+APACHE LICENSE 2 IS APPLICABLE FOR SOURCE CODE, CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL FOR DOCUMENTATION
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Attribution 4.0 International
+
+https://creativecommons.org/licenses/by/4.0/legalcode
+
+---------------------------------------------------------------------------------------
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More_considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+
+---------------------------------------------------------------------------------------
+
+Creative Commons Attribution 4.0 International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution 4.0 International Public License ("Public License"). To the
+extent this Public License may be interpreted as a contract, You are
+granted the Licensed Rights in consideration of Your acceptance of
+these terms and conditions, and the Licensor grants You such rights in
+consideration of benefits the Licensor receives from making the
+Licensed Material available under these terms and conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+
+ c. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+
+ d. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+
+ f. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+
+ g. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+
+ h. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+
+ i. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+
+ j. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+
+ k. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+ a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part; and
+
+ b. produce, reproduce, and Share Adapted Material.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+
+ b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+ a. Attribution.
+
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+
+ 4. If You Share Adapted Material You produce, the Adapter's
+ License You apply must not prevent recipients of the Adapted
+ Material from complying with this Public License.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database;
+
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+
+---------------------------------------------------------------------------------------
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the "Licensor." The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org.
diff --git a/servicegateway/deployment/src/main/release/pub/app_define.json b/servicegateway/deployment/src/main/release/pub/app_define.json
deleted file mode 100644
index 83f9f9d..0000000
--- a/servicegateway/deployment/src/main/release/pub/app_define.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "fileVersion": "1",
- "name": "ServiceGateway",
- "description": "ServiceGateway",
- "requireDiskSize": 50,
- "rtspSoftLink": true,
- "upgrade": {
- "use": {
- "jre": "~1.3"
- },
- "postInstall": {
- "command": [
- "${APP_ROOT}/init/post_install.sh"
- ],
- "timeout": 300
- },
- "check": {
- "command": [
- "${APP_ROOT}/upgrade/check.sh"
- ],
- "timeout": 30
- },
- "upgrade": {
- "command": [
- "${APP_ROOT}/upgrade/init.sh"
- ],
- "timeout": 300
- }
- },
- "processes": {
- "ServiceGateway": {
- "use": {
- "jre": "~1.3",
- "tomcat": "~9.0"
- },
- "subscribes": [
- {
- "name": "iamcacheproxy",
- "srv_ctx": {},
- "ins_ctx": {}
- },
- {
- "name": "iamcore",
- "srv_ctx": {},
- "ins_ctx": {}
- }
- ],
- "mode": "cluster",
- "cpu": 0.5,
- "memory": 1024,
- "memoryLimit": 4096,
- "patterns": [
- "!/rest/ServiceGateway/v1",
- "/rest/ServiceGateway_portal/v1"
- ],
- "useAdditionalEnv": [
- "_APP_LOG_DIR",
- "_APP_TMP_DIR",
- "_APP_SHARE_DIR"
- ],
- "protocols": {
- "IR": "http"
- },
- "commands": {
- "start": [
- "${APP_ROOT}/bin/start.sh"
- ],
- "stop": [
- "${APP_ROOT}/bin/stop.sh"
- ]
- }
- }
- },
- "databases": {
- "ServiceGatewaydb": {
- "type": [
- "mysql"
- ],
- "serviceName": "ServiceGatewaydb",
- "dataSize": 4096,
- "logSize": 128,
- "sharding": false,
- "defaultShardingNumber": 1
- }
- },
- "redis": {
- "ServiceGatewayrdb": {
- "serviceName": "ServiceGatewayrdb",
- "type": "cache",
- "memory": 1024,
- "dataSize": 1024,
- "sharding": false,
- "defaultShardingNumber": 1,
- "protected": true
- }
- }
-}
diff --git a/servicegateway/deployment/src/main/release/pub/i18n/en_US/app_define.properties b/servicegateway/deployment/src/main/release/pub/i18n/en_US/app_define.properties
deleted file mode 100644
index 6918a8b..0000000
--- a/servicegateway/deployment/src/main/release/pub/i18n/en_US/app_define.properties
+++ /dev/null
@@ -1,80 +0,0 @@
-servicemgr.bad_param_desc=Invalid Param
-servicemgr.bad_param_detail=Invalid Param.
-servicemgr.bad_param_reason=Invalid Param
-servicemgr.bad_param_advice=Invalid Param
-servicemgr.service.status_inprogress_desc=The service status is in process, can not operate it.
-servicemgr.service.status_inprogress_detail=The service status is in process, can not operate it.
-servicemgr.service.status_inprogress_reason=The service status is in process, can not operate it.
-servicemgr.service.status_inprogress_advice=Can not operate service when service status is in progress.
-servicemgr.service.status_active_desc=The service status is active, activate or delete service is not permitted.
-servicemgr.service.status_active_detail=The service status is active, activate or delete service is not permitted.
-servicemgr.service.status_active_reason=The service status is active, activate or delete service is not permitted.
-servicemgr.service.status_active_advice=Can not activate or delete service when service status is active.
-servicemgr.service.status_deactive_desc=The service status is deactive, deactivate service is not permitted.
-servicemgr.service.status_deactive_detail=The service status is deactive, deactivate service is not permitted.
-servicemgr.service.status_deactive_reason=The service status is deactive, deactivate service is not permitted.
-servicemgr.service.status_deactive_advice=Can not deactive service when service status service is deactive.
-servicemgr.mysql.oper_mysql_db_error_desc=Operate mysql database error.
-servicemgr.mysql.oper_mysql_db_error_detail=Operate mysql database error.
-servicemgr.mysql.oper_mysql_db_error_reason=Operate mysql database error.
-servicemgr.mysql.oper_mysql_db_error_advice=Operate mysql database error.
-servicemgr.redis.oper_redis_db_error_desc=Operate redis error.
-servicemgr.redis.oper_redis_db_error_reason=Operate redis error.
-servicemgr.redis.oper_redis_db_error_detail=Operate redis error.
-servicemgr.redis.oper_redis_db_error_advice=Operate redis error.
-servicemgr.db.oper_db_error_desc=Operate database error.
-servicemgr.db.oper_db_error_detail=Operate database error.
-servicemgr.db.oper_db_error_reason=Operate database error.
-servicemgr.db.oper_db_error_advice=Operate database error.
-servicemgr.service.not_exist_desc=Service is not exist, can not operate it.
-servicemgr.service.not_exist_detail=Service is not exist, can not operate it.
-servicemgr.service.not_exist_reason=Service is not exist, can not operate it.
-servicemgr.service.not_exist_advice=Service is not exist, can not operate it.
-servicemgr.service.status_param_error_desc=The parameter of service status is error, can not operate it.
-servicemgr.service.status_param_error_detail=The parameter of service status is error, can not operate it.
-servicemgr.service.status_param_error_reason=The parameter of service status is error, can not operate it.
-servicemgr.service.status_param_error_advice=The parameter of service status is error, can not operate it.
-servicemgr.service.service_package_status_inactive_desc=The service package status is offline.
-servicemgr.service.service_package_status_inactive_detail=The service package status is offline.
-servicemgr.service.service_package_status_inactive_reason=The service package status is offline.
-servicemgr.service.service_package_status_inactive_advice=Online the service package firstly.
-servicemgr.service.service_package_status_delete_depending_desc=The Service Package is delete pending, can't do the action.
-servicemgr.service.service_package_status_delete_depending_detail=The Service Package is delete pending, can't do the action.
-servicemgr.service.service_package_status_delete_depending_reason=The Service Package is delete pending, can't do the action.
-servicemgr.service.service_package_status_delete_depending_advice=The Service Package is delete pending, can't do the action.
-servicemgr.servicePackage.not_activation_desc=The service package status is incorrect.
-servicemgr.servicePackage.not_activation_detail=The service package status is incorrect.
-servicemgr.servicePackage.not_activation_reason=The service package status is incorrect.
-servicemgr.servicePackage.not_activation_advice=The service package status is incorrect, can not operate it.
-servicemgr.servicePageExtend.not_exist_desc=The service_page_extend is not exist, can not operate it.
-servicemgr.servicePageExtend.not_exist_detail=The service_page_extend is not exist, can not operate it.
-servicemgr.servicePageExtend.not_exist_reason=The service_page_extend is not exist, can not operate it.
-servicemgr.servicePageExtend.not_exist_advice=The service_page_extend is not exist, can not operate it.
-servicemgr.service.create_failed_desc=Service create failed, only deleting operation is permitted.
-servicemgr.service.create_failed_detail=Service create failed, only deleting operation is permitted.
-servicemgr.service.create_failed_reason=Service create failed, only deleting operation is permitted.
-servicemgr.service.create_failed_advice=Service create failed, only deleting operation is permitted.
-servicemgr.service.parameter.validate_error_desc=Service parameter validate failed.
-servicemgr.service.parameter.validate_error_detail=Service parameter validate failed.
-servicemgr.service.parameter.validate_error_reason=Service parameter validate failed.
-servicemgr.service.parameter.validate_error_advice=Service parameter validate failed.
-servicemgr.service.template.parse_error_desc=Template parse error.
-servicemgr.service.template.parse_error_detail=Template parse error.
-servicemgr.service.template.parse_error_reason=Template parse error.
-servicemgr.service.template.parse_error_advice=Template parse error.
-servicemgr.permission_denied_desc=Incorrect password.
-servicemgr.permission_denied_detail=Incorrect password.
-servicemgr.permission_denied_reason=Incorrect password.
-servicemgr.permission_denied_advice=Incorrect password.
-servicemgr.template.not_exist_desc=The template does not exist.
-servicemgr.template.not_exist_detail=The template does not exist.
-servicemgr.template.not_exist_reason=The template does not exist.
-servicemgr.template.not_exist_advice=The template does not exist.
-servicemgr.service.exist_desc=Service is exist.
-servicemgr.service.exist_detail=Service is exist.
-servicemgr.service.exist_reason=Service is exist.
-servicemgr.service.exist_advice=Service is exist.
-servicemgr.template.parameter.not_exist_desc=The parameters of template does not exist.
-servicemgr.template.parameter.not_exis_detail=The parameters of template does not exist.
-servicemgr.template.parameter.not_exis_reason=The parameters of template does not exist.
-servicemgr.template.parameter.not_exis_advice=The parameters of template does not exist.
diff --git a/servicegateway/deployment/src/main/release/pub/i18n/zh_CN/app_define.properties b/servicegateway/deployment/src/main/release/pub/i18n/zh_CN/app_define.properties
deleted file mode 100644
index b6ab626..0000000
--- a/servicegateway/deployment/src/main/release/pub/i18n/zh_CN/app_define.properties
+++ /dev/null
@@ -1,83 +0,0 @@
-name=ServiceGateway
-description=\u63d0\u4f9b\u8054\u673a\u5e2e\u52a9\u3002
-servicemgr.bad_param_desc=\u53c2\u6570\u9519\u8bef
-servicemgr.bad_param_detail=\u53c2\u6570\u9519\u8bef\u3002
-servicemgr.bad_param_reason=\u53c2\u6570\u9519\u8bef
-servicemgr.bad_param_advice=\u53c2\u6570\u9519\u8bef
-servicemgr.service.status_inprogress_desc=\u5f53\u524d\u4e1a\u52a1\u6b63\u5728\u5904\u7406\u4e2d\u65f6\uff0c\u4e0d\u80fd\u8fdb\u884c\u64cd\u4f5c\u3002
-servicemgr.service.status_inprogress_detail=\u5f53\u524d\u4e1a\u52a1\u6b63\u5728\u5904\u7406\u4e2d\u65f6\uff0c\u4e0d\u80fd\u8fdb\u884c\u64cd\u4f5c\u3002
-servicemgr.service.status_inprogress_reason=\u5f53\u524d\u4e1a\u52a1\u6b63\u5728\u5904\u7406\u4e2d\u65f6\uff0c\u4e0d\u80fd\u8fdb\u884c\u64cd\u4f5c\u3002
-servicemgr.service.status_inprogress_advice=\u5f53\u524d\u4e1a\u52a1\u6b63\u5728\u5904\u7406\u4e2d\u65f6\uff0c\u4e0d\u80fd\u8fdb\u884c\u64cd\u4f5c\u3002
-servicemgr.service.status_active_desc=\u4e1a\u52a1\u4e3a\u6fc0\u6d3b\u72b6\u6001\uff0c\u4e0d\u652f\u6301\u6fc0\u6d3b\u6216\u5220\u9664\u64cd\u4f5c\u3002
-servicemgr.service.status_active_detail=\u4e1a\u52a1\u4e3a\u6fc0\u6d3b\u72b6\u6001\uff0c\u4e0d\u652f\u6301\u6fc0\u6d3b\u6216\u5220\u9664\u64cd\u4f5c\u3002
-servicemgr.service.status_active_reason=\u4e1a\u52a1\u4e3a\u6fc0\u6d3b\u72b6\u6001\uff0c\u4e0d\u652f\u6301\u6fc0\u6d3b\u6216\u5220\u9664\u64cd\u4f5c\u3002
-servicemgr.service.status_active_advice=\u4e1a\u52a1\u4e3a\u6fc0\u6d3b\u72b6\u6001\uff0c\u4e0d\u652f\u6301\u6fc0\u6d3b\u6216\u5220\u9664\u64cd\u4f5c\u3002
-servicemgr.service.status_deactive_desc=\u4e1a\u52a1\u4e3a\u53bb\u6fc0\u6d3b\u72b6\u6001\uff0c\u4e0d\u652f\u6301\u53bb\u6fc0\u6d3b\u64cd\u4f5c\u3002
-servicemgr.service.status_deactive_detail=\u4e1a\u52a1\u4e3a\u53bb\u6fc0\u6d3b\u72b6\u6001\uff0c\u4e0d\u652f\u6301\u53bb\u6fc0\u6d3b\u64cd\u4f5c\u3002
-servicemgr.service.status_deactive_reason=\u4e1a\u52a1\u4e3a\u53bb\u6fc0\u6d3b\u72b6\u6001\uff0c\u4e0d\u652f\u6301\u53bb\u6fc0\u6d3b\u64cd\u4f5c\u3002
-servicemgr.service.status_deactive_advice=\u4e1a\u52a1\u4e3a\u53bb\u6fc0\u6d3b\u72b6\u6001\uff0c\u4e0d\u652f\u6301\u53bb\u6fc0\u6d3b\u64cd\u4f5c\u3002
-servicemgr.mysql.oper_mysql_db_error_desc=\u64cd\u4f5c\u5173\u7cfb\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.mysql.oper_mysql_db_error_detail=\u64cd\u4f5c\u5173\u7cfb\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.mysql.oper_mysql_db_error_reason=\u64cd\u4f5c\u5173\u7cfb\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.mysql.oper_mysql_db_error_advice=\u64cd\u4f5c\u5173\u7cfb\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.redis.oper_redis_db_error_desc=\u64cd\u4f5c\u7f13\u5b58\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.redis.oper_redis_db_error_reason=\u64cd\u4f5c\u7f13\u5b58\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.redis.oper_redis_db_error_detail=\u64cd\u4f5c\u7f13\u5b58\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.redis.oper_redis_db_error_advice=\u64cd\u4f5c\u7f13\u5b58\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.db.oper_db_error_desc=\u64cd\u4f5c\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.db.oper_db_error_detail=\u64cd\u4f5c\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.db.oper_db_error_reason=\u64cd\u4f5c\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.db.oper_db_error_advice=\u64cd\u4f5c\u6570\u636e\u5e93\u5931\u8d25\u3002
-servicemgr.service.not_exist_desc=\u4e1a\u52a1\u4e0d\u5b58\u5728\uff0c\u4e0d\u80fd \u8fdb\u884c\u64cd\u4f5c\u3002
-servicemgr.service.not_exist_detail=\u4e1a\u52a1\u4e0d\u5b58\u5728\uff0c\u4e0d\u80fd \u8fdb\u884c\u64cd\u4f5c\u3002
-servicemgr.service.not_exist_reason=\u4e1a\u52a1\u4e0d\u5b58\u5728\uff0c\u4e0d\u80fd \u8fdb\u884c\u64cd\u4f5c\u3002
-servicemgr.service.not_exist_advice=\u4e1a\u52a1\u4e0d\u5b58\u5728\uff0c\u4e0d\u80fd \u8fdb\u884c\u64cd\u4f5c\u3002
-servicemgr.service.status_param_error_desc=\u4e1a\u52a1\u72b6\u6001\u53c2\u6570\u5f02\u5e38\u3002
-servicemgr.service.status_param_error_detail=\u4e1a\u52a1\u72b6\u6001\u53c2\u6570\u5f02\u5e38\u3002
-servicemgr.service.status_param_error_reason=\u4e1a\u52a1\u72b6\u6001\u53c2\u6570\u5f02\u5e38\u3002
-servicemgr.service.status_param_error_advice=\u4e1a\u52a1\u72b6\u6001\u53c2\u6570\u5f02\u5e38\u3002
-servicemgr.service.service_package_status_inactive_desc=\u5f53\u524d\u4e1a\u52a1\u5305\u4e3a\u4e0b\u7ebf\u72b6\u6001\uff0c\u4e0d\u5141\u8bb8\u64cd\u4f5c\u3002
-servicemgr.service.service_package_status_inactive_detail=\u5f53\u524d\u4e1a\u52a1\u5305\u4e3a\u4e0b\u7ebf\u72b6\u6001\uff0c\u4e0d\u5141\u8bb8\u64cd\u4f5c\u3002
-servicemgr.service.service_package_status_inactive_reason=\u5f53\u524d\u4e1a\u52a1\u5305\u4e3a\u4e0b\u7ebf\u6d3b\u72b6\u6001\uff0c\u4e0d\u5141\u8bb8\u64cd\u4f5c\u3002
-servicemgr.service.service_package_status_inactive_advice=\u5f53\u524d\u4e1a\u52a1\u5305\u4e3a\u4e0b\u7ebf\u6d3b\u72b6\u6001\uff0c\u4e0d\u5141\u8bb8\u64cd\u4f5c\u3002
-servicemgr.service.service_package_status_delete_depending_desc=\u4e1a\u52a1\u5b9a\u4e49\u7684\u72b6\u6001\u662f\u5f85\u5220\u9664\uff0c\u4e0d\u80fd\u6267\u884c\u64cd\u4f5c\u3002\u3002
-servicemgr.service.service_package_status_delete_depending_detail=\u4e1a\u52a1\u5b9a\u4e49\u7684\u72b6\u6001\u662f\u5f85\u5220\u9664\uff0c\u4e0d\u80fd\u6267\u884c\u64cd\u4f5c\u3002\u3002
-servicemgr.service.service_package_status_delete_depending_reason=\u4e1a\u52a1\u5b9a\u4e49\u7684\u72b6\u6001\u662f\u5f85\u5220\u9664\uff0c\u4e0d\u80fd\u6267\u884c\u64cd\u4f5c\u3002\u3002
-servicemgr.service.service_package_status_delete_depending_advice=\u4e1a\u52a1\u5b9a\u4e49\u7684\u72b6\u6001\u662f\u5f85\u5220\u9664\uff0c\u4e0d\u80fd\u6267\u884c\u64cd\u4f5c\u3002\u3002
-servicemgr.servicePackage.not_activation_desc=\u5f53\u524d\u4e1a\u52a1\u5305\u72b6\u6001\u5f02\u5e38\u3002
-servicemgr.servicePackage.not_activation_detail=\u5f53\u524d\u4e1a\u52a1\u5305\u72b6\u6001\u5f02\u5e38\u3002
-servicemgr.servicePackage.not_activation_reason=\u5f53\u524d\u4e1a\u52a1\u5305\u72b6\u6001\u5f02\u5e38\u3002
-servicemgr.servicePackage.not_activation_advice=\u5f53\u524d\u4e1a\u52a1\u5305\u72b6\u6001\u5f02\u5e38\uff0c\u4e0d\u5141\u8bb8\u64cd\u4f5c\u3002
-servicemgr.servicePageExtend.not_exist_desc=\u5f53\u524d\u4e1a\u52a1\u6ce8\u518c\u9875\u9762\u4fe1\u606f\u4e0d\u5b58\u5728\uff0c\u4e0d\u5141\u8bb8\u64cd\u4f5c\u3002
-servicemgr.servicePageExtend.not_exist_detail=\u5f53\u524d\u4e1a\u52a1\u6ce8\u518c\u9875\u9762\u4fe1\u606f\u4e0d\u5b58\u5728\uff0c\u4e0d\u5141\u8bb8\u64cd\u4f5c\u3002
-servicemgr.servicePageExtend.not_exist_reason=\u5f53\u524d\u4e1a\u52a1\u6ce8\u518c\u9875\u9762\u4fe1\u606f\u4e0d\u5b58\u5728\uff0c\u4e0d\u5141\u8bb8\u64cd\u4f5c\u3002
-servicemgr.servicePageExtend.not_exist_advice=\u5f53\u524d\u4e1a\u52a1\u6ce8\u518c\u9875\u9762\u4fe1\u606f\u4e0d\u5b58\u5728\uff0c\u4e0d\u5141\u8bb8\u64cd\u4f5c\u3002
-servicemgr.service.create_failed_desc=\u5f53\u524d\u4e1a\u52a1\u521b\u5efa\u5931\u8d25\uff0c\u53ea\u5141\u8bb8\u5220\u9664\u64cd\u4f5c\u3002
-servicemgr.service.create_failed_detail=\u5f53\u524d\u4e1a\u52a1\u521b\u5efa\u5931\u8d25\uff0c\u53ea\u5141\u8bb8\u5220\u9664\u64cd\u4f5c\u3002
-servicemgr.service.create_failed_reason=\u5f53\u524d\u4e1a\u52a1\u521b\u5efa\u5931\u8d25\uff0c\u53ea\u5141\u8bb8\u5220\u9664\u64cd\u4f5c\u3002
-servicemgr.service.create_failed_advice=\u5f53\u524d\u4e1a\u52a1\u521b\u5efa\u5931\u8d25\uff0c\u53ea\u5141\u8bb8\u5220\u9664\u64cd\u4f5c\u3002
-servicemgr.service.parameter.validate_error_desc=\u4e1a\u52a1\u53c2\u6570\u6821\u9a8c\u5931\u8d25\u3002
-servicemgr.service.parameter.validate_error_detail=\u4e1a\u52a1\u53c2\u6570\u6821\u9a8c\u5931\u8d25\u3002
-servicemgr.service.parameter.validate_error_reason=\u4e1a\u52a1\u53c2\u6570\u6821\u9a8c\u5931\u8d25\u3002
-servicemgr.service.parameter.validate_error_advice=\u4e1a\u52a1\u53c2\u6570\u6821\u9a8c\u5931\u8d25\u3002
-servicemgr.service.template.parse_error_desc=\u6a21\u677f\u89e3\u6790\u5931\u8d25\u3002
-servicemgr.service.template.parse_error_detail=\u6a21\u677f\u89e3\u6790\u5931\u8d25\u3002
-servicemgr.service.template.parse_error_reason=\u6a21\u677f\u89e3\u6790\u5931\u8d25\u3002
-servicemgr.service.template.parse_error_advice=\u6a21\u677f\u89e3\u6790\u5931\u8d25\u3002
-servicemgr.permission_denied_desc=\u5bc6\u7801\u9519\u8bef
-servicemgr.permission_denied_detail=\u5bc6\u7801\u9519\u8bef
-servicemgr.permission_denied_reason=\u5bc6\u7801\u9519\u8bef
-servicemgr.permission_denied_advice=\u5bc6\u7801\u9519\u8bef
-servicemgr.template.not_exist=\u6a21\u677f\u4e0d\u5b58\u5728
-servicemgr.template.not_exist_desc=\u6a21\u677f\u4e0d\u5b58\u5728
-servicemgr.template.not_exist_detail=\u6a21\u677f\u4e0d\u5b58\u5728
-servicemgr.template.not_exist_reason=\u6a21\u677f\u4e0d\u5b58\u5728
-servicemgr.template.not_exist_advice=\u6a21\u677f\u4e0d\u5b58\u5728
-servicemgr.service.exist_desc=\u4e1a\u52a1\u5df2\u5b58\u5728\u3002
-servicemgr.service.exist_detail=\u4e1a\u52a1\u5df2\u5b58\u5728\u3002
-servicemgr.service.exist_reason=\u4e1a\u52a1\u5df2\u5b58\u5728\u3002
-servicemgr.service.exist_advice=\u4e1a\u52a1\u5df2\u5b58\u5728\u3002
-servicemgr.template.parameter.not_exist_desc=\u6a21\u677f\u53c2\u6570\u4e0d\u5b58\u5728\u3002
-servicemgr.template.parameter.not_exis_detail=\u6a21\u677f\u53c2\u6570\u4e0d\u5b58\u5728\u3002
-servicemgr.template.parameter.not_exis_reason=\u6a21\u677f\u53c2\u6570\u4e0d\u5b58\u5728\u3002
-servicemgr.template.parameter.not_exis_advice=\u6a21\u677f\u53c2\u6570\u4e0d\u5b58\u5728\u3002
\ No newline at end of file
diff --git a/servicegateway/deployment/src/main/release/pub/release_version.properties b/servicegateway/deployment/src/main/release/pub/release_version.properties
deleted file mode 100644
index b5b354e..0000000
--- a/servicegateway/deployment/src/main/release/pub/release_version.properties
+++ /dev/null
@@ -1 +0,0 @@
-upload_path=Services/ICTO/public
diff --git a/servicegateway/deployment/src/main/release/upgrade/check.sh b/servicegateway/deployment/src/main/release/upgrade/check.sh
deleted file mode 100644
index d87f29e..0000000
--- a/servicegateway/deployment/src/main/release/upgrade/check.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-
-exit 1
diff --git a/servicegateway/deployment/src/main/release/upgrade/init.sh b/servicegateway/deployment/src/main/release/upgrade/init.sh
deleted file mode 100644
index 799b7e4..0000000
--- a/servicegateway/deployment/src/main/release/upgrade/init.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-#check user
-CUR_PATH=$(cd `dirname $0`;pwd)
-SCRIPT_PATH=$0
-IPMC_USER="`stat -c '%U' ${SCRIPT_PATH}`"
-export IPMC_USER
-CURRENT_USER="`/usr/bin/id -u -n`"
-if [ "${IPMC_USER}" != "${CURRENT_USER}" ]
-then
- echo "only ${IPMC_USER} can execute this script."
- exit 1
-fi
-umask 027
-
-cd $APP_ROOT
-JAVA=$JAVA_HOME/bin/java
-
-DB_ID="ServiceGatewaydb"
-SCRIPT=$APP_ROOT/init/ServiceGateway_tables_@{dbtype}.sql
-
-JVM_OPT="$JVM_OPT -Dlog.dir=$_APP_LOG_DIR"
-JVM_OPT="$JVM_OPT -Dinit.appconfig=$APP_CONF_FILE"
-JVM_OPT="$JVM_OPT -Dinit.approot=$APP_ROOT"
-JVM_OPT="$JVM_OPT -Dinit.dataSourceId=$DB_ID"
-JVM_OPT="$JVM_OPT -Dinit.script=$SCRIPT"
-JVM_OPT="$JVM_OPT -Dinit.connectType=$1"
-JVM_OPT="$JVM_OPT -Dinit.class=org.openo.baseservice.biz.init.impl.DBInitializer"
-
-CLASS_PATH="$APP_ROOT/lib/*:$APP_ROOT/webapps/ROOT/WEB-INF/lib/*:"
-JVM_OPT="$JVM_OPT -classpath $CLASS_PATH"
-
-$JAVA $JVM_OPT org.openo.baseservice.biz.inittool.InitTool
-result=$?
-$CUR_PATH/../../../../manager/agent/tools/shscript/syslogutils.sh "$(basename $0)" "$result" "Execute($#):$CUR_PATH/$0 $@";exit $result
diff --git a/servicegateway/pom.xml b/servicegateway/pom.xml
index 660e55d..3836dd5 100644
--- a/servicegateway/pom.xml
+++ b/servicegateway/pom.xml
@@ -1,3 +1,18 @@
+<!--
+ Copyright 2016 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">
<modelVersion>4.0.0</modelVersion>
diff --git a/servicegateway/service/pom.xml b/servicegateway/service/pom.xml
index 5a834e6..3ff6fdc 100644
--- a/servicegateway/service/pom.xml
+++ b/servicegateway/service/pom.xml
@@ -1,10 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- /* * Copyright (c) 2016, 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. */ -->
-
+<!--
+ Copyright 2016 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">
<modelVersion>4.0.0</modelVersion>
@@ -22,13 +31,13 @@
<dependency>
<groupId>org.openo.common-services.common-utilities</groupId>
<artifactId>commonlib-cbb</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
</dependency>
<!-- roa -->
<dependency>
<groupId>org.openo.common-services.common-utilities</groupId>
<artifactId>commonlib-restclient</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/constant/Constant.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/constant/Constant.java
index 2e35b5a..3a26a60 100644
--- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/constant/Constant.java
+++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/constant/Constant.java
@@ -46,6 +46,15 @@
*/
public static final String SERVICE_GATEWAY_URI = "gatewayUri";
+ /**
+ * Service operation.
+ */
+ public static final String SERVICE_OPERATION = "operation";
+
+ /**
+ * Service delete operation.
+ */
+ public static final String SERVICE_DELETE_OPERATION = "delete";
/**
* Create workflow name.
diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/exception/HttpCode.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/exception/HttpCode.java
index 05f5220..2577903 100644
--- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/exception/HttpCode.java
+++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/exception/HttpCode.java
@@ -1,86 +1,86 @@
-/*
- * Copyright (c) 2016, 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.
- */
-
-package org.openo.gso.gui.servicegateway.exception;
-
-/**
- * Constant Class.<br/>
- * <p>
- * Define constant for http operation.
- * </p>
- *
- * @author
- * @version GSO 0.5 2016/8/4
- */
-public class HttpCode {
-
- /**
- * Fail to request.
- */
- public static final int BAD_REQUEST = 400;
-
- /**
- * Inner error
- */
- public static final int INTERNAL_SERVER_ERROR = 500;
-
- /**
- * Not accept request.
- */
- public static final int NOT_ACCEPTABLE = 406;
-
- /**
- * Not found service.
- */
- public static final int NOT_FOUND = 404;
-
- /**
- * Accept request.
- */
- public static final int RESPOND_ACCEPTED = 202;
-
- /**
- * Http response is ok.
- */
- public static final int RESPOND_OK = 200;
-
- /**
- * Conflict
- */
- public static final int RESPOND_CONFLICT = 409;
-
- /**
- * Constructor<br/>
- * <p>
- * </p>
- *
- * @since GSO 0.5
- */
- private HttpCode() {
-
- }
-
- /**
- * Whether request is successful.<br/>
- *
- * @param httpCode response code
- * @return true or false
- * @since GSO 0.5
- */
- public static boolean isSucess(int httpCode) {
- return httpCode / 100 == 2;
- }
-}
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+package org.openo.gso.gui.servicegateway.exception;
+
+/**
+ * Constant Class.<br/>
+ * <p>
+ * Define constant for http operation.
+ * </p>
+ *
+ * @author
+ * @version GSO 0.5 2016/8/4
+ */
+public class HttpCode {
+
+ /**
+ * Fail to request.
+ */
+ public static final int BAD_REQUEST = 400;
+
+ /**
+ * Inner error
+ */
+ public static final int INTERNAL_SERVER_ERROR = 500;
+
+ /**
+ * Not accept request.
+ */
+ public static final int NOT_ACCEPTABLE = 406;
+
+ /**
+ * Not found service.
+ */
+ public static final int NOT_FOUND = 404;
+
+ /**
+ * Accept request.
+ */
+ public static final int RESPOND_ACCEPTED = 202;
+
+ /**
+ * Http response is ok.
+ */
+ public static final int RESPOND_OK = 200;
+
+ /**
+ * Conflict
+ */
+ public static final int RESPOND_CONFLICT = 409;
+
+ /**
+ * Constructor<br/>
+ * <p>
+ * </p>
+ *
+ * @since GSO 0.5
+ */
+ private HttpCode() {
+
+ }
+
+ /**
+ * Whether request is successful.<br/>
+ *
+ * @param httpCode response code
+ * @return true or false
+ * @since GSO 0.5
+ */
+ public static boolean isSucess(int httpCode) {
+ return httpCode / 100 == 2;
+ }
+}
diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/impl/ServiceGatewayRoaModuleImpl.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/impl/ServiceGatewayRoaModuleImpl.java
index 492d75f..ff33751 100644
--- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/impl/ServiceGatewayRoaModuleImpl.java
+++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/impl/ServiceGatewayRoaModuleImpl.java
@@ -100,7 +100,28 @@
*/
@Override
public Response deleteService(String serviceId, HttpServletRequest servletReq) {
+ Map<String, Object> operateStatus = null;
+ Map<String, Object> result = null;
+ try {
+ // 1. Check validation
+ String reqContent = RestUtils.getRequestBody(servletReq);
+ ValidateUtil.assertStringNotNull(reqContent);
- return null;
+ // 2. Delete service
+ serviceGateway.deleteService(serviceId, servletReq);
+ } catch(ServiceException exception) {
+ LOGGER.error("Fail to delete service instance.");
+ operateStatus = ResponseUtils.setOperateStatus(Constant.RESPONSE_STATUS_FAIL, exception,
+ String.valueOf(exception.getHttpCode()));
+ result = ResponseUtils.setResult(serviceId, operateStatus);
+
+ return Response.accepted().entity(result).build();
+ }
+
+ operateStatus = ResponseUtils.setOperateStatus(Constant.RESPONSE_STATUS_SUCCESS, null,
+ String.valueOf(HttpCode.RESPOND_OK));
+ result = ResponseUtils.setResult(serviceId, operateStatus);
+
+ return Response.accepted().entity(result).build();
}
}
diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/inf/IServiceGatewayRoaModule.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/inf/IServiceGatewayRoaModule.java
index 929af50..302b2bd 100644
--- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/inf/IServiceGatewayRoaModule.java
+++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/roa/inf/IServiceGatewayRoaModule.java
@@ -1,73 +1,73 @@
-/*
- * Copyright (c) 2016, 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.
- */
-
-package org.openo.gso.gui.servicegateway.roa.inf;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Context;
-import javax.ws.rs.core.Response;
-
-import org.openo.baseservice.remoteservice.exception.ServiceException;
-
-/**
- * API for restful interface.<br/>
- * <p>
- * </p>
- *
- * @author
- * @version GSO 0.5 2016/8/4
- */
-@Path("/servicegateway/v1/services")
-@Consumes({"application/json"})
-@Produces({"application/json"})
-public interface IServiceGatewayRoaModule {
-
- /**
- * Create service instance.<br/>
- *
- * @param servletReq http request
- * @return response
- * @throws ServiceException when operate database or parameter is wrong.
- * @since GSO 0.5
- */
- @POST
- @Produces({"application/json"})
- @Consumes({"application/json"})
- Response createService(@Context HttpServletRequest servletReq) throws ServiceException;
-
- /**
- * Delete service instance.<br/>
- *
- * @param serviceId service instance id
- * @param servletReq http request
- * @return response
- * @throws ServiceException when operate database or parameter is wrong.
- * @since GSO 0.5
- */
- @DELETE
- @Produces({"application/json"})
- @Consumes({"application/json"})
- @Path("/{serviceId}")
- Response deleteService(@PathParam("serviceId") String serviceId, @Context HttpServletRequest servletReq)
- throws ServiceException;
-
-}
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+package org.openo.gso.gui.servicegateway.roa.inf;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+
+import org.openo.baseservice.remoteservice.exception.ServiceException;
+
+/**
+ * API for restful interface.<br/>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version GSO 0.5 2016/8/4
+ */
+@Path("/servicegateway/v1/services")
+@Consumes({"application/json"})
+@Produces({"application/json"})
+public interface IServiceGatewayRoaModule {
+
+ /**
+ * Create service instance.<br/>
+ *
+ * @param servletReq http request
+ * @return response
+ * @throws ServiceException when operate database or parameter is wrong.
+ * @since GSO 0.5
+ */
+ @POST
+ @Produces({"application/json"})
+ @Consumes({"application/json"})
+ Response createService(@Context HttpServletRequest servletReq) throws ServiceException;
+
+ /**
+ * Delete service instance.<br/>
+ *
+ * @param serviceId service instance id
+ * @param servletReq http request
+ * @return response
+ * @throws ServiceException when operate database or parameter is wrong.
+ * @since GSO 0.5
+ */
+ @DELETE
+ @Produces({"application/json"})
+ @Consumes({"application/json"})
+ @Path("/{serviceId}")
+ Response deleteService(@PathParam("serviceId") String serviceId, @Context HttpServletRequest servletReq)
+ throws ServiceException;
+
+}
diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java
index 7016252..07442bb 100644
--- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java
+++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/service/impl/ServiceGatewayImpl.java
@@ -25,6 +25,7 @@
import org.openo.baseservice.roa.util.restclient.RestfulFactory;
import org.openo.baseservice.roa.util.restclient.RestfulParametes;
import org.openo.baseservice.roa.util.restclient.RestfulResponse;
+import org.openo.baseservice.util.RestUtils;
import org.openo.gso.gui.servicegateway.constant.Constant;
import org.openo.gso.gui.servicegateway.service.inf.IServiceGateway;
import org.openo.gso.gui.servicegateway.util.json.JsonUtil;
@@ -127,7 +128,43 @@
*/
@Override
public void deleteService(String serviceId, HttpServletRequest httpRequest) throws ServiceException {
+ // Parse request
+ String reqContent = RestUtils.getRequestBody(httpRequest);
+ Map<String, Object> requestBody = JsonUtil.unMarshal(reqContent, Map.class);
+ Map<String, Object> service = (Map<String, Object>)requestBody.get(Constant.SERVICE_INDENTIFY);
+ if(null == service)
+ {
+ service = requestBody;
+ }
+ ValidateUtil.assertObjectNotNull(requestBody);
+ // Validate data
+ String gatewayUri = (String)service.get(Constant.SERVICE_GATEWAY_URI);
+ ValidateUtil.assertStringNotNull(gatewayUri);
+ service.remove(Constant.SERVICE_GATEWAY_URI);
+
+ String operation = (String) service.get(Constant.SERVICE_OPERATION);
+ ValidateUtil.assertStringNotNull(operation);
+ service.remove(Constant.SERVICE_OPERATION);
+
+ // call the restful
+ String id = null;
+ try {
+ RestfulResponse restfulRsp = null;
+ if(Constant.SERVICE_DELETE_OPERATION.equalsIgnoreCase(operation)) {
+ restfulRsp = RestfulFactory.getRestInstance("http").delete(gatewayUri,
+ getRestfulParameters(JsonUtil.marshal(requestBody)));
+ } else {
+ restfulRsp = RestfulFactory.getRestInstance("http").post(gatewayUri,
+ getRestfulParameters(JsonUtil.marshal(requestBody)));
+ }
+ if (null != restfulRsp) {
+ LOGGER.info("restful call result:", restfulRsp.getStatus());
+ }
+ } catch(ServiceException e) {
+ LOGGER.error("service gateway delete restful call result:", e);
+ throw e;
+ }
}
}
diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/util/http/HttpUtil.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/util/http/HttpUtil.java
index 8154649..d255f31 100644
--- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/util/http/HttpUtil.java
+++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/util/http/HttpUtil.java
@@ -1,138 +1,138 @@
-/*
- * Copyright (c) 2016, 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.
- */
-
-package org.openo.gso.gui.servicegateway.util.http;
-
-import java.util.Map;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.openo.baseservice.remoteservice.exception.ServiceException;
-import org.openo.baseservice.roa.util.restclient.RestfulFactory;
-import org.openo.baseservice.roa.util.restclient.RestfulParametes;
-import org.openo.baseservice.roa.util.restclient.RestfulResponse;
-import org.openo.gso.gui.servicegateway.util.json.JsonUtil;
-
-/**
- * Method class that provides interface to do http request.<br/>
- * <p>
- * </p>
- *
- * @author
- * @version GSO 0.5 2016/9/1
- */
-public class HttpUtil {
-
- /**
- * Constructor<br/>
- * <p>
- * </p>
- *
- * @since GSO 0.5
- */
- private HttpUtil() {
-
- }
-
- /**
- * Get operation.<br/>
- *
- * @param url request location
- * @param httpHeaders request headers
- * @param httpRequest http request
- * @return response
- * @throws ServiceException when request is failure.
- * @since GSO 0.5
- */
- public static RestfulResponse get(final String url, final Map<String, String> httpHeaders,
- HttpServletRequest httpRequest) throws ServiceException {
- final RestfulParametes restfulParametes = getRestfulParametes(httpRequest);
- for(Map.Entry<String, String> entry : httpHeaders.entrySet()) {
- restfulParametes.putHttpContextHeader(entry.getKey(), entry.getValue());
- }
-
- return RestfulFactory.getRestInstance(RestfulFactory.PROTO_HTTP).get(url, restfulParametes);
- }
-
- /**
- * Post operation.<br/>
- *
- * @param url request location
- * @param sendObj request body
- * @param httpRequest http request
- * @return response
- * @throws ServiceException when request is failure.
- * @since GSO 0.5
- */
- public static RestfulResponse post(final String url, Object sendObj, HttpServletRequest httpRequest)
- throws ServiceException {
-
- final RestfulParametes restfulParametes = getRestfulParametes(httpRequest);
- if(sendObj != null) {
- String strJsonReq = JsonUtil.marshal(sendObj);
- restfulParametes.setRawData(strJsonReq);
- }
-
- return RestfulFactory.getRestInstance(RestfulFactory.PROTO_HTTP).post(url, restfulParametes);
- }
-
- /**
- * Delete operation.<br/>
- *
- * @param url request location
- * @param httpRequest http request
- * @return response
- * @throws ServiceException when request is failure.
- * @since GSO 0.5
- */
- public static RestfulResponse delete(final String url, HttpServletRequest httpRequest) throws ServiceException {
- final RestfulParametes restfulParametes = getRestfulParametes(httpRequest);
- return RestfulFactory.getRestInstance(RestfulFactory.PROTO_HTTP).delete(url, restfulParametes);
- }
-
- /**
- * Put operation.<br/>
- *
- * @param url request location
- * @param httpHeaders request headers
- * @param httpRequest http request
- * @return response
- * @throws ServiceException when request is failure.
- * @since GSO 0.5
- */
- public static RestfulResponse put(final String url, final Map<String, String> httpHeaders,
- HttpServletRequest httpRequest) throws ServiceException {
- final RestfulParametes restfulParametes = getRestfulParametes(httpRequest);
- for(Map.Entry<String, String> entry : httpHeaders.entrySet()) {
- restfulParametes.putHttpContextHeader(entry.getKey(), entry.getValue());
- }
-
- return RestfulFactory.getRestInstance(RestfulFactory.PROTO_HTTP).put(url, restfulParametes);
- }
-
- /**
- * Fill in request parameters.<br/>
- *
- * @param httpRequest http request
- * @return rest parameters
- * @since GSO 0.5
- */
- public static RestfulParametes getRestfulParametes(HttpServletRequest httpRequest) {
- final RestfulParametes restfulParametes = new RestfulParametes();
- restfulParametes.putHttpContextHeader("Content-Type", "application/json;charset=UTF-8");
- return restfulParametes;
- }
-}
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+package org.openo.gso.gui.servicegateway.util.http;
+
+import java.util.Map;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.openo.baseservice.remoteservice.exception.ServiceException;
+import org.openo.baseservice.roa.util.restclient.RestfulFactory;
+import org.openo.baseservice.roa.util.restclient.RestfulParametes;
+import org.openo.baseservice.roa.util.restclient.RestfulResponse;
+import org.openo.gso.gui.servicegateway.util.json.JsonUtil;
+
+/**
+ * Method class that provides interface to do http request.<br/>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version GSO 0.5 2016/9/1
+ */
+public class HttpUtil {
+
+ /**
+ * Constructor<br/>
+ * <p>
+ * </p>
+ *
+ * @since GSO 0.5
+ */
+ private HttpUtil() {
+
+ }
+
+ /**
+ * Get operation.<br/>
+ *
+ * @param url request location
+ * @param httpHeaders request headers
+ * @param httpRequest http request
+ * @return response
+ * @throws ServiceException when request is failure.
+ * @since GSO 0.5
+ */
+ public static RestfulResponse get(final String url, final Map<String, String> httpHeaders,
+ HttpServletRequest httpRequest) throws ServiceException {
+ final RestfulParametes restfulParametes = getRestfulParametes(httpRequest);
+ for(Map.Entry<String, String> entry : httpHeaders.entrySet()) {
+ restfulParametes.putHttpContextHeader(entry.getKey(), entry.getValue());
+ }
+
+ return RestfulFactory.getRestInstance(RestfulFactory.PROTO_HTTP).get(url, restfulParametes);
+ }
+
+ /**
+ * Post operation.<br/>
+ *
+ * @param url request location
+ * @param sendObj request body
+ * @param httpRequest http request
+ * @return response
+ * @throws ServiceException when request is failure.
+ * @since GSO 0.5
+ */
+ public static RestfulResponse post(final String url, Object sendObj, HttpServletRequest httpRequest)
+ throws ServiceException {
+
+ final RestfulParametes restfulParametes = getRestfulParametes(httpRequest);
+ if(sendObj != null) {
+ String strJsonReq = JsonUtil.marshal(sendObj);
+ restfulParametes.setRawData(strJsonReq);
+ }
+
+ return RestfulFactory.getRestInstance(RestfulFactory.PROTO_HTTP).post(url, restfulParametes);
+ }
+
+ /**
+ * Delete operation.<br/>
+ *
+ * @param url request location
+ * @param httpRequest http request
+ * @return response
+ * @throws ServiceException when request is failure.
+ * @since GSO 0.5
+ */
+ public static RestfulResponse delete(final String url, HttpServletRequest httpRequest) throws ServiceException {
+ final RestfulParametes restfulParametes = getRestfulParametes(httpRequest);
+ return RestfulFactory.getRestInstance(RestfulFactory.PROTO_HTTP).delete(url, restfulParametes);
+ }
+
+ /**
+ * Put operation.<br/>
+ *
+ * @param url request location
+ * @param httpHeaders request headers
+ * @param httpRequest http request
+ * @return response
+ * @throws ServiceException when request is failure.
+ * @since GSO 0.5
+ */
+ public static RestfulResponse put(final String url, final Map<String, String> httpHeaders,
+ HttpServletRequest httpRequest) throws ServiceException {
+ final RestfulParametes restfulParametes = getRestfulParametes(httpRequest);
+ for(Map.Entry<String, String> entry : httpHeaders.entrySet()) {
+ restfulParametes.putHttpContextHeader(entry.getKey(), entry.getValue());
+ }
+
+ return RestfulFactory.getRestInstance(RestfulFactory.PROTO_HTTP).put(url, restfulParametes);
+ }
+
+ /**
+ * Fill in request parameters.<br/>
+ *
+ * @param httpRequest http request
+ * @return rest parameters
+ * @since GSO 0.5
+ */
+ public static RestfulParametes getRestfulParametes(HttpServletRequest httpRequest) {
+ final RestfulParametes restfulParametes = new RestfulParametes();
+ restfulParametes.putHttpContextHeader("Content-Type", "application/json;charset=UTF-8");
+ return restfulParametes;
+ }
+}
diff --git a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/util/json/JsonUtil.java b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/util/json/JsonUtil.java
index afb3c23..683f5d9 100644
--- a/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/util/json/JsonUtil.java
+++ b/servicegateway/service/src/main/java/org/openo/gso/gui/servicegateway/util/json/JsonUtil.java
@@ -1,133 +1,133 @@
-/*
- * Copyright (c) 2016, 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.
- */
-
-package org.openo.gso.gui.servicegateway.util.json;
-
-import java.io.IOException;
-
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
-import org.codehaus.jackson.type.TypeReference;
-import org.openo.baseservice.remoteservice.exception.ServiceException;
-import org.openo.gso.gui.servicegateway.exception.ErrorCode;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import net.sf.json.JSON;
-
-/**
- * Interface for json analyzing.<br/>
- * <p>
- * </p>
- *
- * @author
- * @version GSO 0.5 2016/9/1
- */
-public class JsonUtil {
-
- /**
- * Log service
- */
- private static final Logger LOGGER = LoggerFactory.getLogger(JsonUtil.class);
-
- /**
- * Mapper.
- */
- private static final ObjectMapper MAPPER = new ObjectMapper();
-
- static {
- MAPPER.setDeserializationConfig(MAPPER.getDeserializationConfig()
- .without(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES));
- MAPPER.setSerializationInclusion(Inclusion.NON_NULL);
- }
-
- /**
- * Constructor<br/>
- * <p>
- * </p>
- *
- * @since GSO 0.5
- */
- private JsonUtil() {
-
- }
-
- /**
- * Parse the string in form of json.<br/>
- *
- * @param jsonstr json string.
- * @param type that convert json string to
- * @return
- * @throws ServiceException
- * @since GSO 0.5
- */
- public static <T> T unMarshal(String jsonstr, Class<T> type) throws ServiceException {
- try {
- return MAPPER.readValue(jsonstr, type);
- } catch(IOException e) {
- LOGGER.error("jsonstr unMarshal failed!", e);
- throw new ServiceException(ErrorCode.SVCMGR_SERVICEMGR_BAD_PARAM, "jsonstr unMarshal failed!");
- }
- }
-
- /**
- * Parse the string in form of json.<br/>
- *
- * @param jsonstr json string.
- * @param type that convert json string to
- * @return
- * @throws ServiceException
- * @since GSO 0.5
- */
- public static <T> T unMarshal(String jsonstr, TypeReference<T> type) throws ServiceException {
- try {
- return MAPPER.readValue(jsonstr, type);
- } catch(IOException e) {
- LOGGER.error("jsonstr unMarshal failed!", e);
- throw new ServiceException(ErrorCode.SVCMGR_SERVICEMGR_BAD_PARAM, "jsonstr unMarshal failed!");
- }
- }
-
- /**
- * Convert object to json string.<br/>
- *
- * @param srcObj data object
- * @return json string
- * @throws ServiceException when fail to convert.
- * @since GSO 0.5
- */
- public static String marshal(Object srcObj) throws ServiceException {
- if(srcObj instanceof JSON) {
- return srcObj.toString();
- }
- try {
- return MAPPER.writeValueAsString(srcObj);
- } catch(IOException e) {
- LOGGER.error("srcObj marshal failed!", e);
- throw new ServiceException(ErrorCode.SVCMGR_SERVICEMGR_BAD_PARAM, "srcObj marshal failed!");
- }
- }
-
- /**
- * Get mapper.<br/>
- *
- * @return mapper
- * @since GSO 0.5
- */
- public static ObjectMapper getMapper() {
- return MAPPER;
- }
-}
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+package org.openo.gso.gui.servicegateway.util.json;
+
+import java.io.IOException;
+
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+import org.codehaus.jackson.type.TypeReference;
+import org.openo.baseservice.remoteservice.exception.ServiceException;
+import org.openo.gso.gui.servicegateway.exception.ErrorCode;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import net.sf.json.JSON;
+
+/**
+ * Interface for json analyzing.<br/>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version GSO 0.5 2016/9/1
+ */
+public class JsonUtil {
+
+ /**
+ * Log service
+ */
+ private static final Logger LOGGER = LoggerFactory.getLogger(JsonUtil.class);
+
+ /**
+ * Mapper.
+ */
+ private static final ObjectMapper MAPPER = new ObjectMapper();
+
+ static {
+ MAPPER.setDeserializationConfig(MAPPER.getDeserializationConfig()
+ .without(org.codehaus.jackson.map.DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES));
+ MAPPER.setSerializationInclusion(Inclusion.NON_NULL);
+ }
+
+ /**
+ * Constructor<br/>
+ * <p>
+ * </p>
+ *
+ * @since GSO 0.5
+ */
+ private JsonUtil() {
+
+ }
+
+ /**
+ * Parse the string in form of json.<br/>
+ *
+ * @param jsonstr json string.
+ * @param type that convert json string to
+ * @return
+ * @throws ServiceException
+ * @since GSO 0.5
+ */
+ public static <T> T unMarshal(String jsonstr, Class<T> type) throws ServiceException {
+ try {
+ return MAPPER.readValue(jsonstr, type);
+ } catch(IOException e) {
+ LOGGER.error("jsonstr unMarshal failed!", e);
+ throw new ServiceException(ErrorCode.SVCMGR_SERVICEMGR_BAD_PARAM, "jsonstr unMarshal failed!");
+ }
+ }
+
+ /**
+ * Parse the string in form of json.<br/>
+ *
+ * @param jsonstr json string.
+ * @param type that convert json string to
+ * @return
+ * @throws ServiceException
+ * @since GSO 0.5
+ */
+ public static <T> T unMarshal(String jsonstr, TypeReference<T> type) throws ServiceException {
+ try {
+ return MAPPER.readValue(jsonstr, type);
+ } catch(IOException e) {
+ LOGGER.error("jsonstr unMarshal failed!", e);
+ throw new ServiceException(ErrorCode.SVCMGR_SERVICEMGR_BAD_PARAM, "jsonstr unMarshal failed!");
+ }
+ }
+
+ /**
+ * Convert object to json string.<br/>
+ *
+ * @param srcObj data object
+ * @return json string
+ * @throws ServiceException when fail to convert.
+ * @since GSO 0.5
+ */
+ public static String marshal(Object srcObj) throws ServiceException {
+ if(srcObj instanceof JSON) {
+ return srcObj.toString();
+ }
+ try {
+ return MAPPER.writeValueAsString(srcObj);
+ } catch(IOException e) {
+ LOGGER.error("srcObj marshal failed!", e);
+ throw new ServiceException(ErrorCode.SVCMGR_SERVICEMGR_BAD_PARAM, "srcObj marshal failed!");
+ }
+ }
+
+ /**
+ * Get mapper.<br/>
+ *
+ * @return mapper
+ * @since GSO 0.5
+ */
+ public static ObjectMapper getMapper() {
+ return MAPPER;
+ }
+}
diff --git a/servicegateway/service/src/main/resources/spring/service.xml b/servicegateway/service/src/main/resources/spring/service.xml
index c91ed1c..c328d86 100644
--- a/servicegateway/service/src/main/resources/spring/service.xml
+++ b/servicegateway/service/src/main/resources/spring/service.xml
@@ -1,9 +1,19 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- /* * Copyright (c) 2016, 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. */ -->
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2016 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.
+-->
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:ctx="http://www.springframework.org/schema/context" xmlns:context="http://www.springframework.org/schema/context"
xmlns:oms="http://www.huawei.com/schema/oms"
@@ -50,47 +60,14 @@
<constructor-arg index="0" ref="sessionFactory" />
</bean>
- <bean class="org.openo.gso.servicemgr.activator.Activator"></bean>
+ <bean class="org.openo.gso.gui.servicegateway.activator.Activator"></bean>
- <bean id="Activator" class="org.openo.gso.servicemgr.activator.Activator" init-method="start" destroy-method="stop">
+ <bean id="Activator" class="org.openo.gso.gui.servicegateway.activator.Activator" init-method="start" destroy-method="stop">
</bean>
- <bean id="ServicemgrRoaModuleImpl" class="org.openo.gso.servicemgr.roa.impl.ServicemgrRoaModuleImpl">
+ <bean id="ServicGatewayRoaModuleImpl" class="org.openo.gso.gui.servicegateway.roa.impl.ServicGatewayRoaModuleImpl">
<property name="ServiceGateway" ref="ServiceGateway"></property>
</bean>
- <bean id="ServiceGateway" class="org.openo.gso.servicemgr.service.impl.ServiceGatewayImpl">
- <property name="serviceModelDao" ref="serviceModelDao"></property>
- <property name="subServiceDao" ref="subServiceDao"></property>
- <property name="servicePackageDao" ref="servicePackageDao"></property>
- <property name="catalogProxy" ref="catalogProxy"></property>
- <property name="wsoProxy" ref="wsoProxy"></property>
- </bean>
-
- <bean id="ServicePackageModuleImpl" class="org.openo.gso.servicemgr.roa.impl.ServicePackageModuleImpl">
- <property name="packageMgr" ref="packageMgr"></property>
- </bean>
-
- <bean id="packageMgr" class="org.openo.gso.servicemgr.service.impl.PackageManagerImpl">
- <property name="servicePackageDao" ref="servicePackageDao"></property>
- <property name="catalogProxy" ref="catalogProxy"></property>
- </bean>
-
- <bean id="serviceModelDao" class="org.openo.gso.servicemgr.dao.impl.ServiceModelDaoImpl">
- <property name="session" ref="session" />
- </bean>
-
- <bean id="servicePackageDao" class="org.openo.gso.servicemgr.dao.impl.ServicePackageDaoImpl">
- <property name="session" ref="session" />
- </bean>
-
- <bean id="subServiceDao" class="org.openo.gso.servicemgr.dao.impl.SubServiceDaoImpl">
- <property name="session" ref="session" />
- </bean>
-
- <bean id="catalogProxy" class="org.openo.gso.servicemgr.restproxy.impl.CatalogProxyImpl">
- </bean>
-
- <bean id="wsoProxy" class="org.openo.gso.servicemgr.restproxy.impl.WsoProxyImpl">
</bean>
</beans>
\ No newline at end of file
diff --git a/servicegateway/service/src/main/webapp/WEB-INF/web.xml b/servicegateway/service/src/main/webapp/WEB-INF/web.xml
index 6f06aed..59f3592 100644
--- a/servicegateway/service/src/main/webapp/WEB-INF/web.xml
+++ b/servicegateway/service/src/main/webapp/WEB-INF/web.xml
@@ -1,9 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- /* * Copyright (c) 2016, 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. */ -->
+<!--
+ Copyright 2016 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.
+-->
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
diff --git a/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/exception/ErrorCodeTest.java b/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/exception/ErrorCodeTest.java
index 422c5e4..74f9f43 100644
--- a/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/exception/ErrorCodeTest.java
+++ b/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/exception/ErrorCodeTest.java
@@ -1,39 +1,39 @@
-/*
- * Copyright (c) 2016, 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.
- */
-
-package org.openo.gso.gui.servicegateway.exception;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Test;
-
-/**
- * Test Constant class.<br/>
- * <p>
- * </p>
- *
- * @author
- * @version GSO 0.5 2016/8/4
- */
-public class ErrorCodeTest {
-
- @Test
- public void test() {
- assertEquals("servicemgr.mysql.oper_mysql_db_error", ErrorCode.SVCMGR_OPER_MYSQL_DB_ERROR);
- assertEquals("servicemgr.bad_param", ErrorCode.SVCMGR_SERVICEMGR_BAD_PARAM);
- }
-
-}
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+package org.openo.gso.gui.servicegateway.exception;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+/**
+ * Test Constant class.<br/>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version GSO 0.5 2016/8/4
+ */
+public class ErrorCodeTest {
+
+ @Test
+ public void test() {
+ assertEquals("servicemgr.mysql.oper_mysql_db_error", ErrorCode.SVCMGR_OPER_MYSQL_DB_ERROR);
+ assertEquals("servicemgr.bad_param", ErrorCode.SVCMGR_SERVICEMGR_BAD_PARAM);
+ }
+
+}
diff --git a/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/exception/HttpCodeTest.java b/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/exception/HttpCodeTest.java
index cefdb50..06d247b 100644
--- a/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/exception/HttpCodeTest.java
+++ b/servicegateway/service/src/test/java/org/openo/gso/gui/servicegateway/exception/HttpCodeTest.java
@@ -1,47 +1,47 @@
-/*
- * Copyright (c) 2016, 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.
- */
-
-package org.openo.gso.gui.servicegateway.exception;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-
-/**
- * Test Constant class.<br/>
- * <p>
- * </p>
- *
- * @author
- * @version GSO 0.5 2016/8/4
- */
-public class HttpCodeTest {
-
- @Test
- public void test() {
- assertEquals(400, HttpCode.BAD_REQUEST);
- assertEquals(500, HttpCode.INTERNAL_SERVER_ERROR);
- assertEquals(406, HttpCode.NOT_ACCEPTABLE);
- assertEquals(404, HttpCode.NOT_FOUND);
- assertEquals(202, HttpCode.RESPOND_ACCEPTED);
- assertEquals(200, HttpCode.RESPOND_OK);
- assertTrue(HttpCode.isSucess(200));
- assertFalse(HttpCode.isSucess(400));
- }
-
-}
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+package org.openo.gso.gui.servicegateway.exception;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.junit.Test;
+
+/**
+ * Test Constant class.<br/>
+ * <p>
+ * </p>
+ *
+ * @author
+ * @version GSO 0.5 2016/8/4
+ */
+public class HttpCodeTest {
+
+ @Test
+ public void test() {
+ assertEquals(400, HttpCode.BAD_REQUEST);
+ assertEquals(500, HttpCode.INTERNAL_SERVER_ERROR);
+ assertEquals(406, HttpCode.NOT_ACCEPTABLE);
+ assertEquals(404, HttpCode.NOT_FOUND);
+ assertEquals(202, HttpCode.RESPOND_ACCEPTED);
+ assertEquals(200, HttpCode.RESPOND_OK);
+ assertTrue(HttpCode.isSucess(200));
+ assertFalse(HttpCode.isSucess(400));
+ }
+
+}
diff --git a/servicegateway/service/src/test/resources/json/license.txt b/servicegateway/service/src/test/resources/json/license.txt
new file mode 100644
index 0000000..bebcc7f
--- /dev/null
+++ b/servicegateway/service/src/test/resources/json/license.txt
@@ -0,0 +1,473 @@
+THIS LICENSE FILE CONTAINS THE LICENSE APPLICABLE DEPENDING ON THE TYPE OF CONTRIBUTIONS.
+
+APACHE LICENSE 2 IS APPLICABLE FOR SOURCE CODE, CREATIVE COMMONS ATTRIBUTION 4.0 INTERNATIONAL FOR DOCUMENTATION
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+
+Apache License
+Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
+
+"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
+
+2. Grant of Copyright License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.
+
+Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution.
+
+You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
+
+You must give any other recipients of the Work or Derivative Works a copy of this License; and
+You must cause any modified files to carry prominent notices stating that You changed the files; and
+You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
+If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
+You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions.
+
+Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+6. Trademarks.
+
+This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty.
+
+Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability.
+
+In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability.
+
+While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+Attribution 4.0 International
+
+https://creativecommons.org/licenses/by/4.0/legalcode
+
+---------------------------------------------------------------------------------------
+
+Creative Commons Corporation ("Creative Commons") is not a law firm and
+does not provide legal services or legal advice. Distribution of
+Creative Commons public licenses does not create a lawyer-client or
+other relationship. Creative Commons makes its licenses and related
+information available on an "as-is" basis. Creative Commons gives no
+warranties regarding its licenses, any material licensed under their
+terms and conditions, or any related information. Creative Commons
+disclaims all liability for damages resulting from their use to the
+fullest extent possible.
+
+Using Creative Commons Public Licenses
+
+Creative Commons public licenses provide a standard set of terms and
+conditions that creators and other rights holders may use to share
+original works of authorship and other material subject to copyright
+and certain other rights specified in the public license below. The
+following considerations are for informational purposes only, are not
+exhaustive, and do not form part of our licenses.
+
+ Considerations for licensors: Our public licenses are
+ intended for use by those authorized to give the public
+ permission to use material in ways otherwise restricted by
+ copyright and certain other rights. Our licenses are
+ irrevocable. Licensors should read and understand the terms
+ and conditions of the license they choose before applying it.
+ Licensors should also secure all rights necessary before
+ applying our licenses so that the public can reuse the
+ material as expected. Licensors should clearly mark any
+ material not subject to the license. This includes other CC-
+ licensed material, or material used under an exception or
+ limitation to copyright. More considerations for licensors:
+ wiki.creativecommons.org/Considerations_for_licensors
+
+ Considerations for the public: By using one of our public
+ licenses, a licensor grants the public permission to use the
+ licensed material under specified terms and conditions. If
+ the licensor's permission is not necessary for any reason--for
+ example, because of any applicable exception or limitation to
+ copyright--then that use is not regulated by the license. Our
+ licenses grant only permissions under copyright and certain
+ other rights that a licensor has authority to grant. Use of
+ the licensed material may still be restricted for other
+ reasons, including because others have copyright or other
+ rights in the material. A licensor may make special requests,
+ such as asking that all changes be marked or described.
+ Although not required by our licenses, you are encouraged to
+ respect those requests where reasonable. More_considerations
+ for the public:
+ wiki.creativecommons.org/Considerations_for_licensees
+
+---------------------------------------------------------------------------------------
+
+Creative Commons Attribution 4.0 International Public License
+
+By exercising the Licensed Rights (defined below), You accept and agree
+to be bound by the terms and conditions of this Creative Commons
+Attribution 4.0 International Public License ("Public License"). To the
+extent this Public License may be interpreted as a contract, You are
+granted the Licensed Rights in consideration of Your acceptance of
+these terms and conditions, and the Licensor grants You such rights in
+consideration of benefits the Licensor receives from making the
+Licensed Material available under these terms and conditions.
+
+
+Section 1 -- Definitions.
+
+ a. Adapted Material means material subject to Copyright and Similar
+ Rights that is derived from or based upon the Licensed Material
+ and in which the Licensed Material is translated, altered,
+ arranged, transformed, or otherwise modified in a manner requiring
+ permission under the Copyright and Similar Rights held by the
+ Licensor. For purposes of this Public License, where the Licensed
+ Material is a musical work, performance, or sound recording,
+ Adapted Material is always produced where the Licensed Material is
+ synched in timed relation with a moving image.
+
+ b. Adapter's License means the license You apply to Your Copyright
+ and Similar Rights in Your contributions to Adapted Material in
+ accordance with the terms and conditions of this Public License.
+
+ c. Copyright and Similar Rights means copyright and/or similar rights
+ closely related to copyright including, without limitation,
+ performance, broadcast, sound recording, and Sui Generis Database
+ Rights, without regard to how the rights are labeled or
+ categorized. For purposes of this Public License, the rights
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
+ Rights.
+
+ d. Effective Technological Measures means those measures that, in the
+ absence of proper authority, may not be circumvented under laws
+ fulfilling obligations under Article 11 of the WIPO Copyright
+ Treaty adopted on December 20, 1996, and/or similar international
+ agreements.
+
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
+ any other exception or limitation to Copyright and Similar Rights
+ that applies to Your use of the Licensed Material.
+
+ f. Licensed Material means the artistic or literary work, database,
+ or other material to which the Licensor applied this Public
+ License.
+
+ g. Licensed Rights means the rights granted to You subject to the
+ terms and conditions of this Public License, which are limited to
+ all Copyright and Similar Rights that apply to Your use of the
+ Licensed Material and that the Licensor has authority to license.
+
+ h. Licensor means the individual(s) or entity(ies) granting rights
+ under this Public License.
+
+ i. Share means to provide material to the public by any means or
+ process that requires permission under the Licensed Rights, such
+ as reproduction, public display, public performance, distribution,
+ dissemination, communication, or importation, and to make material
+ available to the public including in ways that members of the
+ public may access the material from a place and at a time
+ individually chosen by them.
+
+ j. Sui Generis Database Rights means rights other than copyright
+ resulting from Directive 96/9/EC of the European Parliament and of
+ the Council of 11 March 1996 on the legal protection of databases,
+ as amended and/or succeeded, as well as other essentially
+ equivalent rights anywhere in the world.
+
+ k. You means the individual or entity exercising the Licensed Rights
+ under this Public License. Your has a corresponding meaning.
+
+
+Section 2 -- Scope.
+
+ a. License grant.
+
+ 1. Subject to the terms and conditions of this Public License,
+ the Licensor hereby grants You a worldwide, royalty-free,
+ non-sublicensable, non-exclusive, irrevocable license to
+ exercise the Licensed Rights in the Licensed Material to:
+
+ a. reproduce and Share the Licensed Material, in whole or
+ in part; and
+
+ b. produce, reproduce, and Share Adapted Material.
+
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
+ Exceptions and Limitations apply to Your use, this Public
+ License does not apply, and You do not need to comply with
+ its terms and conditions.
+
+ 3. Term. The term of this Public License is specified in Section
+ 6(a).
+
+ 4. Media and formats; technical modifications allowed. The
+ Licensor authorizes You to exercise the Licensed Rights in
+ all media and formats whether now known or hereafter created,
+ and to make technical modifications necessary to do so. The
+ Licensor waives and/or agrees not to assert any right or
+ authority to forbid You from making technical modifications
+ necessary to exercise the Licensed Rights, including
+ technical modifications necessary to circumvent Effective
+ Technological Measures. For purposes of this Public License,
+ simply making modifications authorized by this Section 2(a)
+ (4) never produces Adapted Material.
+
+ 5. Downstream recipients.
+
+ a. Offer from the Licensor -- Licensed Material. Every
+ recipient of the Licensed Material automatically
+ receives an offer from the Licensor to exercise the
+ Licensed Rights under the terms and conditions of this
+ Public License.
+
+ b. No downstream restrictions. You may not offer or impose
+ any additional or different terms or conditions on, or
+ apply any Effective Technological Measures to, the
+ Licensed Material if doing so restricts exercise of the
+ Licensed Rights by any recipient of the Licensed
+ Material.
+
+ 6. No endorsement. Nothing in this Public License constitutes or
+ may be construed as permission to assert or imply that You
+ are, or that Your use of the Licensed Material is, connected
+ with, or sponsored, endorsed, or granted official status by,
+ the Licensor or others designated to receive attribution as
+ provided in Section 3(a)(1)(A)(i).
+
+ b. Other rights.
+
+ 1. Moral rights, such as the right of integrity, are not
+ licensed under this Public License, nor are publicity,
+ privacy, and/or other similar personality rights; however, to
+ the extent possible, the Licensor waives and/or agrees not to
+ assert any such rights held by the Licensor to the limited
+ extent necessary to allow You to exercise the Licensed
+ Rights, but not otherwise.
+
+ 2. Patent and trademark rights are not licensed under this
+ Public License.
+
+ 3. To the extent possible, the Licensor waives any right to
+ collect royalties from You for the exercise of the Licensed
+ Rights, whether directly or through a collecting society
+ under any voluntary or waivable statutory or compulsory
+ licensing scheme. In all other cases the Licensor expressly
+ reserves any right to collect such royalties.
+
+
+Section 3 -- License Conditions.
+
+Your exercise of the Licensed Rights is expressly made subject to the
+following conditions.
+
+ a. Attribution.
+
+ 1. If You Share the Licensed Material (including in modified
+ form), You must:
+
+ a. retain the following if it is supplied by the Licensor
+ with the Licensed Material:
+
+ i. identification of the creator(s) of the Licensed
+ Material and any others designated to receive
+ attribution, in any reasonable manner requested by
+ the Licensor (including by pseudonym if
+ designated);
+
+ ii. a copyright notice;
+
+ iii. a notice that refers to this Public License;
+
+ iv. a notice that refers to the disclaimer of
+ warranties;
+
+ v. a URI or hyperlink to the Licensed Material to the
+ extent reasonably practicable;
+
+ b. indicate if You modified the Licensed Material and
+ retain an indication of any previous modifications; and
+
+ c. indicate the Licensed Material is licensed under this
+ Public License, and include the text of, or the URI or
+ hyperlink to, this Public License.
+
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
+ reasonable manner based on the medium, means, and context in
+ which You Share the Licensed Material. For example, it may be
+ reasonable to satisfy the conditions by providing a URI or
+ hyperlink to a resource that includes the required
+ information.
+
+ 3. If requested by the Licensor, You must remove any of the
+ information required by Section 3(a)(1)(A) to the extent
+ reasonably practicable.
+
+ 4. If You Share Adapted Material You produce, the Adapter's
+ License You apply must not prevent recipients of the Adapted
+ Material from complying with this Public License.
+
+
+Section 4 -- Sui Generis Database Rights.
+
+Where the Licensed Rights include Sui Generis Database Rights that
+apply to Your use of the Licensed Material:
+
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
+ to extract, reuse, reproduce, and Share all or a substantial
+ portion of the contents of the database;
+
+ b. if You include all or a substantial portion of the database
+ contents in a database in which You have Sui Generis Database
+ Rights, then the database in which You have Sui Generis Database
+ Rights (but not its individual contents) is Adapted Material; and
+
+ c. You must comply with the conditions in Section 3(a) if You Share
+ all or a substantial portion of the contents of the database.
+
+For the avoidance of doubt, this Section 4 supplements and does not
+replace Your obligations under this Public License where the Licensed
+Rights include other Copyright and Similar Rights.
+
+
+Section 5 -- Disclaimer of Warranties and Limitation of Liability.
+
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
+
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
+
+ c. The disclaimer of warranties and limitation of liability provided
+ above shall be interpreted in a manner that, to the extent
+ possible, most closely approximates an absolute disclaimer and
+ waiver of all liability.
+
+
+Section 6 -- Term and Termination.
+
+ a. This Public License applies for the term of the Copyright and
+ Similar Rights licensed here. However, if You fail to comply with
+ this Public License, then Your rights under this Public License
+ terminate automatically.
+
+ b. Where Your right to use the Licensed Material has terminated under
+ Section 6(a), it reinstates:
+
+ 1. automatically as of the date the violation is cured, provided
+ it is cured within 30 days of Your discovery of the
+ violation; or
+
+ 2. upon express reinstatement by the Licensor.
+
+ For the avoidance of doubt, this Section 6(b) does not affect any
+ right the Licensor may have to seek remedies for Your violations
+ of this Public License.
+
+ c. For the avoidance of doubt, the Licensor may also offer the
+ Licensed Material under separate terms or conditions or stop
+ distributing the Licensed Material at any time; however, doing so
+ will not terminate this Public License.
+
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
+ License.
+
+
+Section 7 -- Other Terms and Conditions.
+
+ a. The Licensor shall not be bound by any additional or different
+ terms or conditions communicated by You unless expressly agreed.
+
+ b. Any arrangements, understandings, or agreements regarding the
+ Licensed Material not stated herein are separate from and
+ independent of the terms and conditions of this Public License.
+
+
+Section 8 -- Interpretation.
+
+ a. For the avoidance of doubt, this Public License does not, and
+ shall not be interpreted to, reduce, limit, restrict, or impose
+ conditions on any use of the Licensed Material that could lawfully
+ be made without permission under this Public License.
+
+ b. To the extent possible, if any provision of this Public License is
+ deemed unenforceable, it shall be automatically reformed to the
+ minimum extent necessary to make it enforceable. If the provision
+ cannot be reformed, it shall be severed from this Public License
+ without affecting the enforceability of the remaining terms and
+ conditions.
+
+ c. No term or condition of this Public License will be waived and no
+ failure to comply consented to unless expressly agreed to by the
+ Licensor.
+
+ d. Nothing in this Public License constitutes or may be interpreted
+ as a limitation upon, or waiver of, any privileges and immunities
+ that apply to the Licensor or You, including from the legal
+ processes of any jurisdiction or authority.
+
+---------------------------------------------------------------------------------------
+
+Creative Commons is not a party to its public
+licenses. Notwithstanding, Creative Commons may elect to apply one of
+its public licenses to material it publishes and in those instances
+will be considered the "Licensor." The text of the Creative Commons
+public licenses is dedicated to the public domain under the CC0 Public
+Domain Dedication. Except for the limited purpose of indicating that
+material is shared under a Creative Commons public license or as
+otherwise permitted by the Creative Commons policies published at
+creativecommons.org/policies, Creative Commons does not authorize the
+use of the trademark "Creative Commons" or any other trademark or logo
+of Creative Commons without its prior written consent including,
+without limitation, in connection with any unauthorized modifications
+to any of its public licenses or any other arrangements,
+understandings, or agreements concerning use of licensed material. For
+the avoidance of doubt, this paragraph does not form part of the
+public licenses.
+
+Creative Commons may be contacted at creativecommons.org.