Use o-ran-sc in groupId strings.
Adjust java package names similarly.
Bump version to 1.0.1.
Change-Id: I8385916c53a6ee3e6de81d8e95510f4e14738d1d
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
RIC Dashboard Release Notes
===========================
+Version 1.0.1, 2 May 2019
+-------------------------
+* Use E2 Manager API definition dated 2 May 2019
+
Version 1.0.0, 30 Apr 2019
--------------------------
* Initial version
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.oranosc.ric.portal.dashboard</groupId>
+ <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
<artifactId>ric-dash-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.oranosc.ric.e2mgr.client</groupId>
+ <!-- This groupId will NOT allow deployment in LF -->
+ <groupId>org.o-ran-sc.ric.e2mgr.client</groupId>
<artifactId>e2-mgr-client</artifactId>
<name>RIC E2 Manager client</name>
- <version>0.0.1-SNAPSHOT</version>
+ <version>02052019-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <swagger-annotations-version>1.5.15</swagger-annotations-version>
- <client.base.package.name>org.oranosc.ric.e2mgr.client</client.base.package.name>
+ <client.base.package.name>org.oransc.ric.e2mgr.client</client.base.package.name>
</properties>
<!-- Successful compilation requires generated code dependencies -->
<dependencies>
<dependency>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
- <version>${swagger-annotations-version}</version>
+ <version>2.0.8</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<build>
<plugins>
<plugin>
- <groupId>io.swagger</groupId>
+ <!-- This 2019 version is required for OpenAPI 3 -->
+ <groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
- <version>2.4.5</version>
+ <version>3.0.8</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
- <inputSpec>${project.basedir}/src/main/resources/e2_mgr_rest_api_v0_0_1.yaml</inputSpec>
+ <inputSpec>${project.basedir}/src/main/resources/e2_manager_02052019.yaml</inputSpec>
<language>java</language>
+ <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>
<configOptions>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<artifactVersion>${project.version}</artifactVersion>
- <artifactUrl>www.oran-osc.org</artifactUrl>
- <artifactDescription>E2 manager 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>
- <scmConnection></scmConnection>
- <scmDeveloperConnection></scmDeveloperConnection>
- <scmUrl>http://gerrit.oran-osc.org</scmUrl>
- <developerName>RIC Team</developerName>
- <developerEmail></developerEmail>
- <developerOrganization>AT&T and Nokia</developerOrganization>
- <developerOrganizationUrl></developerOrganizationUrl>
</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>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
- <groupId>io.swagger</groupId>
+ <groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
--- /dev/null
+# ========================LICENSE_START=================================
+# ORAN-OSC
+# %%
+# 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===================================
+openapi: 3.0.0
+info:
+ title: E2 Manager Service
+ description: This is a description of E2 manager service APIs
+ version: 1.0.0
+servers:
+ - url: http://{apiRoot}/nodeb/v1
+ variables:
+ apiRoot:
+ default: localhost:3800
+ description: >-
+ E2 manager
+paths:
+ /setup:
+ post:
+ summary: X2 Setup Request
+ tags:
+ - X2 Setup Request
+ operationId: setup
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SetupRequest'
+ required: true
+ responses:
+ '200':
+ description: Request was handled successfuly
+ '400':
+ description: Invalid input
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '404':
+ description: Resource not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ default:
+ description: Unexpected error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+
+ /endcSetup:
+ post:
+ tags:
+ - ENDC Setup Request
+ summary: ENDC Setup Request
+ operationId: endcSetup
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SetupRequest'
+ required: true
+ responses:
+ '200':
+ description: Request was handled successfuly
+ '400':
+ description: Invalid input
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '404':
+ description: Resource not found
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ '500':
+ description: Internal server error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+ default:
+ description: Unexpected error
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ErrorResponse'
+
+ /health:
+ get:
+ tags:
+ - Health Check
+ summary: E2 Manager Service Health Check
+ operationId: healthCheck
+ responses:
+ '200':
+ description: OK
+components:
+ schemas:
+ SetupRequest:
+ type: object
+ required:
+ - ranIp
+ - ranPort
+ - ranName
+ properties:
+ ranIp:
+ type: string
+ ranPort:
+ type: integer
+ format: uint16
+ ranName:
+ type: string
+ ErrorResponse:
+ type: object
+ required:
+ - errorCode
+ - errorMessage
+ properties:
+ errorCode:
+ type: string
+ description: 401 - corrupted json, 402 - validation error, 501 - internal problem
+ errorMessage:
+ type: string
+ description: Human readable text
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dashboard.e2mgr.demo;
+package org.oransc.ric.portal.dashboard.e2mgr.client.test;
import org.junit.jupiter.api.Test;
-import org.oranosc.ric.e2mgr.client.api.DefaultApi;
-import org.oranosc.ric.e2mgr.client.invoker.ApiClient;
+import org.oransc.ric.e2mgr.client.api.HealthCheckApi;
+import org.oransc.ric.e2mgr.client.invoker.ApiClient;
import org.springframework.web.client.RestClientException;
/**
public void demo() {
ApiClient apiClient = new ApiClient();
apiClient.setBasePath("http://localhost:30099/");
- DefaultApi e2Mgr = new DefaultApi(apiClient);
+ HealthCheckApi e2Health = new HealthCheckApi(apiClient);
try {
- e2Mgr.getHealth();
+ e2Health.healthCheck();
System.out.println("getHealth answered: " + apiClient.getStatusCode().toString());
} catch (RestClientException e) {
System.err.println("getHealth failed: " + e.toString());
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
- <version>2.1.3.RELEASE</version>
+ <version>2.1.4.RELEASE</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
- <groupId>org.oranosc.ric.portal.dashboard</groupId>
+ <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
<artifactId>ric-dash-parent</artifactId>
<name>RIC Dashboard project</name>
<packaging>pom</packaging>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
<!-- Properties for the license-maven-plugin in child POMs -->
<properties>
<lmp.organization.name>AT&T Intellectual Property and Nokia</lmp.organization.name>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.oranosc.ric.portal.dashboard</groupId>
+ <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
<artifactId>ric-dash-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
</parent>
<artifactId>ric-dash-be</artifactId>
<name>RIC Dashboard Webapp backend</name>
</properties>
<dependencies>
<dependency>
- <groupId>org.oranosc.ric.e2mgr.client</groupId>
+ <groupId>org.o-ran-sc.ric.e2mgr.client</groupId>
<artifactId>e2-mgr-client</artifactId>
- <version>0.0.1-SNAPSHOT</version>
+ <version>02052019-SNAPSHOT</version>
</dependency>
<dependency>
- <groupId>org.oranosc.ric.xappmgr.client</groupId>
+ <groupId>org.o-ran-sc.ric.xappmgr.client</groupId>
<artifactId>xapp-mgr-client</artifactId>
<version>0.0.10-SNAPSHOT</version>
</dependency>
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash;
+package org.oransc.ric.portal.dashboard;
import java.lang.invoke.MethodHandles;
@SpringBootApplication
// Limit the annotation scan to the dashboard classes;
// exclude the generated client classes!
-@ComponentScan("org.oranosc.ric.portal.dash")
+@ComponentScan("org.oransc.ric.portal.dashboard")
public class DashboardApplication {
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash;
+package org.oransc.ric.portal.dashboard;
public abstract class DashboardConstants {
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.config;
+package org.oransc.ric.portal.dashboard.config;
import java.lang.invoke.MethodHandles;
-import org.oranosc.ric.e2mgr.client.api.DefaultApi;
-import org.oranosc.ric.e2mgr.client.invoker.ApiClient;
+import org.oransc.ric.e2mgr.client.api.EndcSetupRequestApi;
+import org.oransc.ric.e2mgr.client.api.HealthCheckApi;
+import org.oransc.ric.e2mgr.client.api.X2SetupRequestApi;
+import org.oransc.ric.e2mgr.client.invoker.ApiClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
this.e2mgrBasepath = e2mgrBasepath;
}
- /**
- * @return A DefaultApi with an ApiClient configured from properties
- */
- @Bean
- public DefaultApi e2ManagerClient() {
+ private ApiClient apiClient() {
ApiClient apiClient = new ApiClient(new RestTemplate());
apiClient.setBasePath(e2mgrBasepath);
- return new DefaultApi(apiClient);
+ return apiClient;
+ }
+
+ @Bean
+ public EndcSetupRequestApi endcSetupRequestApi() {
+ return new EndcSetupRequestApi(apiClient());
+ }
+
+ @Bean
+ public HealthCheckApi healthCheckApi() {
+ return new HealthCheckApi(apiClient());
+ }
+
+ @Bean
+ public X2SetupRequestApi x2SetupRequestApi() {
+ return new X2SetupRequestApi(apiClient());
}
}
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.config;
+package org.oransc.ric.portal.dashboard.config;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
import java.lang.invoke.MethodHandles;
-import org.oranosc.ric.e2mgr.client.api.DefaultApi;
-import org.oranosc.ric.e2mgr.client.invoker.ApiClient;
-import org.oranosc.ric.e2mgr.client.model.RanSetupRequest;
+import org.oransc.ric.e2mgr.client.api.EndcSetupRequestApi;
+import org.oransc.ric.e2mgr.client.api.HealthCheckApi;
+import org.oransc.ric.e2mgr.client.api.X2SetupRequestApi;
+import org.oransc.ric.e2mgr.client.invoker.ApiClient;
+import org.oransc.ric.e2mgr.client.model.SetupRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
logger.info("Configuring mock E2 Manager");
}
- @Bean
- public DefaultApi e2ManagerMockClient() {
+ private ApiClient apiClient() {
ApiClient mockClient = mock(ApiClient.class);
when(mockClient.getStatusCode()).thenReturn(HttpStatus.OK);
+ return mockClient;
+ }
- DefaultApi mockApi = mock(DefaultApi.class);
- when(mockApi.getApiClient()).thenReturn(mockClient);
+ @Bean
+ public EndcSetupRequestApi endcSetupRequestApi() {
+ ApiClient apiClient = apiClient();
+ EndcSetupRequestApi mockApi = mock(EndcSetupRequestApi.class);
+ when(mockApi.getApiClient()).thenReturn(apiClient);
+ return mockApi;
+ }
+ @Bean
+ public HealthCheckApi healthCheckApi() {
+ ApiClient apiClient = apiClient();
+ HealthCheckApi mockApi = mock(HealthCheckApi.class);
+ when(mockApi.getApiClient()).thenReturn(apiClient);
doAnswer(i -> {
return null;
- }).when(mockApi).getHealth();
+ }).when(mockApi).healthCheck();
+ return mockApi;
+ }
+ @Bean
+ public X2SetupRequestApi x2SetupRequestApi() {
+ ApiClient apiClient = apiClient();
+ X2SetupRequestApi mockApi = mock(X2SetupRequestApi.class);
+ when(mockApi.getApiClient()).thenReturn(apiClient);
doAnswer(i -> {
return null;
- }).when(mockApi).setupRan(any(RanSetupRequest.class));
-
+ }).when(mockApi).setup(any(SetupRequest.class));
return mockApi;
}
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.config;
+package org.oransc.ric.portal.dashboard.config;
-import org.oranosc.ric.portal.dash.DashboardApplication;
+import org.oransc.ric.portal.dashboard.DashboardApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.config;
+package org.oransc.ric.portal.dashboard.config;
import java.lang.invoke.MethodHandles;
-import org.oranosc.ric.xappmgr.client.api.DefaultApi;
-import org.oranosc.ric.xappmgr.client.invoker.ApiClient;
+import org.oransc.ric.xappmgr.client.api.DefaultApi;
+import org.oransc.ric.xappmgr.client.invoker.ApiClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.config;
+package org.oransc.ric.portal.dashboard.config;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
import java.lang.invoke.MethodHandles;
-import org.oranosc.ric.xappmgr.client.api.DefaultApi;
-import org.oranosc.ric.xappmgr.client.invoker.ApiClient;
-import org.oranosc.ric.xappmgr.client.model.AllXapps;
-import org.oranosc.ric.xappmgr.client.model.SubscriptionRequest;
-import org.oranosc.ric.xappmgr.client.model.SubscriptionResponse;
-import org.oranosc.ric.xappmgr.client.model.XAppInfo;
-import org.oranosc.ric.xappmgr.client.model.Xapp;
-import org.oranosc.ric.xappmgr.client.model.Xapp.StatusEnum;
+import org.oransc.ric.xappmgr.client.api.DefaultApi;
+import org.oransc.ric.xappmgr.client.invoker.ApiClient;
+import org.oransc.ric.xappmgr.client.model.AllXapps;
+import org.oransc.ric.xappmgr.client.model.SubscriptionRequest;
+import org.oransc.ric.xappmgr.client.model.SubscriptionResponse;
+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.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.controller;
+package org.oransc.ric.portal.dashboard.controller;
import java.lang.invoke.MethodHandles;
import java.net.MalformedURLException;
import javax.servlet.http.HttpServletResponse;
-import org.oranosc.ric.portal.dash.DashboardConstants;
-import org.oranosc.ric.portal.dash.model.DelayTransport;
-import org.oranosc.ric.portal.dash.model.ErrorTransport;
-import org.oranosc.ric.portal.dash.model.IDashboardResponse;
-import org.oranosc.ric.portal.dash.model.LoadTransport;
-import org.oranosc.ric.portal.dash.model.MetricsTransport;
-import org.oranosc.ric.portal.dash.model.PathTransport;
-import org.oranosc.ric.portal.dash.model.SuccessTransport;
-import org.oranosc.ric.portal.dash.model.UrlTransport;
+import org.oransc.ric.portal.dashboard.DashboardConstants;
+import org.oransc.ric.portal.dashboard.model.DelayTransport;
+import org.oransc.ric.portal.dashboard.model.ErrorTransport;
+import org.oransc.ric.portal.dashboard.model.IDashboardResponse;
+import org.oransc.ric.portal.dashboard.model.LoadTransport;
+import org.oransc.ric.portal.dashboard.model.MetricsTransport;
+import org.oransc.ric.portal.dashboard.model.PathTransport;
+import org.oransc.ric.portal.dashboard.model.SuccessTransport;
+import org.oransc.ric.portal.dashboard.model.UrlTransport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.controller;
+package org.oransc.ric.portal.dashboard.controller;
import java.lang.invoke.MethodHandles;
import java.util.HashSet;
import javax.servlet.http.HttpServletResponse;
-import org.oranosc.ric.e2mgr.client.api.DefaultApi;
-import org.oranosc.ric.e2mgr.client.model.RanSetupRequest;
-import org.oranosc.ric.portal.dash.DashboardConstants;
+import org.oransc.ric.e2mgr.client.api.HealthCheckApi;
+import org.oransc.ric.e2mgr.client.api.X2SetupRequestApi;
+import org.oransc.ric.e2mgr.client.model.SetupRequest;
+import org.oransc.ric.portal.dashboard.DashboardConstants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
// Populated by the autowired constructor
- private final DefaultApi e2MgrClient;
+ private final HealthCheckApi healthCheckApi;
+ private final X2SetupRequestApi x2SetupRequestApi;
// Tracks the requests previously submitted.
// TODO remove when the E2 manager is extended.
- private Set<RanSetupRequest> requests = new HashSet<>();
+ private Set<SetupRequest> requests = new HashSet<>();
@Autowired
- public E2ManagerController(final DefaultApi e2MgrClient) {
- Assert.notNull(e2MgrClient, "client must not be null");
- if (logger.isDebugEnabled())
- logger.debug("ctor: configured with client type {}", e2MgrClient.getClass().getName());
- this.e2MgrClient = e2MgrClient;
+ public E2ManagerController(final HealthCheckApi healthCheckApi, final X2SetupRequestApi x2SetupRequestApi) {
+ Assert.notNull(healthCheckApi, "API must not be null");
+ this.healthCheckApi = healthCheckApi;
+ this.x2SetupRequestApi = x2SetupRequestApi;
}
private void assertNotNull(Object o) {
@RequestMapping(value = "/health", method = RequestMethod.GET)
public void getHealth(HttpServletResponse response) {
logger.debug("getHealth");
- e2MgrClient.getHealth();
- response.setStatus(e2MgrClient.getApiClient().getStatusCode().value());
+ healthCheckApi.healthCheck();
+ response.setStatus(healthCheckApi.getApiClient().getStatusCode().value());
}
- @ApiOperation(value = "Gets the unique requests submitted to the E2 manager.", response = RanSetupRequest.class, responseContainer = "List")
+ @ApiOperation(value = "Gets the unique requests submitted to the E2 manager.", response = SetupRequest.class, responseContainer = "List")
@RequestMapping(value = "/setup", method = RequestMethod.GET)
- public Iterable<RanSetupRequest> getRequests() {
+ public Iterable<SetupRequest> getRequests() {
logger.debug("getRequests");
return requests;
}
@ApiOperation(value = "Sets up a RAN connection via the E2 manager.")
@RequestMapping(value = "/setup", method = RequestMethod.POST)
- public void setup(@RequestBody RanSetupRequest rsr, HttpServletResponse response) {
- logger.debug("setup {}", rsr);
+ public void setup(@RequestBody SetupRequest setupRequest, HttpServletResponse response) {
+ logger.debug("setup {}", setupRequest);
try {
- assertNotEmpty(rsr.getRanIp());
- assertNotEmpty(rsr.getRanName());
- assertNotNull(rsr.getRanPort());
+ assertNotEmpty(setupRequest.getRanIp());
+ assertNotEmpty(setupRequest.getRanName());
+ assertNotNull(setupRequest.getRanPort());
} catch (Exception ex) {
logger.error("Bad request", ex);
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
}
try {
- requests.add(rsr);
- e2MgrClient.setupRan(rsr);
+ requests.add(setupRequest);
+ x2SetupRequestApi.setup(setupRequest);
} catch (Exception ex) {
logger.error("Failed", ex);
response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.controller;
+package org.oransc.ric.portal.dashboard.controller;
import java.util.Map;
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.controller;
+package org.oransc.ric.portal.dashboard.controller;
import java.lang.invoke.MethodHandles;
import javax.servlet.http.HttpServletResponse;
-import org.oranosc.ric.portal.dash.DashboardConstants;
-import org.oranosc.ric.portal.dash.model.ErrorTransport;
-import org.oranosc.ric.xappmgr.client.api.DefaultApi;
-import org.oranosc.ric.xappmgr.client.model.AllXapps;
-import org.oranosc.ric.xappmgr.client.model.XAppInfo;
-import org.oranosc.ric.xappmgr.client.model.Xapp;
+import org.oransc.ric.portal.dashboard.DashboardConstants;
+import org.oransc.ric.portal.dashboard.model.ErrorTransport;
+import org.oransc.ric.xappmgr.client.api.DefaultApi;
+import org.oransc.ric.xappmgr.client.model.AllXapps;
+import org.oransc.ric.xappmgr.client.model.XAppInfo;
+import org.oransc.ric.xappmgr.client.model.Xapp;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.model;
+package org.oransc.ric.portal.dashboard.model;
/**
* Trivial model to transport a number, to be serialized as JSON.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.model;
+package org.oransc.ric.portal.dashboard.model;
/**
* Model for message returned on failure, to be serialized as JSON.
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.model;
+package org.oransc.ric.portal.dashboard.model;
/**
* Marker interface used by all transport models.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.model;
+package org.oransc.ric.portal.dashboard.model;
/**
* Trivial model to transport a number, to be serialized as JSON.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.model;
+package org.oransc.ric.portal.dashboard.model;
/**
* Trivial model to transport a batch of numbers, to be serialized as JSON.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.model;
+package org.oransc.ric.portal.dashboard.model;
/**
* Trivial model to transport a path, to be serialized as JSON.
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.model;
+package org.oransc.ric.portal.dashboard.model;
public class SuccessTransport implements IDashboardResponse {
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash.model;
+package org.oransc.ric.portal.dashboard.model;
/**
* Trivial model to transport a URL, to be serialized as JSON.
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dash;
+package org.oransc.ric.portal.dashboard;
import org.junit.Test;
import org.junit.runner.RunWith;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.oranosc.ric.portal.dashboard</groupId>
- <artifactId>ric-dash-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- </parent>
+ <parent>
+ <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
+ <artifactId>ric-dash-parent</artifactId>
+ <version>1.0.1-SNAPSHOT</version>
+ </parent>
<artifactId>ric-dash-fe</artifactId>
- <name>RIC Dashboard Webapp frontend</name>
+ <name>RIC Dashboard Webapp frontend</name>
+ <properties>
+ <!-- No java here so skip javadoc -->
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ </properties>
<build>
<plugins>
<!-- do not deploy anything -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
- <!-- spring sets the <version>2.8</version> -->
+ <!-- spring sets the <version>2.8</version> -->
<configuration>
<skip>true</skip>
</configuration>
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.oranosc.ric.portal.dashboard</groupId>
+ <groupId>org.o-ran-sc.portal.ric-dashboard</groupId>
<artifactId>ric-dash-parent</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.0.1-SNAPSHOT</version>
</parent>
- <groupId>org.oranosc.ric.xappmgr.client</groupId>
+ <!-- This groupId will NOT allow deployment in LF -->
+ <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>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <swagger-annotations-version>1.5.15</swagger-annotations-version>
- <client.base.package.name>org.oranosc.ric.xappmgr.client</client.base.package.name>
+ <client.base.package.name>org.oransc.ric.xappmgr.client</client.base.package.name>
</properties>
<!-- Successful compilation requires generated code dependencies -->
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
- <version>${swagger-annotations-version}</version>
+ <version>1.5.15</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<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>
<dateLibrary>java8</dateLibrary>
<licenseName>Apache 2.0</licenseName>
<licenseUrl>https://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
- <scmConnection></scmConnection>
- <scmDeveloperConnection></scmDeveloperConnection>
- <scmUrl>http://gerrit.oran-osc.org</scmUrl>
- <developerName>RIC Team</developerName>
- <developerEmail></developerEmail>
- <developerOrganization>AT&T and Nokia</developerOrganization>
- <developerOrganizationUrl></developerOrganizationUrl>
</configOptions>
<packageName>${client.base.package.name}</packageName>
<modelPackage>${client.base.package.name}.model</modelPackage>
--- /dev/null
+xapp_manager_rest_api_v0_0_10.yaml
* limitations under the License.
* ========================LICENSE_END===================================
*/
-package org.oranosc.ric.portal.dashboard.xmc.demo;
+package org.oransc.ric.portal.dashboard.xappmgr.client.test;
import org.junit.jupiter.api.Test;
-import org.oranosc.ric.xappmgr.client.api.DefaultApi;
-import org.oranosc.ric.xappmgr.client.invoker.ApiClient;
-import org.oranosc.ric.xappmgr.client.model.AllXapps;
-import org.oranosc.ric.xappmgr.client.model.Xapp;
+import org.oransc.ric.xappmgr.client.api.DefaultApi;
+import org.oransc.ric.xappmgr.client.invoker.ApiClient;
+import org.oransc.ric.xappmgr.client.model.AllXapps;
+import org.oransc.ric.xappmgr.client.model.Xapp;
import org.springframework.web.client.RestClientException;
/**
* Demonstrates use of the generated xApp manager client.
*
* The test fails because no server is available.
+ *
+ * The ugly name "DefaultApi" is generated because the spec lacks appropriate
+ * tags on the operation, also see
+ * https://stackoverflow.com/questions/38293236/swagger-swagger-codegen-maven-plugin-generate-default-api-interface
*/
public class XappManagerClientTest {