VMware-BZ: 2192560
Signed-off-by: Zak Whittington <[email protected]>
---
 utilities/ovs-save | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/utilities/ovs-save b/utilities/ovs-save
index 2294583..902d331 100755
--- a/utilities/ovs-save
+++ b/utilities/ovs-save
@@ -121,11 +121,23 @@ save_flows () {
              cnt++;printf "{class="$1",type="$2",len="$3"}->"$4}'
         echo "'"
 
+        printf "%s" "ovs-ofctl -O $ofp_version add-groups ${bridge} " \
+            "\"$workdir/$bridge.groups.dump\""
+
+        # If possible use OpenFlow 1.4 atomic bundle transaction to add groups
+        [ ${ofp_version#OpenFlow} -ge 14 ] && bundle=" --bundle" || bundle=""
+        echo "${bundle}"
+
         printf "%s" "ovs-ofctl -O $ofp_version replace-flows ${bridge} " \
             "\"$workdir/$bridge.flows.dump\""
 
         # If possible, use OpenFlow 1.4 atomic bundle transaction to add flows
-        [ ${ofp_version#OpenFlow} -ge 14 ] && echo " --bundle" || echo
+        echo "${bundle}"
+
+        ovs-ofctl -O $ofp_version dump-groups "$bridge" | \
+            sed -e '/^OFPST_GROUP_DESC/d' \
+                -e '/^NXST_GROUP_DESC/d' > \
+                "$workdir/$bridge.groups.dump"
 
         ovs-ofctl -O $ofp_version dump-flows --no-names --no-stats "$bridge" | 
\
             sed -e '/NXST_FLOW/d' \
-- 
2.7.4

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to