[VOL-4437] Adding support for unkown attributes

Change-Id: I54b1fbefdb75ca3ec4abfc83b57b232d07c76873
diff --git a/internal/common/options.go b/internal/common/options.go
index 58cec20..494473c 100644
--- a/internal/common/options.go
+++ b/internal/common/options.go
@@ -164,29 +164,30 @@
 }
 
 type BBSimConfig struct {
-	ConfigFile             string
-	ServiceConfigFile      string
-	PonsConfigFile         string
-	DhcpRetry              bool    `yaml:"dhcp_retry"`
-	AuthRetry              bool    `yaml:"auth_retry"`
-	LogLevel               string  `yaml:"log_level"`
-	LogCaller              bool    `yaml:"log_caller"`
-	Delay                  int     `yaml:"delay"`
-	CpuProfile             *string `yaml:"cpu_profile"`
-	OpenOltAddress         string  `yaml:"openolt_address"`
-	ApiAddress             string  `yaml:"api_address"`
-	RestApiAddress         string  `yaml:"rest_api_address"`
-	LegacyApiAddress       string  `yaml:"legacy_api_address"`
-	LegacyRestApiAddress   string  `yaml:"legacy_rest_api_address"`
-	SadisRestAddress       string  `yaml:"sadis_rest_address"`
-	SadisServer            bool    `yaml:"sadis_server"`
-	KafkaAddress           string  `yaml:"kafka_address"`
-	Events                 bool    `yaml:"enable_events"`
-	ControlledActivation   string  `yaml:"controlled_activation"`
-	EnablePerf             bool    `yaml:"enable_perf"`
-	KafkaEventTopic        string  `yaml:"kafka_event_topic"`
-	DmiServerAddress       string  `yaml:"dmi_server_address"`
-	BandwidthProfileFormat string  `yaml:"bp_format"`
+	ConfigFile                  string
+	ServiceConfigFile           string
+	PonsConfigFile              string
+	DhcpRetry                   bool    `yaml:"dhcp_retry"`
+	AuthRetry                   bool    `yaml:"auth_retry"`
+	LogLevel                    string  `yaml:"log_level"`
+	LogCaller                   bool    `yaml:"log_caller"`
+	Delay                       int     `yaml:"delay"`
+	CpuProfile                  *string `yaml:"cpu_profile"`
+	OpenOltAddress              string  `yaml:"openolt_address"`
+	ApiAddress                  string  `yaml:"api_address"`
+	RestApiAddress              string  `yaml:"rest_api_address"`
+	LegacyApiAddress            string  `yaml:"legacy_api_address"`
+	LegacyRestApiAddress        string  `yaml:"legacy_rest_api_address"`
+	SadisRestAddress            string  `yaml:"sadis_rest_address"`
+	SadisServer                 bool    `yaml:"sadis_server"`
+	KafkaAddress                string  `yaml:"kafka_address"`
+	Events                      bool    `yaml:"enable_events"`
+	ControlledActivation        string  `yaml:"controlled_activation"`
+	EnablePerf                  bool    `yaml:"enable_perf"`
+	KafkaEventTopic             string  `yaml:"kafka_event_topic"`
+	DmiServerAddress            string  `yaml:"dmi_server_address"`
+	BandwidthProfileFormat      string  `yaml:"bp_format"`
+	InjectOmciUnknownAttributes bool    `yaml:"inject_omci_unknown_attributes"`
 }
 
 type BBRConfig struct {
@@ -355,6 +356,7 @@
 	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")
+	injectOmciUnknownAttributes := flag.Bool("injectOmciUnknownAttributes", conf.BBSim.InjectOmciUnknownAttributes, "Generate a MibDB packet with Unknown Attributes")
 
 	flag.Parse()
 
@@ -385,6 +387,7 @@
 	conf.BBSim.AuthRetry = *authRetry
 	conf.BBSim.DhcpRetry = *dhcpRetry
 	conf.BBSim.DmiServerAddress = *dmi_server_address
+	conf.BBSim.InjectOmciUnknownAttributes = *injectOmciUnknownAttributes
 
 	// update device id if not set
 	if conf.Olt.DeviceId == "" {
@@ -409,26 +412,27 @@
 			// PonsConfigFile is left intentionally blank here
 			// to use the default values computed at runtime depending
 			// on the loaded Services
-			PonsConfigFile:         "",
-			LogLevel:               "debug",
-			LogCaller:              false,
-			Delay:                  200,
-			OpenOltAddress:         ":50060",
-			ApiAddress:             ":50070",
-			RestApiAddress:         ":50071",
-			LegacyApiAddress:       ":50072",
-			LegacyRestApiAddress:   ":50073",
-			SadisRestAddress:       ":50074",
-			SadisServer:            true,
-			KafkaAddress:           ":9092",
-			Events:                 false,
-			ControlledActivation:   "default",
-			EnablePerf:             false,
-			KafkaEventTopic:        "",
-			DhcpRetry:              false,
-			AuthRetry:              false,
-			DmiServerAddress:       ":50075",
-			BandwidthProfileFormat: BP_FORMAT_MEF,
+			PonsConfigFile:              "",
+			LogLevel:                    "debug",
+			LogCaller:                   false,
+			Delay:                       200,
+			OpenOltAddress:              ":50060",
+			ApiAddress:                  ":50070",
+			RestApiAddress:              ":50071",
+			LegacyApiAddress:            ":50072",
+			LegacyRestApiAddress:        ":50073",
+			SadisRestAddress:            ":50074",
+			SadisServer:                 true,
+			KafkaAddress:                ":9092",
+			Events:                      false,
+			ControlledActivation:        "default",
+			EnablePerf:                  false,
+			KafkaEventTopic:             "",
+			DhcpRetry:                   false,
+			AuthRetry:                   false,
+			DmiServerAddress:            ":50075",
+			BandwidthProfileFormat:      BP_FORMAT_MEF,
+			InjectOmciUnknownAttributes: false,
 		},
 		OltConfig{
 			Vendor:             "BBSim",