mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-22 18:14:19 +08:00
Compare commits
1 Commits
sysmngr_me
...
ponmngr_do
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2575f33e57 |
1139
ponmngr/docs/api/xpon.ubus.md
Normal file
1139
ponmngr/docs/api/xpon.ubus.md
Normal file
File diff suppressed because it is too large
Load Diff
1
ponmngr/docs/api/xpon.uci.md
Normal file
1
ponmngr/docs/api/xpon.uci.md
Normal 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>
|
||||||
143
ponmngr/docs/guide/quickstart.md
Normal file
143
ponmngr/docs/guide/quickstart.md
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
# Function Specification
|
||||||
|
|
||||||
|
## Introduction
|
||||||
|
|
||||||
|
This will be a short description of how to setup ONU and enable ANI.
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
ponmngr UCI Config
|
||||||
|
|
||||||
|
```
|
||||||
|
config ani 'ani'
|
||||||
|
option enable '1'
|
||||||
|
option serial_number 'IOPS18000001'
|
||||||
|
```
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
* `serial_number` is the unique for each ONU, In case `serial_number` has not
|
||||||
|
* been set from production in that case `serial_number` is calculated using
|
||||||
|
* the combination of vendor "IOPS" and last 4 octet of device mac address.
|
||||||
|
* same serial number should avaibale in OLT for the corresponding ONU profile
|
||||||
|
|
||||||
|
After ubus starts the xpon methods can be invoked to get the status
|
||||||
|
|
||||||
|
For all available status the command can be used without parameters, such as
|
||||||
|
|
||||||
|
```
|
||||||
|
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
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
UCI to invoke pon manager to enable status of ani, such as
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
25
ponmngr/docs/schemas/xpon_uci.json
Normal file
25
ponmngr/docs/schemas/xpon_uci.json
Normal 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."
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
300
ponmngr/xpon_ubus.json
Normal file
300
ponmngr/xpon_ubus.json
Normal file
@@ -0,0 +1,300 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||||
|
"$id": "http://example.com/root.json",
|
||||||
|
"type": "object",
|
||||||
|
"title": "xpon",
|
||||||
|
"object": "xpon",
|
||||||
|
"properties": {
|
||||||
|
"status": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"output": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"ONU": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"Enable",
|
||||||
|
"Version",
|
||||||
|
"EquipmentID",
|
||||||
|
"SoftwareImage",
|
||||||
|
"EthernetUNI",
|
||||||
|
"ANI",
|
||||||
|
"Transceiver"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"Enable": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": "false"
|
||||||
|
},
|
||||||
|
"Version": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"EquipmentID": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 20
|
||||||
|
},
|
||||||
|
"SoftwareImage": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"ID",
|
||||||
|
"Version",
|
||||||
|
"IsCommitted",
|
||||||
|
"IsActive",
|
||||||
|
"IsValid"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"ID": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0,
|
||||||
|
"maximum": 1
|
||||||
|
},
|
||||||
|
"Version": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 14,
|
||||||
|
"default": "7.2_BETA2"
|
||||||
|
},
|
||||||
|
"IsCommitted": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": "false"
|
||||||
|
},
|
||||||
|
"IsActive": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": "false"
|
||||||
|
},
|
||||||
|
"IsValid": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": "false"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"EthernetUNI": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"Enable",
|
||||||
|
"Status",
|
||||||
|
"ANIs",
|
||||||
|
"InterdomainID",
|
||||||
|
"InterdomainName",
|
||||||
|
"Stats"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"Enable": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": "false"
|
||||||
|
},
|
||||||
|
"Status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"Up",
|
||||||
|
"Down",
|
||||||
|
"unknown",
|
||||||
|
"Dormant",
|
||||||
|
"NotPresent",
|
||||||
|
"LowerLayerDown",
|
||||||
|
"Error"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ANIs": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 1024,
|
||||||
|
"pattern": "gpon[0-9]\\.[0-9]"
|
||||||
|
},
|
||||||
|
"InterdomainID": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 256,
|
||||||
|
"pattern": "(VEIP|PPTPEthernetUNI),(1025|257)"
|
||||||
|
},
|
||||||
|
"InterdomainName": {
|
||||||
|
"type": "string",
|
||||||
|
"minLength": 1,
|
||||||
|
"maxLength": 25,
|
||||||
|
"default": "VEIP"
|
||||||
|
},
|
||||||
|
"Stats": {
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"BytesSent",
|
||||||
|
"BytesReceived",
|
||||||
|
"PacketsSent",
|
||||||
|
"PacketsReceived"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"BytesSent": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"BytesReceived": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"PacketsSent": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"PacketsReceived": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ANI": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"Enable",
|
||||||
|
"Status",
|
||||||
|
"PONMode",
|
||||||
|
"Stats"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"Enable": {
|
||||||
|
"type": "boolean",
|
||||||
|
"default": "false"
|
||||||
|
},
|
||||||
|
"Status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum":[
|
||||||
|
"Up",
|
||||||
|
"Down",
|
||||||
|
"Dormant",
|
||||||
|
"Unknown",
|
||||||
|
"NotPresent",
|
||||||
|
"Error"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"PONMode": {
|
||||||
|
"type": "string",
|
||||||
|
"enum":[
|
||||||
|
"GPON",
|
||||||
|
"XG-PON",
|
||||||
|
"NG-PON2",
|
||||||
|
"XGS-PON"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"Stats": {
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"BytesSent",
|
||||||
|
"BytesReceived",
|
||||||
|
"PacketsSent",
|
||||||
|
"PacketsReceived"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"BytesSent": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"BytesReceived": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"PacketsSent": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"PacketsReceived": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"Transceiver": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"ID",
|
||||||
|
"Identifier",
|
||||||
|
"ModuleVendor",
|
||||||
|
"ModuleName",
|
||||||
|
"ModuleVersion",
|
||||||
|
"ModuleFirmwareVersion",
|
||||||
|
"PONMode",
|
||||||
|
"RxPower",
|
||||||
|
"TxPower",
|
||||||
|
"Voltage",
|
||||||
|
"Bias",
|
||||||
|
"Temperature"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"ID": {
|
||||||
|
"type": "integer",
|
||||||
|
"default": 0
|
||||||
|
},
|
||||||
|
"Identier": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"ModuleVendor": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"ModuleName": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"ModuleVersion": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"ModuleFirmwareVersion": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"PONMode": {
|
||||||
|
"type": "string",
|
||||||
|
"enum":[
|
||||||
|
"GPON",
|
||||||
|
"XG-PON",
|
||||||
|
"NG-PON2",
|
||||||
|
"XGS-PON"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"RxPower": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"TxPower": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"Voltage": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"Bias": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"Temperature": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user