[VOL-3707] Adding support for multiple onu-adapter and removing the OLT topic from configuration

Change-Id: Ic358a6d3c1b60a9a2bc2163a2ddb5e11c471fdd0
diff --git a/cmd/openonu-adapter/main.go b/cmd/openonu-adapter/main.go
index 004755c..cd253b9 100644
--- a/cmd/openonu-adapter/main.go
+++ b/cmd/openonu-adapter/main.go
@@ -126,7 +126,7 @@
 	// Create the core proxy to handle requests to the Core
 	a.coreProxy = com.NewCoreProxy(ctx, a.kip, a.config.Topic, a.config.CoreTopic)
 
-	logger.Debugw(ctx, "create adapter proxy", log.Fields{"OltTopic": a.config.OltTopic, "CoreTopic": a.config.CoreTopic})
+	logger.Debugw(ctx, "create adapter proxy", log.Fields{"CoreTopic": a.config.CoreTopic})
 	a.adapterProxy = com.NewAdapterProxy(ctx, a.kip, a.config.CoreTopic, cm.Backend)
 
 	// Create the event proxy to post events to KAFKA
@@ -286,11 +286,9 @@
 		"totalReplicas":  a.config.TotalReplicas,
 	})
 	adapterDescription := &voltha.Adapter{
-		Id:      adapterID, // Unique name for the device type ->exact type required for OLT comm????
-		Vendor:  "VOLTHA OpenONUGo",
-		Version: version.VersionInfo.Version,
-		// TODO once we'll be ready to support multiple versions of the adapter
-		// the Endpoint will have to change to `brcm_openomci_onu_<currentReplica`>
+		Id:             adapterID, // Unique name for the device type ->exact type required for OLT comm????
+		Vendor:         "VOLTHA OpenONUGo",
+		Version:        version.VersionInfo.Version,
 		Endpoint:       a.config.Topic,
 		Type:           "brcm_openomci_onu",
 		CurrentReplica: int32(a.config.CurrentReplica),
diff --git a/internal/pkg/config/config.go b/internal/pkg/config/config.go
index 6c2283d..75ff11d 100644
--- a/internal/pkg/config/config.go
+++ b/internal/pkg/config/config.go
@@ -41,7 +41,6 @@
 	defaultDisplayVersionOnly   = false
 	defaultAccIncrEvto          = false
 	defaultTopic                = "openonu"
-	defaultOltTopic             = "openolt"
 	defaultCoreTopic            = "rwcore"
 	defaultEventTopic           = "voltha.events"
 	defaultOnunumber            = 1
@@ -78,7 +77,6 @@
 	KVStoreHost                 string
 	KVStorePort                 int
 	Topic                       string
-	OltTopic                    string
 	CoreTopic                   string
 	EventTopic                  string
 	LogLevel                    string
@@ -114,7 +112,6 @@
 		KVStoreHost:                 defaultKvstorehost,
 		KVStorePort:                 defaultKvstoreport,
 		Topic:                       defaultTopic,
-		OltTopic:                    defaultOltTopic,
 		CoreTopic:                   defaultCoreTopic,
 		EventTopic:                  defaultEventTopic,
 		LogLevel:                    defaultLoglevel,
@@ -155,10 +152,7 @@
 	flag.IntVar(&(so.KafkaClusterPort), "kafka_cluster_port", defaultKafkaclusterport, help)
 
 	help = fmt.Sprintf("Open ONU topic")
-	flag.StringVar(&(so.Topic), "adapter_topic", defaultTopic, help)
-
-	help = fmt.Sprintf("Open OLT topic")
-	flag.StringVar(&(so.OltTopic), "olt_adapter_topic", defaultOltTopic, help)
+	baseAdapterTopic := flag.String("adapter_topic", defaultTopic, help)
 
 	help = fmt.Sprintf("Core topic")
 	flag.StringVar(&(so.CoreTopic), "core_topic", defaultCoreTopic, help)
@@ -239,6 +233,8 @@
 		so.InstanceID = containerName
 	}
 
+	so.Topic = fmt.Sprintf("%s_%d", *baseAdapterTopic, int32(so.CurrentReplica))
+
 }
 
 func getContainerInfo() string {
diff --git a/internal/pkg/onuadaptercore/omci_vlan_config.go b/internal/pkg/onuadaptercore/omci_vlan_config.go
index 86316cc..21cdbda 100644
--- a/internal/pkg/onuadaptercore/omci_vlan_config.go
+++ b/internal/pkg/onuadaptercore/omci_vlan_config.go
@@ -2018,10 +2018,6 @@
 	//rowKey = 0
 	tableCtrlStr := "0100000000000000"
 	tableCtrl := AsByteSlice(tableCtrlStr)
-	//TODO Building it as a Table, even though the attribute is `StringAttributeType`
-	// see line 56 of multicastoperationsprofileframe.go, it's an error in the conversion.
-	// FIXED 30/12/2020 Fixed for now with a local copy of multicastoperationsprofileframe.go in vendor/omci-lib-go
-	// provided by Chip, needs upstreaming and version change.
 	dynamicAccessCL := make([]uint8, 24)
 	copy(dynamicAccessCL, tableCtrl)
 	//Multicast GemPortId