--- /dev/null
+.. ===============LICENSE_START=======================================================
+.. O-RAN SC CC-BY-4.0
+.. %%
+.. 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=========================================================
+
+.. RIC Dashboard documentation master
+
+=============
+RIC Dashboard
+=============
+
+
+.. toctree::
+ :maxdepth: 2
+ :caption: Contents:
+
+ overview.rst
+ release-notes.rst
+
+* :ref:`search`
--- /dev/null
+.. ===============LICENSE_START=======================================================
+.. O-RAN SC CC-BY-4.0
+.. %%
+.. 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=========================================================
+
+======================
+RIC Dashboard Overview
+======================
+
+The O-RAN SC RIC Dashboard provides administrative and operator functions.
+The web app is built as a single-page app using an Angular front end and a
+Java Spring-Boot back end.
--- /dev/null
+.. ===============LICENSE_START=======================================================
+.. O-RAN SC CC-BY-4.0
+.. %%
+.. 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=========================================================
+
+===========================
+RIC Dashboard Release Notes
+===========================
+
+Version 1.0.0, 30 Apr 2019
+--------------------------
+* Initial version
*/
package org.oranosc.ric.portal.dash.config;
+import java.lang.invoke.MethodHandles;
+
import org.oranosc.ric.e2mgr.client.api.DefaultApi;
import org.oranosc.ric.e2mgr.client.invoker.ApiClient;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
import org.springframework.util.Assert;
import org.springframework.web.client.RestTemplate;
* Creates an E2 manager client as a bean to be managed by the Spring container.
*/
@Configuration
+@Profile("!mock")
public class E2ManagerConfiguration {
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
// Populated by the autowired constructor
private final String e2mgrBasepath;
@Autowired
public E2ManagerConfiguration(@Value("${e2mgr.basepath}") final String e2mgrBasepath) {
Assert.notNull(e2mgrBasepath, "base path must not be null");
+ logger.info("Configuring E2 Manager at base path {}", e2mgrBasepath);
this.e2mgrBasepath = e2mgrBasepath;
}
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+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.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;
import org.springframework.http.HttpStatus;
@Configuration
public class E2ManagerMockConfiguration {
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
+ public E2ManagerMockConfiguration() {
+ logger.info("Configuring mock E2 Manager");
+ }
+
@Bean
- @Primary
public DefaultApi e2ManagerMockClient() {
ApiClient mockClient = mock(ApiClient.class);
when(mockClient.getStatusCode()).thenReturn(HttpStatus.OK);
*/
package org.oranosc.ric.portal.dash.config;
+import java.lang.invoke.MethodHandles;
+
import org.oranosc.ric.xappmgr.client.api.DefaultApi;
import org.oranosc.ric.xappmgr.client.invoker.ApiClient;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
import org.springframework.util.Assert;
import org.springframework.web.client.RestTemplate;
* container.
*/
@Configuration
+@Profile("!mock")
public class XappManagerConfiguration {
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
// Populated by the autowired constructor
private final String xappMgrBasepath;
@Autowired
public XappManagerConfiguration(@Value("${xappmgr.basepath}") final String xappMgrBasepath) {
Assert.notNull(xappMgrBasepath, "base path must not be null");
+ logger.info("Configuring xApp Manager at base path {}", xappMgrBasepath);
this.xappMgrBasepath = xappMgrBasepath;
}
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+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.XAppInfo;
import org.oranosc.ric.xappmgr.client.model.Xapp;
import org.oranosc.ric.xappmgr.client.model.Xapp.StatusEnum;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.Primary;
import org.springframework.context.annotation.Profile;
import org.springframework.http.HttpStatus;
@Configuration
public class XappManagerMockConfiguration {
+ private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
+
private final AllXapps allXapps;
public XappManagerMockConfiguration() {
+ logger.info("Configuring mock xApp Manager");
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));
}
@Bean
- @Primary
public DefaultApi xappManagerMockClient() {
ApiClient mockClient = mock(ApiClient.class);
when(mockClient.getStatusCode()).thenReturn(HttpStatus.OK);
@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;
}
@Autowired
public XappManagerController(final DefaultApi xappMgrClient) {
Assert.notNull(xappMgrClient, "client must not be null");
+ if (logger.isDebugEnabled())
+ logger.debug("ctor: configured with client type {}", xappMgrClient.getClass().getName());
this.xappMgrClient = xappMgrClient;
}
@ApiOperation(value = "Calls the xApp Manager to get the list of xApps.", response = AllXapps.class)
@RequestMapping(value = "/xapps", method = RequestMethod.GET)
public AllXapps getAllXapps() {
- logger.debug("getAllXapps via " + xappMgrClient.getApiClient().getBasePath());
+ if (logger.isDebugEnabled())
+ logger.debug("getAllXapps via {}", xappMgrClient.getApiClient().getBasePath());
return xappMgrClient.getAllXapps();
}
</root>
<!-- Code under test should be chatty --> >
- <logger name="org.oranosc.ric.portal" level="DEBUG" />
+ <logger name="org.oranosc.ric.portal.dash" level="INFO" />
</configuration>