XVOL-1689 : ONU stays in DISCOVERED state
VOL-1586 : Possible race condition in openolt python adapter during onu discovery
1) gets Device in response of ChildDeviceDetected.
This avoids race and also removes the need for GetChildDevice.
2)Puts the Device Id into cache to use in future requests,
especially avoid the fail when calling GetChildDevice
in onuIndication because of race.
Change-Id: I60944a6ee0e2ffad80a31ef93f72b55b0b136284
diff --git a/Gopkg.lock b/Gopkg.lock
index f74402a..4b1d426 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -216,7 +216,7 @@
[[projects]]
branch = "master"
- digest = "1:d43c4cb219b7c047c50c055d29d0289a7b045ba4da6bc97cd03a3174f9946b0f"
+ digest = "1:493092a7b59aec01e27d25e3cc4e833c59de8d19c845611a612387592a2b7ff9"
name = "github.com/opencord/voltha-go"
packages = [
"adapters",
@@ -230,11 +230,11 @@
"rw_core/utils",
]
pruneopts = "UT"
- revision = "89176ab6a90c6657d6fc2600edf5832355230c39"
+ revision = "6deaa24a2a5bee6d9fd285ccb39b12f7255ee0ab"
[[projects]]
branch = "master"
- digest = "1:430a17be21236a9945a3234035783cbd1ac8bfe66afafe6fc87551c7f3340ee9"
+ digest = "1:5c3529076294da6587e5d23e32c2d97fb449018c5ba4134bb3bc34cf55befd96"
name = "github.com/opencord/voltha-protos"
packages = [
"go/common",
@@ -245,7 +245,7 @@
"go/voltha",
]
pruneopts = "UT"
- revision = "4b0dab2699ecc30ef043b4113e6a754e5c4342e7"
+ revision = "f98ca1386c16a1c767dc8642cae9d1bdae8ec43a"
[[projects]]
digest = "1:d886a3c32c8c1a770d07e36340f061d3afc948d065ffc3c9a19b01b34d4f0b65"
diff --git a/adaptercore/device_handler.go b/adaptercore/device_handler.go
index eb970bb..fef55bf 100644
--- a/adaptercore/device_handler.go
+++ b/adaptercore/device_handler.go
@@ -21,14 +21,13 @@
"context"
"errors"
"fmt"
+ "google.golang.org/grpc/codes"
"io"
"strconv"
"strings"
"sync"
"time"
- "google.golang.org/grpc/codes"
-
"github.com/gogo/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"github.com/mdlayher/ethernet"
@@ -675,14 +674,15 @@
onuDevice, err := dh.coreProxy.GetChildDevice(context.TODO(), dh.device.Id, kwargs)
var onuID uint32
if onuDevice == nil || err != nil {
+ //This is the first time ONU discovered. Create an OnuID for it.
onuID, err = dh.resourceMgr.GetONUID(onuDiscInd.GetIntfId())
if err != nil {
log.Errorw("failed to fetch onuID from resource manager", log.Fields{"err": err})
return err
}
- if err := dh.coreProxy.ChildDeviceDetected(context.TODO(), dh.device.Id, int(parentPortNo),
+ if onuDevice, err = dh.coreProxy.ChildDeviceDetected(context.TODO(), dh.device.Id, int(parentPortNo),
"brcm_openomci_onu", int(channelID),
- string(onuDiscInd.SerialNumber.GetVendorId()), sn, int64(onuID)); err != nil {
+ string(onuDiscInd.SerialNumber.GetVendorId()), sn, int64(onuID)); onuDevice == nil {
log.Errorw("Create onu error",
log.Fields{"parent_id": dh.device.Id, "ponPort": onuDiscInd.GetIntfId(),
"onuID": onuID, "sn": sn, "error": err})
@@ -690,27 +690,26 @@
}
} else {
+ //ONU already discovered before. Use the same OnuID.
onuID = onuDevice.ProxyAddress.OnuId
}
- kwargs["onu_id"] = onuID
- kwargs["parent_port_no"] = parentPortNo
- for i := 0; i < 10; i++ {
- if onuDevice, _ := dh.coreProxy.GetChildDevice(context.TODO(), dh.device.Id, kwargs); onuDevice != nil {
- err := dh.coreProxy.DeviceStateUpdate(context.TODO(), onuDevice.Id, common.ConnectStatus_REACHABLE, common.OperStatus_DISCOVERED)
- if err != nil {
- log.Errorw("failed to update device state", log.Fields{"DeviceID": onuDevice.Id})
- return err
- }
+ //Insert the ONU into cache to use in OnuIndication.
+ //TODO: Do we need to remove this from the cache on ONU change, or wait for overwritten on next discovery.
+ onuKey := dh.formOnuKey(onuDiscInd.GetIntfId(), onuID)
+ dh.onus[onuKey] = NewOnuDevice(onuDevice.Id, onuDevice.Type, onuDevice.SerialNumber, onuID, onuDiscInd.GetIntfId(), onuDevice.ProxyAddress.DeviceId)
- log.Debugw("onu-discovered-reachable", log.Fields{"deviceId": onuDevice.Id})
- dh.activateONU(onuDiscInd.IntfId, int64(onuID), onuDiscInd.SerialNumber, sn)
- return nil
- }
- time.Sleep(1 * time.Second)
- log.Debugln("Sleep 1 seconds to active onu, retry times ", i+1)
+ err = dh.coreProxy.DeviceStateUpdate(context.TODO(), onuDevice.Id, common.ConnectStatus_REACHABLE, common.OperStatus_DISCOVERED)
+ if err != nil {
+ log.Errorw("failed to update device state", log.Fields{"DeviceID": onuDevice.Id})
+ return err
}
- log.Errorw("Cannot query onu, dont activate it.", log.Fields{"parent_id": dh.device.Id, "ponPort": onuDiscInd.GetIntfId(), "onuID": onuID, "sn": sn})
- return errors.New("failed to activate onu")
+ log.Debugw("onu-discovered-reachable", log.Fields{"deviceId": onuDevice.Id})
+ //TODO: We put this sleep here to prevent the race between state update and onuIndication
+ //In onuIndication the operStatus of device is checked. If it is still not updated in KV store
+ //then the initialisation fails.
+ time.Sleep(1 * time.Second)
+ dh.activateONU(onuDiscInd.IntfId, int64(onuID), onuDiscInd.SerialNumber, sn)
+ return nil
}
func (dh *DeviceHandler) onuIndication(onuInd *oop.OnuIndication) {
@@ -718,14 +717,25 @@
kwargs := make(map[string]interface{})
ponPort := IntfIDToPortNo(onuInd.GetIntfId(), voltha.Port_PON_OLT)
-
- if serialNumber != "" {
- kwargs["serial_number"] = serialNumber
+ var onuDevice *voltha.Device
+ foundInCache := false
+ onuKey := dh.formOnuKey(onuInd.GetIntfId(), onuInd.OnuId)
+ if onuInCache, ok := dh.onus[onuKey]; ok {
+ //If ONU id is discovered before then use GetDevice to get onuDevice because it is cheaper.
+ foundInCache = true
+ onuDevice, _ = dh.coreProxy.GetDevice(nil, dh.device.Id, onuInCache.deviceID)
} else {
- kwargs["onu_id"] = onuInd.OnuId
- kwargs["parent_port_no"] = ponPort
+ //If ONU not found in adapter cache then we have to use GetChildDevice to get onuDevice
+ if serialNumber != "" {
+ kwargs["serial_number"] = serialNumber
+ } else {
+ kwargs["onu_id"] = onuInd.OnuId
+ kwargs["parent_port_no"] = ponPort
+ }
+ onuDevice, _ = dh.coreProxy.GetChildDevice(context.TODO(), dh.device.Id, kwargs)
}
- if onuDevice, _ := dh.coreProxy.GetChildDevice(context.TODO(), dh.device.Id, kwargs); onuDevice != nil {
+
+ if onuDevice != nil {
if onuDevice.ParentPortNo != ponPort {
//log.Warnw("ONU-is-on-a-different-intf-id-now", log.Fields{"previousIntfId": intfIDFromPortNo(onuDevice.ParentPortNo), "currentIntfId": onuInd.GetIntfId()})
log.Warnw("ONU-is-on-a-different-intf-id-now", log.Fields{"previousIntfId": onuDevice.ParentPortNo, "currentIntfId": ponPort})
@@ -734,9 +744,10 @@
if onuDevice.ProxyAddress.OnuId != onuInd.OnuId {
log.Warnw("ONU-id-mismatch, can happen if both voltha and the olt rebooted", log.Fields{"expected_onu_id": onuDevice.ProxyAddress.OnuId, "received_onu_id": onuInd.OnuId})
}
- onuKey := dh.formOnuKey(onuInd.GetIntfId(), onuInd.GetOnuId())
- dh.onus[onuKey] = NewOnuDevice(onuDevice.Id, onuDevice.Type, onuDevice.SerialNumber, onuInd.GetOnuId(), onuInd.GetIntfId(), onuDevice.ProxyAddress.DeviceId)
- dh.updateOnuAdminState(onuInd)
+ if !foundInCache {
+ onuKey := dh.formOnuKey(onuInd.GetIntfId(), onuInd.GetOnuId())
+ dh.onus[onuKey] = NewOnuDevice(onuDevice.Id, onuDevice.Type, onuDevice.SerialNumber, onuInd.GetOnuId(), onuInd.GetIntfId(), onuDevice.ProxyAddress.DeviceId)
+ }
dh.updateOnuStates(onuDevice, onuInd)
} else {
@@ -747,8 +758,6 @@
}
func (dh *DeviceHandler) updateOnuStates(onuDevice *voltha.Device, onuInd *oop.OnuIndication) {
- onuKey := dh.formOnuKey(onuInd.GetIntfId(), onuInd.GetOnuId())
- dh.onus[onuKey] = NewOnuDevice(onuDevice.Id, onuDevice.Type, onuDevice.SerialNumber, onuInd.GetOnuId(), onuInd.GetIntfId(), onuDevice.ProxyAddress.DeviceId)
dh.updateOnuAdminState(onuInd)
// operState
if onuInd.OperState == "down" {
diff --git a/adaptercore/openolt_flowmgr.go b/adaptercore/openolt_flowmgr.go
index cdda5d8..24f2c92 100644
--- a/adaptercore/openolt_flowmgr.go
+++ b/adaptercore/openolt_flowmgr.go
@@ -222,7 +222,7 @@
if ipProto.(uint32) == IPProtoDhcp {
log.Info("Adding DHCP flow")
f.addDHCPTrapFlow(intfID, onuID, uniID, portNo, classifierInfo, actionInfo, flow, allocID[0], gemPort)
- } else if ipProto == IPProtoIgmp {
+ } else if ipProto.(uint32) == IPProtoIgmp {
log.Info("igmp flow add ignored, not implemented yet")
} else {
log.Errorw("Invalid-Classifier-to-handle", log.Fields{"classifier": classifierInfo, "action": actionInfo})
diff --git a/vendor/github.com/opencord/voltha-go/adapters/common/core_proxy.go b/vendor/github.com/opencord/voltha-go/adapters/common/core_proxy.go
index c4b5bf5..8371e09 100644
--- a/vendor/github.com/opencord/voltha-go/adapters/common/core_proxy.go
+++ b/vendor/github.com/opencord/voltha-go/adapters/common/core_proxy.go
@@ -231,7 +231,7 @@
}
func (ap *CoreProxy) ChildDeviceDetected(ctx context.Context, parentDeviceId string, parentPortNo int,
- childDeviceType string, channelId int, vendorId string, serialNumber string, onuId int64) error {
+ childDeviceType string, channelId int, vendorId string, serialNumber string, onuId int64) (*voltha.Device, error) {
log.Debugw("ChildDeviceDetected", log.Fields{"pDeviceId": parentDeviceId, "channelId": channelId})
rpc := "ChildDeviceDetected"
// Use a device specific topic to send the request. The adapter handling the device creates a device
@@ -278,7 +278,24 @@
success, result := ap.kafkaICProxy.InvokeRPC(nil, rpc, &toTopic, &replyToTopic, true, parentDeviceId, args...)
log.Debugw("ChildDeviceDetected-response", log.Fields{"pDeviceId": parentDeviceId, "success": success})
- return unPackResponse(rpc, parentDeviceId, success, result)
+
+ if success {
+ volthaDevice := &voltha.Device{}
+ if err := ptypes.UnmarshalAny(result, volthaDevice); err != nil {
+ log.Warnw("cannot-unmarshal-response", log.Fields{"error": err})
+ return nil, status.Errorf(codes.InvalidArgument, "%s", err.Error())
+ }
+ return volthaDevice, nil
+ } else {
+ unpackResult := &ic.Error{}
+ var err error
+ if err = ptypes.UnmarshalAny(result, unpackResult); err != nil {
+ log.Warnw("cannot-unmarshal-response", log.Fields{"error": err})
+ }
+ log.Debugw("ChildDeviceDetected-return", log.Fields{"deviceid": parentDeviceId, "success": success, "error": err})
+ // TODO: Need to get the real error code
+ return nil, status.Errorf(codes.Internal, "%s", unpackResult.Reason)
+ }
}
@@ -479,6 +496,6 @@
Value: pkt,
}
success, result := ap.kafkaICProxy.InvokeRPC(nil, rpc, &toTopic, &replyToTopic, true, deviceId, args...)
- log.Debugw("ChildDeviceDetected-response", log.Fields{"pDeviceId": deviceId, "success": success})
+ log.Debugw("SendPacketIn-response", log.Fields{"pDeviceId": deviceId, "success": success})
return unPackResponse(rpc, deviceId, success, result)
}
diff --git a/vendor/github.com/opencord/voltha-go/adapters/common/request_handler.go b/vendor/github.com/opencord/voltha-go/adapters/common/request_handler.go
index 3ac5c4f..7ce4414 100644
--- a/vendor/github.com/opencord/voltha-go/adapters/common/request_handler.go
+++ b/vendor/github.com/opencord/voltha-go/adapters/common/request_handler.go
@@ -183,7 +183,42 @@
}
func (rhp *RequestHandlerProxy) Reboot_device(args []*ic.Argument) (*empty.Empty, error) {
+ if len(args) < 3 {
+ log.Warn("invalid-number-of-args", log.Fields{"args": args})
+ err := errors.New("invalid-number-of-args")
+ return nil, err
+ }
+
+ device := &voltha.Device{}
+ transactionID := &ic.StrType{}
+ fromTopic := &ic.StrType{}
+ for _, arg := range args {
+ switch arg.Key {
+ case "device":
+ if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
+ log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
+ return nil, err
+ }
+ case kafka.TransactionKey:
+ if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
+ log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
+ return nil, err
+ }
+ case kafka.FromTopic:
+ if err := ptypes.UnmarshalAny(arg.Value, fromTopic); err != nil {
+ log.Warnw("cannot-unmarshal-from-topic", log.Fields{"error": err})
+ return nil, err
+ }
+ }
+ }
+ //Update the core reference for that device
+ rhp.coreProxy.UpdateCoreReference(device.Id, fromTopic.Val)
+ //Invoke the Reboot_device API on the adapter
+ if err := rhp.adapter.Reboot_device(device); err != nil {
+ return nil, status.Errorf(codes.NotFound, "%s", err.Error())
+ }
return new(empty.Empty), nil
+
}
func (rhp *RequestHandlerProxy) Self_test_device(args []*ic.Argument) (*empty.Empty, error) {
@@ -233,6 +268,45 @@
}
func (rhp *RequestHandlerProxy) Update_flows_bulk(args []*ic.Argument) (*empty.Empty, error) {
+ log.Debug("Update_flows_bulk")
+ if len(args) < 4 {
+ log.Warn("Update_flows_bulk-invalid-number-of-args", log.Fields{"args": args})
+ err := errors.New("invalid-number-of-args")
+ return nil, err
+ }
+ device := &voltha.Device{}
+ transactionID := &ic.StrType{}
+ flows := &voltha.Flows{}
+ groups := &voltha.FlowGroups{}
+ for _, arg := range args {
+ switch arg.Key {
+ case "device":
+ if err := ptypes.UnmarshalAny(arg.Value, device); err != nil {
+ log.Warnw("cannot-unmarshal-device", log.Fields{"error": err})
+ return nil, err
+ }
+ case "flows":
+ if err := ptypes.UnmarshalAny(arg.Value, flows); err != nil {
+ log.Warnw("cannot-unmarshal-flows", log.Fields{"error": err})
+ return nil, err
+ }
+ case "groups":
+ if err := ptypes.UnmarshalAny(arg.Value, groups); err != nil {
+ log.Warnw("cannot-unmarshal-groups", log.Fields{"error": err})
+ return nil, err
+ }
+ case kafka.TransactionKey:
+ if err := ptypes.UnmarshalAny(arg.Value, transactionID); err != nil {
+ log.Warnw("cannot-unmarshal-transaction-ID", log.Fields{"error": err})
+ return nil, err
+ }
+ }
+ }
+ log.Debugw("Update_flows_bulk", log.Fields{"flows": flows, "groups": groups})
+ //Invoke the adopt device on the adapter
+ if err := rhp.adapter.Update_flows_bulk(device, flows, groups); err != nil {
+ return nil, status.Errorf(codes.NotFound, "%s", err.Error())
+ }
return new(empty.Empty), nil
}
diff --git a/vendor/github.com/opencord/voltha-go/db/model/node.go b/vendor/github.com/opencord/voltha-go/db/model/node.go
index 15ea04e..207df09 100644
--- a/vendor/github.com/opencord/voltha-go/db/model/node.go
+++ b/vendor/github.com/opencord/voltha-go/db/model/node.go
@@ -61,9 +61,10 @@
}
type node struct {
- mutex sync.RWMutex
- Root *root
- Type interface{}
+ mutex sync.RWMutex
+ Root *root
+ Type interface{}
+
Branches map[string]*Branch
Tags map[string]Revision
Proxy *Proxy
@@ -325,7 +326,11 @@
if entry, exists := GetRevCache().Cache.Load(path); exists && entry.(Revision) != nil {
entryAge := time.Now().Sub(entry.(Revision).GetLastUpdate()).Nanoseconds() / int64(time.Millisecond)
if entryAge < DATA_REFRESH_PERIOD {
- log.Debugw("using-cache-entry", log.Fields{"path": path, "hash": hash, "age": entryAge})
+ log.Debugw("using-cache-entry", log.Fields{
+ "path": path,
+ "hash": hash,
+ "age": entryAge,
+ })
return proto.Clone(entry.(Revision).GetData().(proto.Message))
} else {
log.Debugw("cache-entry-expired", log.Fields{"path": path, "hash": hash, "age": entryAge})
@@ -950,6 +955,13 @@
}
func (n *node) createProxy(path string, fullPath string, parentNode *node, exclusive bool) *Proxy {
+ log.Debugw("node-create-proxy", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "path": path,
+ "fullPath": fullPath,
+ })
+
for strings.HasPrefix(path, "/") {
path = path[1:]
}
@@ -960,48 +972,130 @@
rev := n.GetBranch(NONE).GetLatest()
partition := strings.SplitN(path, "/", 2)
name := partition[0]
+ var nodeType interface{}
+ // Node type is chosen depending on if we have reached the end of path or not
if len(partition) < 2 {
path = ""
+ nodeType = n.Type
} else {
path = partition[1]
+ nodeType = parentNode.Type
}
- field := ChildrenFields(n.Type)[name]
- if field.IsContainer {
- if path == "" {
- //log.Error("cannot proxy a container field")
- newNode := n.MakeNode(reflect.New(field.ClassType.Elem()).Interface(), "")
- return newNode.makeProxy(path, fullPath, parentNode, exclusive)
- } else if field.Key != "" {
- partition := strings.SplitN(path, "/", 2)
- key := partition[0]
- if len(partition) < 2 {
- path = ""
+ field := ChildrenFields(nodeType)[name]
+
+ if field != nil {
+ if field.IsContainer {
+ log.Debugw("container-field", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "path": path,
+ "name": name,
+ })
+ if path == "" {
+ log.Debugw("folder-proxy", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "fullPath": fullPath,
+ "name": name,
+ })
+ newNode := n.MakeNode(reflect.New(field.ClassType.Elem()).Interface(), "")
+ return newNode.makeProxy(path, fullPath, parentNode, exclusive)
+ } else if field.Key != "" {
+ log.Debugw("key-proxy", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "fullPath": fullPath,
+ "name": name,
+ })
+ partition := strings.SplitN(path, "/", 2)
+ key := partition[0]
+ if len(partition) < 2 {
+ path = ""
+ } else {
+ path = partition[1]
+ }
+ keyValue := field.KeyFromStr(key)
+ var children []Revision
+ children = make([]Revision, len(rev.GetChildren(name)))
+ copy(children, rev.GetChildren(name))
+
+ // Try to find a matching revision in memory
+ // If not found try the db
+ var childRev Revision
+ if _, childRev = n.findRevByKey(children, field.Key, keyValue); childRev != nil {
+ log.Debugw("found-revision-matching-key-in-memory", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "fullPath": fullPath,
+ "name": name,
+ })
+ } else if revs := n.GetBranch(NONE).GetLatest().LoadFromPersistence(fullPath, "", nil); revs != nil && len(revs) > 0 {
+ log.Debugw("found-revision-matching-key-in-db", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "fullPath": fullPath,
+ "name": name,
+ })
+ childRev = revs[0]
+ } else {
+ log.Debugw("no-revision-matching-key", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "fullPath": fullPath,
+ "name": name,
+ })
+ }
+ if childRev != nil {
+ childNode := childRev.GetNode()
+ return childNode.createProxy(path, fullPath, n, exclusive)
+ }
} else {
- path = partition[1]
- }
- keyValue := field.KeyFromStr(key)
- var children []Revision
- children = make([]Revision, len(rev.GetChildren(name)))
- copy(children, rev.GetChildren(name))
- if _, childRev := n.findRevByKey(children, field.Key, keyValue); childRev != nil {
- childNode := childRev.GetNode()
- return childNode.createProxy(path, fullPath, n, exclusive)
+ log.Errorw("cannot-access-index-of-empty-container", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "path": path,
+ "name": name,
+ })
}
} else {
- log.Error("cannot index into container with no keys")
+ log.Debugw("non-container-field", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "path": path,
+ "name": name,
+ })
+ childRev := rev.GetChildren(name)[0]
+ childNode := childRev.GetNode()
+ return childNode.createProxy(path, fullPath, n, exclusive)
}
} else {
- childRev := rev.GetChildren(name)[0]
- childNode := childRev.GetNode()
- return childNode.createProxy(path, fullPath, n, exclusive)
+ log.Debugw("field-object-is-nil", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "fullPath": fullPath,
+ "name": name,
+ })
}
- log.Warnf("Cannot create proxy - latest rev:%s, all revs:%+v", rev.GetHash(), n.GetBranch(NONE).Revisions)
+ log.Warnw("cannot-create-proxy", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "path": path,
+ "fullPath": fullPath,
+ "latest-rev": rev.GetHash(),
+ })
return nil
}
func (n *node) makeProxy(path string, fullPath string, parentNode *node, exclusive bool) *Proxy {
+ log.Debugw("node-make-proxy", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "path": path,
+ "fullPath": fullPath,
+ })
+
r := &root{
node: n,
Callbacks: n.Root.GetCallbacks(),
@@ -1013,8 +1107,20 @@
}
if n.Proxy == nil {
+ log.Debugw("constructing-new-proxy", log.Fields{
+ "node-type": reflect.ValueOf(n.Type).Type(),
+ "parent-node-type": reflect.ValueOf(parentNode.Type).Type(),
+ "path": path,
+ "fullPath": fullPath,
+ })
n.Proxy = NewProxy(r, n, parentNode, path, fullPath, exclusive)
} else {
+ log.Debugw("node-has-existing-proxy", log.Fields{
+ "node-type": reflect.ValueOf(n.Proxy.Node.Type).Type(),
+ "parent-node-type": reflect.ValueOf(n.Proxy.ParentNode.Type).Type(),
+ "path": n.Proxy.Path,
+ "fullPath": n.Proxy.FullPath,
+ })
if n.Proxy.Exclusive {
log.Error("node is already owned exclusively")
}
diff --git a/vendor/github.com/opencord/voltha-go/db/model/non_persisted_revision.go b/vendor/github.com/opencord/voltha-go/db/model/non_persisted_revision.go
index 6075b3f..297a740 100644
--- a/vendor/github.com/opencord/voltha-go/db/model/non_persisted_revision.go
+++ b/vendor/github.com/opencord/voltha-go/db/model/non_persisted_revision.go
@@ -55,7 +55,6 @@
Branch *Branch
WeakRef string
Name string
- discarded bool
lastUpdate time.Time
}
@@ -66,14 +65,9 @@
r.Config = NewDataRevision(root, data)
r.Children = children
r.Hash = r.hashContent()
- r.discarded = false
return r
}
-func (npr *NonPersistedRevision) IsDiscarded() bool {
- return npr.discarded
-}
-
func (npr *NonPersistedRevision) SetConfig(config *DataRevision) {
npr.mutex.Lock()
defer npr.mutex.Unlock()
@@ -356,14 +350,33 @@
if nameExists {
// Check if the data has changed or not
if existingChildren[nameIndex].GetData().(proto.Message).String() != newChild.GetData().(proto.Message).String() {
+ log.Debugw("replacing-existing-child", log.Fields{
+ "old-hash": existingChildren[nameIndex].GetHash(),
+ "old-data": existingChildren[nameIndex].GetData(),
+ "new-hash": newChild.GetHash(),
+ "new-data": newChild.GetData(),
+ })
+
// replace entry
newChild.GetNode().Root = existingChildren[nameIndex].GetNode().Root
updatedChildren = append(updatedChildren, newChild)
} else {
+ log.Debugw("keeping-existing-child", log.Fields{
+ "old-hash": existingChildren[nameIndex].GetHash(),
+ "old-data": existingChildren[nameIndex].GetData(),
+ "new-hash": newChild.GetHash(),
+ "new-data": newChild.GetData(),
+ })
+
// keep existing entry
updatedChildren = append(updatedChildren, existingChildren[nameIndex])
}
} else {
+ log.Debugw("adding-unknown-child", log.Fields{
+ "hash": newChild.GetHash(),
+ "data": newChild.GetData(),
+ })
+
// new entry ... just add it
updatedChildren = append(updatedChildren, newChild)
}
@@ -413,7 +426,6 @@
// Drop is used to indicate when a revision is no longer required
func (npr *NonPersistedRevision) Drop(txid string, includeConfig bool) {
log.Debugw("dropping-revision", log.Fields{"hash": npr.GetHash(), "name": npr.GetName()})
- npr.discarded = true
}
// ChildDrop will remove a child entry matching the provided parameters from the current revision
@@ -458,6 +470,6 @@
// stub ... required by interface
}
-func (pr *NonPersistedRevision) StorageDrop(txid string, includeConfig bool) {
+func (npr *NonPersistedRevision) StorageDrop(txid string, includeConfig bool) {
// stub ... required by interface
}
diff --git a/vendor/github.com/opencord/voltha-go/db/model/persisted_revision.go b/vendor/github.com/opencord/voltha-go/db/model/persisted_revision.go
index 226fc3c..2ab91b7 100644
--- a/vendor/github.com/opencord/voltha-go/db/model/persisted_revision.go
+++ b/vendor/github.com/opencord/voltha-go/db/model/persisted_revision.go
@@ -127,34 +127,31 @@
StopWatchLoop:
for {
- if pr.IsDiscarded() {
- break StopWatchLoop
- }
+ latestRev := pr.GetBranch().GetLatest()
select {
case event, ok := <-pr.events:
if !ok {
- log.Errorw("event-channel-failure: stopping watch loop", log.Fields{"key": pr.GetHash(), "watch": pr.GetName()})
+ log.Errorw("event-channel-failure: stopping watch loop", log.Fields{"key": latestRev.GetHash(), "watch": latestRev.GetName()})
break StopWatchLoop
}
-
- log.Debugw("received-event", log.Fields{"type": event.EventType, "watch": pr.GetName()})
+ log.Debugw("received-event", log.Fields{"type": event.EventType, "watch": latestRev.GetName()})
switch event.EventType {
case kvstore.DELETE:
- log.Debugw("delete-from-memory", log.Fields{"key": pr.GetHash(), "watch": pr.GetName()})
+ log.Debugw("delete-from-memory", log.Fields{"key": latestRev.GetHash(), "watch": latestRev.GetName()})
pr.Revision.Drop("", true)
break StopWatchLoop
case kvstore.PUT:
- log.Debugw("update-in-memory", log.Fields{"key": pr.GetHash(), "watch": pr.GetName()})
+ log.Debugw("update-in-memory", log.Fields{"key": latestRev.GetHash(), "watch": latestRev.GetName()})
- data := reflect.New(reflect.TypeOf(pr.GetData()).Elem())
+ data := reflect.New(reflect.TypeOf(latestRev.GetData()).Elem())
if err := proto.Unmarshal(event.Value.([]byte), data.Interface().(proto.Message)); err != nil {
- log.Errorw("failed-to-unmarshal-watch-data", log.Fields{"key": pr.GetHash(), "watch": pr.GetName(), "error": err})
+ log.Errorw("failed-to-unmarshal-watch-data", log.Fields{"key": latestRev.GetHash(), "watch": latestRev.GetName(), "error": err})
} else {
- log.Debugw("un-marshaled-watch-data", log.Fields{"key": pr.GetHash(), "watch": pr.GetName(), "data": data.Interface()})
+ log.Debugw("un-marshaled-watch-data", log.Fields{"key": latestRev.GetHash(), "watch": latestRev.GetName(), "data": data.Interface()})
var pathLock string
var pac *proxyAccessControl
@@ -171,24 +168,26 @@
Lease: 0,
}
- if pr.GetNode().GetProxy() != nil {
+ if latestRev.GetNode().GetProxy() != nil {
//
// If a proxy exists for this revision, use it to lock access to the path
// and prevent simultaneous updates to the object in memory
//
- pathLock, _ = pr.GetNode().GetProxy().parseForControlledPath(pr.GetNode().GetProxy().getFullPath())
+ pathLock, _ = latestRev.GetNode().GetProxy().parseForControlledPath(latestRev.GetNode().GetProxy().getFullPath())
//If the proxy already has a request in progress, then there is no need to process the watch
- log.Debugw("checking-if-path-is-locked", log.Fields{"key": pr.GetHash(), "pathLock": pathLock})
+ log.Debugw("checking-if-path-is-locked", log.Fields{"key": latestRev.GetHash(), "pathLock": pathLock})
if PAC().IsReserved(pathLock) {
log.Debugw("operation-in-progress", log.Fields{
- "key": pr.GetHash(),
- "path": pr.GetNode().GetProxy().getFullPath(),
- "operation": pr.GetNode().GetProxy().Operation.String(),
+ "key": latestRev.GetHash(),
+ "path": latestRev.GetNode().GetProxy().getFullPath(),
+ "operation": latestRev.GetNode().GetProxy().Operation.String(),
})
+ //continue
+
// Identify the operation type and determine if the watch event should be applied or not.
- switch pr.GetNode().GetProxy().Operation {
+ switch latestRev.GetNode().GetProxy().Operation {
case PROXY_REMOVE:
fallthrough
@@ -200,9 +199,9 @@
// Therefore, the data of the current event is most likely out-dated
// and should be ignored
log.Debugw("ignore-watch-event", log.Fields{
- "key": pr.GetHash(),
- "path": pr.GetNode().GetProxy().getFullPath(),
- "operation": pr.GetNode().GetProxy().Operation.String(),
+ "key": latestRev.GetHash(),
+ "path": latestRev.GetNode().GetProxy().getFullPath(),
+ "operation": latestRev.GetNode().GetProxy().Operation.String(),
})
continue
@@ -216,41 +215,45 @@
case PROXY_GET:
fallthrough
+ case PROXY_WATCH:
+ fallthrough
+
default:
log.Debugw("process-watch-event", log.Fields{
- "key": pr.GetHash(),
- "path": pr.GetNode().GetProxy().getFullPath(),
- "operation": pr.GetNode().GetProxy().Operation.String(),
+ "key": latestRev.GetHash(),
+ "path": latestRev.GetNode().GetProxy().getFullPath(),
+ "operation": latestRev.GetNode().GetProxy().Operation.String(),
})
}
}
// Reserve the path to prevent others to modify while we reload from persistence
- log.Debugw("reserve-and-lock-path", log.Fields{"key": pr.GetHash(), "path": pathLock})
- pac = PAC().ReservePath(pr.GetNode().GetProxy().getFullPath(), pr.GetNode().GetProxy(), pathLock)
+ log.Debugw("reserve-and-lock-path", log.Fields{"key": latestRev.GetHash(), "path": pathLock})
+ pac = PAC().ReservePath(latestRev.GetNode().GetProxy().getFullPath(),
+ latestRev.GetNode().GetProxy(), pathLock)
pac.lock()
- pr.GetNode().GetProxy().Operation = PROXY_UPDATE
- pac.SetProxy(pr.GetNode().GetProxy())
+ latestRev.GetNode().GetProxy().Operation = PROXY_WATCH
+ pac.SetProxy(latestRev.GetNode().GetProxy())
// Load changes and apply to memory
- pr.LoadFromPersistence(pr.GetName(), "", blobs)
+ latestRev.LoadFromPersistence(latestRev.GetName(), "", blobs)
- log.Debugw("release-and-unlock-path", log.Fields{"key": pr.GetHash(), "path": pathLock})
+ log.Debugw("release-and-unlock-path", log.Fields{"key": latestRev.GetHash(), "path": pathLock})
pac.getProxy().Operation = PROXY_GET
pac.unlock()
PAC().ReleasePath(pathLock)
} else {
// This block should be reached only if coming from a non-proxied request
- log.Debugw("revision-with-no-proxy", log.Fields{"key": pr.GetHash(), "watch": pr.GetName()})
+ log.Debugw("revision-with-no-proxy", log.Fields{"key": latestRev.GetHash(), "watch": latestRev.GetName()})
// Load changes and apply to memory
- pr.LoadFromPersistence(pr.GetName(), "", blobs)
+ latestRev.LoadFromPersistence(latestRev.GetName(), "", blobs)
}
}
default:
- log.Debugw("unhandled-event", log.Fields{"key": pr.GetHash(), "watch": pr.GetName(), "type": event.EventType})
+ log.Debugw("unhandled-event", log.Fields{"key": latestRev.GetHash(), "watch": latestRev.GetName(), "type": event.EventType})
}
}
}
@@ -267,19 +270,18 @@
newNPR := pr.Revision.UpdateData(data, branch)
newPR := &PersistedRevision{
- Revision: newNPR,
- Compress: pr.Compress,
- kvStore: pr.kvStore,
- events: pr.events,
+ Revision: newNPR,
+ Compress: pr.Compress,
+ kvStore: pr.kvStore,
+ events: pr.events,
+ isWatched: pr.isWatched,
}
if newPR.GetHash() != pr.GetHash() {
- newPR.isWatched = false
newPR.isStored = false
pr.Drop(branch.Txid, false)
pr.Drop(branch.Txid, false)
} else {
- newPR.isWatched = true
newPR.isStored = true
}
@@ -294,18 +296,17 @@
newNPR := pr.Revision.UpdateChildren(name, children, branch)
newPR := &PersistedRevision{
- Revision: newNPR,
- Compress: pr.Compress,
- kvStore: pr.kvStore,
- events: pr.events,
+ Revision: newNPR,
+ Compress: pr.Compress,
+ kvStore: pr.kvStore,
+ events: pr.events,
+ isWatched: pr.isWatched,
}
if newPR.GetHash() != pr.GetHash() {
- newPR.isWatched = false
newPR.isStored = false
pr.Drop(branch.Txid, false)
} else {
- newPR.isWatched = true
newPR.isStored = true
}
@@ -319,18 +320,17 @@
newNPR := pr.Revision.UpdateAllChildren(children, branch)
newPR := &PersistedRevision{
- Revision: newNPR,
- Compress: pr.Compress,
- kvStore: pr.kvStore,
- events: pr.events,
+ Revision: newNPR,
+ Compress: pr.Compress,
+ kvStore: pr.kvStore,
+ events: pr.events,
+ isWatched: pr.isWatched,
}
if newPR.GetHash() != pr.GetHash() {
- newPR.isWatched = false
newPR.isStored = false
pr.Drop(branch.Txid, false)
} else {
- newPR.isWatched = true
newPR.isStored = true
}
@@ -388,6 +388,7 @@
if childIdx, childRev := pr.GetNode().findRevByKey(children, keyName, keyValue); childRev != nil {
// A child matching the provided key exists in memory
// Verify if the data differs from what was retrieved from persistence
+ // Also check if we are treating a newer revision of the data or not
if childRev.GetData().(proto.Message).String() != data.(proto.Message).String() {
log.Debugw("revision-data-is-different", log.Fields{
"key": childRev.GetHash(),
@@ -407,11 +408,11 @@
updatedChildRev.GetNode().SetProxy(childRev.GetNode().GetProxy())
updatedChildRev.SetupWatch(updatedChildRev.GetName())
- childRev.Drop(txid, false)
updatedChildRev.SetLastUpdate()
// Update cache
GetRevCache().Cache.Store(updatedChildRev.GetName(), updatedChildRev)
+ childRev.Drop(txid, false)
childRev.GetBranch().LatestLock.Unlock()
// END lock child
@@ -459,6 +460,7 @@
response = childRev
}
}
+
} else {
// There is no available child with that key value.
// Create a new child and update the parent revision.
@@ -478,7 +480,6 @@
childRev.SetName(typeName + "/" + keyValue)
childRev.SetupWatch(childRev.GetName())
- pr.GetBranch().Node.makeLatest(pr.GetBranch(), childRev, nil)
pr.GetBranch().LatestLock.Unlock()
// END child lock
@@ -491,7 +492,6 @@
children = append(children, childRev)
updatedRev := parent.GetBranch(NONE).Latest.UpdateChildren(typeName, children, parent.GetBranch(NONE))
updatedRev.GetNode().SetProxy(parent.GetBranch(NONE).Node.GetProxy())
-
parent.GetBranch(NONE).Node.makeLatest(parent.GetBranch(NONE), updatedRev, nil)
parent.GetBranch(NONE).LatestLock.Unlock()
// END parent lock
@@ -512,8 +512,7 @@
// LoadFromPersistence retrieves data from kv store at the specified location and refreshes the memory
// by adding missing entries, updating changed entries and ignoring unchanged ones
-func (pr *PersistedRevision) LoadFromPersistence(
- path string, txid string, blobs map[string]*kvstore.KVPair) []Revision {
+func (pr *PersistedRevision) LoadFromPersistence(path string, txid string, blobs map[string]*kvstore.KVPair) []Revision {
pr.mutex.Lock()
defer pr.mutex.Unlock()
@@ -575,8 +574,7 @@
// based on the field's key attribute
_, key := GetAttributeValue(data.Interface(), field.Key, 0)
- if entry := pr.verifyPersistedEntry(data.Interface(), name, field.Key, key.String(),
- txid); entry != nil {
+ if entry := pr.verifyPersistedEntry(data.Interface(), name, field.Key, key.String(), txid); entry != nil {
response = append(response, entry)
}
} else {
@@ -603,8 +601,7 @@
}
keyValue := field.KeyFromStr(key)
- if entry := pr.verifyPersistedEntry(data.Interface(), name, field.Key, keyValue.(string),
- txid); entry != nil {
+ if entry := pr.verifyPersistedEntry(data.Interface(), name, field.Key, keyValue.(string), txid); entry != nil {
response = append(response, entry)
}
}
diff --git a/vendor/github.com/opencord/voltha-go/db/model/proxy.go b/vendor/github.com/opencord/voltha-go/db/model/proxy.go
index d4a86f4..182dcdd 100644
--- a/vendor/github.com/opencord/voltha-go/db/model/proxy.go
+++ b/vendor/github.com/opencord/voltha-go/db/model/proxy.go
@@ -100,8 +100,12 @@
// getCallbacks returns the full list of callbacks associated to the proxy
func (p *Proxy) getCallbacks(callbackType CallbackType) map[string]*CallbackTuple {
- if cb, exists := p.Callbacks[callbackType]; exists {
- return cb
+ if p != nil {
+ if cb, exists := p.Callbacks[callbackType]; exists {
+ return cb
+ }
+ } else {
+ log.Debugw("proxy-is-nil", log.Fields{"callback-type": callbackType.String()})
}
return nil
}
@@ -148,6 +152,7 @@
PROXY_UPDATE
PROXY_REMOVE
PROXY_CREATE
+ PROXY_WATCH
)
var proxyOperationTypes = []string{
@@ -157,6 +162,7 @@
"PROXY_UPDATE",
"PROXY_REMOVE",
"PROXY_CREATE",
+ "PROXY_WATCH",
}
func (t ProxyOperation) String() string {
diff --git a/vendor/github.com/opencord/voltha-go/db/model/proxy_access_control.go b/vendor/github.com/opencord/voltha-go/db/model/proxy_access_control.go
index 2a5d034..a1ea6be 100644
--- a/vendor/github.com/opencord/voltha-go/db/model/proxy_access_control.go
+++ b/vendor/github.com/opencord/voltha-go/db/model/proxy_access_control.go
@@ -255,7 +255,7 @@
defer log.Debugw("unlocked-access--create-proxy", log.Fields{"path": path, "fullPath": pac.Proxy.getFullPath()})
}
- result := pac.getProxy().GetRoot().CreateProxy(path, exclusive)
+ result := pac.getProxy().ParentNode.CreateProxy(path, exclusive)
if result != nil {
return result
diff --git a/vendor/github.com/opencord/voltha-go/db/model/revision.go b/vendor/github.com/opencord/voltha-go/db/model/revision.go
index 4e606f1..cd4c5df 100644
--- a/vendor/github.com/opencord/voltha-go/db/model/revision.go
+++ b/vendor/github.com/opencord/voltha-go/db/model/revision.go
@@ -22,7 +22,6 @@
type Revision interface {
Finalize(bool)
- IsDiscarded() bool
SetConfig(revision *DataRevision)
GetConfig() *DataRevision
Drop(txid string, includeConfig bool)
diff --git a/vendor/github.com/opencord/voltha-go/db/model/root.go b/vendor/github.com/opencord/voltha-go/db/model/root.go
index 338ef67..5036ce1 100644
--- a/vendor/github.com/opencord/voltha-go/db/model/root.go
+++ b/vendor/github.com/opencord/voltha-go/db/model/root.go
@@ -91,7 +91,7 @@
dirtyNode.DeleteBranch(txid)
}
delete(r.DirtyNodes, txid)
- delete(r.node.Branches, txid)
+ r.node.DeleteBranch(txid)
}
// FoldTxBranch will merge the contents of a transaction branch with the root object
@@ -111,9 +111,8 @@
// ExecuteCallbacks will invoke all the callbacks linked to root object
func (r *root) ExecuteCallbacks() {
r.mutex.Lock()
- log.Debugf("ExecuteCallbacks has the ROOT lock : %+v", r)
defer r.mutex.Unlock()
- defer log.Debugf("ExecuteCallbacks released the ROOT lock : %+v", r)
+
for len(r.Callbacks) > 0 {
callback := r.Callbacks[0]
r.Callbacks = r.Callbacks[1:]
@@ -133,36 +132,32 @@
// getCallbacks returns the available callbacks
func (r *root) GetCallbacks() []CallbackTuple {
r.mutex.Lock()
- log.Debugf("getCallbacks has the ROOT lock : %+v", r)
defer r.mutex.Unlock()
- defer log.Debugf("getCallbacks released the ROOT lock : %+v", r)
+
return r.Callbacks
}
// getCallbacks returns the available notification callbacks
func (r *root) GetNotificationCallbacks() []CallbackTuple {
r.mutex.Lock()
- log.Debugf("GetNotificationCallbacks has the ROOT lock : %+v", r)
defer r.mutex.Unlock()
- defer log.Debugf("GetNotificationCallbacks released the ROOT lock : %+v", r)
+
return r.NotificationCallbacks
}
// AddCallback inserts a new callback with its arguments
func (r *root) AddCallback(callback CallbackFunction, args ...interface{}) {
r.mutex.Lock()
- log.Debugf("AddCallback has the ROOT lock : %+v", r)
defer r.mutex.Unlock()
- defer log.Debugf("AddCallback released the ROOT lock : %+v", r)
+
r.Callbacks = append(r.Callbacks, CallbackTuple{callback, args})
}
// AddNotificationCallback inserts a new notification callback with its arguments
func (r *root) AddNotificationCallback(callback CallbackFunction, args ...interface{}) {
r.mutex.Lock()
- log.Debugf("AddNotificationCallback has the ROOT lock : %+v", r)
defer r.mutex.Unlock()
- defer log.Debugf("AddNotificationCallback released the ROOT lock : %+v", r)
+
r.NotificationCallbacks = append(r.NotificationCallbacks, CallbackTuple{callback, args})
}
diff --git a/vendor/github.com/opencord/voltha-go/kafka/client.go b/vendor/github.com/opencord/voltha-go/kafka/client.go
old mode 100644
new mode 100755
index 3d37f6e..36c1ede
--- a/vendor/github.com/opencord/voltha-go/kafka/client.go
+++ b/vendor/github.com/opencord/voltha-go/kafka/client.go
@@ -16,8 +16,9 @@
package kafka
import (
- ca "github.com/opencord/voltha-protos/go/inter_container"
"time"
+
+ ca "github.com/opencord/voltha-protos/go/inter_container"
)
const (
@@ -53,6 +54,7 @@
DefaultNumberPartitions = 3
DefaultNumberReplicas = 1
DefaultAutoCreateTopic = false
+ DefaultMetadataMaxRetry = 3
)
// MsgClient represents the set of APIs a Kafka MsgClient must implement
diff --git a/vendor/github.com/opencord/voltha-go/kafka/sarama_client.go b/vendor/github.com/opencord/voltha-go/kafka/sarama_client.go
old mode 100644
new mode 100755
index e920a83..0576da9
--- a/vendor/github.com/opencord/voltha-go/kafka/sarama_client.go
+++ b/vendor/github.com/opencord/voltha-go/kafka/sarama_client.go
@@ -18,15 +18,16 @@
import (
"errors"
"fmt"
+ "strings"
+ "sync"
+ "time"
+
scc "github.com/bsm/sarama-cluster"
"github.com/golang/protobuf/proto"
"github.com/google/uuid"
"github.com/opencord/voltha-go/common/log"
ic "github.com/opencord/voltha-protos/go/inter_container"
"gopkg.in/Shopify/sarama.v1"
- "strings"
- "sync"
- "time"
)
func init() {
@@ -73,6 +74,7 @@
lockTopicToConsumerChannelMap sync.RWMutex
topicLockMap map[string]*sync.RWMutex
lockOfTopicLockMap sync.RWMutex
+ metadataMaxRetry int
}
type SaramaClientOption func(*SaramaClient)
@@ -179,6 +181,12 @@
}
}
+func MetadatMaxRetries(retry int) SaramaClientOption {
+ return func(args *SaramaClient) {
+ args.metadataMaxRetry = retry
+ }
+}
+
func NewSaramaClient(opts ...SaramaClientOption) *SaramaClient {
client := &SaramaClient{
KafkaHost: DefaultKafkaHost,
@@ -197,6 +205,7 @@
client.numPartitions = DefaultNumberPartitions
client.numReplicas = DefaultNumberReplicas
client.autoCreateTopic = DefaultAutoCreateTopic
+ client.metadataMaxRetry = DefaultMetadataMaxRetry
for _, option := range opts {
option(client)
@@ -679,6 +688,7 @@
config.Consumer.MaxWaitTime = time.Duration(sc.consumerMaxwait) * time.Millisecond
config.Consumer.MaxProcessingTime = time.Duration(sc.maxProcessingTime) * time.Millisecond
config.Consumer.Offsets.Initial = sarama.OffsetNewest
+ config.Metadata.Retry.Max = sc.metadataMaxRetry
kafkaFullAddr := fmt.Sprintf("%s:%d", sc.KafkaHost, sc.KafkaPort)
brokers := []string{kafkaFullAddr}
diff --git a/vendor/github.com/opencord/voltha-go/rw_core/utils/core_utils.go b/vendor/github.com/opencord/voltha-go/rw_core/utils/core_utils.go
index 813c978..c9cd56d 100644
--- a/vendor/github.com/opencord/voltha-go/rw_core/utils/core_utils.go
+++ b/vendor/github.com/opencord/voltha-go/rw_core/utils/core_utils.go
@@ -18,6 +18,7 @@
import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
+ "os"
"reflect"
"time"
)
@@ -30,6 +31,10 @@
Id string
}
+func GetHostName() string {
+ return os.Getenv("HOSTNAME")
+}
+
//WaitForNilOrErrorResponses waits on a variadic number of channels for either a nil response or an error
//response. If an error is received from a given channel then the returned error array will contain that error.
//The error will be at the index corresponding to the order in which the channel appear in the parameter list.
diff --git a/vendor/github.com/opencord/voltha-go/rw_core/utils/flow_utils.go b/vendor/github.com/opencord/voltha-go/rw_core/utils/flow_utils.go
index c1ca18d..3828b39 100644
--- a/vendor/github.com/opencord/voltha-go/rw_core/utils/flow_utils.go
+++ b/vendor/github.com/opencord/voltha-go/rw_core/utils/flow_utils.go
@@ -1082,7 +1082,7 @@
//Check match condition
//If the flow_mod match field is empty, that is a special case and indicates the flow entry matches
- if (mod.Match == nil) || (mod.Match.OxmFields == nil) {
+ if (mod.Match == nil) || (mod.Match.OxmFields == nil) || (len(mod.Match.OxmFields) == 0) {
//If we got this far and the match is empty in the flow spec, than the flow matches
return true
} // TODO : implement the flow match analysis
@@ -1156,3 +1156,11 @@
}
return len(toKeep) < len(flows), toKeep
}
+
+func ToOfpOxmField(from []*ofp.OfpOxmOfbField) []*ofp.OfpOxmField {
+ matchFields := make([]*ofp.OfpOxmField, 0)
+ for _, val := range from {
+ matchFields = append(matchFields, &ofp.OfpOxmField{Field: &ofp.OfpOxmField_OfbField{OfbField: val}})
+ }
+ return matchFields
+}
diff --git a/vendor/github.com/opencord/voltha-protos/go/voltha/events.pb.go b/vendor/github.com/opencord/voltha-protos/go/voltha/events.pb.go
index 43e5a48..0a43011 100644
--- a/vendor/github.com/opencord/voltha-protos/go/voltha/events.pb.go
+++ b/vendor/github.com/opencord/voltha-protos/go/voltha/events.pb.go
@@ -205,6 +205,108 @@
return fileDescriptor_e63e6c07044fd2c4, []int{11, 0}
}
+type EventCategory_EventCategory int32
+
+const (
+ EventCategory_COMMUNICATION EventCategory_EventCategory = 0
+ EventCategory_ENVIRONMENT EventCategory_EventCategory = 1
+ EventCategory_EQUIPMENT EventCategory_EventCategory = 2
+ EventCategory_SERVICE EventCategory_EventCategory = 3
+ EventCategory_PROCESSING EventCategory_EventCategory = 4
+ EventCategory_SECURITY EventCategory_EventCategory = 5
+)
+
+var EventCategory_EventCategory_name = map[int32]string{
+ 0: "COMMUNICATION",
+ 1: "ENVIRONMENT",
+ 2: "EQUIPMENT",
+ 3: "SERVICE",
+ 4: "PROCESSING",
+ 5: "SECURITY",
+}
+
+var EventCategory_EventCategory_value = map[string]int32{
+ "COMMUNICATION": 0,
+ "ENVIRONMENT": 1,
+ "EQUIPMENT": 2,
+ "SERVICE": 3,
+ "PROCESSING": 4,
+ "SECURITY": 5,
+}
+
+func (x EventCategory_EventCategory) String() string {
+ return proto.EnumName(EventCategory_EventCategory_name, int32(x))
+}
+
+func (EventCategory_EventCategory) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_e63e6c07044fd2c4, []int{14, 0}
+}
+
+type EventSubCategory_EventSubCategory int32
+
+const (
+ EventSubCategory_PON EventSubCategory_EventSubCategory = 0
+ EventSubCategory_OLT EventSubCategory_EventSubCategory = 1
+ EventSubCategory_ONT EventSubCategory_EventSubCategory = 2
+ EventSubCategory_ONU EventSubCategory_EventSubCategory = 3
+ EventSubCategory_NNI EventSubCategory_EventSubCategory = 4
+)
+
+var EventSubCategory_EventSubCategory_name = map[int32]string{
+ 0: "PON",
+ 1: "OLT",
+ 2: "ONT",
+ 3: "ONU",
+ 4: "NNI",
+}
+
+var EventSubCategory_EventSubCategory_value = map[string]int32{
+ "PON": 0,
+ "OLT": 1,
+ "ONT": 2,
+ "ONU": 3,
+ "NNI": 4,
+}
+
+func (x EventSubCategory_EventSubCategory) String() string {
+ return proto.EnumName(EventSubCategory_EventSubCategory_name, int32(x))
+}
+
+func (EventSubCategory_EventSubCategory) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_e63e6c07044fd2c4, []int{15, 0}
+}
+
+type EventType_EventType int32
+
+const (
+ EventType_CONFIG_EVENT EventType_EventType = 0
+ EventType_KPI_EVENT EventType_EventType = 1
+ EventType_KPI_EVENT2 EventType_EventType = 2
+ EventType_DEVICE_EVENT EventType_EventType = 3
+)
+
+var EventType_EventType_name = map[int32]string{
+ 0: "CONFIG_EVENT",
+ 1: "KPI_EVENT",
+ 2: "KPI_EVENT2",
+ 3: "DEVICE_EVENT",
+}
+
+var EventType_EventType_value = map[string]int32{
+ "CONFIG_EVENT": 0,
+ "KPI_EVENT": 1,
+ "KPI_EVENT2": 2,
+ "DEVICE_EVENT": 3,
+}
+
+func (x EventType_EventType) String() string {
+ return proto.EnumName(EventType_EventType_name, int32(x))
+}
+
+func (EventType_EventType) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptor_e63e6c07044fd2c4, []int{16, 0}
+}
+
type ConfigEventType struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -617,6 +719,8 @@
//
// Identify to the area of the system impacted by the alarm
+// To be deprecated once python version of OpenOLT adapter
+// moves to the new event defination for device alarms
type AlarmEventType struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -650,6 +754,9 @@
//
// Identify to the functional category originating the alarm
+// To be deprecated once python version of OpenOLT adapter
+// as well as OpenONU adapter moves to the new event
+// defination for device alarms
type AlarmEventCategory struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -683,6 +790,9 @@
//
// Active state of the alarm
+// To be deprecated once python version of OpenOLT adapter
+// as well as OpenONU adapter moves to the new event
+// defination for device alarms
type AlarmEventState struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -716,6 +826,9 @@
//
// Identify the overall impact of the alarm on the system
+// To be deprecated once python version of OpenOLT adapter
+// as well as OpenONU adapter moves to the new event
+// defination for device alarms
type AlarmEventSeverity struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -748,7 +861,9 @@
var xxx_messageInfo_AlarmEventSeverity proto.InternalMessageInfo
//
-//
+// To be deprecated once python version of OpenOLT adapter
+// as well as OpenONU adapter moves to the new event
+// defination for device alarms
type AlarmEvent struct {
// Unique ID for this alarm. e.g. voltha.some_olt.1234
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
@@ -897,6 +1012,404 @@
return ""
}
+//
+// Describes the events specific to device
+type DeviceEvent struct {
+ // Identifier of the originating resource of the event, for ex: device_id
+ ResourceId string `protobuf:"bytes,1,opt,name=resource_id,json=resourceId,proto3" json:"resource_id,omitempty"`
+ // device_event_name indicates clearly the name of the device event
+ DeviceEventName string `protobuf:"bytes,2,opt,name=device_event_name,json=deviceEventName,proto3" json:"device_event_name,omitempty"`
+ // Textual explanation of the device event
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
+ // Key/Value storage for extra information that may give context to the event
+ Context map[string]string `protobuf:"bytes,4,rep,name=context,proto3" json:"context,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *DeviceEvent) Reset() { *m = DeviceEvent{} }
+func (m *DeviceEvent) String() string { return proto.CompactTextString(m) }
+func (*DeviceEvent) ProtoMessage() {}
+func (*DeviceEvent) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e63e6c07044fd2c4, []int{13}
+}
+
+func (m *DeviceEvent) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_DeviceEvent.Unmarshal(m, b)
+}
+func (m *DeviceEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_DeviceEvent.Marshal(b, m, deterministic)
+}
+func (m *DeviceEvent) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DeviceEvent.Merge(m, src)
+}
+func (m *DeviceEvent) XXX_Size() int {
+ return xxx_messageInfo_DeviceEvent.Size(m)
+}
+func (m *DeviceEvent) XXX_DiscardUnknown() {
+ xxx_messageInfo_DeviceEvent.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DeviceEvent proto.InternalMessageInfo
+
+func (m *DeviceEvent) GetResourceId() string {
+ if m != nil {
+ return m.ResourceId
+ }
+ return ""
+}
+
+func (m *DeviceEvent) GetDeviceEventName() string {
+ if m != nil {
+ return m.DeviceEventName
+ }
+ return ""
+}
+
+func (m *DeviceEvent) GetDescription() string {
+ if m != nil {
+ return m.Description
+ }
+ return ""
+}
+
+func (m *DeviceEvent) GetContext() map[string]string {
+ if m != nil {
+ return m.Context
+ }
+ return nil
+}
+
+//
+// Identify the area of the system impacted by the event.
+type EventCategory struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *EventCategory) Reset() { *m = EventCategory{} }
+func (m *EventCategory) String() string { return proto.CompactTextString(m) }
+func (*EventCategory) ProtoMessage() {}
+func (*EventCategory) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e63e6c07044fd2c4, []int{14}
+}
+
+func (m *EventCategory) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_EventCategory.Unmarshal(m, b)
+}
+func (m *EventCategory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_EventCategory.Marshal(b, m, deterministic)
+}
+func (m *EventCategory) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EventCategory.Merge(m, src)
+}
+func (m *EventCategory) XXX_Size() int {
+ return xxx_messageInfo_EventCategory.Size(m)
+}
+func (m *EventCategory) XXX_DiscardUnknown() {
+ xxx_messageInfo_EventCategory.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EventCategory proto.InternalMessageInfo
+
+//
+// Identify the functional category originating the event
+type EventSubCategory struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *EventSubCategory) Reset() { *m = EventSubCategory{} }
+func (m *EventSubCategory) String() string { return proto.CompactTextString(m) }
+func (*EventSubCategory) ProtoMessage() {}
+func (*EventSubCategory) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e63e6c07044fd2c4, []int{15}
+}
+
+func (m *EventSubCategory) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_EventSubCategory.Unmarshal(m, b)
+}
+func (m *EventSubCategory) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_EventSubCategory.Marshal(b, m, deterministic)
+}
+func (m *EventSubCategory) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EventSubCategory.Merge(m, src)
+}
+func (m *EventSubCategory) XXX_Size() int {
+ return xxx_messageInfo_EventSubCategory.Size(m)
+}
+func (m *EventSubCategory) XXX_DiscardUnknown() {
+ xxx_messageInfo_EventSubCategory.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EventSubCategory proto.InternalMessageInfo
+
+//
+// Identify the type of event
+type EventType struct {
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *EventType) Reset() { *m = EventType{} }
+func (m *EventType) String() string { return proto.CompactTextString(m) }
+func (*EventType) ProtoMessage() {}
+func (*EventType) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e63e6c07044fd2c4, []int{16}
+}
+
+func (m *EventType) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_EventType.Unmarshal(m, b)
+}
+func (m *EventType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_EventType.Marshal(b, m, deterministic)
+}
+func (m *EventType) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EventType.Merge(m, src)
+}
+func (m *EventType) XXX_Size() int {
+ return xxx_messageInfo_EventType.Size(m)
+}
+func (m *EventType) XXX_DiscardUnknown() {
+ xxx_messageInfo_EventType.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EventType proto.InternalMessageInfo
+
+//
+// Identify the functional category originating the event
+type EventHeader struct {
+ // Unique ID for this event. e.g. voltha.some_olt.1234
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // Refers to the functional area affect by the event
+ Category EventCategory_EventCategory `protobuf:"varint,2,opt,name=category,proto3,enum=voltha.EventCategory_EventCategory" json:"category,omitempty"`
+ // Refers to functional category of the event
+ SubCategory EventSubCategory_EventSubCategory `protobuf:"varint,3,opt,name=sub_category,json=subCategory,proto3,enum=voltha.EventSubCategory_EventSubCategory" json:"sub_category,omitempty"`
+ // Refers to the type of the event
+ Type EventType_EventType `protobuf:"varint,4,opt,name=type,proto3,enum=voltha.EventType_EventType" json:"type,omitempty"`
+ // The version identifier for this event type, thus allowing each
+ // event type to evolve independently. The version should be in the
+ // format “MAJOR.MINOR” format and minor changes must only be additive
+ // and non-breaking.
+ TypeVersion string `protobuf:"bytes,5,opt,name=type_version,json=typeVersion,proto3" json:"type_version,omitempty"`
+ // Timestamp at which the event was first raised.
+ // This represents the UTC time stamp since epoch (in seconds) when the
+ // the event was first raised from the source entity.
+ // If the source entity doesn't send the raised_ts, this shall be set
+ // to timestamp when the event was received.
+ RaisedTs float32 `protobuf:"fixed32,6,opt,name=raised_ts,json=raisedTs,proto3" json:"raised_ts,omitempty"`
+ // Timestamp at which the event was reported.
+ // This represents the UTC time stamp since epoch (in seconds) when the
+ // the event was reported (this time stamp is >= raised_ts).
+ // If the source entity that reported this event doesn't send the
+ // reported_ts, this shall be set to the same value as raised_ts.
+ ReportedTs float32 `protobuf:"fixed32,7,opt,name=reported_ts,json=reportedTs,proto3" json:"reported_ts,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *EventHeader) Reset() { *m = EventHeader{} }
+func (m *EventHeader) String() string { return proto.CompactTextString(m) }
+func (*EventHeader) ProtoMessage() {}
+func (*EventHeader) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e63e6c07044fd2c4, []int{17}
+}
+
+func (m *EventHeader) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_EventHeader.Unmarshal(m, b)
+}
+func (m *EventHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_EventHeader.Marshal(b, m, deterministic)
+}
+func (m *EventHeader) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_EventHeader.Merge(m, src)
+}
+func (m *EventHeader) XXX_Size() int {
+ return xxx_messageInfo_EventHeader.Size(m)
+}
+func (m *EventHeader) XXX_DiscardUnknown() {
+ xxx_messageInfo_EventHeader.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_EventHeader proto.InternalMessageInfo
+
+func (m *EventHeader) GetId() string {
+ if m != nil {
+ return m.Id
+ }
+ return ""
+}
+
+func (m *EventHeader) GetCategory() EventCategory_EventCategory {
+ if m != nil {
+ return m.Category
+ }
+ return EventCategory_COMMUNICATION
+}
+
+func (m *EventHeader) GetSubCategory() EventSubCategory_EventSubCategory {
+ if m != nil {
+ return m.SubCategory
+ }
+ return EventSubCategory_PON
+}
+
+func (m *EventHeader) GetType() EventType_EventType {
+ if m != nil {
+ return m.Type
+ }
+ return EventType_CONFIG_EVENT
+}
+
+func (m *EventHeader) GetTypeVersion() string {
+ if m != nil {
+ return m.TypeVersion
+ }
+ return ""
+}
+
+func (m *EventHeader) GetRaisedTs() float32 {
+ if m != nil {
+ return m.RaisedTs
+ }
+ return 0
+}
+
+func (m *EventHeader) GetReportedTs() float32 {
+ if m != nil {
+ return m.ReportedTs
+ }
+ return 0
+}
+
+//
+// Event Structure
+type Event struct {
+ // event header
+ Header *EventHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
+ // oneof event types referred by EventType.
+ //
+ // Types that are valid to be assigned to EventType:
+ // *Event_ConfigEvent
+ // *Event_KpiEvent
+ // *Event_KpiEvent2
+ // *Event_DeviceEvent
+ EventType isEvent_EventType `protobuf_oneof:"event_type"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *Event) Reset() { *m = Event{} }
+func (m *Event) String() string { return proto.CompactTextString(m) }
+func (*Event) ProtoMessage() {}
+func (*Event) Descriptor() ([]byte, []int) {
+ return fileDescriptor_e63e6c07044fd2c4, []int{18}
+}
+
+func (m *Event) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_Event.Unmarshal(m, b)
+}
+func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_Event.Marshal(b, m, deterministic)
+}
+func (m *Event) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_Event.Merge(m, src)
+}
+func (m *Event) XXX_Size() int {
+ return xxx_messageInfo_Event.Size(m)
+}
+func (m *Event) XXX_DiscardUnknown() {
+ xxx_messageInfo_Event.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Event proto.InternalMessageInfo
+
+func (m *Event) GetHeader() *EventHeader {
+ if m != nil {
+ return m.Header
+ }
+ return nil
+}
+
+type isEvent_EventType interface {
+ isEvent_EventType()
+}
+
+type Event_ConfigEvent struct {
+ ConfigEvent *ConfigEvent `protobuf:"bytes,2,opt,name=config_event,json=configEvent,proto3,oneof"`
+}
+
+type Event_KpiEvent struct {
+ KpiEvent *KpiEvent `protobuf:"bytes,3,opt,name=kpi_event,json=kpiEvent,proto3,oneof"`
+}
+
+type Event_KpiEvent2 struct {
+ KpiEvent2 *KpiEvent2 `protobuf:"bytes,4,opt,name=kpi_event2,json=kpiEvent2,proto3,oneof"`
+}
+
+type Event_DeviceEvent struct {
+ DeviceEvent *DeviceEvent `protobuf:"bytes,5,opt,name=device_event,json=deviceEvent,proto3,oneof"`
+}
+
+func (*Event_ConfigEvent) isEvent_EventType() {}
+
+func (*Event_KpiEvent) isEvent_EventType() {}
+
+func (*Event_KpiEvent2) isEvent_EventType() {}
+
+func (*Event_DeviceEvent) isEvent_EventType() {}
+
+func (m *Event) GetEventType() isEvent_EventType {
+ if m != nil {
+ return m.EventType
+ }
+ return nil
+}
+
+func (m *Event) GetConfigEvent() *ConfigEvent {
+ if x, ok := m.GetEventType().(*Event_ConfigEvent); ok {
+ return x.ConfigEvent
+ }
+ return nil
+}
+
+func (m *Event) GetKpiEvent() *KpiEvent {
+ if x, ok := m.GetEventType().(*Event_KpiEvent); ok {
+ return x.KpiEvent
+ }
+ return nil
+}
+
+func (m *Event) GetKpiEvent2() *KpiEvent2 {
+ if x, ok := m.GetEventType().(*Event_KpiEvent2); ok {
+ return x.KpiEvent2
+ }
+ return nil
+}
+
+func (m *Event) GetDeviceEvent() *DeviceEvent {
+ if x, ok := m.GetEventType().(*Event_DeviceEvent); ok {
+ return x.DeviceEvent
+ }
+ return nil
+}
+
+// XXX_OneofWrappers is for the internal use of the proto package.
+func (*Event) XXX_OneofWrappers() []interface{} {
+ return []interface{}{
+ (*Event_ConfigEvent)(nil),
+ (*Event_KpiEvent)(nil),
+ (*Event_KpiEvent2)(nil),
+ (*Event_DeviceEvent)(nil),
+ }
+}
+
func init() {
proto.RegisterEnum("voltha.ConfigEventType_ConfigEventType", ConfigEventType_ConfigEventType_name, ConfigEventType_ConfigEventType_value)
proto.RegisterEnum("voltha.KpiEventType_KpiEventType", KpiEventType_KpiEventType_name, KpiEventType_KpiEventType_value)
@@ -904,6 +1417,9 @@
proto.RegisterEnum("voltha.AlarmEventCategory_AlarmEventCategory", AlarmEventCategory_AlarmEventCategory_name, AlarmEventCategory_AlarmEventCategory_value)
proto.RegisterEnum("voltha.AlarmEventState_AlarmEventState", AlarmEventState_AlarmEventState_name, AlarmEventState_AlarmEventState_value)
proto.RegisterEnum("voltha.AlarmEventSeverity_AlarmEventSeverity", AlarmEventSeverity_AlarmEventSeverity_name, AlarmEventSeverity_AlarmEventSeverity_value)
+ proto.RegisterEnum("voltha.EventCategory_EventCategory", EventCategory_EventCategory_name, EventCategory_EventCategory_value)
+ proto.RegisterEnum("voltha.EventSubCategory_EventSubCategory", EventSubCategory_EventSubCategory_name, EventSubCategory_EventSubCategory_value)
+ proto.RegisterEnum("voltha.EventType_EventType", EventType_EventType_name, EventType_EventType_value)
proto.RegisterType((*ConfigEventType)(nil), "voltha.ConfigEventType")
proto.RegisterType((*ConfigEvent)(nil), "voltha.ConfigEvent")
proto.RegisterType((*KpiEventType)(nil), "voltha.KpiEventType")
@@ -922,75 +1438,102 @@
proto.RegisterType((*AlarmEventSeverity)(nil), "voltha.AlarmEventSeverity")
proto.RegisterType((*AlarmEvent)(nil), "voltha.AlarmEvent")
proto.RegisterMapType((map[string]string)(nil), "voltha.AlarmEvent.ContextEntry")
+ proto.RegisterType((*DeviceEvent)(nil), "voltha.DeviceEvent")
+ proto.RegisterMapType((map[string]string)(nil), "voltha.DeviceEvent.ContextEntry")
+ proto.RegisterType((*EventCategory)(nil), "voltha.EventCategory")
+ proto.RegisterType((*EventSubCategory)(nil), "voltha.EventSubCategory")
+ proto.RegisterType((*EventType)(nil), "voltha.EventType")
+ proto.RegisterType((*EventHeader)(nil), "voltha.EventHeader")
+ proto.RegisterType((*Event)(nil), "voltha.Event")
}
func init() { proto.RegisterFile("voltha_protos/events.proto", fileDescriptor_e63e6c07044fd2c4) }
var fileDescriptor_e63e6c07044fd2c4 = []byte{
- // 1033 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0xe3, 0x44,
- 0x14, 0xae, 0x9d, 0xff, 0x93, 0x36, 0xf5, 0x8e, 0x10, 0x32, 0xe5, 0x67, 0xbb, 0x46, 0x2c, 0xd5,
- 0xa2, 0xa6, 0x22, 0x08, 0x69, 0xb7, 0xa8, 0x82, 0xe0, 0x5a, 0xc8, 0xd0, 0x38, 0x65, 0x92, 0x76,
- 0x81, 0x9b, 0x68, 0xd6, 0x9e, 0xa6, 0x16, 0x89, 0xc7, 0xb2, 0xa7, 0xd1, 0xe6, 0x8e, 0x07, 0x40,
- 0xe2, 0x72, 0x9f, 0x88, 0x37, 0xe1, 0x41, 0xd0, 0xcc, 0xd8, 0xb5, 0x93, 0x7a, 0xc5, 0xc5, 0x8a,
- 0xbb, 0x39, 0xdf, 0xf9, 0xf1, 0x77, 0xce, 0x9c, 0x39, 0xc7, 0x70, 0xb0, 0x62, 0x0b, 0x7e, 0x4b,
- 0x66, 0x71, 0xc2, 0x38, 0x4b, 0x4f, 0xe8, 0x8a, 0x46, 0x3c, 0xed, 0x4b, 0x09, 0x35, 0x95, 0xee,
- 0xc0, 0xdc, 0xb4, 0x59, 0x52, 0x4e, 0x94, 0xc5, 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, 0x00, 0xff,
- 0xff, 0xba, 0xd4, 0xc8, 0xc8, 0x90, 0x09, 0x00, 0x00,
+ // 1350 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x57, 0xdb, 0x6e, 0xdb, 0x46,
+ 0x13, 0x16, 0xa9, 0x83, 0xa5, 0xa1, 0x6c, 0xd3, 0x9b, 0x1f, 0x3f, 0xf4, 0x3b, 0x7f, 0x1b, 0x87,
+ 0x45, 0xd3, 0x34, 0x41, 0x2c, 0x54, 0x45, 0x01, 0xc7, 0x45, 0x90, 0x2a, 0x32, 0x1b, 0xb3, 0xb1,
+ 0x28, 0x77, 0x25, 0x3b, 0x3d, 0x5c, 0x08, 0x6b, 0x71, 0x23, 0x13, 0x96, 0x48, 0x81, 0x5c, 0x0b,
+ 0xf1, 0x4d, 0xd1, 0x07, 0x28, 0xd0, 0xcb, 0x5c, 0xf4, 0x5d, 0x7a, 0xd7, 0x37, 0xe9, 0x23, 0xf4,
+ 0x01, 0x8a, 0x3d, 0x48, 0x3c, 0x48, 0x41, 0x51, 0x04, 0xb9, 0xdb, 0xfd, 0x76, 0x66, 0xf8, 0xcd,
+ 0xec, 0xec, 0xb7, 0x4b, 0xd8, 0x9d, 0x87, 0x13, 0x76, 0x49, 0x86, 0xb3, 0x28, 0x64, 0x61, 0xdc,
+ 0xa4, 0x73, 0x1a, 0xb0, 0x78, 0x5f, 0xcc, 0x50, 0x45, 0xae, 0xed, 0x36, 0xb2, 0x36, 0x53, 0xca,
+ 0x88, 0xb4, 0xd8, 0xfd, 0xff, 0x38, 0x0c, 0xc7, 0x13, 0xda, 0x24, 0x33, 0xbf, 0x49, 0x82, 0x20,
+ 0x64, 0x84, 0xf9, 0x61, 0xa0, 0xfc, 0x2d, 0x1b, 0xb6, 0x3b, 0x61, 0xf0, 0xca, 0x1f, 0xdb, 0x3c,
+ 0xea, 0xe0, 0x66, 0x46, 0x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