VOL-4112 Add configuration flag to define the number of UNIs created in BBSim
uni_ports integer parameter added to OltConfig as command line parameter
Change-Id: I10956c497eb2123c62a3f9c27e912cd0046efcb8
diff --git a/internal/common/options.go b/internal/common/options.go
index 545bb5c..83b5b56 100644
--- a/internal/common/options.go
+++ b/internal/common/options.go
@@ -92,6 +92,7 @@
OltRebootDelay int `yaml:"reboot_delay"`
PortStatsInterval int `yaml:"port_stats_interval"`
OmciResponseRate uint8 `yaml:"omci_response_rate"`
+ UniPorts uint32 `yaml:"uni_ports"`
}
type BBSimConfig struct {
@@ -230,6 +231,8 @@
nni := flag.Int("nni", int(conf.Olt.NniPorts), "Number of NNI ports per OLT device to be emulated")
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 UNI Ports per ONU device to be emulated")
+
oltRebootDelay := flag.Int("oltRebootDelay", conf.Olt.OltRebootDelay, "Time that BBSim should before restarting after a reboot")
omci_response_rate := flag.Int("omci_response_rate", int(conf.Olt.OmciResponseRate), "Amount of OMCI messages to respond to")
@@ -258,6 +261,7 @@
conf.Olt.ID = int(*olt_id)
conf.Olt.NniPorts = uint32(*nni)
conf.Olt.PonPorts = uint32(*pon)
+ conf.Olt.UniPorts = uint32(*uni)
conf.Olt.OnusPonPort = uint32(*onu)
conf.Olt.OltRebootDelay = *oltRebootDelay
conf.Olt.OmciResponseRate = uint8(*omci_response_rate)
@@ -333,6 +337,7 @@
OltRebootDelay: 60,
PortStatsInterval: 20,
OmciResponseRate: 10,
+ UniPorts: 4,
},
BBRConfig{
LogLevel: "debug",