xenserver: Use "ovs-dpctl dump-dps" instead of parsing "ovs-dpctl show".
authorBen Pfaff <blp@nicira.com>
Fri, 14 Jan 2011 01:14:07 +0000 (17:14 -0800)
committerBen Pfaff <blp@nicira.com>
Thu, 27 Jan 2011 17:29:35 +0000 (09:29 -0800)
Might as well use the dump-dps command as intended.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
xenserver/etc_init.d_openvswitch

index 6adb004..a99cc9f 100755 (executable)
@@ -166,16 +166,12 @@ function hup_monitor_external_ids {
     fi
 }
 
-function dp_list {
-    "$dpctl" show | grep '^dp[0-9]\+:' | cut -d':' -f 1
-}
-
 function turn_on_corefiles {
     ulimit -Sc 67108864
 }
 
 function remove_all_dp {
-    for dp in $(dp_list); do
+    for dp in $($dpctl dump-dps); do
         action "Removing datapath: $dp" "$dpctl" del-dp "$dp"
     done
 }