summaryrefslogtreecommitdiffstats
path: root/deployment/zip
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-12-11 20:34:44 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2017-12-12 15:48:55 +0530
commit0d97a835fa2052ded5a31e8921baf641c8e9bb57 (patch)
tree800584529f77c8ff26f05a73abd3fa71205a69a7 /deployment/zip
parent03c54a40daf75644ec0bcbc73636e3eb427c1604 (diff)
Make Http as separate plugin
Issue-ID: CLI-66 Change-Id: I8ad78f417f6dbb00e29effdd3ed8ec1939aee81d Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'deployment/zip')
-rw-r--r--deployment/zip/installer/cli-init.sh33
-rw-r--r--deployment/zip/pom.xml20
-rw-r--r--deployment/zip/src/main/release/conf/log4j.properties9
-rw-r--r--deployment/zip/src/main/release/conf/open-cli.properties31
4 files changed, 48 insertions, 45 deletions
diff --git a/deployment/zip/installer/cli-init.sh b/deployment/zip/installer/cli-init.sh
deleted file mode 100644
index 59d078ec..00000000
--- a/deployment/zip/installer/cli-init.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-#*******************************************************************************
-# Copyright 2017 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#*******************************************************************************
-
-export OPEN_CLI_HOME=/opt/oclip
-export OPEN_CLI_PRODUCT_IN_USE=open-cli
-
-cd $OPEN_CLI_HOME
-
-if [ ! -d ./data ]; then mkdir ./data; fi
-if [ ! -d ./open-cli-schema ]; then mkdir ./open-cli-schema; fi
-
-chmod +x ./bin/oclip.sh
-
-#Make oclip available in path
-ln ./bin/oclip.sh /usr/bin/oclip
-
-#Print the version
-oclip -v \ No newline at end of file
diff --git a/deployment/zip/pom.xml b/deployment/zip/pom.xml
index 8c2ecfca..46f7df02 100644
--- a/deployment/zip/pom.xml
+++ b/deployment/zip/pom.xml
@@ -75,10 +75,10 @@
}
ant.copy(todir: "${deployUnzip}") {
- fileset(file: "${basedir}/installer/cli-init.sh")
+ fileset(file: "${basedir}/installer/install.sh")
}
- ant.chmod(file: "${deployUnzip}/bin/onap.sh", perm: "ugo+x")
- ant.chmod(file: "${deployUnzip}/cli-init.sh", perm: "ugo+x")
+ ant.chmod(file: "${deployUnzip}/bin/oclip.sh", perm: "ugo+x")
+ ant.chmod(file: "${deployUnzip}/install.sh", perm: "ugo+x")
ant.copy(todir:
"${deployUnzip}/lib") {
@@ -87,18 +87,20 @@
fileset(dir:
"${project.build.directory}/../../../main/target/lib/")
fileset(dir:
- "${project.build.directory}/../../../plugins/target/lib/")
+ "${project.build.directory}/../../../products/target/lib/")
+ fileset(dir:
+ "${project.build.directory}/../../../profiles/target/lib/")
}
ant.copy(todir:
"${deployUnzip}/conf") {
fileset(file:
- "${project.build.directory}/../../../framework/src/main/resources/open-cli.properties")
+ "${basedir}/src/main/release/conf/open-cli.properties")
}
ant.copy(todir:
"${deployUnzip}/conf") {
fileset(file:
- "${project.build.directory}/../../../framework/src/main/resources/log4j.properties")
+ "${basedir}/src/main/release/conf/log4j.properties")
}
ant.copy(todir:
@@ -107,12 +109,6 @@
"${project.build.directory}/../../../README.md")
}
- ant.copy(todir:
- "${deployUnzip}") {
- fileset(file:
- "${project.build.directory}/../installer/install.sh")
- }
-
ant.zip(destfile:
"${deployFolder}/${outfileName}") {
zipfileset(dir: "${deployUnzip}", excludes: "**/*.sh")
diff --git a/deployment/zip/src/main/release/conf/log4j.properties b/deployment/zip/src/main/release/conf/log4j.properties
new file mode 100644
index 00000000..f117ef6e
--- /dev/null
+++ b/deployment/zip/src/main/release/conf/log4j.properties
@@ -0,0 +1,9 @@
+log4j.rootLogger=ERROR, file
+
+# Redirect log messages to a log file, support file rolling.
+log4j.appender.file=org.apache.log4j.RollingFileAppender
+log4j.appender.file.File=${OPEN_CLI_HOME}/logs/oclip.log
+log4j.appender.file.MaxFileSize=5MB
+log4j.appender.file.MaxBackupIndex=10
+log4j.appender.file.layout=org.apache.log4j.PatternLayout
+log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
diff --git a/deployment/zip/src/main/release/conf/open-cli.properties b/deployment/zip/src/main/release/conf/open-cli.properties
new file mode 100644
index 00000000..026b1f13
--- /dev/null
+++ b/deployment/zip/src/main/release/conf/open-cli.properties
@@ -0,0 +1,31 @@
+cli.product_name=open-cli
+cli.version=1.0
+
+cli.discover_always=false
+
+#schema validation
+cli.schema.top_level_params_list=open_cli_schema_version,name,description,parameters,results,http,info
+cli.schema.top_level_mandatory_list=open_cli_schema_version
+
+cli.schema.info_params_list=product,service,type,author,ignore
+cli.schema.info_params_mandatory_list=product,service
+
+cli.schema.input_params_list=name,description,type,short_option,long_option, is_optional,default_value,is_secured,is_include
+cli.schema.input_params_mandatory_list=name,description,type
+
+cli.schema.result_params_list=name,description,scope,type,is_secured, default_value
+cli.schema.result_params_mandatory_list=name, description, type, scope
+
+cli.schema.boolean_values=true,false
+cli.command.type=cmd,auth,catalog
+
+# moco properties
+cli.sample.gen.enable=false
+cli.sample.gen.target=.
+
+# mrkanag Move this to db, once exteranl command registration is supported in place of discovery
+cli.schema.type.supported=http
+
+#other properties to load (it should be hanled when plugins are made as externally register-able
+#when command plugin management support is enabled in oclip
+cli.plugins-prps=open-cli-http.properties \ No newline at end of file