From e26f1bfa9bdad0562b9d0be226e8b7fa756c7345 Mon Sep 17 00:00:00 2001 From: Herbert Eiselt Date: Fri, 29 Mar 2019 10:53:28 +0100 Subject: [PATCH] SDNR prepare for readthedocs Adjust helpserver to generate help content Change-Id: I913615019d1415d88942b8d2050ed39e55e1dc2e Issue-ID: SDNC-716 Signed-off-by: Herbert Eiselt --- sdnr/wt/helpserver/feature/pom.xml | 6 +- sdnr/wt/helpserver/installer/pom.xml | 6 +- sdnr/wt/helpserver/pom.xml | 6 +- sdnr/wt/helpserver/provider/README.md | 34 ++ sdnr/wt/helpserver/provider/pom.xml | 148 ++++---- .../features/sdnr/wt/helpserver/HelpServlet.java | 73 +--- .../help/mediatorserver/{0.4.0 => }/README.md | 2 +- .../installation/{0.4.0 => }/README.md | 0 .../mediatorserver/mediator/{0.4.0 => }/README.md | 0 .../provider/src/main/resources/help/meta.json | 395 +++++++++------------ .../src/main/resources/help/sdnr/0.4.0/about.md | 1 - .../resources/help/sdnr/{0.4.0 => }/ONAP-SDN-R.png | Bin .../main/resources/help/sdnr/{0.4.0 => }/README.md | 5 +- .../help/sdnr/{0.4.0 => }/abbreviations.md | 0 .../help/sdnr/connect/{0.4.0 => }/README.md | 13 +- .../main/resources/help/sdnr/{0.4.0 => }/faq.md | 24 +- .../help/sdnr/mwtnLog/{0.4.0 => }/README.md | 0 .../help/sdnr/mwtnTest/{0.4.0 => }/README.md | 0 .../help/sdnr/pnfConfig/{0.4.0 => }/README.md | 3 - .../help/sdnr/pnfFault/{0.4.0 => }/README.md | 11 +- .../help/sdnr/pnfInventory/0.4.0/README.md | 9 - .../resources/help/sdnr/pnfInventory/README.md | 21 ++ .../help/sdnr/pnfMaintenance/0.4.0/README.md | 10 - .../resources/help/sdnr/pnfMaintenance/README.md | 10 + .../help/sdnr/pnfMediator/{0.4.0 => }/README.md | 0 .../help/sdnr/pnfPerformance/0.4.0/README.md | 19 - .../resources/help/sdnr/pnfPerformance/README.md | 8 + .../sdnr/wt/helpserver/test/TestMyServlet.java | 4 +- 28 files changed, 380 insertions(+), 428 deletions(-) create mode 100644 sdnr/wt/helpserver/provider/README.md rename sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/{0.4.0 => }/README.md (89%) rename sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/installation/{0.4.0 => }/README.md (100%) rename sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/mediator/{0.4.0 => }/README.md (100%) delete mode 100644 sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/about.md rename sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/{0.4.0 => }/ONAP-SDN-R.png (100%) rename sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/{0.4.0 => }/README.md (83%) rename sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/{0.4.0 => }/abbreviations.md (100%) rename sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/{0.4.0 => }/README.md (85%) rename sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/{0.4.0 => }/faq.md (68%) rename sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/mwtnLog/{0.4.0 => }/README.md (100%) rename sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/mwtnTest/{0.4.0 => }/README.md (100%) rename sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfConfig/{0.4.0 => }/README.md (95%) rename sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfFault/{0.4.0 => }/README.md (71%) delete mode 100644 sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfInventory/0.4.0/README.md create mode 100644 sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfInventory/README.md delete mode 100644 sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMaintenance/0.4.0/README.md create mode 100644 sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMaintenance/README.md rename sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMediator/{0.4.0 => }/README.md (100%) delete mode 100644 sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfPerformance/0.4.0/README.md create mode 100644 sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfPerformance/README.md diff --git a/sdnr/wt/helpserver/feature/pom.xml b/sdnr/wt/helpserver/feature/pom.xml index 7545ce3e9..e2d22b9c6 100644 --- a/sdnr/wt/helpserver/feature/pom.xml +++ b/sdnr/wt/helpserver/feature/pom.xml @@ -21,7 +21,9 @@ * ============LICENSE_END========================================================= --> - + + 4.0.0 org.onap.ccsdk.features.sdnr.wt @@ -34,7 +36,7 @@ org.onap.ccsdk.parent single-feature-parent 1.2.2-SNAPSHOT - + diff --git a/sdnr/wt/helpserver/installer/pom.xml b/sdnr/wt/helpserver/installer/pom.xml index cdf810ef1..84ad2c9d1 100755 --- a/sdnr/wt/helpserver/installer/pom.xml +++ b/sdnr/wt/helpserver/installer/pom.xml @@ -1,5 +1,7 @@ - + 4.0.0 org.onap.ccsdk.features.sdnr.wt @@ -12,7 +14,7 @@ org.onap.ccsdk.parent odlparent-lite 1.2.2-SNAPSHOT - + diff --git a/sdnr/wt/helpserver/pom.xml b/sdnr/wt/helpserver/pom.xml index 89070da44..dcc7dd641 100755 --- a/sdnr/wt/helpserver/pom.xml +++ b/sdnr/wt/helpserver/pom.xml @@ -21,7 +21,9 @@ * ============LICENSE_END========================================================= --> - + + 4.0.0 org.onap.ccsdk.features.sdnr.wt @@ -47,4 +49,4 @@ sdnr-wt-helpserver - + \ No newline at end of file diff --git a/sdnr/wt/helpserver/provider/README.md b/sdnr/wt/helpserver/provider/README.md new file mode 100644 index 000000000..d35aeb580 --- /dev/null +++ b/sdnr/wt/helpserver/provider/README.md @@ -0,0 +1,34 @@ +##Creating help files + +#### Link and references to pictures. + +All links are relative to the current md-file. + +Link to pages located in the same directory: + +``` +[linkname](file.md) +``` + +Link to subpages located in subdirectories: + +``` +[linkname](subfolder/file.md) +``` + +External Links: + +``` +[linkname](linkurl "linktitle") +``` + +Images: + +``` +![SDN-R in ONAP](./ONAP-SDN-R.png "SDN-R in ONAP") +``` + +#### Supported formates + +md-format: +Picture formats: PNG diff --git a/sdnr/wt/helpserver/provider/pom.xml b/sdnr/wt/helpserver/provider/pom.xml index 392ae1a40..7c7d1fd12 100644 --- a/sdnr/wt/helpserver/provider/pom.xml +++ b/sdnr/wt/helpserver/provider/pom.xml @@ -1,83 +1,75 @@ - - + + - 4.0.0 + 4.0.0 - org.onap.ccsdk.features.sdnr.wt - sdnr-wt-helpserver-provider - 0.4.2-SNAPSHOT - ccsdk-features-sdnr-wt :: ${project.artifactId} - bundle - - true - ${maven.build.timestamp} UTC - ONAP Dublin (Flourine-SR1) - 1.15b7491 - - - org.onap.ccsdk.parent - binding-parent - 1.2.2-SNAPSHOT - - - - - javax.servlet - servlet-api - 2.5 - - - org.slf4j - slf4j-simple - - - org.json - json - - - org.osgi - org.osgi.core - - - org.osgi - org.osgi.compendium - - - org.mockito - mockito-core - test - + org.onap.ccsdk.features.sdnr.wt + sdnr-wt-helpserver-provider + 0.4.2-SNAPSHOT + ccsdk-features-sdnr-wt :: ${project.artifactId} + bundle + + true + + + org.onap.ccsdk.parent + binding-parent + 1.2.2-SNAPSHOT + + + + + javax.servlet + servlet-api + 2.5 + + + org.slf4j + slf4j-simple + + + org.json + json + + + org.osgi + org.osgi.core + + + org.osgi + org.osgi.compendium + + + org.mockito + mockito-core + test + - - - - - - src/main/resources - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - false - - - - + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + + + + diff --git a/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/HelpServlet.java b/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/HelpServlet.java index 35e351563..f91e96b79 100644 --- a/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/HelpServlet.java +++ b/sdnr/wt/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/HelpServlet.java @@ -26,8 +26,6 @@ import java.io.OutputStream; import java.net.URISyntaxException; import java.net.URLDecoder; import java.nio.file.Path; -import java.util.regex.Matcher; -import java.util.regex.Pattern; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; @@ -67,11 +65,7 @@ public class HelpServlet extends HttpServlet implements AutoCloseable { resp.addHeader("Access-Control-Allow-Methods", "OPTIONS, HEAD, GET, POST, PUT, DELETE"); resp.addHeader("Access-Control-Allow-Headers", "X-Requested-With, Content-Type, Content-Length"); if (query != null && query.contains("meta")) { - /* - * LOG.debug("received post with uri="+req.getRequestURI()); String - * uri=req.getRequestURI().substring(BASEURI.length()); if(uri.startsWith("/")) - * uri=uri.substring(1); - */ + File f = new File(HelpInfrastructureObject.KARAFHELPDIRECTORY, "meta.json"); if (f.exists()) { LOG.debug("found local meta file"); @@ -120,36 +114,20 @@ public class HelpServlet extends HttpServlet implements AutoCloseable { } LOG.debug("delivering file"); OutputStream out = resp.getOutputStream(); - String version = null; - if (REDIRECT_LINKS) { - version = getVersionFromRequestedUri(uri); - } - if (this.isTextFile(f) && REDIRECT_LINKS && version != null) { - final String regex = - "(!?\\[[^\\]]*?\\])\\(((?:(?!http|www\\.|\\#|\\.com|\\.net|\\.info|\\.org|\\.svg|\\.png|\\.jpg|\\.gif|\\.jpeg|\\.pdf).)*?)\\)"; - final Pattern pattern = Pattern.compile(regex); - Matcher matcher; - String line; - try (BufferedReader br = new BufferedReader(new FileReader(f))) { - line = br.readLine(); - while (line != null) { - // check line for internal link - matcher = pattern.matcher(line); - if (matcher.find()) { - // extend link with specific version - line = line.replace(matcher.group(2), - "../" + matcher.group(2) + version + "/README.md"); - } - out.write((line + "\n").getBytes()); - line = br.readLine(); - - } - out.flush(); - out.close(); - br.close(); - } - - } else { +// if (this.isTextFile(f) && REDIRECT_LINKS) { +// String line; +// try (BufferedReader br = new BufferedReader(new FileReader(f))) { +// line = br.readLine(); +// while (line != null) { +// out.write((line + "\n").getBytes()); +// line = br.readLine(); +// } +// out.flush(); +// out.close(); +// br.close(); +// } +// } else + { try (FileInputStream in = new FileInputStream(f)) { byte[] buffer = new byte[1024]; @@ -169,27 +147,6 @@ public class HelpServlet extends HttpServlet implements AutoCloseable { } } - /** - * Extract version from URI string - * @param uri = "help/folder1/folder2/version/README.md" - * @return version as a string - */ - private static String getVersionFromRequestedUri(String uri) { - if (uri == null) { - return null; - } - int lastidx = uri.lastIndexOf("/"); - if (lastidx < 0) { - return null; - } - int slastidx = uri.lastIndexOf("/", lastidx - 1); - if (slastidx < 0) { - return null; - } - return uri.substring(slastidx + 1, lastidx); - - } - private boolean ispdf(File f) { return f != null ? this.ispdf(f.getName()) : false; } diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/README.md similarity index 89% rename from sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/0.4.0/README.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/README.md index c03217d14..c99967d2b 100644 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/0.4.0/README.md +++ b/sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/README.md @@ -1,7 +1,7 @@ # MediatorServer ## Description -The mediator server is the physical device on which multiple instances of the [mediators](mediator/) are running. Additionally a small webserver provides an API to control and create the mediators via HTTP-API. These mediators are translating the requests and responses between the SDN-Controller(netconf) and the device(snmp). Because of the restricted snmp protocol (port 162 only) we have to implement a prerouting automatism that forwards the alarms sent by the devices to another local port so that each mediator only gets the alarms of its device. +The mediator server is the physical device on which multiple instances of the [mediators](mediator/README.md) are running. Additionally a small webserver provides an API to control and create the mediators via HTTP-API. These mediators are translating the requests and responses between the SDN-Controller(netconf) and the device(snmp). Because of the restricted snmp protocol (port 162 only) we have to implement a prerouting automatism that forwards the alarms sent by the devices to another local port so that each mediator only gets the alarms of its device. diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/installation/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/installation/README.md similarity index 100% rename from sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/installation/0.4.0/README.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/installation/README.md diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/mediator/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/mediator/README.md similarity index 100% rename from sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/mediator/0.4.0/README.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/mediator/README.md diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/meta.json b/sdnr/wt/helpserver/provider/src/main/resources/help/meta.json index b23e8d9d0..0bcd0f3e8 100644 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/meta.json +++ b/sdnr/wt/helpserver/provider/src/main/resources/help/meta.json @@ -1,222 +1,177 @@ { - "sdnr": { - "nodes": { - "connect": { - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/connect/0.4.0/README.md", - "label": "Connect" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/connect/0.4.0/README.md", - "label": "Connect" - } - }, - "label": "Connect" - }, - "pnfFault": { - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/pnfFault/0.4.0/README.md", - "label": "pnf Fault" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/pnfFault/0.4.0/README.md", - "label": "pnf Fault" - } - }, - "label": "pnf Fault" - }, - "pnfMaintenance": { - "versions": { - "0.4.0": { - "date": "2018-09-13", - "path": "sdnr/pnfMaintenance/0.4.0/README.md", - "label": "pnf Maintenance" - }, - "current": { - "date": "2018-09-13", - "path": "sdnr/pnfMaintenance/0.4.0/README.md", - "label": "pnf Maintenance" - } - }, - "label": "pnf Maintenance" - }, - "pnfConfig": { - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/pnfConfig/0.4.0/README.md", - "label": "pnf Config" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/pnfConfig/0.4.0/README.md", - "label": "pnf Config" - } - }, - "label": "pnf Config" - }, - "pnfPerformance": { - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/pnfPerformance/0.4.0/README.md", - "label": "pnf Performance" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/pnfPerformance/0.4.0/README.md", - "label": "pnf Performance" - } - }, - "label": "pnf Performance" - }, - "pnfInventory": { - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/pnfInventory/0.4.0/README.md", - "label": "pnf Inventory" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/pnfInventory/0.4.0/README.md", - "label": "pnf Inventory" - } - }, - "label": "pnf Inventory" - }, - "pnfMediator": { - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/pnfMediator/0.4.0/README.md", - "label": "pnf Mediator" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/pnfMediator/0.4.0/README.md", - "label": "pnf Mediator" - } - }, - "label": "pnf Mediator" - }, - "mwtnTest": { - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/mwtnTest/0.4.0/README.md", - "label": "LTE RAN Test" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/mwtnTest/0.4.0/README.md", - "label": "LTE RAN Test" - } - }, - "label": "LTE RAN Test" - }, - "mwtnLog": { - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/mwtnLog/0.4.0/README.md", - "label": "Logs" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/mwtnLog/0.4.0/README.md", - "label": "Logs" - } - }, - "label": "Logs" - } - }, - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/0.4.0/README.md", - "label": "SDN-R" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/0.4.0/README.md", - "label": "SDN-R" - } - }, - "label": "SDN-R" - }, - "mediatorserver":{ - "nodes":{ - "installation":{ - "versions":{ - "0.4.0":{"date":"","path":"mediatorserver/installation/0.4.0/README.md","label":""}, - "current":{"date":"","path":"mediatorserver/installation/0.4.0/README.md","label":""} - }, - "label":"Installation" - }, - "mediator":{ - "versions":{ - "0.4.0":{"date":"","path":"mediatorserver/mediator/0.4.0/README.md","label":""}, - "current":{"date":"","path":"mediatorserver/mediator/0.4.0/README.md","label":""} - }, - "label":"Mediator" - } - }, - "versions":{ - "0.4.0":{"date":"","path":"mediatorserver/0.4.0/README.md","label":""}, - "current":{"date":"","path":"mediatorserver/0.4.0/README.md","label":""} - }, - "label":"MediatorServer" - }, - "faq": { - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/0.4.0/faq.md", - "label": "FAQ" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/0.4.0/faq.md", - "label": "FAQ" - } - }, - "label": "FAQ" - }, - "abbreviations": { - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/0.4.0/abbreviations.md", - "label": "Abbreviations" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/0.4.0/abbreviations.md", - "label": "Abbreviations" - } - }, - "label": "Abbreviations" - }, - "about": { - "versions": { - "0.4.0": { - "date": "2018-02-24", - "path": "sdnr/0.4.0/about.md", - "label": "About" - }, - "current": { - "date": "2018-02-24", - "path": "sdnr/0.4.0/about.md", - "label": "About" - } - }, - "label": "About" - } + "sdnr": { + "nodes": { + "connect": { + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/connect/README.md", + "label": "Connect" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/connect/README.md", + "label": "Connect" + } + }, + "label": "Connect" + }, + "pnfFault": { + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/pnfFault/README.md", + "label": "Fault" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/pnfFault/README.md", + "label": "Fault" + } + }, + "label": "Fault" + }, + "pnfMaintenance": { + "versions": { + "0.4.0": { + "date": "2018-09-13", + "path": "sdnr/pnfMaintenance/README.md", + "label": "Maintenance" + }, + "current": { + "date": "2018-09-13", + "path": "sdnr/pnfMaintenance/README.md", + "label": "Maintenance" + } + }, + "label": "Maintenance" + }, + "pnfConfig": { + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/pnfConfig/README.md", + "label": "Config" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/pnfConfig/README.md", + "label": "Config" + } + }, + "label": "Config" + }, + "pnfPerformance": { + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/pnfPerformance/README.md", + "label": "Performance" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/pnfPerformance/README.md", + "label": "Performance" + } + }, + "label": "Performance" + }, + "pnfInventory": { + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/pnfInventory/README.md", + "label": "Inventory" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/pnfInventory/README.md", + "label": "Inventory" + } + }, + "label": "Inventory" + }, + "pnfMediator": { + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/pnfMediator/README.md", + "label": "Mediator" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/pnfMediator/README.md", + "label": "Mediator" + } + }, + "label": "Mediator" + } + }, + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/README.md", + "label": "SDN-R" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/README.md", + "label": "SDN-R" + } + }, + "label": "SDN-R" + }, + "mediatorserver":{ + "nodes":{ + "installation":{ + "versions":{ + "0.4.0":{"date":"","path":"mediatorserver/installation/README.md","label":""}, + "current":{"date":"","path":"mediatorserver/installation/README.md","label":""} + }, + "label":"Installation" + }, + "mediator":{ + "versions":{ + "0.4.0":{"date":"","path":"mediatorserver/mediator/README.md","label":""}, + "current":{"date":"","path":"mediatorserver/mediator/README.md","label":""} + }, + "label":"Mediator" + } + }, + "versions":{ + "0.4.0":{"date":"","path":"mediatorserver/README.md","label":""}, + "current":{"date":"","path":"mediatorserver/README.md","label":""} + }, + "label":"MediatorServer" + }, + "faq": { + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/faq.md", + "label": "FAQ" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/faq.md", + "label": "FAQ" + } + }, + "label": "FAQ" + }, + "abbreviations": { + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/abbreviations.md", + "label": "Abbreviations" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/abbreviations.md", + "label": "Abbreviations" + } + }, + "label": "Abbreviations" + } } diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/about.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/about.md deleted file mode 100644 index 31fd5fef8..000000000 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/about.md +++ /dev/null @@ -1 +0,0 @@ -ONAP SDN-R | ONF Wireless for ${distversion} - Build: ${buildtime} (${buildno}) \ No newline at end of file diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/ONAP-SDN-R.png b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/ONAP-SDN-R.png similarity index 100% rename from sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/ONAP-SDN-R.png rename to sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/ONAP-SDN-R.png diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/README.md similarity index 83% rename from sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/README.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/README.md index c0871102b..72e4cad05 100644 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/README.md +++ b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/README.md @@ -2,6 +2,7 @@ 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. +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.md) -![SDN-R in ONAP](./ONAP-SDN-R.png "SDN-R in ONAP") \ No newline at end of file +![SDN-R in ONAP](./ONAP-SDN-R.png "SDN-R in ONAP") diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/abbreviations.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/abbreviations.md similarity index 100% rename from sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/abbreviations.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/abbreviations.md diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/README.md similarity index 85% rename from sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/0.4.0/README.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/README.md index 12e4dbe63..6eba75461 100644 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/0.4.0/README.md +++ b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/connect/README.md @@ -4,27 +4,20 @@ The 'Connect' application on OpenDaylight provides up-to-date connectivity infor ## Views -The graphical user interfaces is divided in four sections. +The graphical user interfaces is divided in three sections. ### Required Network Elements Required Network Elements are physical network functions, which are planned or expected in the network. This means the identifier, IP addresses and its required configuration is well-known and available in a planning database or in ONAP A&AI. +This view also offer to manually configure/mount the device with the '+' icon. The SDN controller will then start connecting the Netconf server. + ### Unknown Network Elements Most of the physical network function support an automatic registration procedure to the SDN controller. It may happen, that devices are connected to the SDN Controller but not available in planning data. It might be a normal occurrence for very cheap devices, where an entire planning process to too expensive. But is may also happen that the identifier used in planning process differ from the identifier currently configured in the device. -### Mount NetConf Server - -The view offer manually configuration of a device. The SDN controller will then start connecting the NetConf server. - ### Connection Status Log The log lists the connections status changes between SDN Controller and NetConf servers (devices). - - -## Video - -https://youtu.be/QhchzRV2tac \ No newline at end of file diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/faq.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/faq.md similarity index 68% rename from sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/faq.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/faq.md index d81574640..f9d5e50d7 100644 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/0.4.0/faq.md +++ b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/faq.md @@ -1,6 +1,6 @@ # Frequently asked questions -- - - + ## Which browser should I use to operate Opendaylight SDN-R User interface? @@ -49,4 +49,24 @@ grep -anr --include=*.log* "Unable to read NE data for mountpoint" . | grep 2018 grep -anr --include=*.log* "LKCYFL79Q01M01MSS801" . | grep 2018 >> 09-LKCYFL79Q01M01MSS801.txt ``` -- - - + +## How to report an odlux issue + +If you would like to report an odlux issue which you have noticed in the Graphical User Interface, please provide the following information: + +1. **Description**: In which application you have noticed the issue? + +2. **Environment**: + - Which browser is used and the version of the browser. eg: *Google chrome - version 71.0.3578.80 / Mozilla Firefox.* + - Which Operating system and version. eg: *Linux/ Windows 10 - version 1803.* + - In which language you are using the application. + - The application URL which is available on the browser address bar. eg: *http://hostname/odlux/index.html#/connectApp* + +3. **Expected Result**: What is the expected result you are looking for? + +4. **Actual Result**: What is the actual result you got? + +5. **Steps to reproduce**: Describe the steps to reproduce the scenario. If possible, please provide the screenshots + +The above information helps us to analyze the problem quicker. + diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/mwtnLog/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/mwtnLog/README.md similarity index 100% rename from sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/mwtnLog/0.4.0/README.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/mwtnLog/README.md diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/mwtnTest/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/mwtnTest/README.md similarity index 100% rename from sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/mwtnTest/0.4.0/README.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/mwtnTest/README.md diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfConfig/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfConfig/README.md similarity index 95% rename from sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfConfig/0.4.0/README.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfConfig/README.md index d398a8e70..d36ec8e09 100644 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfConfig/0.4.0/README.md +++ b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfConfig/README.md @@ -10,6 +10,3 @@ The applications are implemented as OpenDaylight-DLUX web application using the Connections status information are updated automatically due to a web socket for notifications from OpenDaylight to the browser. -## Video - -https://youtu.be/QhchzRV2tac \ No newline at end of file diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfFault/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfFault/README.md similarity index 71% rename from sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfFault/0.4.0/README.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfFault/README.md index bfe1774d0..b7db4388e 100644 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfFault/0.4.0/README.md +++ b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfFault/README.md @@ -8,7 +8,7 @@ The graphical user interface is separated in three views. ### Current Alarms -It list all current active faults in the network. In addition is also list alarms send by the SDN controller itself, which detects connections losses to the NetConf server (connectionLossOAM) or which detects connection loss to a devices via a mediator to a device (connectionLossNeOAM). +It list all current active faults in the network. In addition it also list alarms sent by the SDN controller itself, which detects connections losses to the NetConf server (connectionLossOAM) or which detects connection loss to a devices via a mediator to a device (connectionLossNeOAM). ### Alarm Notifications @@ -16,18 +16,15 @@ As long as the view is open, it lists all alarm notification reached by the SDN ### Alarm Log -Next to the current active alarms an alarm log list all alarm notifications of the past. +Next to the current active alarms an alarm log lists all alarm notifications of the past. ## Implementation -The application has two parts. While the server is listening for NetConf notifications to store them in the data base the client retrieves the information from the data base and displays them in a grid view. +The application has two parts. While the server is listening for NetConf notifications to store them in the database the client retrieves the information from the database and displays them in a grid view. -The server synchronizes with the current alarm lists of the devices and calculates based on raise and clear notifications the current alarm status of the network. The current alarms are stored in a data base. In addition all Problem Notifications received by the SDN controller are stored. There is no logic implemented on the client. +The server synchronizes with the current alarm lists of the devices and calculates based on raise and clear notifications the current alarm status of the network. The current alarms are stored in a database. In addition all Problem Notifications received by the SDN controller are stored. There is no logic implemented on the client. An alarm status bar on top of each graphical user interface informs the operator about the health status of the network. The OpenDaylight DLUX web application uses web sockets for updating the graphical user interface in case of Problem Notification (devices) and Connection Status Notifications (ODL). -## Video - -https://youtu.be/vONKAtFZ8wc \ No newline at end of file diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfInventory/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfInventory/0.4.0/README.md deleted file mode 100644 index 436280855..000000000 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfInventory/0.4.0/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Inventory - -The application offers basic inventory management of devices supporting ONF-TR-512. - -After selection of a currently connected physical network function, the inventory data - basically serial-numbers and part-numbers are displaced accroding to the containment of the equipment. - -## Video - -[ONAP / ONF proof of concept](https://cloud-highstreet-technologies.com/nextcloud/index.php/s/m4wFfqkQ1qK3hHe "ONAP / ONF proof of concept") diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfInventory/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfInventory/README.md new file mode 100644 index 000000000..d8122ad0a --- /dev/null +++ b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfInventory/README.md @@ -0,0 +1,21 @@ +# Inventory + +The application offers basic inventory management of devices supporting ONF-TR-512. + +The view displays the inventory data of the network element - basically serial-numbers and part-numbers are displaced according to the containment of the equipment. + +##### Inventory Export: + +As the default pagination size is set to 10, when you export the data only first 10 rows or the first 10 filtered rows shown on the page will be exported to a file. +The inventory export allows the export of up to 1000 entries, when the pagination size is increased to 1000.  +So, It is recommended to change the pagination size 'Rows per page' to 1000 if you want to export the complete Inventory data. + +To export the Inventory data: +The behaviour is different depending on the browser: + +a) Some browsers allows you to save the file with the predefined name export.csv. In case your browser does not offer this function please use 'Save as..' + option and define the filename with extension csv. + +b) Some browsers saves the file automatically with the alphanumeric name without an extension. In such case please go to the downloaded file location and rename the file + with the extension after the download. (eg: export_file.csv) + diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMaintenance/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMaintenance/0.4.0/README.md deleted file mode 100644 index 6f5ab5420..000000000 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMaintenance/0.4.0/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Maintenance Mode - -The 'Maintenance' application on the OpenDaylight provides the information of the Network Elements which are set for Maintenance, currently or in the future. - -When a Network Element is mounted with the maintenance mode it automatically shows on this application with the Information like when maintenance will be started or ended. - -Maintenance Mode field in this application shows if the Network Element is in maintenance mode currently or not. -If it is True it means the Network Element is currently undergoing maintenance, If false it means maintenance might have been set for future or maintenance is already completed. - -Users have access to disable the Maintenance mode or change the maintenance start and end dates at any point of time by clicking on the Manage checkbox available. \ No newline at end of file diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMaintenance/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMaintenance/README.md new file mode 100644 index 000000000..2deadcafc --- /dev/null +++ b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMaintenance/README.md @@ -0,0 +1,10 @@ +# Maintenance + +The 'Maintenance' application on the OpenDaylight provides the information of the Network Elements which are set for Maintenance, currently or in the future. +User can manage devices to set the maintenance mode so that no unnecessary alarms are created. +When the device is in Maintenace alarms are not forwarded to DCAE and when the device maintenance is turned off the alarms will start flowing again. + +'Active' field in this application shows if the Network Element is in maintenance mode currently or not. +If it is 'active' it means the Network Element is currently undergoing maintenance, If 'not active' it means maintenance might have been set for future or maintenance is already completed. + +Users have access to disable the Maintenance mode or change the maintenance start and end dates at any point of time by using the available options in actions column. diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMediator/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMediator/README.md similarity index 100% rename from sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMediator/0.4.0/README.md rename to sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfMediator/README.md diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfPerformance/0.4.0/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfPerformance/0.4.0/README.md deleted file mode 100644 index a1d39186a..000000000 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfPerformance/0.4.0/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# Performance Monitoring - -Performance Monitoring values measured by the devices are necessary to analyze and optimize the network. Therefore the application automatically retrieves all historical performance values from the devices and stores them in a data base. The client part just retrieves the values from the database and displays them in graphical and/or grid views. - -## Current performance values - -After selection of a connected PNF supporting ONF-TR-532 and an physical interface, the application collects the current performance values directly from the device and displays then in table views. - -## Performance history values - -After selection of a connected PNF supporting ONF-TR-532 and an physical interface, the application collects the received and centralized stored performance values for this interface and displays then in table views. - -## Performance link values - -After selection of two air-interface creating an air-interface-link, the application collects the received and centralized stored performance values for this link and displays the data in diagrams and table views. - -## Video - -https://youtu.be/fgwbKFt9cos \ No newline at end of file diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfPerformance/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfPerformance/README.md new file mode 100644 index 000000000..2db5eda81 --- /dev/null +++ b/sdnr/wt/helpserver/provider/src/main/resources/help/sdnr/pnfPerformance/README.md @@ -0,0 +1,8 @@ +# Performance + +Performance Monitoring values measured by the devices are necessary to analyze and optimize the network. Therefore the application automatically retrieves all historical performance values from the devices and stores them in a database. The client part just retrieves the values from the database and displays them in graphical user interface. + +## Performance history values + +After selection of a connected PNF supporting ONF-TR-532 and an physical interface, the application collects the received and centralized stored performance values for this interface and displays them in table views. + diff --git a/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java b/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java index e51cc6843..2e4f987be 100644 --- a/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java +++ b/sdnr/wt/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java @@ -120,7 +120,7 @@ public class TestMyServlet extends Mockito { @Test public void testServlet2() { - this.testGetRequest("test/0.4.0/test.txt"); + this.testGetRequest("test/test.txt"); this.testGetRequest("test.css"); this.testGetRequest("test.eps"); this.testGetRequest("test.pdf"); @@ -156,6 +156,6 @@ public class TestMyServlet extends Mockito { } catch (Exception e) { } - assertEquals(CONTENT,sw.toString().trim()); + assertEquals("compare content for "+fn,CONTENT,sw.toString().trim()); } } -- 2.16.6