diff options
Diffstat (limited to 'sdnr/wt-odlux/helpserver')
32 files changed, 1928 insertions, 0 deletions
diff --git a/sdnr/wt-odlux/helpserver/pom.xml b/sdnr/wt-odlux/helpserver/pom.xml new file mode 100755 index 000000000..e0eaa31e8 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/pom.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ ============LICENSE_START======================================================= + ~ ONAP : SDNR ODLUX + ~ ================================================================================ + ~ Copyright (C) 2018 highstreet technologies GmbH Intellectual Property. + ~ All rights reserved. + ~ ================================================================================ + ~ Update Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + ~ ================================================================================ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~ ============LICENSE_END======================================================= + ~ + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.onap.ccsdk.features.sdnr.odlux</groupId> + <artifactId>sdnr-odlux-helpserver-top</artifactId> + <version>1.7.0-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>SDNR ODLUX :: ${project.artifactId}</name> + + <modules> + <module>provider</module> + </modules> + +</project> diff --git a/sdnr/wt-odlux/helpserver/provider/README.md b/sdnr/wt-odlux/helpserver/provider/README.md new file mode 100644 index 000000000..d35aeb580 --- /dev/null +++ b/sdnr/wt-odlux/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-odlux/helpserver/provider/bitnami/nginx/help/meta.json b/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/meta.json new file mode 100644 index 000000000..6dc9c4556 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/meta.json @@ -0,0 +1 @@ +abbccdfkamaosie aksdmais
\ No newline at end of file diff --git a/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test.css b/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test.css new file mode 100644 index 000000000..6dc9c4556 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test.css @@ -0,0 +1 @@ +abbccdfkamaosie aksdmais
\ No newline at end of file diff --git a/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test.eps b/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test.eps new file mode 100644 index 000000000..6dc9c4556 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test.eps @@ -0,0 +1 @@ +abbccdfkamaosie aksdmais
\ No newline at end of file diff --git a/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test.pdf b/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test.pdf new file mode 100644 index 000000000..6dc9c4556 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test.pdf @@ -0,0 +1 @@ +abbccdfkamaosie aksdmais
\ No newline at end of file diff --git a/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test/test.txt b/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test/test.txt new file mode 100644 index 000000000..6dc9c4556 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/bitnami/nginx/help/test/test.txt @@ -0,0 +1 @@ +abbccdfkamaosie aksdmais
\ No newline at end of file diff --git a/sdnr/wt-odlux/helpserver/provider/help/meta.json b/sdnr/wt-odlux/helpserver/provider/help/meta.json new file mode 100644 index 000000000..6dc9c4556 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/help/meta.json @@ -0,0 +1 @@ +abbccdfkamaosie aksdmais
\ No newline at end of file diff --git a/sdnr/wt-odlux/helpserver/provider/help/test/test.txt b/sdnr/wt-odlux/helpserver/provider/help/test/test.txt new file mode 100644 index 000000000..6dc9c4556 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/help/test/test.txt @@ -0,0 +1 @@ +abbccdfkamaosie aksdmais
\ No newline at end of file diff --git a/sdnr/wt-odlux/helpserver/provider/pom.xml b/sdnr/wt-odlux/helpserver/provider/pom.xml new file mode 100644 index 000000000..4caaa4ac2 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/pom.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + ~ ============LICENSE_START======================================================= + ~ ONAP : ccsdk features + ~ ================================================================================ + ~ Copyright (C) 2020 highstreet technologies GmbH Intellectual Property. + ~ All rights reserved. + ~ ================================================================================ + ~ Update Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. + ~ ================================================================================ + ~ Licensed under the Apache License, Version 2.0 (the "License"); + ~ you may not use this file except in compliance with the License. + ~ You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + ~ ============LICENSE_END======================================================= + ~ + --> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.onap.ccsdk.features.sdnr.odlux</groupId> + <artifactId>sdnr-odlux-helpserver-provider</artifactId> + <version>1.7.0-SNAPSHOT</version> + <packaging>jar</packaging> + + <name>SDNR ODLUX :: ${project.artifactId}</name> + + <properties> + <maven.javadoc.skip>true</maven.javadoc.skip> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> + <log4j.version>2.17.1</log4j.version> + <log4j2.version>2.17.1</log4j2.version> + <junit.version>4.13.2</junit.version> + </properties> + + <dependencies> + <dependency> + <groupId>jakarta.servlet</groupId> + <artifactId>jakarta.servlet-api</artifactId> + <version>4.0.4</version> + </dependency> + <dependency> + <groupId>org.json</groupId> + <artifactId>json</artifactId> + <version>20201115</version> + </dependency> + <dependency> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-log4j12</artifactId> + <version>1.7.29</version> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>3.5.11</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.13.2</version> + <scope>test</scope> + </dependency> + + </dependencies> + + <build> + <plugins> + <!-- fixed bug for sonarcube --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <useSystemClassLoader>false</useSystemClassLoader> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/HelpServlet.java b/sdnr/wt-odlux/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/HelpServlet.java new file mode 100644 index 000000000..bf93109ba --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/HelpServlet.java @@ -0,0 +1,179 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.helpserver; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.OutputStream; +import java.net.URISyntaxException; +import java.net.URLDecoder; +import java.nio.file.Path; +import javax.servlet.Servlet; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.onap.ccsdk.features.sdnr.wt.helpserver.data.HelpInfrastructureObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class HelpServlet extends HttpServlet implements AutoCloseable { + + private static Logger LOG = LoggerFactory.getLogger(HelpServlet.class); + private static final long serialVersionUID = -4285072760648493461L; + + private static final String BASEURI = "/help"; + + private final Path basePath; + + public HelpServlet() { + LOG.info("Starting HelpServlet instance {}", this.hashCode()); +// HelpInfrastructureObject.createFilesFromResources(); +// this.basePath = HelpInfrastructureObject.getHelpDirectoryBase(); + this.basePath = Path.of("bitnami/nginx/help"); + } + + @Override + public void doOptions(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + resp.addHeader("Access-Control-Allow-Origin", "*"); + 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"); + } + + @Override + public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String query = req.getQueryString(); + resp.addHeader("Access-Control-Allow-Origin", "*"); + 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")) { +// +// File f = new File(HelpInfrastructureObject.KARAFHELPDIRECTORY, "meta.json"); +// if (f.exists()) { +// LOG.debug("found local meta file"); +// try (BufferedReader rd = new BufferedReader(new FileReader(f));) { +// String line = rd.readLine(); +// while (line != null) { +// resp.getOutputStream().println(line); +// line = rd.readLine(); +// } +// rd.close(); +// } catch (IOException e) { +// LOG.debug("Can not read meta file", e); +// } +// } else { +// LOG.debug("start walking from path=" + basePath.toAbsolutePath().toString()); +// HelpInfrastructureObject o = null; +// try { +// o = new HelpInfrastructureObject(this.basePath); +// } catch (URISyntaxException e) { +// LOG.debug("Can not relsolve URI. ", e); +// } +// resp.getOutputStream().println(o != null ? o.toString() : ""); +// } +// resp.setHeader("Content-Type", "application/json"); +// } else + { + LOG.debug("received get with uri=" + req.getRequestURI()); + String uri = URLDecoder.decode(req.getRequestURI().substring(BASEURI.length()), "UTF-8"); + if (uri.startsWith("/")) { + uri = uri.substring(1); + } + Path p = basePath.resolve(uri); + File f = p.toFile(); + if (f.isFile() && f.exists()) { + LOG.debug("found file for request"); + if (this.isTextFile(f)) { + resp.setHeader("Content-Type", "application/text"); + resp.setHeader("charset", "utf-8"); + } else if (this.isImageFile(f)) { + resp.setHeader("Content-Type", "image/*"); + } else if (this.ispdf(f)) { + resp.setHeader("Content-Type", "application/pdf"); + } else { + LOG.debug("file is not allowed to deliver"); + resp.setStatus(404); + return; + } + LOG.debug("delivering file"); + try (OutputStream out = resp.getOutputStream()) { + try (FileInputStream in = new FileInputStream(f)) { + + byte[] buffer = new byte[1024]; + int len; + while ((len = in.read(buffer)) != -1) { + out.write(buffer, 0, len); + } + in.close(); + out.flush(); + out.close(); + } + } catch (IOException e) { + LOG.warn("Can not write meta file", e); + resp.setStatus(500); + } + } else { + LOG.debug("found not file for request"); + resp.setStatus(404); + } + } + } + + private boolean ispdf(File f) { + return f != null && this.ispdf(f.getName()); + } + + private boolean ispdf(String name) { + return name != null && name.toLowerCase().endsWith("pdf"); + } + + private boolean isImageFile(File f) { + return f != null && this.isImageFile(f.getName()); + } + + private boolean isImageFile(String name) { + + return name != null + ? name.toLowerCase().endsWith("png") || name.toLowerCase().endsWith("jpg") + || name.toLowerCase().endsWith("jpeg") || name.toLowerCase().endsWith("svg") + || name.toLowerCase().endsWith("eps") + : false; + } + + private boolean isTextFile(File f) { + return f != null && this.isTextFile(f.getName()); + + } + + private boolean isTextFile(String name) { + return name != null + ? name.toLowerCase().endsWith("md") || name.toLowerCase().endsWith("txt") + || name.toLowerCase().endsWith("html") || name.toLowerCase().endsWith("htm") + || name.toLowerCase().endsWith("js") || name.toLowerCase().endsWith("css") + : false; + } + + @Override + public void close() throws Exception { + + } + +} diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/data/HelpInfrastructureObject.java b/sdnr/wt-odlux/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/data/HelpInfrastructureObject.java new file mode 100644 index 000000000..5075b92d8 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/java/org/onap/ccsdk/features/sdnr/wt/helpserver/data/HelpInfrastructureObject.java @@ -0,0 +1,174 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.helpserver.data; + +import java.io.File; +import java.io.IOException; +import java.net.URISyntaxException; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import org.json.JSONObject; +//import org.osgi.framework.Bundle; +//import org.osgi.framework.FrameworkUtil; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class HelpInfrastructureObject extends JSONObject { + + private static final Logger LOG = LoggerFactory.getLogger(HelpInfrastructureObject.class); + private static String HELPBASE = "help"; + + public static class VersionObject extends JSONObject { + private static Comparator<VersionObject> comp; + private final String mVersion; + + public String getVersion() { + return this.mVersion; + } + + public VersionObject(String path, String date, String label, String version) { + this.mVersion = version; + this.put("path", path); + this.put("date", date); + this.put("label", label); + } + + public static Comparator<VersionObject> getComparer() { + if (comp == null) { + comp = (o1, o2) -> o1.getVersion().compareTo(o2.getVersion()); + } + return comp; + } + + public VersionObject cloneAsLatest() { + return new VersionObject(this.getString("path"), this.getString("date"), this.getString("label"), "latest"); + } + + public VersionObject cloneAsCurrent() { + return new VersionObject(this.getString("path"), this.getString("date"), this.getString("label"), + "current"); + } + } + public static class NodeObject extends JSONObject { + public NodeObject(Path base, File dir, String label, ArrayList<VersionObject> versions) { + this.put("label", label); + if (versions != null && !versions.isEmpty()) { + JSONObject o = new JSONObject(); + this.put("versions", o); + for (VersionObject version : versions) { + o.put(version.getVersion(), version); + } + + } + File[] list = dir.listFiles(); + if (list == null) { + return; + } + for (File f : list) { + if (f.isDirectory()) { + ArrayList<VersionObject> versions2 = findReadmeVersionFolders(base, f.toPath(), true); + if (versions2 != null && !versions2.isEmpty()) { + JSONObject nodes; + if (!this.has("nodes")) { + this.put("nodes", new JSONObject()); + } + nodes = this.getJSONObject("nodes"); + + NodeObject o = new NodeObject(base, f, f.getName(), versions2); + nodes.put(o.getString("label").toLowerCase(), o); + } + } + } + } + + } + + public HelpInfrastructureObject(Path pRoot) throws URISyntaxException { + File root = pRoot.toFile(); + File[] list = root.listFiles(); + if (list == null) { + return; + } + for (File f : list) { + if (f.isDirectory()) { + ArrayList<VersionObject> versions = findReadmeVersionFolders(root.toPath(), f.toPath(), true); + if (versions != null && !versions.isEmpty()) { + NodeObject o = new NodeObject(pRoot, f, f.getName(), versions); + this.put(o.getString("label").toLowerCase(), o); + } + } + } + } + + private static ArrayList<VersionObject> findReadmeVersionFolders(Path base, Path root, boolean appendCurrent) { + ArrayList<VersionObject> list = new ArrayList<>(); + File[] files = root.toFile().listFiles(); + int baselen = base.toFile().getAbsolutePath().length(); + if (files != null) { + for (File f : files) { + if (f.isDirectory() && new File(f.getAbsolutePath() + "/README.md").exists()) { + list.add(new VersionObject(f.getAbsolutePath().substring(baselen + 1) + "/README.md", "", "", + f.getName())); + } + } + } + Collections.sort(list, VersionObject.getComparer()); + Collections.reverse(list); + if (!list.isEmpty() && appendCurrent) { + list.add(list.get(0).cloneAsCurrent()); + } + return list; + } + + +// public static void createFilesFromResources() { +// +// if (KARAFHELPDIRECTORY.exists()) { +// LOG.debug("Delete existing directory"); +// try { +// ExtactBundleResource.deleteRecursively(KARAFHELPDIRECTORY); +// } catch (IOException e1) { +// LOG.warn(e1.toString()); +// } +// } +// +// LOG.debug("Extract"); +// try { +// Bundle b = FrameworkUtil.getBundle(HelpInfrastructureObject.class); +// if (b == null) { +// LOG.debug("No bundlereference: Use target in filesystem."); +// // URL helpRessource = +// // JarFileUtils.stringToJarURL("target/helpserver-impl-0.4.0-SNAPSHOT.jar",KARAFBUNDLERESOURCEHELPROOT); +// +// } else { +// LOG.debug("Bundle location:{} State:{}", b.getLocation(), b.getState()); +// LOG.debug("Write files from Resource"); +// ExtactBundleResource.copyBundleResoucesRecursively(b, "data/cache/com.highstreet.technologies.", +// KARAFBUNDLERESOURCEHELPROOT); +// } +// } catch (IOException e) { +// LOG.warn("No help files available. Exception: " + e.toString()); +// } +// } +// +// public static Path getHelpDirectoryBase() { +// return KARAFHELPDIRECTORY.toPath(); +// } +} diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/mediatorserver/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/mediatorserver/README.md new file mode 100644 index 000000000..c99967d2b --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/mediatorserver/README.md @@ -0,0 +1,144 @@ +# MediatorServer + +## Description +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. + + + +## Config-File + +``` +/etc/mediatorserver.conf +``` + +``` +#global config file for mediatorserver + +#Home Directory +home=/opt/snmp + +#HOST IP +host=192.168.178.89 +port=7071 + +#Port range for Netconf +ncrangemin=4000 +ncrangemax=6000 + +#Port Range for SNMP +snmprangemin=10000 +snmprangemax=12000 + +#PortRange for JMX +jmxrangemin=6001 +jmxrangemax=7000 + +#Log (ERROR | WARN | DEBUG | INFO | TRACE ) +loglevel=DEBUG +logfile=/var/log/mediatorserver.log + +#===================================== +#global MediatorConfig + +#set LogLevel (ERROR | WARN | DEBUG | INFO | TRACE ) +MediatorLogLevel=DEBUG + +#set ping timeout in milliseconds +MediatorDevicePingTimeout=2000 + +#set latency for snmp requests +MediatorSnmpLatency=2000 + +#set java memory for mediator instance +MediatorMemory="-Xmx256m -Xms128m" +``` + +## HTTP-API + +``` +http://<host>:<port>/api/?task=<task> +``` + +| Task | additional Parameters | Description | Response (Success) | +| ---- | --------------------- | ----------- | ------------------ | +| create | config=<config-object> | create new mediator instance | {"code":1,"data":"<string>"}| +| delete | name=<name> | delete mediator instance | \{"code":1,"data":<string>"} | +| start | name=<name> | start mediator instance | \{"code":1,"data":"<string>"} | +| stop | name=<name> | stop mediator instance | \{"code":1,"data":"<string>"} | +| getconfig | name=<name>(optional) | Get current Config for all instances / named mediator instance | \{"code":1,"data":[<config-objects>]}| +| getlog | name=<name>(optional) | Get LogEntries for all instances / named mediator instance | \{"code":1,"data":[]} | +| clearlock | name=<name> | Clear Mediator Lock File | \{"code":1,"data":"<string>"} | +| getnemodels | - | get all Network Element Template Filenames | \{"code":1,"data":[<string-array>]} | +| getncports | limit=<limit>(optional) | get next free ports for Netconf Connections | \{"code":1,"data":[<int-array>]} | +| getsnmpports | limit=<limit>(optional) | get next free ports for SNMP Traps | \{"code":1,"data":[<int-array>]} | +| version | - | get version info of server and mediator | \{"code":1,"data":\{"server":"0.1.0","mediator":"0.1.1"\}\}| +| repair | - | try to fix corrupted configs | \{"code":1,"data":[<config-status-objects>]}| + +HTTP-Response is always a json-formatted String with 2 Elements: + +* code ... 1:success 0:failure +* data ... if code==0: <string> else <string | object> + + +### JSON-Objects + +Config-Object +``` +{ + Name:<String>, + DeviceType:<enum>, + DeviceIp:<String>, + DevicePort: <int>, + TrapsPort:<Int>, + NeModel:<XML Filename>, + NcPort:<int>, + ODLConfig:[ + { + Server:<String>, + Port:<int>, + User:<String>, + Password:<String> + } + ], + PID:<int>, + IsLocked:<boolean>, + AutoRun:<boolean>, + FwActive:<boolean>, + IsNetconfConnected:<boolean>, + IsNeConnected:<boolean> +} +``` + +Log-Object +``` +{ + ts:"<Timestamp>", + lvl:"<LogLevel>", + src:"<Source>", + msg:"<Message" +} +``` + + +## Usage + +All functionality which is not automated can be executed by the control script +``` +bin/control.sh +``` + +| parameter | description | +| ------------- | ------------------------------------------------ | +|checkout | get latest code from git repo | +|cpsrc | copy binary files from source | +|cpxml | copy xml files from source | +|build | build sources | +|make | build sources and install bins and ressources | +|start | start server | +|stop | stop server | +|stopall | stop all mediators, then the server | +|startmed [med] | start mediator with name [med] | +|stopmed [med] | stop mediator with name [med] | +|status | print status | +|repair | repair config files if corrupted | + diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/mediatorserver/installation/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/mediatorserver/installation/README.md new file mode 100644 index 000000000..6fdcbaec0 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/mediatorserver/installation/README.md @@ -0,0 +1,246 @@ +# MediatorServer + +## Manual Installation + +### Install prerequisites + +``` +sudo apt-get install jq curl +``` +Installing Java + +for production +``` +sudo apt-get install openjdk-8-jre + +``` + +for development +``` +sudo apt-get install openjdk-8-jdk +sudo apt-get install git maven + +``` + +### Create user +``` +useradd mediators +``` + +### Choose a home directory for all mediatorserver files +``` +mkdir /opt/snmp + +``` + +### Create folder infrastructure +``` +cd /opt/snmp +mkdir bin +mkdir mediators +mkdir nemodel +mkdir yang +mkdir source (only for dev-env) + +``` + +### Copy files to folders +``` +bin/control.sh +bin/clean_all.sh +bin/debug.sh +bin/mediatorserver.sh +bin/Netconf2SNMPMediator.sh +bin/Netconf2SNMPMediator.jar +bin/init_script.sh +bin/firewall_status.sh +bin/unlock_all.sh +bin/firewall.sh +bin/MediatorServer.jar +bin/stop_all.sh +bin/start_all.sh +``` + +``` +nemodel/DragonWave-HCP.xml +nemodel/ActionTEC_ECB6200.xml +nemodel/ActionTEC_ECB6000.xml +nemodel/DVM_MWCore12_BasicAir.xml +nemodel/DragonWave-HQ.xml +nemodel/DragonWave-HQdev.xml +nemodel/CommScope.xml +``` + +``` +yang/yangNeModel +yang/yangNeModel/G_874_1_model-Imported_Information_Object_Classes-Q_822@2016-08-11.yang +yang/yangNeModel/MicrowaveModel-ObjectClasses-PureEthernetStructure@2016-09-02.yang +yang/yangNeModel/yuma-proc@2012-10-10.yang +yang/yangNeModel/nc-notifications@2008-07-14.yang +yang/yangNeModel/CoreModel-CoreFoundationModule-TypeDefinitions@2016-07-01.yang +yang/yangNeModel/ietf-inet-types@2010-09-24.yang +yang/yangNeModel/onf-ptp-dataset@2017-05-08.yang +yang/yangNeModel/yuma-system@2014-11-27.yang +yang/yangNeModel/onf-ethernet-conditional-packages@2017-04-02.yang +yang/yangNeModel/MicrowaveModel-ObjectClasses-SuperClasses@2016-08-09.yang +yang/yangNeModel/ietf-ptp-dataset@2017-02-08.yang +yang/yangNeModel/MicrowaveModel-ObjectClasses-TdmContainer@2016-09-02.yang +yang/yangNeModel/ietf-netconf-acm@2012-02-22.yang +yang/yangNeModel/MicrowaveModel-Notifications@2016-08-09.yang +yang/yangNeModel/MicrowaveModel-ObjectClasses-HybridMwStructure@2016-09-02.yang +yang/yangNeModel/microwave-model@2017-03-24.yang +yang/yangNeModel/MicrowaveModel-ObjectClasses-AirInterfaceDiversity@2016-09-02.yang +yang/yangNeModel/G_874_1_model-Type_Definitions@2016-07-10.yang +yang/yangNeModel/CoreModel-CoreFoundationModule-StateModel@2016-08-09.yang +yang/yangNeModel/G_874_1_model-Imported_Information_Object_Classes-X_739@2016-07-10.yang +yang/yangNeModel/ietf-system@2014-08-06.yang +yang/yangNeModel/G_874_1_model-Imported_Information_Object_Classes-X_721@2016-07-10.yang +yang/yangNeModel/MicrowaveModel-ObjectClasses-AirInterface@2016-09-01.yang +yang/yangNeModel/onf-core-model-conditional-packages@2017-04-02.yang +yang/yangNeModel/MicrowaveModel-NetworkElement-CurrentProblemList@2016-11-20.yang +yang/yangNeModel/core-model@2017-03-20.yang +yang/yangNeModel/g.874.1-model@2017-03-20.yang +yang/yangNeModel/ietf-yang-library@2016-04-09.yang +yang/yangNeModel/yuma-time-filter@2011-08-13.yang +yang/yangNeModel/yuma-mysession@2010-05-10.yang +yang/yangNeModel/G_874_1_model-Imported_Data_Types@2016-07-10.yang +yang/yangNeModel/yuma-ncx@2012-01-13.yang +yang/yangNeModel/ietf-yang-types@2013-07-15.yang +yang/yangNeModel/MicrowaveModel-ObjectClasses-EthernetContainer@2016-09-02.yang +yang/yangNeModel/notifications@2008-07-14.yang +yang/yangNeModel/ietf-netconf-monitoring@2010-10-04.yang +yang/yangNeModel/CoreModel-CoreFoundationModule-SuperClassesAndCommonPackages@2016-07-10.yang +yang/yangNeModel/ietf-restconf@2013-10-19.yang +yang/yangNeModel/yuma-app-common@2012-08-16.yang +yang/yangNeModel/yuma-types@2012-06-01.yang +yang/yangNeModel/CoreModel-CoreNetworkModule-ObjectClasses@2016-08-11.yang +yang/yangNeModel/MicrowaveModel-TypeDefinitions@2016-09-02.yang +yang/yangNeModel/ietf-netconf-with-defaults@2011-06-01.yang +yang/yangNeModel/ietf-netconf@2011-06-01.yang +yang/yangNeModel/ietf-netconf-partial-lock@2009-10-19.yang +yang/yangNeModel/G_874_1_model-Object_Classes@2016-07-10.yang +yang/yangNeModel/ietf-inet-types@2013-07-15.yang +yang/yangNeModel/CoreModel-CoreNetworkModule-TypeDefinitions@2016-07-10.yang +yang/yangNeModel/yuma-arp@2012-01-13.yang +yang/yangNeModel/iana-crypt-hash@2014-04-04.yang +yang/notification +yang/notification/readme.md +yang/notification/notifications@2008-07-14.yang +``` + +and change all rights to the extra created user +``` +sudo chown -R mediators:mediators /opt/snmp +``` + +### Create mediatorserver config file + +``` +sudo nano /etc/mediatorserver.conf +``` +example: +``` +#Home Directory +home=/opt/snmp + +#HOST IP +host=192.168.178.89 +port=7070 + +#Port range for Netconf +ncrangemin=4000 +ncrangemax=6000 + +#Port Range for SNMP +snmprangemin=10000 +snmprangemax=12000 + +#PortRange for JMX +jmxrangemin=6001 +jmxrangemax=7000 + +#Log (ERROR | WARN | DEBUG | INFO | TRACE ) +loglevel=WARN +logfile=/var/log/mediatorserver.log + +#===================================== +#global MediatorConfig + +#set LogLevel (ERROR | WARN | DEBUG | INFO | TRACE ) +MediatorLogLevel=DEBUG + +#set ping timeout in milliseconds +MediatorDevicePingTimeout=2000 + +#set latency for snmp requests +MediatorSnmpLatency=2000 + +#set java memory for mediator instance +MediatorMemory="-Xmx256m -Xms128m" + +#==================================== +``` + + +### Create mediatorserver systemd daemon + +``` +sudo nano /etc/systemd/system/mediatorserver.service +``` + +``` +[Unit] +Description=mediatorserver +After=network.target + +[Service] +WorkingDirectory=/opt/snmp/ +SyslogIdentifier=MediatorServer +ExecStart=/opt/snmp/bin/mediatorserver.sh +User=mediators +Type=oneshot + +[Install] +WantedBy=multi-user.target + +``` + +### Initial create mediator server logfile with correct file permissions +``` +sudo touch /var/log/mediatorserver.log +sudo chown mediators:mediators /var/log/mediatorserver.log +``` + +### Activate mediatorserver systemd daemon +``` +systemctl enable mediatorserver.service +systemctl daemon-reload +``` + +Now you can start and stop the service as you like +``` +sudo service mediatorserver [start | stop] +``` + +### Install cron jobs +``` +sudo crontab -e +``` +``` +*/2 * * * * /bin/bash /opt/snmp/bin/firewall.sh >> /var/log/firewall.log +*/2 * * * * /bin/bash /opt/snmp/bin/clean_all.sh > /dev/null 2>&1 +``` + +### Test Accessibility of the HTTP-API with console +``` +curl http://localhost:7070/api/?task=version +``` +or directly in your browser +``` +http://<mediator-server-ip>:7070/api/?task=version +``` +should respond with something like this: +``` +{"code":1,"data":{"server":"0.1.0","mediator":"0.1.1"}} +``` + diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/mediatorserver/mediator/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/mediatorserver/mediator/README.md new file mode 100644 index 000000000..9fa43a436 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/mediatorserver/mediator/README.md @@ -0,0 +1,66 @@ +# Mediator + +## Description + + +The mediator is a piece of software to translate get and set requests between the SDN-Controller and the device. In our case we translate from netconf to snmp and back. Additionally the mediator is listening for snmp traps to push them forward to the SDN-Controller. + +## Usage + +Standalone: +``` +./Netconf2SNMPMediator.sh [--cli] ../test.config ../yang/yangNeModel +``` +[MediatorServer](../../mediatorserver/): +``` +./mediators/<name>/start.sh +``` + +## Config-File +``` +{ + "Name":"<mediatorname-in-odl>", + "DeviceType":<int-of-enum of device type>, + "DeviceIP":"<remote Ip Address>", + "TrapPort":<trap port>, + "NeXMLFile":"<rel-path-to-xml-ne-filename>", + "NcPort":<netconf-port>, + "ODLConfig":[{"Server":"<odl-server-ip>","Port":<odl-http-port>,"User":"<odl-username>","Password":"<odl-password>"}], + "IsNCConnected":false +} +``` + +## XML Ne File + +The xml network element file is the central element of the mediator. It contains all information about the interfaces, their capabilities and everything else of information which get requested through netconf. To connect specific netconf values to device specific snmp values we use the xml attributes of the node element. + +Attributes: + +|Name | Value | Description | +| ----| ---- | ---------- | +|oid | <oid dotted string> | Attribute with SNMP mapping for given oid. For NETCONF-get, request content from Device| +|access | read-only / read-write | decides if only snmp-get or get and set-requests are allowed| +|conversion | <conv-method> | Convert the snmp-value to netconf-value and back| +|default | <any value> | the default netconf value if there is no response from the device | +|validator | regex | to validate the netconf value to avoid protocol errors | + + +Conversion methods: + +Hint: All conversations shown here are the snmp-to-netconf value conversations. Some of these are working in both directions, some not. + + +| Conversion | bi-directional | Description | Example | +| ---------- |: -------------- :| ----------- | ------- | +|int-to-boolean | yes | Convert 1-true and not 1-false between boolean and int| 1=\>true, 0=\>false | +|int-to-boolean-dd,dd,dd-true | no | Convert listed numbers to true | | +|int-to-boolean-dd,dd,dd-false | no | Convert listed numbers to false| | +|if-dd,dd,dd-term1-term2 | no | if value listed, result is *term1*, if not *term2*| | +|map-dd1,dd2,dd3-term1-term2 | yes | Bidirectional map dd1 to term1, dd2 to term2 and soon | | +|divide-dd1 | yes | Divide value by dd1| divide-10: 99 =\> 9.9 =\> 10| +|dividen-dd1 | yes | Divide value by (-1*dd1)| dividen-10: 99 =\> -9.9 =\> -10| +|internal | yes | use inernally hardcoded conversion method | qpsk =\> 4, 16qam =\> 16 | + + +## Alarms + diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/meta.json b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/meta.json new file mode 100644 index 000000000..208bee032 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/meta.json @@ -0,0 +1,261 @@ +{ + "sdnr": { + "nodes": { + "connectApp": { + "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" + }, + "faultApp": { + "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" + }, + "maintenanceApp": { + "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" + }, + "configurationApp": { + "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" + }, + "performanceHistoryApp": { + "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" + }, + "inventoryApp": { + "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" + }, + "mediatorApp": { + "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" + }, + "eventLogApp": { + "versions": { + "0.4.0": { + "date": "2020-02-03", + "path": "sdnr/pnfEventLog/README.md", + "label": "EventLog" + }, + "current": { + "date": "2020-02-03", + "path": "sdnr/pnfEventLog/README.md", + "label": "EventLog" + } + }, + "label": "EventLog" + }, + "networkApp": { + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/networkMap/README.md", + "label": "NetworkMap" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/networkMap/README.md", + "label": "NetworkMap" + } + }, + "label": "NetworkMap" + }, + "linkCalculationApp": { + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/linkCalculator/README.md", + "label": "LinkCalculator" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/linkCalculator/README.md", + "label": "LinkCalculator" + } + }, + "label": "LinkCalculator" + } + }, + "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" + }, + "general": { + "versions": { + "0.4.0": { + "date": "2018-02-24", + "path": "sdnr/general.md", + "label": "General Functionality" + }, + "current": { + "date": "2018-02-24", + "path": "sdnr/general.md", + "label": "General Functionality" + } + }, + "label": "General Functionality" + } +}
\ No newline at end of file diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/ONAP-SDN-R.png b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/ONAP-SDN-R.png Binary files differnew file mode 100644 index 000000000..6a9f2fac8 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/ONAP-SDN-R.png diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/README.md new file mode 100644 index 000000000..fa8ce0d76 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/README.md @@ -0,0 +1,8 @@ +# SDN controller for 'Radio' (SDN-R) + +SDN-R adds features and functionality to the OpenDaylight-based ONAP controller 'CCSDK/SDNC'. 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 using DMaaP APIs. 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") diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/abbreviations.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/abbreviations.md new file mode 100644 index 000000000..120d685d8 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/abbreviations.md @@ -0,0 +1,212 @@ +# Abbreviations + +|**Abbreviation**|**Description**| +|----------------|---------------| +| AAF | [Application Authorization Framework](https://wiki.onap.org/display/DW/Application+Authorization+Framework+Project) | +| A&AI | [Active & Available Inventory](https://wiki.onap.org/display/DW/Active+and+Available+Inventory+Project) | +| AAA | [Authentication, Authorization and Accounting](https://en.wikipedia.org/wiki/AAA_(computer_security)) | +| AEC | AT&T Edge Cloud | +| AIC | AT&T Integrated Cloud | +| AID | Architecture Integration Document | +| APPC | [Application Controller](https://wiki.onap.org/display/DW/Application+Controller+Project) | +| BPEL | Business Process Execution Language | +| BPMN | [Business Process Model and Notation or Business Process Management Notation](https://en.wikipedia.org/wiki/Business_Process_Model_and_Notation) | +| BRMS | Business Rules Management System | +| BSS | Business Support System | +| CCSDK | Common Controller SDK project | +| CDAP | [Cask Data Application Platform](https://cdap.io/) | +| CDR | Charging Data Record | +| CDS | Controller Design Studio | +| CI/CD | Continuous Integration / Continuous Delivery | +| Cinder | OpenStack Block Storage | +| CL | Control Loop | +| CLAMP | Closed Loop Automation Management Platform (project) | +| CLI | [Command Line Interface (project)](https://wiki.onap.org/display/DW/Command+Line+Interface+Project) | +| CMA | Change Management Application (within ONAP) | +| CN | Core Network | +| CNF | Cloud Native network Function. | +| COE | Container Orchestration Engine | +| CPE | Customer Premise Equipment | +| CSAR | [Cloud Service ARchive (link)](http://openbaton.github.io/documentation/tosca-CSAR-onboarding/) | +| CU | Centralized Unit | +| DAO | [Data Access Object](https://en.wikipedia.org/wiki/Data_access_object) | +| DCAE | [Data Collection Analytics and Events](https://wiki.onap.org/pages/viewpage.action?pageId=6592895) | +| DDoS | Distributed Denial-of-Service attack | +| DG | Directed Graph | +| DG Builder | Directed Graph Builder | +| DMaaP | [Data Movement as a Platform](https://wiki.onap.org/display/DW/DMaaP) | +| DME | [Direct Messaging Engine (common service within ONAP)](https://wiki.onap.org/display/DW/Common+Services) | +| DMIP | Device Management Interface Profile | +| DNS | Domain Name System | +| DPDK | Data Plane Development Kit | +| DU | Distributed Unit | +| ECA | External Content Adapter | +| ECOMP | Enhanced, Control, Orchestration, Management and Policy | +| EELF | [Event&Error LoggingFramework](https://wiki.onap.org/display/DW/Common+Services) | +| EMS | [Element Management System](https://en.wikipedia.org/wiki/Element_management_system) | +| ESR | [External System Register](https://wiki.onap.org/pages/viewpage.action?pageId=5734948) | +| ETSI | [European Telecommunications Standards Institute](http://www.etsi.org/technologies-clusters/technologies/689-network-functions-virtualisation) | +| EUAG | [ONAP End User Advisory Group](https://wiki.lfnetworking.org/pages/viewpage.action?pageId=2916362) | +| FCAPS | Fault Configuration Accounting Performance Security | +| FM | Fault Management | +| FQDN | Fully Qualified Domain Name | +| GBP | [Group-Based Policy ](https://wiki.openstack.org/wiki/GroupBasedPolicy) | +| Glance | OpenStack Image repository | +| GNFC | [Genric Network Function Controller](https://wiki.onap.org/download/attachments/45300148/ONAP_GNF_ControllersSOL003.pptx?version=1&modificationDate=1548619943000&api=v2) | +| GUI | [Graphical User Interface](https://en.wikipedia.org/wiki/Graphical_user_interface) | +| HAS | [Homing and Allocation Service](https://wiki.onap.org/pages/viewpage.action?pageId=16005528) | +| HDFS | Hadoop Distributed File System | +| Horizon | OpenStack GUI | +| HPA | Hardware Platform Awareness | +| HTTP | HyperText Transfer Protococol | +| HV VES | [High Volume Virtual function Event Stream](https://wiki.onap.org/display/DW/High+Volume+VES+Collector) | +| IAM/IDAM | Identity and Access Management | +| ICE | Incubation and Certification Environment | +| ICMMS | Syniverse Inter-carrier messaging solution | +| IDS | [Intrusion Detection System](https://en.wikipedia.org/wiki/Intrusion_detection_system) | +| IETF | [Internet Engineering Task Force](http://www.ietf.org) | +| IKE | [Internet KeyExchange](https://en.wikipedia.org/wiki/Internet_Key_Exchange) | +| IPS | [Intrusion Prevention System](https://en.wikipedia.org/wiki/Intrusion_detection_system) | +| IPSEC | [Internet Protocol Security](https://en.wikipedia.org/wiki/IPsec) | +| JAR | [Java Archive](https://en.wikipedia.org/wiki/JAR_(file_format)) | +| JSC | [JavaServiceContainer](https://wiki.onap.org/display/DW/Common+Services) | +| JSON | JavaScript Object Notation | +| Keystone | OpenStack Authorization Project | +| KVM | Kernel-based Virtual machine | +| LCM | Life Cycle Management | +| LDAP | Lightweight Directory Access Protocol | +| LFN CVC | [Linux Foundation Networking Compliance/Verification Committee](https://wiki.onap.org/display/DW/LFN+CVC+Testing+in+VNFSDK) | +| LFN CVP | [Linux Foundation Networking Compliance/Verification Program](https://wiki.onap.org/display/DW/LFN+CVC+Testing+in+VNFSDK) | +| LRM | Local Resource Monitor | +| M0 | Release Kick-off milestone. See also Release Lifecycle | +| M1 | Release Planning milestone. See also Release Lifecycle | +| M2 | Release Functionality Freeze milestone. See also Release Lifecycle | +| M3 | Release API Freeze milestone. See also Release Lifecycle | +| M4 | Release Code Freeze milestone. See also Release Lifecycle | +| MACD | (Vendor specific) Move Add Change Delete/Disconnect | +| MANO | MANagement and Organization of NFV | +| MD-SAL | Model Driven Service Abstraction Layer | +| MIND | Master Integrated Network Directory | +| MR | Message Router (a Common Service of ONAP) | +| MOP | Method of Procedure | +| MOTS | Mechanized Operations Tracking System | +| MSB | Microservice Bus | +| MSO | [Master Service Orchestrator](https://wiki.onap.org/pages/viewpage.action?pageId=1015834) | +| MVP | [Minimum ViableProduct](https://en.wikipedia.org/wiki/Minimum_viable_product) | +| NAI | Network Artificial Intelligence | +| NANCSP | Network Cloud Service Provider | +| NBI | North Bound Interface | +| NEP | Network Equipment Provider | +| NETCONF | [Network Configuration Protocol](https://en.wikipedia.org/wiki/NETCONF) | +| Neutron | OpenStack Networking | +| NFMF | Network Function Management Function | +| NFV | [Network Function Virtualization](https://en.wikipedia.org/wiki/Network_function_virtualization) | +| NFVI | [network functions virtualization infrastructure](https://www.sdxcentral.com/nfv/definitions/nfv-mano/) | +| NOD | Network On Demand | +| Nova | OpenStack compute | +| NS | Network Services | +| NS | (Vendor Specific) New Start | +| NSI | Network Slice Subnet Instance | +| NSMF | Network Slice Management Function | +| NSSMF | Network Slice Subnet Management Function | +| O-RAN | [O-RAN Alliance , OperatorDefined NextGeneration RadioAccessNetworksAlliance ](https://www.o-ran.org) | +| O-RAN-SC | [O-RAN SoftwareCommunity](https://o-ran-sc.org) | +| OAM | Operation and Maintenance | +| OA&M | Operations, Administration and Management | +| OMF | Operational Management Framework (of ONAP) | +| OMSA | ONAP Microservice Architecture | +| ONAP | [Open Network Automation Platform](https://wiki.onap.org/pages/viewpage.action?pageId=1015843) | +| OOF | ONAP Optimization Framework | +| ODL | [OpenDaylight](https://www.opendaylight.org/) | +| OOM | [ONAP Operations Manager](https://wiki.onap.org/display/DW/OOM+User+Guide) | +| OpenStack | A cloud operating system | +| OPNFV | [Open Platform for NFV Project](https://www.sdxcentral.com/nfv/definitions/opnfv/) | +| Originato | MMSC Any Non-AT&T MMSC that originally sent the request to ICMMS | +| OSAM | [Open Source Access Manager](https://wiki.onap.org/display/DW/OpenSource+Access+Manager+%28OSAM%29+Use+Case) | +| OSC | O-RAN Software Community or Optical Supervisory Channel | +| OSS | Operations Support System | +| PAP | Policy Administration Point (ONAP) | +| PCE | Path Computation and Element (ONAP) | +| PCI | Physical Cell ID | +| pCPE | physical Customer Premise Equipment | +| PDP-x | Policy Decision Point - XACML (ONAP) | +| PDP-d | Policy Decision Point - Drools (ONAP) | +| PM | Performance Management | +| PNDA | [OpensourcePlatform for Network DataAnalytics](https://wiki.onap.org/display/DW/Integrating+PNDA) | +| PNF | Physical Network Function | +| PnP | Plug and Play | +| PO | Platform Orchestrator | +| PoC | Proof of Concept | +| POMBA | [Post Orchestration Model Based Audit](https://wiki.onap.org/display/DW/POMBA) | +| PRH | Phyiical Network Function Registration Handler | +| Pub/Sub | Publisher/Subscriber | +| RAN | Radio Access Network | +| RCA | Root Cause Analysis | +| RCT | Reference Connection Tool | +| REST | [Representational State Transfer](https://en.wikipedia.org/wiki/Representational_state_transfer) | +| RESTCONF | A protocol based on HTTP for configuring data defined in YANG | +| RO | Resource Orchestrator | +| RPC | Remote Procedure Call | +| RU | Radio Unit | +| RRH | Remote Radio Head | +| S3P | [Stability, Security, Scalability, Performance](https://wiki.onap.org/pages/viewpage.action?pageId=16003367) | +| SDC | Service Design and Creation (component of ONAP for visual modeling and design) | +| SDN | [Software-defined networking](https://en.wikipedia.org/wiki/Software-defined_networking) | +| SDN-C | [SDN-Controller](https://wiki.onap.org/display/DW/SDN+Controller+Development+Guide) | +| SDN-R | [SDN-Radio, Router, ROADM - a set of model-driven application based on SDN-C](https://wiki.onap.org/display/DW/SDN-R) | +| SDN-GP | Software Defined Network - Global Platform | +| SEBA | SDN-Enabled Broadband Access, see also | +| SLA | Service Level Agreement | +| SLI | Service Logic Interpreter | +| SME | Subject Matter Expert | +| SMTP | Simple Mail Transfer Protocol | +| SNMP | Simple Network Management Protocol | +| SO | [Service Orchestrator (project)](https://wiki.onap.org/display/DW/Service+Orchestrator+Project) | +| SON | Self-Organizing Networks | +| SOT | Source Of Truth | +| SR-IOV | [Single-Root Input/Output Virtualization](https://en.wikipedia.org/wiki/Single-root_input/output_virtualization) | +| SRS | Software Requirements Specification | +| SSL | [SecureSocketsLayer](https://en.wikipedia.org/wiki/Transport_Layer_Security) | +| SUPP | (Vendor Specific) short for supplement, changing a connection before activation | +| Swagger | legacy name for the OpenAPI Specification | +| Swift | OpenStack Object storage | +| TCP | Transmission Control Protocol | +| TEM | Telecom Electronics Manufacturer | +| TLS | [Transport Layer Security](https://en.wikipedia.org/wiki/Transport_Layer_Security) | +| TN | Transport Network | +| TOSCA | [Topology and Orchestration Specification for Cloud Applications](https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=tosca) | +| TPS | Transactions Per Second | +| TSC | Technical Steering Committee | +| U-UI | [Usecase UserInterface](https://wiki.onap.org/display/DW/Usecase+UI+Project) | +| UI | [User Interface](https://en.wikipedia.org/wiki/User_interface) | +| UUI | User to User Information | +| UX | [User Experience](https://en.wikipedia.org/wiki/User_experience) | +| vCE | virtual CE (Customer Edge) router (an example VNF) | +| vCPE | Virtual Customer Premise Equipment | +| vDNS | Virtual Domain Name Server (an example VNF) | +| VDU | [Virtualisation Deployment Unit](https://wiki.onap.org/display/DW/Comparison+of+Current+R3+Clean+Version+with+IFA011+v2.5.1) | +| VES | [Virtual function EventStream](https://wiki.opnfv.org/download/attachments/6819329/OPNVF%20VES.pptx?version=4&modificationDate=1466395653000&api=v2) | +| vF | Virtual Firewall (an example VNF) | +| VF | Virtual Function | +| VFC | [Virtual Function Controller](https://wiki.onap.org/display/DW/Virtual+Function+Controller+Project) | +| VFC | Virtual Function Component (Resource Onboarding) | +| vfModule | Virtual Function Module | +| VID | Virtual Instantiation Deployment | +| VID | [Virtual Infrastructure Deployment (Project)](https://wiki.onap.org/display/DW/Virtual+Infrastructure+Deployment+Project) | +| VIM | Virtualized Infrastructure Manager | +| VLAN | Virtual Local Area Network | +| VM | Virtual Machine | +| VNF | [Virtual Network Function](http://searchsdn.techtarget.com/definition/virtual-network-functions) | +| VNFC | Virtual Network Function Component | +| VNFD | [VNF Descriptor](https://wiki.onap.org/pages/viewpage.action?pageId=8226059) | +| VNFM | VNF Manager | +| VNO | Virtual Network Operator | +| vPE | virtual PE (Provider Edge) router (an example of a VNF) | +| VPP | [Vector Packet Processing](https://wiki.fd.io/view/VPP/What_is_VPP%3F) | +| VSP | Vendor Software Product (from SDC Demo Guide) | +| VTP | [VNF Test Platform](https://wiki.onap.org/pages/viewpage.action?pageId=43386304) | +| VVP | [VNF Validation Program](https://wiki.onap.org/display/DW/VNF+Validation+Program+Project) | +| WAR | [Web application Archive](https://en.wikipedia.org/wiki/WAR_(file_format)) | +| xNF | The combination of PNF and VNF; Network Function | +| YANG | Yet Another Next Generation - a Data Modeling Language for the Network Configuration Protocol (NETCONF) | + diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/connect/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/connect/README.md new file mode 100644 index 000000000..584fcdf14 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/connect/README.md @@ -0,0 +1,19 @@ +# Connect + +The 'Connect' application on OpenDaylight provides up-to-date connectivity information about the network nodes exposing a NETCONF/YANG interface. It automatically displays new Nodes and their connection status. Usually, the NETCONF servers of the Nodes mount themselves. If necessary, they can be mounted manually by right-clicking on the row representing a node and selecting the 'mount' action. For better understanding of alarms and status, a connection status log lists all the connection status changes of OpenDaylight mount points. + +## Views + +The graphical user interface is divided into two sections. + +### Nodes + +Nodes are network functions with a NETCONF/YANG management and control interface. A table view shows all configured and connected NETCONF Servers of the SDN-R cluster. This view also allows to manually configure/mount a node via the '+' button. The SDN controller will start connecting to the NETCONF server. + +Nodes can be marked as 'required'. If a node is required, it will stay available even if disconnected. If a node is not required, it will be deleted once disconnected. + +By right-clicking on a row representing a node, an action menu opens. The menu allows to mount, unmount, view the details, edit and remove the node. Additionally, it links to several applications like Fault and Configure, which will be filtered to display information relevant to the selected node. + +### Connection Status Log + +The log lists the connection status changes between SDN Controller and NETCONF servers (devices, Network Elements, network functions).
\ No newline at end of file diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/faq.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/faq.md new file mode 100644 index 000000000..f9d5e50d7 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/faq.md @@ -0,0 +1,72 @@ +# Frequently asked questions + + + +## Which browser should I use to operate Opendaylight SDN-R User interface? + +An actual version of [Google Chromium](https://www.chromium.org/getting-involved/download-chromium "Download Chromium") or +[Google Chrome](https://www.google.de/search?q=chrome+download&oq=chrome+download&aqs=chrome..69i57j0l5.2718j0j4&sourceid=chrome&ie=UTF-8 "Download Chrome") is recommended. + +- - - + + +## How to enable detailed logs in karaf for SDN-R applications + +If you like to see more details in karaf logs for the NetConf communication between ODL and NetConf servers (mediators/devices) please invoke the following commands in the karaf console. + +``` +# Logging settings (on) +log:set DEBUG org.opendaylight.mwtn +log:set TRACE org.opendaylight.netconf +log:set TRACE com.highstreet.technologies.odl.app +``` + +Please note, setting the debug level to 'TRACE' may impact the performance on the controller. In production environment make sure to set back the debug level to 'INFO' as soon possible. + + +``` +# Logging settings (off) +log:set INFO org.opendaylight.mwtn +log:set INFO org.opendaylight.netconf +log:set INFO com.highstreet.technologies.odl.app +``` + +- - - + +## Which commands should be used to analyse karaf logs? + +``` +cd $ODL_KARAF_HOME/data/log +rm *.txt +grep -anr --include=*.log* "| ERROR |" . | grep 2018 >> 01-error.txt +grep -anr --include=*.log* "RemoteDevice{" . | grep 2018 >> 02-devices.txt +grep -anr --include=*.log* "RemoteDevice{" . | grep "Unable to build schema context, unsatisfied imports" | grep 2018 >> 03-schema-issue.txt +grep -anr --include=*.log* "Matched request:" . | grep 2018 >> 04-matched-request.txt +grep -anr --include=*.log* "network-element" . | grep 2018 >> 05-network-element.txt +grep -anr --include=*.log* "urn:onf:params:xml:ns:yang:core-model" . | grep 2018 >> 06-core-module.txt +grep -anr --include=*.log* "PerformanceManagerTask" . | grep 2018 >> 07-pm-tick.txt +grep -anr --include=*.log* "Unable to read NE data for mountpoint" . | grep 2018 >> 08-unable-to-read.txt +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-odlux/helpserver/provider/src/main/resources/help/sdnr/general.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/general.md new file mode 100644 index 000000000..a91b48545 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/general.md @@ -0,0 +1,25 @@ +# General functionality + +The following functionality is common to all applications. + +### Table data export + +Every table can export its data via the '︙' button. +The data, which gets exported is the currently viewed data in the table. As the default pagination is set to 10, only the first 10 rows or filtered rows will be exported. To increase the number of exported rows, change the pagination. + +The behavior of the export can vary based on the browser: + +a) Some browsers allow you to save the file with the predefined name export.csv. In case your browser does not offer this function please use the 'Save as...' option and define the filename with extension csv. + +b) Some browsers save the file automatically with the alphanumeric name but without an extension. In such a case navigate to the downloaded file location and rename the file. The extension (csv) must be appended to the name. The result should look like 'export_file.csv'. + +### Table filters + +The following filters are supported by all tables based on the data type of the column. + +|Data type | Possible Filter | Example | +| ---------|---------------|---------| +| Text | Any characters or numbers, matches exactly unless a * or a ? are used. Both special characters act as wildcards, which can be used for contains, ends with and begins with queries. The * matches any number of characters whereas the ? matches exactly one character. Both wildcards can be used in the same query. |Test, T*, *st, Te?t, ?est | +| Numeric | < or <= or > or >= or exact number |>5000, 20, <=82 | +| Boolean |None (no filter set), true or false |true, false | + diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfConfig/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfConfig/README.md new file mode 100644 index 000000000..62bf90736 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfConfig/README.md @@ -0,0 +1,22 @@ +# Configuration + +The application rely on yang-specifications provided by the device. It is Generic and generated user interface, generated by yang specs and capabilites of a device. Each view of a functional element is divided into capabilities, configuration, status, current problem, current performance and history performance information according to TR-532. + +A separate window is available for modifying the configuration. All changes made are sent to the device in a single NetConf bulk request. The operator is notified about successfully configuring the device. + +### Features + +Read yang specifications and generate related User interface out of it + + - Provide yang description as tool tip for fields + + - Consider specified type for input fields + + - Provide read and write access + +## Implementation + +The application is implemented as ODLUX web application using the RestConf northbound interface of the SDN controller. The key frameworks are: Typescript, React and material-ui. + +Connection status information is updated automatically using a web socket for notifications from OpenDaylight to the browser. + diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfEventLog/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfEventLog/README.md new file mode 100644 index 000000000..e289f422c --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfEventLog/README.md @@ -0,0 +1,6 @@ +# Event Log + +The 'EventLog' application displays application logs and messages automatically created by the different active applications. +SDN-R offers a common log service so that PNFs or other ONAP components can log their data and users can analyze and export the data in a common way. + + diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfFault/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfFault/README.md new file mode 100644 index 000000000..cfac06d59 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfFault/README.md @@ -0,0 +1,31 @@ +# Fault Management + +To operate a network, it is important to get an overview about the currently raised alarms. The application offers basic fault management of devices supporting ONF-TR-532. The alarms are classified according to the severity level (warning, minor, major, critical). + +## Views + +The graphical user interface is separated into three views. + +### Current Problem List + +Lists all current active faults in the network. In addition, it also lists alarms sent by the SDN controller itself, which detects connection losses to the NetConf server (connectionLossOAM) or to a device via a mediator to a device (connectionLossNeOAM). + +### Alarm Notifications + +As long as the view is open, all alarm notifications received by the SDN Controller are listed. Please note that refreshing the view will start the collection again. Previous alarm notification can be viewed in the alarm log. + +### Alarm Log + +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 database, the client retrieves the information from the database and displays them in a table. + +The server synchronizes with the current alarm lists of the devices. Based on raised and cleared notifications, the current alarm status of the network is calculated. 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 side. + +An alarm status bar in the header of the web application informs the operator about the health status of the network. + +The ODLUX web application uses web sockets to update the graphical user interface of the Alarm Notifications (devices) and Connection Status Notifications in real-time. + + diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfInventory/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfInventory/README.md new file mode 100644 index 000000000..1f2dd88e5 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfInventory/README.md @@ -0,0 +1,30 @@ +# Inventory + +The application offers basic inventory management of devices supporting ONF-TR-512 and ietf-hardware. + +## Views + +The inventory application offers two different ways to visualize inventory data. + +### Tableview + +The view displays the inventory data of the network element – for example, serial-numbers and part-numbers according to the containment of the equipment – as a table. By right-clicking on an entry, the element can be viewed in the treeview. + +### Treeview + +The treeview visualizes relations between the inventory data of a network element. To load all relations, a '*' can be entered in the search-field. + + +##### Inventory Export: + +The '︙' button in the upper right corner of the table allows exporting the inventory data as a CSV file. + +Only the currently viewed table data is exported. As the default pagination is set to 10, only the first 10 rows or filtered rows would be exported. To increase the number of exported rows change the pagination. + +The behavior of the export can vary based on different browsers: + +a) Some browsers allow you to save the file with the predefined name export.csv. In case your browser does not offer this function please use the 'Save as...' option and define the filename with extension csv. + +b) Some browsers save the file automatically with the alphanumeric name but without an extension. In such a case navigate to the downloaded file location and rename the file. The extension (csv) must be appended to the name. The result should look like export_file.csv. + + diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfMaintenance/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfMaintenance/README.md new file mode 100644 index 000000000..f6bf53889 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfMaintenance/README.md @@ -0,0 +1,7 @@ +# Maintenance + +The 'Maintenance' application on OpenDaylight provides information about planned maintenances of Network Elements, currently or in the future. Users can manage devices to set the maintenance mode so that no unnecessary alarms are created. When the device is in maintenance mode, alarms are not forwarded to DCAE. As soon as the maintenance is finished, the alarms will start flowing again. + +The 'active' field in the table shows if the Network Element is currently in maintenance mode 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 a future date or is already completed. + +Users can disable the maintenance mode or change its start and end dates by using the available options in the actions column. diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfMediator/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfMediator/README.md new file mode 100644 index 000000000..ef20c15bc --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfMediator/README.md @@ -0,0 +1,7 @@ +# Mediator + +Some device vendors (Altiostar, CommScope, Dragonwave-X) use the [generic mediator framework](https://github.com/Melacon/NetConf2SNMP). Such mediators offer an API to create, delete, start and stop mediator instances. + +New mediator servers can be added via the '+' button. Afterward, a server can be selected to view all available mediator instances. + +A mediator instance can be started, stopped and deleted using the available actions. Additionally, its details can be viewed. The '+' button allows the user to add a new instance. During the creation, at least one 'ODL auto connect' configuration must be added. diff --git a/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfPerformance/README.md b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfPerformance/README.md new file mode 100644 index 000000000..c217b5c8a --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/main/resources/help/sdnr/pnfPerformance/README.md @@ -0,0 +1,14 @@ +# 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 retrieves the values from the database and displays them in a graphical user interface. + +## Performance history values + +After selecting a connected PNF supporting ONF-TR-532 and a physical interface, the application collects the received and centralized stored performance values for this interface. + +The values are visualized using two views: a line chart and a table, with the chart always shown first. To switch between them, toggle buttons can be used. The chart view offers a filter to quickly limit the shown values. To keep both views in sync, the filters of the chart and the table are connected. If one view is filtered, the other one gets updated in the background. + + + + + diff --git a/sdnr/wt-odlux/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java b/sdnr/wt-odlux/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java new file mode 100644 index 000000000..b7a1dcc47 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/test/java/org/onap/ccsdk/features/sdnr/wt/helpserver/test/TestMyServlet.java @@ -0,0 +1,177 @@ +/* + * ============LICENSE_START======================================================================== + * ONAP : ccsdk feature sdnr wt + * ================================================================================================= + * Copyright (C) 2019 highstreet technologies GmbH Intellectual Property. All rights reserved. + * ================================================================================================= + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + * ============LICENSE_END========================================================================== + */ +package org.onap.ccsdk.features.sdnr.wt.helpserver.test; + +import static java.nio.file.StandardOpenOption.CREATE; +import static java.nio.file.StandardOpenOption.CREATE_NEW; +import static java.nio.file.StandardOpenOption.TRUNCATE_EXISTING; +import static java.nio.file.StandardOpenOption.WRITE; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; +import java.io.File; +import java.io.IOException; +import java.io.StringWriter; +import java.nio.file.Files; +import java.nio.file.OpenOption; +import javax.servlet.ServletException; +import javax.servlet.ServletOutputStream; +import javax.servlet.WriteListener; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.mockito.Mockito; +import org.onap.ccsdk.features.sdnr.wt.helpserver.HelpServlet; + + +public class TestMyServlet extends Mockito { + + private static final String GETHELPDIRECTORYBASE = "data"; + private static final String CONTENT = "abbccdfkamaosie aksdmais"; + + public static void createHelpFile(String filename, String content) { + File file = new File("bitnami/nginx/help" + filename); + File folder = file.getParentFile(); + if (!folder.exists()) { + folder.mkdirs(); + } + try { + if (file.exists()) { + file.delete(); + } + Files.write(file.toPath(), content.getBytes(), + new OpenOption[] {WRITE, CREATE_NEW, CREATE, TRUNCATE_EXISTING}); + } catch (IOException e1) { + fail(e1.getMessage()); + } + } + +// @Before +// public void init() { +// try { +// ExtactBundleResource.deleteRecursively(new File(GETHELPDIRECTORYBASE)); +// } catch (IOException e) { +// e.printStackTrace(); +// } +// } + + + // @Test We dont have implementation of meta in HelpServlet + public void testServlet() throws Exception { + + System.out.println("Test get"); + + HttpServletRequest request = mock(HttpServletRequest.class); + HttpServletResponse response = mock(HttpServletResponse.class); + + when(request.getRequestURI()).thenReturn("help/"); + when(request.getQueryString()).thenReturn("?meta"); + + ServletOutputStreamToStringWriter out = new ServletOutputStreamToStringWriter(); + when(response.getOutputStream()).thenReturn(out); + + HelpServlet helpServlet = null; + try { + helpServlet = new HelpServlet(); + System.out.println("Server created"); + createHelpFile("/meta.json", CONTENT); + + helpServlet.doOptions(request, response); + System.out.println("Get calling"); + helpServlet.doGet(request, response); + System.out.println("Get called"); + } catch (Exception e) { + fail(e.getMessage()); + } + if (helpServlet != null) { + helpServlet.close(); + } + + String result = out.getStringWriter().toString().trim(); + System.out.println("Result: '" + result + "'"); + assertEquals(CONTENT, result); + } + + @Test + public void testServlet2() { + this.testGetRequest("test/test.txt"); + this.testGetRequest("test.css"); + this.testGetRequest("test.eps"); + this.testGetRequest("test.pdf"); + } + + private void testGetRequest(String fn) { + HelpServlet helpServlet = new HelpServlet(); + createHelpFile("/" + fn, CONTENT); + HttpServletRequest request = mock(HttpServletRequest.class); + HttpServletResponse response = mock(HttpServletResponse.class); + + when(request.getRequestURI()).thenReturn("help/" + fn); + ServletOutputStreamToStringWriter out = new ServletOutputStreamToStringWriter(); + try { + when(response.getOutputStream()).thenReturn(out); + helpServlet.doGet(request, response); + } catch (ServletException | IOException e) { + fail(e.getMessage()); + } + try { + out.close(); + } catch (Exception e) { + } + try { + helpServlet.close(); + } catch (Exception e) { + } + + assertEquals("compare content for " + fn, CONTENT, out.getStringWriter().toString().trim()); + } + + public class ServletOutputStreamToStringWriter extends ServletOutputStream { + + // variables + private StringWriter out = new StringWriter(); + // end of variables + + public StringWriter getStringWriter() { + return out; + } + + @Override + public void write(int arg0) throws IOException { + out.write(arg0); + } + + @Override + public String toString() { + return out.toString(); + } + + @Override + public boolean isReady() { + return false; + } + + @Override + public void setWriteListener(WriteListener writeListener) { + } + + + } + +} diff --git a/sdnr/wt-odlux/helpserver/provider/src/test/resources/simplelogger.properties b/sdnr/wt-odlux/helpserver/provider/src/test/resources/simplelogger.properties new file mode 100644 index 000000000..1aa3824a1 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/src/test/resources/simplelogger.properties @@ -0,0 +1,58 @@ +# +# ============LICENSE_START======================================================= +# ONAP : ccsdk features +# ================================================================================ +# Copyright (C) 2020 AT&T Intellectual Property. All rights reserved. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ============LICENSE_END======================================================= +# +# + +# SLF4J's SimpleLogger configuration file +# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err. + +# Default logging detail level for all instances of SimpleLogger. +# Must be one of ("trace", "debug", "info", "warn", or "error"). +# If not specified, defaults to "info". +org.slf4j.simpleLogger.defaultLogLevel=trace + +# Logging detail level for a SimpleLogger instance named "xxx.yyy.zzz". +# Must be one of ("trace", "debug", "info", "warn", or "error"). +# If not specified, the default logging detail level is used. +# org.slf4j.simpleLogger.log.xxx.yyy=debug +org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager=debug +org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager.base.internalTypes.Resources=info +org.slf4j.simpleLogger.log.org.onap.ccsdk.features.sdnr.wt.devicemanager.base.netconf.container=trace + +# Set to true if you want the current date and time to be included in output messages. +# Default is false, and will output the number of milliseconds elapsed since startup. +#org.slf4j.simpleLogger.showDateTime=false + +# The date and time format to be used in the output messages. +# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat. +# If the format is not specified or is invalid, the default format is used. +# The default format is yyyy-MM-dd HH:mm:ss:SSS Z. +#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z + +# Set to true if you want to output the current thread name. +# Defaults to true. +#org.slf4j.simpleLogger.showThreadName=true + +# Set to true if you want the Logger instance name to be included in output messages. +# Defaults to true. +#org.slf4j.simpleLogger.showLogName=true + +# Set to true if you want the last component of the name to be included in output messages. +# Defaults to false. +#org.slf4j.simpleLogger.showShortLogName=false diff --git a/sdnr/wt-odlux/helpserver/provider/test/test.txt b/sdnr/wt-odlux/helpserver/provider/test/test.txt new file mode 100644 index 000000000..6dc9c4556 --- /dev/null +++ b/sdnr/wt-odlux/helpserver/provider/test/test.txt @@ -0,0 +1 @@ +abbccdfkamaosie aksdmais
\ No newline at end of file |