ponmngr: add documentation

This commit is contained in:
Rahul
2023-01-23 12:48:59 +05:30
commit f12ccabad8
7 changed files with 1325 additions and 0 deletions

5
docs/api/ubus/.pages Normal file
View File

@@ -0,0 +1,5 @@
title: "UBUS"
nav:
- "..."

1139
docs/api/ubus/xpon.md Normal file

File diff suppressed because it is too large Load Diff

5
docs/api/uci/.pages Normal file
View File

@@ -0,0 +1,5 @@
title: "UCI"
nav:
- "..."

1
docs/api/uci/xpon.md Normal file
View File

@@ -0,0 +1 @@
<tbody><tr><td colspan="2"><div style="font-weight: bold">xpon</div><table style="width:100%"><tbody><tr><td><div style="font-weight: bold; font-size: 14px">section</div></td><td><div style="font-weight: bold; font-size: 14px">description</div></td><td><div style="font-weight: bold; font-size: 14px">multi</div></td><td><div style="font-weight: bold; font-size: 14px">options</div></td></tr><tr><td class="td_row_even"><div class="td_row_even">ani</div></td><td class="td_row_even"><div class="td_row_even">xpon ani configuration</div></td><td class="td_row_even"><div class="td_row_even">false</div></td><td class="td_row_even"><table style="width:100%"><tbody><tr><td><div style="font-weight: bold; font-size: 14px">name</div></td><td><div style="font-weight: bold; font-size: 14px">type</div></td><td><div style="font-weight: bold; font-size: 14px">required</div></td><td><div style="font-weight: bold; font-size: 14px">default</div></td><td><div style="font-weight: bold; font-size: 14px">description</div></td></tr><tr><td class="td_row_even"><div class="td_row_even">enable</div></td><td class="td_row_even"><div class="td_row_even">boolean</div></td><td class="td_row_even"><div class="td_row_even">yes</div></td><td class="td_row_even"><div class="td_row_even">false</div></td><td class="td_row_even"><div class="td_row_even">ONU is enabled as pon functionality.</div></td></tr><tr><td class="td_row_odd"><div class="td_row_odd">serial_number</div></td><td class="td_row_odd"><div class="td_row_odd">string</div></td><td class="td_row_odd"><div class="td_row_odd">yes</div></td><td class="td_row_odd"><div class="td_row_odd">null</div></td><td class="td_row_odd"><div class="td_row_odd">Serial number of ONU, Unique for each ONU.</div></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody>

5
docs/guide/.pages Normal file
View File

@@ -0,0 +1,5 @@
title: "User Guide"
nav:
- "..."

145
docs/guide/quickstart.md Normal file
View File

@@ -0,0 +1,145 @@
# ponmngr
## About ponmngr
The ponmngr package helps manage pon configuration and exposes pon related information
over the ubus and to the data model.
## Features
- Configuration of pon parameters.
- Reading pon related information.
## Configuration of pon parameters
At present, configuration support for enabling/disabling pon and serial number is
present via the UCI file as follows
```
config ani 'ani'
option enable '1'
option serial_number 'IOPS18000001'
```
`serial_number` is the unique for each ONU and essential for ONU registration, hence,
if the serial number is not configured in the uci, then, it is read from the
production data (using the gponsn variable). If it has not been written in the
production data then, `serial_number` is generated using the combination of vendor
"IOPS" and last 4 octet of device mac address.
## Reading pon related information
After ubus starts the xpon methods can be invoked to get the status
```
root@iopsys:~# ubus call xpon status
{
"ONU": [
{
"Enable": true,
"Version": "",
"EquipmentID": "BVM4K00BRA",
"softwareImage": [
{
"ID": 0,
"Version": "7.2.0alpha0-5",
"IsValid": true,
"IsActive": false,
"IsCommitted": false
},
{
"ID": 1,
"Version": "7.2.0alpha0-5",
"IsValid": true,
"IsActive": true,
"IsCommitted": true
}
],
"EthernetUNI": [
{
"Enable": true,
"Status": "UP",
"ANIs": "gpon0.0",
"InterDomainID": "(VEIP,1025)",
"InterDomainName": "VEIP",
"Stats": {
"BytesSent": 39891,
"BytesReceived": 50296,
"PacketsSent": 314,
"PacketsReceived": 384
}
},
{
"Enable": true,
"Status": "UP",
"ANIs": "gpon0.0",
"InterDomainID": "(VEIP,1025)",
"InterDomainName": "VEIP",
"Stats": {
"BytesSent": 54499,
"BytesReceived": 47908,
"PacketsSent": 286,
"PacketsReceived": 273
}
},
{
"Enable": false,
"Status": "DOWN",
"ANIs": "gpon0.0",
"InterDomainID": "(VEIP,1025)",
"InterDomainName": "VEIP",
"Stats": {
"BytesSent": 0,
"BytesReceived": 0,
"PacketsSent": 0,
"PacketsReceived": 0
}
},
{
"Enable": false,
"Status": "DOWN",
"ANIs": "gpon0.0",
"InterDomainID": "(VEIP,1025)",
"InterDomainName": "VEIP",
"Stats": {
"BytesSent": 0,
"BytesReceived": 0,
"PacketsSent": 0,
"PacketsReceived": 0
}
}
],
"ANI": [
{
"Enable": true,
"Status": "Up",
"PONMode": "GPON",
"Stats": {
"BytesSent": 228,
"BytesReceived": 408394,
"PacketsSent": 2,
"PacketsReceived": 2328
}
}
],
"Transceiver": [
{
"ID": 0,
"Identifier": 3,
"ModuleVendor": "MENTECHOPTO",
"ModuleName": "MSOG22-LDCC-ACCO",
"ModuleVersion": "MNC221K90309",
"ModuleFirmwareVersion": "1.0",
"PONMode": "GPON",
"TxPower": 16,
"RxPower": -240,
"Voltage": 3300,
"Bias": 15744,
"Temperature": 270
}
]
}
]
}
```

25
schemas/xpon_uci.json Normal file
View File

@@ -0,0 +1,25 @@
{
"xpon":
[
{
"section": "ani",
"description": "xpon ani configuration",
"multi": "false",
"options": [
{
"name": "enable",
"type": "boolean",
"required": "yes",
"default": "false",
"description": "ONU is enabled as pon functionality."
},{
"name": "serial_number",
"type": "string",
"required": "yes",
"default": null,
"description": "Serial number of ONU, Unique for each ONU."
}
]
}
]
}