Created
April 1, 2020 17:02
-
-
Save otherwiseguy/72f31f8c6673482ff26a450b2f438642 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# User specific aliases and functions | |
function ovs_destroy_find() { | |
local cmd=$1 | |
local table=$2 | |
local condition=$3 | |
eval $cmd "-- destroy $table "{$(ovs-vsctl --no-headings --columns=_uuid -f csv find $table $condition|paste -sd",")} | |
} | |
alias nbdf="ovs_destroy_find ovn-nbctl" | |
alias sbdf="ovs_destroy_find ovn-sbctl" | |
alias ovsdf="ovs_destroy_find ovs-vsctl" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example:
Delete all QoS table entries with a type=test:
Delete all QoS table entries:
(though for deleting everything in a table you could do $cmd --all destroy $table as well)
etc.