summaryrefslogtreecommitdiffstats
path: root/sdnr
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr')
-rw-r--r--sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/config/VESCollectorCfgImpl.java40
-rw-r--r--sdnr/wt/devicemanager-core/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestVESCollectorClient.java27
-rw-r--r--sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/README.md2
-rw-r--r--sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/networkMap/README.md2
-rwxr-xr-xsdnr/wt/readthedocs/convert.sh4
-rw-r--r--sdnr/wt/readthedocs/src/home.rst31
-rw-r--r--sdnr/wt/readthedocs/src/index.rst12
7 files changed, 55 insertions, 63 deletions
diff --git a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/config/VESCollectorCfgImpl.java b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/config/VESCollectorCfgImpl.java
index 105b915c7..0e88b8435 100644
--- a/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/config/VESCollectorCfgImpl.java
+++ b/sdnr/wt/devicemanager-core/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/vescollectorconnector/impl/config/VESCollectorCfgImpl.java
@@ -31,31 +31,37 @@ public class VESCollectorCfgImpl implements VESCollectorCfgService, Configuratio
/** set to true if VES Collector is installed and configured */
private static final String PROPERTY_KEY_VES_COLLECTOR_ENABLED = "VES_COLLECTOR_ENABLED";
- private static final boolean DEFAULT_VALUE_VES_COLLECTOR_ENABLED = false;
+ private static final String DEFAULT_VALUE_VES_COLLECTOR_ENABLED = "${SDNR_VES_COLLECTOR_ENABLED}";
private static final String PROPERTY_KEY_VES_COLLECTOR_IP = "VES_COLLECTOR_IP";
- private static final String DEFAULT_VALUE_VES_COLLECTOR_IP = "127.0.0.1";
+ private static final String DEFAULT_VALUE_VES_COLLECTOR_IP = "${SDNR_VES_COLLECTOR_IP}";
private static final String PROPERTY_KEY_VES_COLLECTOR_PORT = "VES_COLLECTOR_PORT";
- private static final String DEFAULT_VALUE_VES_COLLECTOR_PORT = "8080";
+ private static final String DEFAULT_VALUE_VES_COLLECTOR_PORT = "${SDNR_VES_COLLECTOR_PORT}";
private static final String PROPERTY_KEY_VES_COLLECTOR_TLS_ENABLED = "VES_COLLECTOR_TLS_ENABLED";
+ private static final String DEFAULT_VALUE_VES_COLLECTOR_TLS_ENABLED = "${SDNR_VES_COLLECTOR_TLS_ENABLED}";
+
private static final String PROPERTY_KEY_VES_COLLECTOR_TRUST_ALL_CERTS = "VES_COLLECTOR_TRUST_ALL_CERTS";
+ private static final String DEFAULT_VALUE_VES_COLLECTOR_TRUST_ALL_CERTS = "${SDNR_VES_COLLECTOR_TRUST_ALL_CERTS}";
private static final String PROPERTY_KEY_VES_COLLECTOR_USERNAME = "VES_COLLECTOR_USERNAME";
- private static final String DEFAULT_VALUE_VES_COLLECTOR_USERNAME = "sample1";
+ private static final String DEFAULT_VALUE_VES_COLLECTOR_USERNAME = "${SDNR_VES_COLLECTOR_USERNAME}";
private static final String PROPERTY_KEY_VES_COLLECTOR_PASSWORD = "VES_COLLECTOR_PASSWORD";
- private static final String DEFAULT_VALUE_VES_COLLECTOR_PASSWORD = "sample1";
+ private static final String DEFAULT_VALUE_VES_COLLECTOR_PASSWORD = "${SDNR_VES_COLLECTOR_PASSWORD}";
private static final String PROPERTY_KEY_VES_COLLECTOR_VERSION = "VES_COLLECTOR_VERSION";
- private static final String DEFAULT_VALUE_VES_COLLECTOR_VERSION = "v7";
+ private static final String DEFAULT_VALUE_VES_COLLECTOR_VERSION = "${SDNR_VES_COLLECTOR_VERSION}";
+ private static final String DEFAULT_VALUE_VES_COLLECTOR_VERSION_NA = "v7";
private static final String PROPERTY_KEY_REPORTING_ENTITY_NAME = "REPORTING_ENTITY_NAME";
- private static final String DEFAULT_VALUE_REPORTING_ENTITY_NAME = "ONAP SDN-R";
+ private static final String DEFAULT_VALUE_REPORTING_ENTITY_NAME = "${SDNR_VES_COLLECTOR_REPORTING_ENTITY_NAME}";
+ private static final String DEFAULT_VALUE_REPORTING_ENTITY_NAME_NA = "ONAP SDN-R";
private static final String PROPERTY_KEY_EVENTLOG_DETAIL = "EVENTLOG_MSG_DETAIL";
- private static final String DEFAULT_VALUE_EVENTLOG_DETAIL = "SHORT"; // "SHORT", "MEDIUM", "LONG"
+ private static final String DEFAULT_VALUE_EVENTLOG_DETAIL = "${SDNR_VES_COLLECTOR_EVENTLOG_MSG_DETAIL}";
+ private static final String DEFAULT_VALUE_EVENTLOG_DETAIL_NA = "SHORT"; // "SHORT", "MEDIUM", "LONG"
private static ConfigurationFileRepresentation configuration;
@@ -73,12 +79,14 @@ public class VESCollectorCfgImpl implements VESCollectorCfgService, Configuratio
@Override
public String getReportingEntityName() {
- return configuration != null ? configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_REPORTING_ENTITY_NAME) : "ONAP SDN-R";
+ String v = configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_REPORTING_ENTITY_NAME);
+ return (v == null || v.isBlank()) ? DEFAULT_VALUE_REPORTING_ENTITY_NAME_NA : v;
}
@Override
public String getEventLogMsgDetail() {
- return configuration != null ?configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_EVENTLOG_DETAIL) : DEFAULT_VALUE_EVENTLOG_DETAIL;
+ String v = configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_EVENTLOG_DETAIL);
+ return (v == null || v.isBlank()) ? DEFAULT_VALUE_EVENTLOG_DETAIL_NA : v;
}
@Override
@@ -107,7 +115,8 @@ public class VESCollectorCfgImpl implements VESCollectorCfgService, Configuratio
}
public String getVersion() {
- return configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_VES_COLLECTOR_VERSION);
+ String v = configuration.getProperty(SECTION_MARKER, PROPERTY_KEY_VES_COLLECTOR_VERSION);
+ return (v == null || v.isBlank()) ? DEFAULT_VALUE_VES_COLLECTOR_VERSION_NA : v;
}
public boolean isTrustAllCerts() {
@@ -116,9 +125,12 @@ public class VESCollectorCfgImpl implements VESCollectorCfgService, Configuratio
@Override
public synchronized void defaults() {
- configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_VES_COLLECTOR_ENABLED, DEFAULT_VALUE_VES_COLLECTOR_ENABLED);
- configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_VES_COLLECTOR_TLS_ENABLED, Boolean.FALSE);
- configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_VES_COLLECTOR_TRUST_ALL_CERTS, Boolean.FALSE);
+ configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_VES_COLLECTOR_ENABLED,
+ DEFAULT_VALUE_VES_COLLECTOR_ENABLED);
+ configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_VES_COLLECTOR_TLS_ENABLED,
+ DEFAULT_VALUE_VES_COLLECTOR_TLS_ENABLED);
+ configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_VES_COLLECTOR_TRUST_ALL_CERTS,
+ DEFAULT_VALUE_VES_COLLECTOR_TRUST_ALL_CERTS);
configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_VES_COLLECTOR_USERNAME,
DEFAULT_VALUE_VES_COLLECTOR_USERNAME);
configuration.setPropertyIfNotAvailable(SECTION_MARKER, PROPERTY_KEY_VES_COLLECTOR_PASSWORD,
diff --git a/sdnr/wt/devicemanager-core/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestVESCollectorClient.java b/sdnr/wt/devicemanager-core/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestVESCollectorClient.java
index 1ff8efafb..9198e84fe 100644
--- a/sdnr/wt/devicemanager-core/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestVESCollectorClient.java
+++ b/sdnr/wt/devicemanager-core/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/devicemanager/test/TestVESCollectorClient.java
@@ -21,16 +21,20 @@
*/
package org.onap.ccsdk.features.sdnr.wt.devicemanager.test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
import com.google.common.io.Files;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
import org.onap.ccsdk.features.sdnr.wt.common.configuration.ConfigurationFileRepresentation;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.types.VESMessage;
import org.onap.ccsdk.features.sdnr.wt.devicemanager.vescollectorconnector.impl.VESCollectorServiceImpl;
+import org.onap.ccsdk.features.sdnr.wt.devicemanager.vescollectorconnector.impl.config.VESCollectorCfgImpl;
public class TestVESCollectorClient {
@@ -44,6 +48,7 @@ public class TestVESCollectorClient {
private static final VESMessage message = new VESMessage("Test Message");
private static final String CONFIG_FILE = "test.properties";
+ private static final String CONFIG_FILE2 = "test2.properties";
@Test
public void testNoAuth() throws Exception {
@@ -72,10 +77,26 @@ public class TestVESCollectorClient {
vesClient.close();
}
+ @Test
+ public void testDefaultConfigValues() throws IOException {
+ Files.asCharSink(new File(CONFIG_FILE2), StandardCharsets.UTF_8).write("");
+ ConfigurationFileRepresentation cfg = new ConfigurationFileRepresentation(CONFIG_FILE2);
+ VESCollectorCfgImpl vesConfig = new VESCollectorCfgImpl(cfg);
+ assertEquals("ONAP SDN-R", vesConfig.getReportingEntityName());
+ assertEquals("SHORT", vesConfig.getEventLogMsgDetail());
+ assertEquals("v7",vesConfig.getVersion());
+ assertFalse(vesConfig.isVESCollectorEnabled());
+ assertFalse(vesConfig.isTrustAllCerts());
+
+ }
+
+
+ @Before
@After
public void after() throws InterruptedException, IOException {
delete(new File(CONFIG_FILE));
+ delete(new File(CONFIG_FILE2));
}
@@ -85,8 +106,10 @@ public class TestVESCollectorClient {
delete(c);
}
}
- if (!f.delete()) {
- throw new FileNotFoundException("Failed to delete file: " + f);
+ if(f.exists()) {
+ if (!f.delete()) {
+ throw new FileNotFoundException("Failed to delete file: " + f);
+ }
}
}
}
diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/README.md
index e15be5e5b..ac5bbe4f0 100644
--- a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/README.md
+++ b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/README.md
@@ -12,7 +12,7 @@ Network Elements are physical network functions (PNFs). A table view shows all c
Network Elements can be marked as 'required'. If an element is required, it will stay available even if disconnected. If an element is not required, it will be deleted once disconnected.
-By right-clicking on an element, an action menu opens. The menu allows to mount, unmount, view the details, edit and remove the element. Additionally, it links to several applications like [Fault](../pnfFault/README.md) and [Configure](../pnfConfig/README.md), which will be filtered to display information relevant to the selected element.
+By right-clicking on an element, an action menu opens. The menu allows to mount, unmount, view the details, edit and remove the element. Additionally, it links to several applications like [Fault](pnfFault.html) and [Configure](pnfConfig.html), which will be filtered to display information relevant to the selected element.
### Connection Status Log
diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/networkMap/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/networkMap/README.md
index 98d413529..b538eb1f6 100644
--- a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/networkMap/README.md
+++ b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/networkMap/README.md
@@ -31,7 +31,7 @@ The details panel shows information specific to the selected element.
Sites offer information about itself, such as name, address and owner, and a short overview of its links and nodes data. The nodes are physical network elements, comparable to the elements of the 'connect' application, and offer an interface to other apps via buttons, such as connect, configure, and fault. Currently, those buttons are disabled. By clicking on a link, the given link is loaded into details.
-If a link of type 'microwave' is selected, the 'calculate link' button is available, which opens the [Link Calculator](../linkCalculator/README.md) in a new tab or page.
+If a link of type 'microwave' is selected, the 'calculate link' button is available, which opens the [Link Calculator](linkCalculator.html) in a new tab or page.
Just like the map, the details panel updates the URL if data is loaded. Once again, the 'Network Map' application will try to load the element specified in the URL, if one is present.
diff --git a/sdnr/wt/readthedocs/convert.sh b/sdnr/wt/readthedocs/convert.sh
index 435751eb6..f50abf330 100755
--- a/sdnr/wt/readthedocs/convert.sh
+++ b/sdnr/wt/readthedocs/convert.sh
@@ -23,8 +23,8 @@ for file in ${markdown_files[@]}; do
pandoc -s --toc -f markdown -t rst $file > $PATH_DOC_USERDOC_DST"$rstfile"
done
-cp "$BASEDIR"sdnr/wt/readthedocs/src/home.rst "$PATH_DOC_USERDOC_DST"
-cp "$BASEDIR"sdnr/wt/readthedocs/src/index.rst "$PATH_DOC_DST"
+#cp "$BASEDIR"sdnr/wt/readthedocs/src/home.rst "$PATH_DOC_USERDOC_DST"
+#cp "$BASEDIR"sdnr/wt/readthedocs/src/index.rst "$PATH_DOC_DST"
#echo "================Creating html=========================================="
#/usr/local/bin/sphinx-build -b html $PATH_DOC_DST /home/jack/public_html/sdnr-trial/
diff --git a/sdnr/wt/readthedocs/src/home.rst b/sdnr/wt/readthedocs/src/home.rst
deleted file mode 100644
index 888572188..000000000
--- a/sdnr/wt/readthedocs/src/home.rst
+++ /dev/null
@@ -1,31 +0,0 @@
-
-.. contents::
- :depth: 3
-..
-
-SDN controller for 'Radio' (SDN-R)
-==================================
-
-SDN-R adds features and functionality to the OpenDaylight-based ONAP
-controller 'SDN-C'. It is built on the Common Controller Framework to
-control and manage wireless resources. Wireless resources are virtual
-network functions (e.g. vBBU, vEPC) or physical network functions (e.g.
-microwave and millimeter wave radios, eNodeB, RRH, DAS equipment).
-
-| SDN-R is integrated into ONAP. Therefore it is interfacing with PNFs
- and VNFs and with other ONAP components, such as A&AI, DCAE and SO.
-| `See abbreviations <abbreviations>`__
-
-.. figure:: ./ONAP-SDN-R.png
- :alt: SDN-R in ONAP
-
- SDN-R in ONAP
-
-
-.. toctree::
- :maxdepth: 1
-
- applications
- installation
- faq
- abbreviations
diff --git a/sdnr/wt/readthedocs/src/index.rst b/sdnr/wt/readthedocs/src/index.rst
deleted file mode 100644
index 1da5c6c03..000000000
--- a/sdnr/wt/readthedocs/src/index.rst
+++ /dev/null
@@ -1,12 +0,0 @@
-=================
-SDN-R Online help
-=================
-
-Below are the references for SDN-R User Documentation
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-
-.. toctree::
- :maxdepth: 1
-
- guides/onap-user/home