diff options
Diffstat (limited to 'sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/README.md')
-rw-r--r-- | sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/README.md | 144 |
1 files changed, 0 insertions, 144 deletions
diff --git a/sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/README.md b/sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/README.md deleted file mode 100644 index c99967d2b..000000000 --- a/sdnr/wt/helpserver/provider/src/main/resources/help/mediatorserver/README.md +++ /dev/null @@ -1,144 +0,0 @@ -# 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 | - |