diff options
Diffstat (limited to 'vnfmarket-be/vnf-sdk-marketplace/src/main/resources')
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 |