VOL-1596 Add Support for handling multicast groups in OpenOLT Adapter.
VOL-1595 Add Support for handling multicast flows in OpenOLT Adapter.
Depends voltha-protos from the patch below:
https://gerrit.opencord.org/#/c/16690/
Change-Id: I1cc9900bd6400bb31aed11beda674138838a21d2
diff --git a/adaptercore/device_handler.go b/adaptercore/device_handler.go
index 3ec4d0e..3def7bc 100644
--- a/adaptercore/device_handler.go
+++ b/adaptercore/device_handler.go
@@ -34,15 +34,15 @@
backoff "github.com/cenkalti/backoff/v3"
"github.com/gogo/protobuf/proto"
"github.com/golang/protobuf/ptypes"
- "github.com/opencord/voltha-lib-go/v2/pkg/adapters/adapterif"
- "github.com/opencord/voltha-lib-go/v2/pkg/log"
- "github.com/opencord/voltha-lib-go/v2/pkg/pmmetrics"
+ "github.com/opencord/voltha-lib-go/v3/pkg/adapters/adapterif"
+ "github.com/opencord/voltha-lib-go/v3/pkg/log"
+ "github.com/opencord/voltha-lib-go/v3/pkg/pmmetrics"
rsrcMgr "github.com/opencord/voltha-openolt-adapter/adaptercore/resourcemanager"
- "github.com/opencord/voltha-protos/v2/go/common"
- ic "github.com/opencord/voltha-protos/v2/go/inter_container"
- of "github.com/opencord/voltha-protos/v2/go/openflow_13"
- oop "github.com/opencord/voltha-protos/v2/go/openolt"
- "github.com/opencord/voltha-protos/v2/go/voltha"
+ "github.com/opencord/voltha-protos/v3/go/common"
+ ic "github.com/opencord/voltha-protos/v3/go/inter_container"
+ of "github.com/opencord/voltha-protos/v3/go/openflow_13"
+ oop "github.com/opencord/voltha-protos/v3/go/openolt"
+ "github.com/opencord/voltha-protos/v3/go/voltha"
"google.golang.org/grpc"
"google.golang.org/grpc/status"
)
@@ -228,7 +228,7 @@
}
func (dh *DeviceHandler) addPort(intfID uint32, portType voltha.Port_PortType, state string) {
- var operStatus common.OperStatus_OperStatus
+ var operStatus common.OperStatus_Types
if state == "up" {
operStatus = voltha.OperStatus_ACTIVE
} else {
@@ -798,7 +798,7 @@
func (dh *DeviceHandler) sendProxiedMessage(onuDevice *voltha.Device, omciMsg *ic.InterAdapterOmciMessage) {
var intfID uint32
var onuID uint32
- var connectStatus common.ConnectStatus_ConnectStatus
+ var connectStatus common.ConnectStatus_Types
if onuDevice != nil {
intfID = onuDevice.ProxyAddress.GetChannelId()
onuID = onuDevice.ProxyAddress.GetOnuId()
@@ -1120,6 +1120,18 @@
// dh.flowMgr.RemoveFlow(flow)
}
}
+
+ if groups != nil {
+ for _, group := range groups.ToAdd.Items {
+ dh.flowMgr.AddGroup(group)
+ }
+ for _, group := range groups.ToUpdate.Items {
+ dh.flowMgr.ModifyGroup(group)
+ }
+ if len(groups.ToRemove.Items) != 0 {
+ log.Debug("Group delete operation is not supported for now")
+ }
+ }
log.Debug("UpdateFlowsIncrementally done successfully")
return nil
}