[VOL-2176] Adding -no-auth and -no-dhcp option in BBSim CLI
Change-Id: I3d0f7adb26c1df0d42f67b9b8fbc782754491c31
diff --git a/internal/bbsim/devices/onu_test_helpers.go b/internal/bbsim/devices/onu_test_helpers.go
index 1044913..a2e7ddd 100644
--- a/internal/bbsim/devices/onu_test_helpers.go
+++ b/internal/bbsim/devices/onu_test_helpers.go
@@ -104,7 +104,8 @@
return nil, errors.New("unimplemented-in-mock-client")
}
-func createMockOnu(id uint32, ponPortId uint32, sTag int, cTag int) Onu {
+// this method creates a fake ONU used in the tests
+func createMockOnu(id uint32, ponPortId uint32, sTag int, cTag int, auth bool, dhcp bool) Onu {
o := Onu{
ID: id,
PonPortID: ponPortId,
@@ -112,7 +113,21 @@
CTag: cTag,
HwAddress: net.HardwareAddr{0x2e, 0x60, 0x70, 0x13, byte(ponPortId), byte(id)},
PortNo: 0,
+ Auth: auth,
+ Dhcp: dhcp,
}
o.SerialNumber = o.NewSN(0, ponPortId, o.ID)
return o
}
+
+// this method creates a real ONU to be used in the tests
+func createTestOnu() *Onu {
+ olt := OltDevice{
+ ID: 0,
+ }
+ pon := PonPort{
+ ID: 1,
+ }
+ onu := CreateONU(olt, pon, 1, 900, 900, false, false)
+ return onu
+}