Make now runs lint and any unit tests.
Also update vendored voltha-go to add new api updates
Change-Id: I08e11ae043b1db46fed4cc64fddc890a6729dedf
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 10be81a..0c485bb 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
@@ -172,7 +172,9 @@
func (dr *DeviceRules) Copy() *DeviceRules {
copyDR := NewDeviceRules()
for key, val := range dr.Rules {
- copyDR.Rules[key] = val.Copy()
+ if val != nil {
+ copyDR.Rules[key] = val.Copy()
+ }
}
return copyDR
}
@@ -183,6 +185,16 @@
}
}
+func (dr *DeviceRules) FilterRules(deviceIds map[string]string) *DeviceRules {
+ filteredDR := NewDeviceRules()
+ for key, val := range dr.Rules {
+ if _, exist := deviceIds[key]; exist {
+ filteredDR.Rules[key] = val.Copy()
+ }
+ }
+ return filteredDR
+}
+
func (dr *DeviceRules) AddFlow(deviceId string, flow *ofp.OfpFlowStats) {
if _, exist := dr.Rules[deviceId]; !exist {
dr.Rules[deviceId] = NewFlowsAndGroups()