VOL-1624 Support for tech-profile creation on the first flow that references the tp-id (in write-metadata)

Getting meter from flow itself and bug fixes

Bug fix for dhcp packet-out

Change-Id: Ia466988bfdbfe49fd9a44729a4ba4a30fd991c54
diff --git a/vendor/github.com/opencord/voltha-go/db/kvstore/consulclient.go b/vendor/github.com/opencord/voltha-go/db/kvstore/consulclient.go
index 2d02342..4b25b5f 100644
--- a/vendor/github.com/opencord/voltha-go/db/kvstore/consulclient.go
+++ b/vendor/github.com/opencord/voltha-go/db/kvstore/consulclient.go
@@ -79,7 +79,7 @@
 	}
 	m := make(map[string]*KVPair)
 	for _, kvp := range kvps {
-		m[string(kvp.Key)] = NewKVPair(string(kvp.Key), kvp.Value, string(kvp.Session), 0)
+		m[string(kvp.Key)] = NewKVPair(string(kvp.Key), kvp.Value, string(kvp.Session), 0, -1)
 	}
 	return m, nil
 }
@@ -100,7 +100,7 @@
 		return nil, err
 	}
 	if kvp != nil {
-		return NewKVPair(string(kvp.Key), kvp.Value, string(kvp.Session), 0), nil
+		return NewKVPair(string(kvp.Key), kvp.Value, string(kvp.Session), 0, -1), nil
 	}
 
 	return nil, nil
@@ -455,7 +455,7 @@
 		default:
 			if err != nil {
 				log.Warnw("error-from-watch", log.Fields{"error": err})
-				ch <- NewEvent(CONNECTIONDOWN, key, []byte(""))
+				ch <- NewEvent(CONNECTIONDOWN, key, []byte(""), -1)
 			} else {
 				log.Debugw("index-state", log.Fields{"lastindex": lastIndex, "newindex": meta.LastIndex, "key": key})
 			}
@@ -469,12 +469,12 @@
 		} else {
 			log.Debugw("update-received", log.Fields{"pair": pair})
 			if pair == nil {
-				ch <- NewEvent(DELETE, key, []byte(""))
+				ch <- NewEvent(DELETE, key, []byte(""), -1)
 			} else if !c.isKVEqual(pair, previousKVPair) {
 				// Push the change onto the channel if the data has changed
 				// For now just assume it's a PUT change
 				log.Debugw("pair-details", log.Fields{"session": pair.Session, "key": pair.Key, "value": pair.Value})
-				ch <- NewEvent(PUT, pair.Key, pair.Value)
+				ch <- NewEvent(PUT, pair.Key, pair.Value, -1)
 			}
 			previousKVPair = pair
 			lastIndex = meta.LastIndex