diff options
Diffstat (limited to 'lifecycle-test/src/main/resources')
-rw-r--r-- | lifecycle-test/src/main/resources/log4j.properties | 27 | ||||
-rw-r--r-- | lifecycle-test/src/main/resources/spring/services.xml | 62 | ||||
-rw-r--r-- | lifecycle-test/src/main/resources/spring/svc_register.xml | 42 | ||||
-rw-r--r-- | lifecycle-test/src/main/resources/swagger.json | 146 |
4 files changed, 277 insertions, 0 deletions
diff --git a/lifecycle-test/src/main/resources/log4j.properties b/lifecycle-test/src/main/resources/log4j.properties new file mode 100644 index 0000000..8a86be9 --- /dev/null +++ b/lifecycle-test/src/main/resources/log4j.properties @@ -0,0 +1,27 @@ +############################################################################### +# 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. +############################################################################### +log4j.rootLogger=INFO,root,stdout +log4j.appender.root.Append=true +log4j.appender.root.File=${catalina.base}/logs/lifecycle-test.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 + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%d %-5p [%t][%X{moduleID}][%C %L] %m%n
\ No newline at end of file diff --git a/lifecycle-test/src/main/resources/spring/services.xml b/lifecycle-test/src/main/resources/spring/services.xml new file mode 100644 index 0000000..44acfd6 --- /dev/null +++ b/lifecycle-test/src/main/resources/spring/services.xml @@ -0,0 +1,62 @@ +<?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. + --> + +<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:aop="http://www.springframework.org/schema/aop" + xmlns:osgi="http://www.springframework.org/schema/osgi" xmlns:osgix="http://www.springframework.org/schema/osgi-compendium" + xmlns:ctx="http://www.springframework.org/schema/context" + xmlns:jaxrs="http://cxf.apache.org/jaxrs" + xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/osgi + http://www.springframework.org/schema/osgi/spring-osgi.xsd + http://www.springframework.org/schema/context + http://www.springframework.org/schema/context/spring-context.xsd + http://www.springframework.org/schema/osgi-compendium + http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd + http://cxf.apache.org/jaxrs + http://cxf.apache.org/schemas/jaxrs.xsd + http://cxf.apache.org/transports/http/configuration + http://cxf.apache.org/schemas/configuration/http-conf.xsd + http://www.springframework.org/schema/aop + http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> + + <!-- these are included in the dependency jar --> + <import resource="classpath:META-INF/cxf/cxf.xml" /> + <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> + + <bean id="jsonProvider" class="org.codehaus.jackson.jaxrs.JacksonJsonProvider" /> + + <bean id="SwaggerRoa" class="org.openo.vnfsdk.lctest.service.rest.SwaggerRoa"></bean> + + <bean id="vnfpackageService" class="org.openo.vnfsdk.lctest.service.business.impl.VnfpackageServiceImpl"></bean> + <bean id="VnfpackageRoa" class="org.openo.vnfsdk.lctest.service.rest.VnfpackageRoa"> + <property name="vnfpackageService" ref="vnfpackageService"></property> + </bean> + + <jaxrs:server id="restContainer" address="/"> + <jaxrs:serviceBeans> + <ref bean="SwaggerRoa" /> + <ref bean="VnfpackageRoa" /> + </jaxrs:serviceBeans> + <jaxrs:providers> + <ref bean="jsonProvider" /> + </jaxrs:providers> + </jaxrs:server> +</beans> diff --git a/lifecycle-test/src/main/resources/spring/svc_register.xml b/lifecycle-test/src/main/resources/spring/svc_register.xml new file mode 100644 index 0000000..79f4f3e --- /dev/null +++ b/lifecycle-test/src/main/resources/spring/svc_register.xml @@ -0,0 +1,42 @@ +<?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. + --> + +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:osgi="http://www.springframework.org/schema/osgi" + xmlns:osgix="http://www.springframework.org/schema/osgi-compendium" + xmlns:ctx="http://www.springframework.org/schema/context" xmlns:jaxrs="http://cxf.apache.org/jaxrs" + xmlns:http-conf="http://cxf.apache.org/transports/http/configuration" + xmlns:context="http://www.springframework.org/schema/context" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://www.springframework.org/schema/osgi + http://www.springframework.org/schema/osgi/spring-osgi.xsd + http://www.springframework.org/schema/context + http://www.springframework.org/schema/context/spring-context.xsd + http://www.springframework.org/schema/osgi-compendium + http://www.springframework.org/schema/osgi-compendium/spring-osgi-compendium.xsd + http://cxf.apache.org/jaxrs + http://cxf.apache.org/schemas/jaxrs.xsd + http://cxf.apache.org/transports/http/configuration + http://cxf.apache.org/schemas/configuration/http-conf.xsd + http://www.springframework.org/schema/aop + http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd + http://www.springframework.org/schema/aop/spring-aop-3.0.xsd"> + <bean class="org.openo.vnfsdk.lctest.service.activator.LifecycleTestPostProcessor"></bean> + <bean class="org.openo.vnfsdk.lctest.service.adapter.impl.LifecycleTestAdapterMgrService"></bean> +</beans>
\ No newline at end of file diff --git a/lifecycle-test/src/main/resources/swagger.json b/lifecycle-test/src/main/resources/swagger.json new file mode 100644 index 0000000..8b73adb --- /dev/null +++ b/lifecycle-test/src/main/resources/swagger.json @@ -0,0 +1,146 @@ +{ + "swagger": "2.0", + "info": { + "title": "lifecycle-test API", + "description": "OPEN-O Interface provider.", + "version": "1.0.0" + }, + "host": "openo.org", + "schemes": [ + "https", + "http" + ], + "basePath": "/openoapi/vnfsdk/v1", + "paths": { + "/vnfpackage": { + "post": { + "summary": "Vnfpackage Onboarding", + "description": "Vnfpackage Onboarding", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "in": "body", + "name": "Vnfpackage", + "description": "Vnfpackage Onboarding.", + "schema": { + "$ref": "#/definitions/VnfpackageParam" + } + } + ], + "responses": { + "200": { + "description": "Successfully Vnfpackage Onboarding", + "schema": { + "$ref": "#/definitions/VnfpackageOnboardingResponse" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Vnfpackage Onboarding Not Found" + }, + "500": { + "description": "Vnfpackage Onboarding failed to process the request" + } + } + } + }, + "/vnfpackage/{csarId}": { + "get": { + "summary": "Vnfpackage Query", + "description": "Vnfpackage Query", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "csarId", + "in": "path", + "description": "csarId", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Successfully Vnfpackage Query", + "schema": { + "$ref": "#/definitions/VnfpackageQueryResponse" + } + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Vnfpackage Onboarding Not Found" + }, + "500": { + "description": "Vnfpackage Onboarding failed to process the request" + } + } + } + } + }, + "definitions": { + "VnfpackageParam": { + "type": "object", + "description": "Vnfpackage Param.", + "required": [ + "csarId", + "vimIds", + "labVimId" + ], + "properties": { + "csarId": { + "type": "string", + "description": "csarId" + }, + "vimIds": { + "type": "array", + "items": { + "type": "string" + } + }, + "labVimId": { + "type": "string", + "description": "labVimId" + } + } + }, + "VnfpackageOnboardingResponse": { + "type": "object", + "description": "Vnfpackage Onboarding Response.", + "required": [ + "jobId" + ], + "properties": { + "jobId": { + "type": "string", + "description": "jobId" + } + } + }, + "VnfpackageQueryResponse": { + "type": "object", + "description": "Vnfpackage Onboarding Response.", + "required": [ + "csarId" + ], + "properties": { + "csarId": { + "type": "string", + "description": "csarId" + } + } + } + } +}
\ No newline at end of file |