Fixing BBR
Change-Id: If612b2ee8dd5ecb1315e071fb9bbe87dd163b53d
diff --git a/internal/bbr/devices/olt.go b/internal/bbr/devices/olt.go
index 5e68fa3..61af90a 100644
--- a/internal/bbr/devices/olt.go
+++ b/internal/bbr/devices/olt.go
@@ -52,6 +52,9 @@
for _, pon := range o.Olt.Pons {
for _, onu := range pon.Onus {
+ if err := onu.InternalState.Event("initialize"); err != nil {
+ log.Fatalf("Error initializing ONU: %v", err)
+ }
log.Tracef("Created ONU: %s (%d:%d)", onu.Sn(), onu.STag, onu.CTag)
}
}
diff --git a/internal/bbsim/devices/olt.go b/internal/bbsim/devices/olt.go
index 3264bc3..eabbe62 100644
--- a/internal/bbsim/devices/olt.go
+++ b/internal/bbsim/devices/olt.go
@@ -144,9 +144,11 @@
olt.Pons = append(olt.Pons, &p)
}
- if err := olt.InternalState.Event("initialize"); err != nil {
- log.Errorf("Error initializing OLT: %v", err)
- return nil
+ if isMock != true {
+ if err := olt.InternalState.Event("initialize"); err != nil {
+ log.Errorf("Error initializing OLT: %v", err)
+ return nil
+ }
}
return &olt