Upgrade xapp client spec to ver 0.1.1.
Add mock xApp instances
Drop unneeded javadoc plugin invocation from clients
Change-Id: If2e5664efa3b43cd4aee34cc7a8d7014f9bd51f1
Issue-Id: RICPLT-1251
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
<target>1.8</target>
</configuration>
</plugin>
- <!-- Generate javadoc jar; see profile for Java 8 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <!-- <version>2.10.3</version> -->
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
<!-- Generate source jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
--- /dev/null
+/.classpath
+/.project
+/.settings/
+/target/
--- /dev/null
+# ANR xApp Client Generator
+
+This projects generates a REST client library from the Swagger specification
+file stored here and packages it in a jar.
+
+## Eclipse and STS Users
+
+The Swagger Codegen maven plugin is not supported in Eclipse/STS. You can
+limp along by taking these steps:
+
+1. Generate the code using maven:
+ mvn install
+2. Add this folder to the project build path:
+ target/generated-sources/swagger/src/main/java
+
+## License
+
+Copyright (C) 2019 AT&T Intellectual Property & Nokia. All rights reserved.
+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.
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--<![CDATA[
+========================LICENSE_START=================================
+O-RAN-SC
+%%
+Copyright (C) 2019 AT&T Intellectual Property and Nokia
+%%
+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.
+========================LICENSE_END===================================
+]]>-->
+<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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
+ <artifactId>ric-dash-parent</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
+ <!-- This groupId will NOT allow deployment in LF -->
+ <groupId>org.o-ran-sc.ric.anrxapp.client</groupId>
+ <artifactId>anr-xapp-client</artifactId>
+ <name>RIC ANR xApp client</name>
+ <version>0.0.3-SNAPSHOT</version>
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <!-- same as groupId BUT without hyphens -->
+ <client.base.package.name>org.oransc.ric.anrxapp.client</client.base.package.name>
+ </properties>
+ <!-- Successful compilation requires generated code dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-annotations</artifactId>
+ <version>1.5.15</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+ <!-- HTTP client: Spring RestTemplate -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <!-- <version>${spring-web-version}</version> -->
+ </dependency>
+ <!-- JSON processing: jackson -->
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ <!-- <version>${jackson-version}</version> -->
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ <!-- <version>${jackson-version}</version> -->
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <!-- <version>${jackson-version}</version> -->
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-json-provider</artifactId>
+ <!-- <version>${jackson-version}</version> -->
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.datatype</groupId>
+ <artifactId>jackson-datatype-jsr310</artifactId>
+ <!-- <version>${jackson-version}</version> -->
+ </dependency>
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>org.junit.jupiter</groupId>
+ <artifactId>junit-jupiter-api</artifactId>
+ <!-- spring sets the <version>5.4.2</version> -->
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <!-- This version works fine on Swagger 2.0 -->
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-codegen-maven-plugin</artifactId>
+ <version>2.4.5</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ <configuration>
+ <inputSpec>${project.basedir}/src/main/resources/anr_swagger_0.0.3.yaml</inputSpec>
+ <language>java</language>
+ <configOptions>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>${project.artifactId}</artifactId>
+ <artifactVersion>${project.version}</artifactVersion>
+ <artifactUrl>www.O-RAN-SC.org</artifactUrl>
+ <artifactDescription>ANR xApp client library</artifactDescription>
+ <library>resttemplate</library>
+ <java8>true</java8>
+ <dateLibrary>java8</dateLibrary>
+ <licenseName>Apache 2.0</licenseName>
+ <licenseUrl>https://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
+ </configOptions>
+ <packageName>${client.base.package.name}</packageName>
+ <modelPackage>${client.base.package.name}.model</modelPackage>
+ <apiPackage>${client.base.package.name}.api</apiPackage>
+ <invokerPackage>${client.base.package.name}.invoker</invokerPackage>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Require Java 1.8 -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <!-- Spring sets the <version></version> -->
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ </configuration>
+ </plugin>
+ <!-- Generate source jar -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <!-- <version>3.0.0</version> -->
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Skip the deploy-jar-to-nexus step -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <!-- Spring sets the <version>2.8</version> -->
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings
+ only. It has no influence on the Maven build itself. -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>io.swagger</groupId>
+ <artifactId>swagger-codegen-maven-plugin</artifactId>
+ <versionRange>[1.0,)</versionRange>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore/>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
--- /dev/null
+# ========================LICENSE_START=================================
+# O-RAN-SC
+# %%
+# Copyright (C) 2019 AT&T Intellectual Property and Nokia
+# %%
+# 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.
+# ========================LICENSE_END===================================
+swagger : '2.0'
+info :
+ description : REST API specification for RIC ANR closed xAPP
+ version : 0.0.3
+ title : RIC ANR
+ license:
+ name : Nokia Closed App
+ url : 'http://www.nokia.com'
+host : anr-service
+basePath : /ric/v1
+schemes :
+ - http
+paths :
+ /health/alive :
+ get :
+ summary : Health check of ANR - Liveness probe
+ tags :
+ - health
+ operationId : getHealthAlive
+ responses :
+ '200' :
+ description : Status of ANR xApp is ok
+ /health/ready :
+ get :
+ summary : Health check of ANR - Readiness probe
+ tags :
+ - health
+ operationId : getHealthReady
+ responses :
+ '200':
+ description : Status of ANR xApp is ok
+ /ncrt/cell :
+ parameters :
+ - $ref : '#/parameters/ggnbId'
+ - $ref : '#/parameters/startIndex'
+ - $ref : '#/parameters/limit'
+ get :
+ summary : Returns neighbor cell relation table for all gnodeBs or based on query string
+ tags :
+ - ncrt
+ operationId : getNcrtInfo
+ produces :
+ - application/json
+ responses :
+ '200' :
+ description : successful operation
+ schema :
+ $ref : '#/definitions/neighborCellRelationTable'
+ '400' :
+ description : Non-existant identifier {ggnbId | neighborCellIdentifier | start Index} in request
+ /ncrt/cell/{cellIdentifier} :
+ parameters :
+ - $ref : '#/parameters/cellIdentifier'
+ - $ref : '#/parameters/startIndex'
+ - $ref : '#/parameters/limit'
+ - $ref : '#/parameters/neighborCellIdentifierNrpci'
+ - $ref : '#/parameters/neighborCellIdentifierNrcgi'
+ get :
+ summary : Returns neighbor cell relation table for a Source Cell (NR CGI) and optionally a neighbor cell based on query string
+ tags :
+ - ncrt
+ operationId : getCellNcrtInfo
+ produces :
+ - application/json
+ responses :
+ '200' :
+ description : successful operation
+ schema :
+ $ref : '#/definitions/neighborCellRelationTable'
+ '400' :
+ description : Non-existant identifier {cellIdentifier | neighborCellIdentifierNrpci | neighborCellIdentifierNrcgi} in request
+ put :
+ summary : Modify neighbor cell relation based on Source Cell NR CGI and Target Cell NR PCI / NR CGI
+ tags :
+ - ncrt
+ operationId : modifyNCRT
+ consumes :
+ - application/json
+ produces :
+ - application/json
+ parameters :
+ - name : NCRTModificationParameters
+ in : body
+ description : Parameters to modify neighbor cell relation
+ required : true
+ schema :
+ $ref : '#/definitions/neighborCellRelationModTable'
+ responses :
+ '200' :
+ description : Successfully modified neighbor cell relation
+ '400' :
+ description : Modification failed.
+ { Identifier neighborCellIdentifierNrpci / neighborCellIdentifierNrcgi not provided |
+ Non-existant identifier {cellIdentifier | neighborCellIdentifierNrpci | neighborCellIdentifierNrcgi} in request |
+ Invalid data in body
+ }
+ delete :
+ summary : Delete neighbor cell relation based on Source Cell NR CGI and Target Cell NR PCI / NR CGI
+ tags :
+ - ncrt
+ operationId : deleteNcrt
+ parameters :
+ - name : NCRTDeletionParameters
+ in : body
+ description : Parameters to delete neighbor cell relation
+ required : true
+ schema :
+ $ref : '#/definitions/neighborCellRelationDelTable'
+ responses :
+ '204' :
+ description : Successfully deleted neighbor cell relation
+ '400' :
+ description : Deletion failed.
+ { Identifier neighborCellIdentifierNrpci / neighborCellIdentifierNrcgi not provided |
+ Non-existant identifier {cellIdentifier | neighborCellIdentifierNrpci | neighborCellIdentifierNrcgi} in request
+ }
+parameters :
+ ggnbId :
+ type : string
+ name : ggnbId
+ description : Global gNodeB Identifier
+ in : query
+ startIndex :
+ type : string
+ name : startIndex
+ description : Pagination Index
+ in : query
+ limit :
+ type : integer
+ name : limit
+ description : Limit of results that client can handle
+ in : query
+ cellIdentifier :
+ type : string
+ name : cellIdentifier
+ description : Source Cell Identifier (NR CGI)
+ in : path
+ required : true
+ neighborCellIdentifierNrpci :
+ type : string
+ name : neighborCellIdentifierNrpci
+ description : Neighbor Cell Identifier (NR PCI)
+ in : query
+ neighborCellIdentifierNrcgi :
+ type : string
+ name : neighborCellIdentifierNrcgi
+ description : Neigbhor Cell Identifier (NR CGI)
+ in : query
+definitions :
+ neighborCellRelationTable :
+ type : object
+ properties :
+ ncrtRelations :
+ type : array
+ items :
+ $ref : '#/definitions/neighborCellRelation'
+ startIndex :
+ type : string
+ description : Index to use in REST API to process multipage results
+ example : 1245A:6740B
+ neighborCellRelationModTable :
+ type : array
+ items :
+ $ref : '#/definitions/neighborCellRelationMod'
+ neighborCellRelationDelTable :
+ type : array
+ items :
+ $ref : '#/definitions/neighborCellRelationDel'
+ neighborCellRelation :
+ type : object
+ required :
+ - cellIdentifierNrcgi
+ - neighborCellIdentifierNrpci
+ - neighborCellIdentifierNrcgi
+ - flagNoHo
+ - flagNoXn
+ - flagNoRemove
+ properties :
+ cellIdentifierNrcgi :
+ type : string
+ description : Source / Serving Cell Identifier (NR CGI)
+ example : E12345
+ neighborCellIdentifierNrpci :
+ type : string
+ description : Neighbor Cell Identifier (NR PCI)
+ example : E12345
+ neighborCellIdentifierNrcgi :
+ type : string
+ description : Neighbor Cell Identifier (NR CGI)
+ example : E12345
+ flagNoHo :
+ type : boolean
+ description : Flag for HANDOVER NOT ALLOWED
+ example : True
+ flagNoXn :
+ type : boolean
+ description : Flag for Xn CONNECTION NOT ALLOWED
+ example : True
+ flagNoRemove :
+ type : boolean
+ description : Flag for DELETION NOT ALLOWED
+ example : True
+ neighborCellRelationMod :
+ type : object
+ required :
+ - neighbourCellIdentifierType
+ - action
+ properties :
+ neighbourCellIdentifierType :
+ type : string
+ description : Neighbor Cell Identifier Type
+ enum :
+ - nrpci
+ - nrcgi
+ action :
+ type : string
+ description : Modification action to be performed
+ enum :
+ - nrpciToNrcgiMapping
+ - flagUpdates
+ - nrcgiMappingAndFlagUpdates
+ neighborCellIdentifierNrpci :
+ type : string
+ description : Neighbor Cell Identifier (NR PCI)
+ example : E12345
+ neighborCellIdentifierNrcgi :
+ type : string
+ description : Neighbor Cell Identifier (NR CGI)
+ example : E12345
+ flagNoHo :
+ type : boolean
+ description : Flag for HANDOVER NOT ALLOWED
+ example : True
+ flagNoXn :
+ type : boolean
+ description : Flag for Xn CONNECTION NOT ALLOWED
+ example : True
+ flagNoRemove :
+ type : boolean
+ description : Flag for DELETION NOT ALLOWED
+ example : True
+ neighborCellRelationDel :
+ type : object
+ required :
+ - idType
+ properties :
+ idType :
+ type : string
+ description : Modification action to be performed
+ enum :
+ - nrpci
+ - nrcgi
+ neighborCellIdentifierNrpci :
+ type : string
+ description : Neighbor Cell Identifier (NR PCI)
+ example : E12345
+ neighborCellIdentifierNrcgi :
+ type : string
+ description : Neighbor Cell Identifier (NR PCI)
+ example : E12345
--- /dev/null
+/*-
+ * ========================LICENSE_START=================================
+ * O-RAN-SC
+ * %%
+ * Copyright (C) 2019 AT&T Intellectual Property and Nokia
+ * %%
+ * 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.
+ * ========================LICENSE_END===================================
+ */
+package org.oransc.ric.portal.dashboard.anrxapp.client.test;
+
+import org.junit.jupiter.api.Test;
+import org.oransc.ric.anrxapp.client.api.HealthApi;
+import org.oransc.ric.anrxapp.client.invoker.ApiClient;
+import org.springframework.web.client.RestClientException;
+
+/**
+ * Demonstrates use of the generated ANR xApp client.
+ *
+ * The test fails because no server is available.
+ */
+public class AnrXappClientTest {
+
+ @Test
+ public void demo() {
+ ApiClient apiClient = new ApiClient();
+ apiClient.setBasePath("http://localhost:30099/");
+ HealthApi healthApi = new HealthApi(apiClient);
+ try {
+ healthApi.getHealthAlive();
+ System.out.println("getHealthAlive answered: " + apiClient.getStatusCode().toString());
+ } catch (RestClientException e) {
+ System.err.println("getHealthAlive failed: " + e.toString());
+ }
+ }
+
+}
* Add draft A1 Mediator API definition
* Use E2 Manager API definition dated 2 May 2019, with tag modifications
* Adjust group IDs and packages for name O-RAN-SC; drop ORAN-OSC
+* Add ANR API spec and client code generator
Version 1.0.0, 30 Apr 2019
--------------------------
<target>1.8</target>
</configuration>
</plugin>
- <!-- Generate javadoc jar; see profile for Java 8 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <!-- <version>2.10.3</version> -->
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
<!-- Generate source jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
</properties>
<modules>
<module>a1-med-client</module>
+ <module>anr-xapp-client</module>
<module>e2-mgr-client</module>
<module>xapp-mgr-client</module>
<module>webapp-frontend</module>
<artifactId>a1-med-client</artifactId>
<version>0.3.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.o-ran-sc.ric.anrxapp.client</groupId>
+ <artifactId>anr-xapp-client</artifactId>
+ <version>0.0.3-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.o-ran-sc.ric.e2mgr.client</groupId>
<artifactId>e2-mgr-client</artifactId>
<dependency>
<groupId>org.o-ran-sc.ric.xappmgr.client</groupId>
<artifactId>xapp-mgr-client</artifactId>
- <version>0.0.10-SNAPSHOT</version>
+ <version>0.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
import org.oransc.ric.xappmgr.client.model.XAppInfo;
import org.oransc.ric.xappmgr.client.model.Xapp;
import org.oransc.ric.xappmgr.client.model.Xapp.StatusEnum;
+import org.oransc.ric.xappmgr.client.model.XappInstance;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
public XappManagerMockConfiguration() {
logger.info("Configuring mock xApp Manager");
+ Xapp ac = new Xapp().name("Admission Control").version("v3").status(StatusEnum.FAILED);
+ ac.addInstancesItem(new XappInstance().name("cdef-3456").ip("3.4.5.6").port(200).status(XappInstance.StatusEnum.RUNNING));
+ Xapp an = new Xapp().name("ANR Control").version("v0").status(StatusEnum.SUPERSEDED);
+ an.addInstancesItem(new XappInstance().name("fedc-8765").ip("8.7.6.5").port(400).status(XappInstance.StatusEnum.RUNNING));
+ Xapp dc = new Xapp().name("Dual Connectivity").version("v2").status(StatusEnum.DELETED);
+ dc.addInstancesItem(new XappInstance().name("def0-6789").ip("6.7.8.9").port(300).status(XappInstance.StatusEnum.COMPLETED));
+ Xapp pc = new Xapp().name("Pendulum Control").version("v1").status(StatusEnum.DEPLOYED);
+ pc.addInstancesItem(new XappInstance().name("abcd-1234").ip("1.2.3.4").port(100).status(XappInstance.StatusEnum.RUNNING));
allXapps = new AllXapps();
- allXapps.add(new Xapp().name("Pendulum Control").version("v1").status(StatusEnum.DEPLOYED));
- allXapps.add(new Xapp().name("Dual Connectivity").version("v2").status(StatusEnum.DELETED));
- allXapps.add(new Xapp().name("Admission Control").version("v3").status(StatusEnum.FAILED));
- allXapps.add(new Xapp().name("ANR Control").version("v0").status(StatusEnum.SUPERSEDED));
+ allXapps.add(ac);
+ allXapps.add(an);
+ allXapps.add(dc);
+ allXapps.add(pc);
}
@Bean
<groupId>org.o-ran-sc.ric.xappmgr.client</groupId>
<artifactId>xapp-mgr-client</artifactId>
<name>RIC xApp Manager client</name>
- <version>0.0.10-SNAPSHOT</version>
+ <version>0.1.1-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<goal>generate</goal>
</goals>
<configuration>
- <inputSpec>${project.basedir}/src/main/resources/xapp_manager_rest_api_v0_0_10.json</inputSpec>
+ <inputSpec>${project.basedir}/src/main/resources/xapp_manager_rest_api_v0_1_1.yaml</inputSpec>
<language>java</language>
<configOptions>
<groupId>${project.groupId}</groupId>
<target>1.8</target>
</configuration>
</plugin>
- <!-- Generate javadoc jar; see profile for Java 8 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <!-- <version>2.10.3</version> -->
- <executions>
- <execution>
- <id>attach-javadocs</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
<!-- Generate source jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+++ /dev/null
-xapp_manager_rest_api_v0_0_10.yaml
--- /dev/null
+# ========================LICENSE_START=================================
+# O-RAN-SC
+# %%
+# Copyright (C) 2019 AT&T Intellectual Property and Nokia
+# %%
+# 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.
+# ========================LICENSE_END===================================
+swagger: '2.0'
+info:
+ description: This is a draft API for RIC appmgr
+ version: 0.1.1
+ title: RIC appmgr
+ license:
+ name: Apache 2.0
+ url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
+host: hostname
+basePath: /ric/v1
+schemes:
+ - https
+ - http
+paths:
+ /health:
+ get:
+ summary: Health check of xApp Manager
+ operationId: getHealth
+ responses:
+ '200':
+ description: Status of xApp Manager is ok
+ /xapps:
+ post:
+ summary: Deploy a xapp
+ operationId: deployXapp
+ consumes:
+ - application/json
+ produces:
+ - application/json
+ parameters:
+ - name: xAppInfo
+ in: body
+ description: xApp information
+ schema:
+ type: object
+ required:
+ - xAppName
+ properties:
+ xAppName:
+ type: string
+ description: Name of the xApp
+ example: xapp-dummy
+ responses:
+ '201':
+ description: xApp successfully created
+ schema:
+ $ref: '#/definitions/Xapp'
+ '400':
+ description: Invalid input
+ '500':
+ description: Internal error
+ get:
+ summary: Returns the status of all xapps
+ operationId: getAllXapps
+ produces:
+ - application/json
+ responses:
+ '200':
+ description: successful query of xApps
+ schema:
+ $ref: '#/definitions/AllXapps'
+ '500':
+ description: Internal error
+ '/xapps/{xAppName}':
+ get:
+ summary: Returns the status of a given xapp
+ operationId: getXappByName
+ produces:
+ - application/json
+ parameters:
+ - name: xAppName
+ in: path
+ description: Name of xApp
+ required: true
+ type: string
+ responses:
+ '200':
+ description: successful operation
+ schema:
+ $ref: '#/definitions/Xapp'
+ '400':
+ description: Invalid ID supplied
+ '404':
+ description: Xapp not found
+ '500':
+ description: Internal error
+ delete:
+ summary: Undeploy an existing xapp
+ operationId: undeployXapp
+ parameters:
+ - name: xAppName
+ in: path
+ description: Xapp to be undeployed
+ required: true
+ type: string
+ responses:
+ '204':
+ description: Successful deletion of xApp
+ '400':
+ description: Invalid xApp name supplied
+ '500':
+ description: Internal error
+ '/xapps/{xAppName}/instances/{xAppInstanceName}':
+ get:
+ summary: Returns the status of a given xapp
+ operationId: getXappInstanceByName
+ produces:
+ - application/json
+ parameters:
+ - name: xAppName
+ in: path
+ description: Name of xApp
+ required: true
+ type: string
+ - name: xAppInstanceName
+ in: path
+ description: Name of xApp instance to get information
+ required: true
+ type: string
+ responses:
+ '200':
+ description: successful operation
+ schema:
+ $ref: '#/definitions/XappInstance'
+ '400':
+ description: Invalid name supplied
+ '404':
+ description: Xapp not found
+ '500':
+ description: Internal error
+ /config:
+ post:
+ summary: Create xApp config
+ operationId: createXappConfig
+ consumes:
+ - application/json
+ produces:
+ - application/json
+ parameters:
+ - name: xAppConfig
+ in: body
+ description: xApp config
+ schema:
+ $ref: '#/definitions/xAppConfig'
+ responses:
+ '201':
+ description: xApp config successfully created
+ schema:
+ $ref: '#/definitions/xAppConfig'
+ '400':
+ description: Invalid input
+ '500':
+ description: Internal error
+ put:
+ summary: Modify xApp config
+ operationId: ModifyXappConfig
+ consumes:
+ - application/json
+ produces:
+ - application/json
+ parameters:
+ - name: xAppConfig
+ in: body
+ description: xApp config
+ schema:
+ $ref: '#/definitions/xAppConfig'
+ responses:
+ '200':
+ description: xApp config successfully modified
+ schema:
+ $ref: '#/definitions/xAppConfig'
+ '400':
+ description: Invalid input
+ '500':
+ description: Internal error
+ get:
+ summary: Returns the configuration of all xapps
+ operationId: getAllXappConfig
+ produces:
+ - application/json
+ responses:
+ '200':
+ description: successful query of xApp config
+ schema:
+ $ref: '#/definitions/AllXappConfig'
+ '500':
+ description: Internal error
+ delete:
+ summary: Delete xApp configuration
+ operationId: deleteXappConfig
+ parameters:
+ - name: xAppConfigInfo
+ in: body
+ description: xApp configuration information
+ schema:
+ $ref: '#/definitions/xAppConfigInfo'
+ responses:
+ '204':
+ description: Successful deletion of xApp
+ '400':
+ description: Invalid parameters supplied
+ '500':
+ description: Internal error
+ /subscriptions:
+ post:
+ summary: Subscribe event
+ operationId: addSubscription
+ consumes:
+ - application/json
+ produces:
+ - application/json
+ parameters:
+ - name: subscriptionRequest
+ in: body
+ description: New subscription
+ required: true
+ schema:
+ $ref: '#/definitions/subscriptionRequest'
+ responses:
+ '200':
+ description: Subscription successful
+ schema:
+ $ref: '#/definitions/subscriptionResponse'
+ '400':
+ description: Invalid input
+ get:
+ summary: Returns all subscriptions
+ operationId: getSubscriptions
+ produces:
+ - application/json
+ responses:
+ '200':
+ description: successful query of subscriptions
+ schema:
+ $ref: '#/definitions/allSubscriptions'
+ '/subscriptions/{subscriptionId}':
+ get:
+ summary: Returns the information of subscription
+ operationId: getSubscriptionById
+ produces:
+ - application/json
+ parameters:
+ - name: subscriptionId
+ in: path
+ description: ID of subscription
+ required: true
+ type: integer
+ responses:
+ '200':
+ description: successful operation
+ schema:
+ $ref: '#/definitions/subscription'
+ '400':
+ description: Invalid ID supplied
+ '404':
+ description: Subscription not found
+ put:
+ summary: Modify event subscription
+ operationId: modifySubscription
+ consumes:
+ - application/json
+ produces:
+ - application/json
+ parameters:
+ - name: subscriptionId
+ in: path
+ description: ID of subscription
+ required: true
+ type: integer
+ - in: body
+ name: subscriptionRequest
+ description: Modified subscription
+ required: true
+ schema:
+ $ref: '#/definitions/subscriptionRequest'
+ responses:
+ '200':
+ description: Subscription modification successful
+ schema:
+ $ref: '#/definitions/subscriptionResponse'
+ '400':
+ description: Invalid input
+ delete:
+ summary: Unsubscribe event
+ description: ''
+ operationId: deleteSubscription
+ parameters:
+ - name: subscriptionId
+ in: path
+ description: ID of subscription
+ required: true
+ type: integer
+ responses:
+ '204':
+ description: Successful deletion of subscription
+ '400':
+ description: Invalid subscription supplied
+definitions:
+ AllXapps:
+ type: array
+ items:
+ $ref: '#/definitions/Xapp'
+ Xapp:
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ type: string
+ example: xapp-dummy
+ status:
+ type: string
+ description: xapp status in the RIC
+ enum:
+ - unknown
+ - deployed
+ - deleted
+ - superseded
+ - failed
+ - deleting
+ version:
+ type: string
+ example: 1.2.3
+ instances:
+ type: array
+ items:
+ $ref: '#/definitions/XappInstance'
+ XappInstance:
+ type: object
+ required:
+ - name
+ properties:
+ name:
+ type: string
+ example: xapp-dummy-6cd577d9-4v255
+ status:
+ type: string
+ description: xapp instance status
+ enum:
+ - pending
+ - running
+ - succeeded
+ - failed
+ - unknown
+ - completed
+ - crashLoopBackOff
+ ip:
+ type: string
+ example: 192.168.0.1
+ port:
+ type: integer
+ example: 32300
+ txMessages:
+ type: array
+ items:
+ type: string
+ example: ControlIndication
+ rxMessages:
+ type: array
+ items:
+ type: string
+ example: LoadIndication
+ xAppConfigInfo:
+ type: object
+ required:
+ - xAppName
+ - configMapName
+ - namespace
+ properties:
+ xAppName:
+ type: string
+ description: Name of the xApp
+ example: xapp-dummy
+ configMapName:
+ type: string
+ description: Name of the config map
+ example: xapp-dummy-config-map
+ namespace:
+ type: string
+ description: Name of the namespace
+ example: ricxapp
+ xAppConfig:
+ type: object
+ required:
+ - xAppConfigInfo
+ - configSchema
+ - configMap
+ properties:
+ xAppConfigInfo:
+ $ref: '#/definitions/xAppConfigInfo'
+ configSchema:
+ type: object
+ description: Schema of configuration in JSON format
+ configMap:
+ type: object
+ description: Configuration in JSON format
+ AllXappConfig:
+ type: array
+ items:
+ $ref: '#/definitions/xAppConfig'
+ subscriptionRequest:
+ type: object
+ required:
+ - targetUrl
+ - eventType
+ - maxRetries
+ - retryTimer
+ properties:
+ targetUrl:
+ type: string
+ example: 'http://localhost:11111/apps/webhook/'
+ eventType:
+ type: string
+ description: Event which is subscribed
+ enum:
+ - created
+ - deleted
+ - all
+ maxRetries:
+ type: integer
+ description: Maximum number of retries
+ example: 11
+ retryTimer:
+ type: integer
+ description: Time in seconds to wait before next retry
+ example: 22
+ subscriptionResponse:
+ type: object
+ properties:
+ id:
+ type: string
+ example: 1ILBltYYzEGzWRrVPZKmuUmhwcc
+ version:
+ type: integer
+ example: 2
+ eventType:
+ type: string
+ description: Event which is subscribed
+ enum:
+ - created
+ - deleted
+ - updated
+ - all
+ allSubscriptions:
+ type: array
+ items:
+ $ref: '#/definitions/subscription'
+ subscription:
+ type: object
+ properties:
+ id:
+ type: string
+ example: 1ILBltYYzEGzWRrVPZKmuUmhwcc
+ targetUrl:
+ type: string
+ example: 'http://localhost:11111/apps/webhook/'
+ eventType:
+ type: string
+ description: Event which is subscribed
+ enum:
+ - created
+ - deleted
+ - updated
+ - all
+ maxRetries:
+ type: integer
+ description: Maximum number of retries
+ example: 11
+ retryTimer:
+ type: integer
+ description: Time in seconds to wait before next retry
+ example: 22
+ subscriptionNotification:
+ type: object
+ properties:
+ id:
+ type: string
+ example: 1ILBltYYzEGzWRrVPZKmuUmhwcc
+ version:
+ type: integer
+ example: 2
+ eventType:
+ type: string
+ description: Event to be notified
+ enum:
+ - created
+ - deleted
+ - updated
+ xApps:
+ $ref: '#/definitions/AllXapps'