[VOL-4589] Make NNI ports speed configurable and report it to the OpenOLT Adapter
Change-Id: Iea4fc1c9ced0975ebbefffd4b13ef1e6e5fa00a1
diff --git a/internal/bbsim/devices/olt.go b/internal/bbsim/devices/olt.go
index ef95ad6..3410e60 100644
--- a/internal/bbsim/devices/olt.go
+++ b/internal/bbsim/devices/olt.go
@@ -77,6 +77,7 @@
ID int
SerialNumber string
NumNni int
+ NniSpeed uint32
NumPon int
NumOnuPerPon int
NumUni int
@@ -123,6 +124,7 @@
oltLogger.WithFields(log.Fields{
"ID": options.Olt.ID,
"NumNni": options.Olt.NniPorts,
+ "NniSpeed": options.Olt.NniSpeed,
"NumPon": options.Olt.PonPorts,
"NumOnuPerPon": options.Olt.OnusPonPort,
"NumUni": options.Olt.UniPorts,
@@ -136,6 +138,7 @@
oltLogger.Debugf("Changing OLT OperState from %s to %s", e.Src, e.Dst)
}),
NumNni: int(options.Olt.NniPorts),
+ NniSpeed: options.Olt.NniSpeed,
NumPon: int(options.Olt.PonPorts),
NumOnuPerPon: int(options.Olt.OnusPonPort),
NumUni: int(options.Olt.UniPorts),
@@ -634,6 +637,7 @@
Type: nni.Type,
IntfId: nni.ID,
OperState: nni.OperState.Current(),
+ Speed: o.NniSpeed,
}}
if err := stream.Send(&openolt.Indication{Data: operData}); err != nil {
@@ -645,6 +649,7 @@
"Type": nni.Type,
"IntfId": nni.ID,
"OperState": nni.OperState.Current(),
+ "Speed": o.NniSpeed,
}).Debug("Sent Indication_IntfOperInd for NNI")
}