VOL-1074: corrected flow ordering from increasing priority to decreasing priority
Change-Id: I8f660c7e1f1a3a6dd222b786f17668daaf80423c
diff --git a/ponsim/v2/core/ponsim_device.go b/ponsim/v2/core/ponsim_device.go
index a1931f8..13cae92 100644
--- a/ponsim/v2/core/ponsim_device.go
+++ b/ponsim/v2/core/ponsim_device.go
@@ -17,14 +17,15 @@
import (
"context"
+ "net"
+ "sort"
+
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
"github.com/google/gopacket/pcap"
"github.com/opencord/voltha/ponsim/v2/common"
"github.com/opencord/voltha/protos/go/openflow_13"
"github.com/sirupsen/logrus"
- "net"
- "sort"
)
// TODO: Pass-in the certificate information as a structure parameter
@@ -258,7 +259,7 @@
}).Debug("Installing flows")
o.flows = flows
- sort.Sort(common.SortByPriority(o.flows))
+ sort.Sort(sort.Reverse(common.SortByPriority(o.flows)))
common.Logger().WithFields(logrus.Fields{
"device": o,