aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket-be/vnf-sdk-marketplace/src/main/resources
diff options
context:
space:
mode:
authorMurali-P <murali.p@huawei.com>2017-07-31 11:06:26 +0530
committerMurali-P <murali.p@huawei.com>2017-07-31 11:06:26 +0530
commitd0e21365a8bf7da9dd87915c52acb0a907dfe59b (patch)
tree06b4f5314b92ca2695bd3dbd9d545df6df242dd3 /vnfmarket-be/vnf-sdk-marketplace/src/main/resources
parent6bf0d8e793ef1f55808bb54112f4839a18ee582a (diff)
Market place initial code
Resolved:VNFSDK-53 VNF SDK market place Change-Id: Ic9ac5491b4a43d03bce105abb295e10c476e1560 Signed-off-by: Murali-P <murali.p@huawei.com>
Diffstat (limited to 'vnfmarket-be/vnf-sdk-marketplace/src/main/resources')
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/resources/generalconfig/OnBoardingSteps.json54
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/resources/log4j.properties8
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/resources/marketplace.properties15
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/configuration/configuration.xml35
-rw-r--r--vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/sql/MarketplaceMapper.xml57
5 files changed, 169 insertions, 0 deletions
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/generalconfig/OnBoardingSteps.json b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/generalconfig/OnBoardingSteps.json
new file mode 100644
index 00000000..ca69f285
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/generalconfig/OnBoardingSteps.json
@@ -0,0 +1,54 @@
+{
+ "operTypeList":[
+ {
+ "operTypeName":"Validation",
+ "operTypeId":"validation",
+ "oper":[
+ {
+ "operId":"upload_id_1",
+ "operName":"Validation Step 1 Execute"
+ },
+ {
+ "operId":"upload_id_2",
+ "operName":"Validation Step 2 Execute"
+ },
+ {
+ "operId":"upload_id_3",
+ "operName":"Validation Step 3 Execute"
+ },
+ {
+ "operId":"upload_id_4",
+ "operName":"Validation Step 4 Execute"
+ }
+ ]
+ },
+ {
+ "operTypeName":"LifeCycle",
+ "operTypeId":"lifecycletest",
+ "oper":[
+ {
+ "operId":"lifecycleTestexec",
+ "operName":"LifeCycle Test Execute"
+ }
+ ]
+ },
+ {
+ "operTypeName":"Function Test",
+ "operTypeId":"functiontest",
+ "oper":[
+ {
+ "operId":"packageExists",
+ "operName":"Check Package exists"
+ },
+ {
+ "operId":"download",
+ "operName":"Download Package from Repository"
+ },
+ {
+ "operId":"functestexec",
+ "operName":"Execute Function Testing"
+ }
+ ]
+ }
+ ]
+} \ No newline at end of file
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/log4j.properties b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/log4j.properties
new file mode 100644
index 00000000..f1a00ee8
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/log4j.properties
@@ -0,0 +1,8 @@
+log4j.rootLogger=INFO,root
+log4j.appender.root.Append=true
+log4j.appender.root.File=${catalina.base}/logs/vnfsdkmarketplace.log
+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.apache.log4j.RollingFileAppender \ No newline at end of file
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/marketplace.properties b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/marketplace.properties
new file mode 100644
index 00000000..6bf73453
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/marketplace.properties
@@ -0,0 +1,15 @@
+# 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.
+IP=msb.openo.org
+PORT=80 \ No newline at end of file
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/configuration/configuration.xml b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/configuration/configuration.xml
new file mode 100644
index 00000000..76da57c8
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/configuration/configuration.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!DOCTYPE configuration
+PUBLIC "//mybatis.org//DTD Config 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-config.dtd">
+<configuration>
+ <environments default="development">
+ <environment id="development">
+ <transactionManager type="JDBC" />
+ <dataSource type="POOLED">
+ <property name="driver" value="com.mysql.jdbc.Driver" />
+ <property name="url" value="jdbc:mysql://127.0.0.1:3306/marketplaceDB" />
+ <property name="username" value="root" />
+ <property name="password" value="Changeme_123" />
+ </dataSource>
+ </environment>
+ </environments>
+ <mappers>
+ <mapper resource="mybatis/sql/MarketplaceMapper.xml" />
+ </mappers>
+</configuration> \ No newline at end of file
diff --git a/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/sql/MarketplaceMapper.xml b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/sql/MarketplaceMapper.xml
new file mode 100644
index 00000000..27801ae5
--- /dev/null
+++ b/vnfmarket-be/vnf-sdk-marketplace/src/main/resources/mybatis/sql/MarketplaceMapper.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.openo.vnfsdk.marketplace.db.mapper.IMarketplaceMapper">
+
+ <select id="getAllPackageData" resultType="org.openo.vnfsdk.marketplace.db.entity.PackageData">
+ SELECT
+ *
+ FROM
+ CSAR_PACKAGE_TABLE
+ </select>
+
+ <select id="getPackageData" resultType="org.openo.vnfsdk.marketplace.db.entity.PackageData">
+ SELECT
+ *
+ FROM
+ CSAR_PACKAGE_TABLE
+ WHERE
+ CSARID=#{csarId}
+ </select>
+
+ <insert id="savePackageData" parameterType="org.openo.vnfsdk.marketplace.db.entity.PackageData">
+ INSERT INTO
+ CSAR_PACKAGE_TABLE
+ (CSARID, DOWNLOADURI, REPORT, SIZE, FORMAT, CREATETIME, DELETIONPENDING, MODIFYTIME, SHORTDESC, NAME, VERSION, PROVIDER, TYPE, DETAILS, REMARKS,DOWNLOADCOUNT)
+ VALUES
+ (#{csarId}, #{downloadUri}, #{report}, #{size}, #{format},#{createTime}, #{deletionPending}, #{modifyTime}, #{shortDesc}, #{name}, #{version}, #{provider},#{type}, #{details}, #{remarks}, #{downloadCount})
+ </insert>
+
+ <delete id="deletePackageData" parameterType="String">
+ DELETE FROM
+ CSAR_PACKAGE_TABLE
+ WHERE
+ CSARID=#{csarId}
+ </delete>
+
+ <delete id="updatePackageData" parameterType="org.openo.vnfsdk.marketplace.db.entity.PackageData">
+ UPDATE CSAR_PACKAGE_TABLE SET DOWNLOADCOUNT=#{downloadCount}
+ WHERE
+ CSARID=#{csarId}
+ </delete>
+
+</mapper> \ No newline at end of file