[VOL-3210] Added Retry feature in BBSim for EAPOL and DHCP
Change-Id: If0586c804f906998ebc09b7770fd6a749a3a2762
diff --git a/internal/common/options.go b/internal/common/options.go
index b7f8bf6..6c728fb 100644
--- a/internal/common/options.go
+++ b/internal/common/options.go
@@ -121,6 +121,8 @@
}
type BBSimConfig struct {
+ DhcpRetry bool `yaml:"dhcp_retry"`
+ AuthRetry bool `yaml:"auth_retry"`
EnableIgmp bool `yaml:"enable_igmp"`
EnableDhcp bool `yaml:"enable_dhcp"`
EnableAuth bool `yaml:"enable_auth"`
@@ -187,6 +189,8 @@
ControlledActivation: "default",
EnablePerf: false,
KafkaEventTopic: "",
+ DhcpRetry: false,
+ AuthRetry: false,
},
OltConfig{
Vendor: "BBSim",
@@ -266,6 +270,8 @@
enableEvents := flag.Bool("enableEvents", conf.BBSim.Events, "Enable sending BBSim events on configured kafka server")
kafkaAddress := flag.String("kafkaAddress", conf.BBSim.KafkaAddress, "IP:Port for kafka")
kafkaEventTopic := flag.String("kafkaEventTopic", conf.BBSim.KafkaEventTopic, "Ability to configure the topic on which BBSim publishes events on Kafka")
+ dhcpRetry := flag.Bool("dhcpRetry", conf.BBSim.DhcpRetry, "Set this flag if BBSim should retry DHCP upon failure until success")
+ authRetry := flag.Bool("authRetry", conf.BBSim.AuthRetry, "Set this flag if BBSim should retry EAPOL (Authentication) upon failure until success")
flag.Parse()
sTagAlloc, err := tagAllocationFromString(*s_tag_allocation)
@@ -311,6 +317,8 @@
conf.BBSim.RestApiAddress = *rest_api_address
conf.BBSim.SadisFormat = sf
conf.BBSim.KafkaEventTopic = *kafkaEventTopic
+ conf.BBSim.AuthRetry = *authRetry
+ conf.BBSim.DhcpRetry = *dhcpRetry
// update device id if not set
if conf.Olt.DeviceId == "" {