[VOL-4589] Make NNI ports speed configurable and report it to the OpenOLT Adapter
Change-Id: Iea4fc1c9ced0975ebbefffd4b13ef1e6e5fa00a1
diff --git a/internal/common/options.go b/internal/common/options.go
index c0798ae..0919de8 100644
--- a/internal/common/options.go
+++ b/internal/common/options.go
@@ -86,6 +86,7 @@
DeviceSerialNumber string `yaml:"device_serial_number"`
PonPorts uint32 `yaml:"pon_ports"`
NniPorts uint32 `yaml:"nni_ports"`
+ NniSpeed uint32 `yaml:"nni_speed"`
OnusPonPort uint32 `yaml:"onus_per_port"`
Technology string `yaml:"technology"`
ID int `yaml:"id"`
@@ -230,6 +231,7 @@
olt_id := flag.Int("olt_id", conf.Olt.ID, "OLT device ID")
nni := flag.Int("nni", int(conf.Olt.NniPorts), "Number of NNI ports per OLT device to be emulated")
+ nni_speed := flag.Uint("nni_speed", uint(conf.Olt.NniSpeed), "Reported speed of the NNI ports in Mbps")
pon := flag.Int("pon", int(conf.Olt.PonPorts), "Number of PON ports per OLT device to be emulated")
onu := flag.Int("onu", int(conf.Olt.OnusPonPort), "Number of ONU devices per PON port to be emulated")
uni := flag.Int("uni", int(conf.Olt.UniPorts), "Number of Ethernet UNI Ports per ONU device to be emulated")
@@ -262,6 +264,7 @@
conf.Olt.ID = int(*olt_id)
conf.Olt.NniPorts = uint32(*nni)
+ conf.Olt.NniSpeed = uint32(*nni_speed)
conf.Olt.PonPorts = uint32(*pon)
conf.Olt.UniPorts = uint32(*uni)
conf.Olt.PotsPorts = uint32(*pots)
@@ -334,6 +337,7 @@
DeviceSerialNumber: "BBSM00000001",
PonPorts: 1,
NniPorts: 1,
+ NniSpeed: 10000, //Mbps
OnusPonPort: 1,
Technology: "XGS-PON",
ID: 0,