IP parameter added to ONU IGMP join/leave cli command
Change-Id: I1d821950deacba1d82d47731e644b917f3a6d7ed
diff --git a/internal/bbsimctl/commands/onu.go b/internal/bbsimctl/commands/onu.go
index 5f6874b..da841cd 100644
--- a/internal/bbsimctl/commands/onu.go
+++ b/internal/bbsimctl/commands/onu.go
@@ -40,6 +40,7 @@
type OnuSnString string
type IgmpSubAction string
+type GroupAddress string
const IgmpJoinKey string = "join"
const IgmpLeaveKey string = "leave"
@@ -90,8 +91,9 @@
type ONUIgmp struct {
Args struct {
- OnuSn OnuSnString
- SubAction IgmpSubAction
+ OnuSn OnuSnString
+ SubAction IgmpSubAction
+ GroupAddress GroupAddress
} `positional-args:"yes" required:"yes"`
}
@@ -331,6 +333,7 @@
igmpReq := pb.IgmpRequest{
OnuReq: &req,
SubActionVal: subActionVal,
+ GroupAddress: string(options.Args.GroupAddress),
}
res, err := client.GetONU(ctx, igmpReq.OnuReq)
if err != nil {
@@ -340,7 +343,7 @@
}
log.WithFields(log.Fields{
"SerialNumber": igmpReq.OnuReq.SerialNumber,
- }).Debugf("ONU has indentified : %s", res)
+ }).Debugf("ONU has identified : %s", res)
igmpRes, igmpErr := client.ChangeIgmpState(ctx, &igmpReq)
if igmpErr != nil {