Ewoud Kohl van Wijngaarden has posted comments on this change.

Change subject: network cleanup scripts
......................................................................


Patch Set 1: Code-Review-1

(4 comments)

....................................................
File scripts/net_cleanup.sh
Line 1: del_dummies() {
Line 2:     for nic in `ip l | awk '{print $2;}' | egrep "^dummy"`; do
Line 3:         ip link del dev ${nic:0:${#nic}-1}
Line 4:     done
Line 5:     find /etc/sysconfig/network-scripts/ -iname "ifcfg-dummy*" | xargs 
--no-run-if-empty rm
Isn't rm -f /etc/sysconfig/network-scripts/ifcfg-dummy* sufficient?
Line 6: }
Line 7: 
Line 8: del_bonds() {
Line 9:     for nic in `ip l | awk '{print $2;}' | egrep "^bond"`; do


Line 12:     find /etc/sysconfig/network-scripts/ -iname "ifcfg-bond*" | xargs 
--no-run-if-empty rm
Line 13: }
Line 14: 
Line 15: del_bridges() {
Line 16:     for bridge in `brctl show | awk '{print $1;}' | grep 
test-network`; do
I was hoping to do this with iproute instead of ip as well, but I can't find an 
easy way to list bridges.
Line 17:         ip link set dev $bridge down
Line 18:         brctl delbr $bridge
Line 19:     done
Line 20: }


Line 14: 
Line 15: del_bridges() {
Line 16:     for bridge in `brctl show | awk '{print $1;}' | grep 
test-network`; do
Line 17:         ip link set dev $bridge down
Line 18:         brctl delbr $bridge
This can be done with ip:

    ip link delete $bridge type bridge
Line 19:     done
Line 20: }
Line 21: 
Line 22: del_test_nets() {


Line 15: del_bridges() {
Line 16:     for bridge in `brctl show | awk '{print $1;}' | grep 
test-network`; do
Line 17:         ip link set dev $bridge down
Line 18:         brctl delbr $bridge
Line 19:     done
Any reason you're not removing ifcfg-bridge files here?
Line 20: }
Line 21: 
Line 22: del_test_nets() {
Line 23:     python ./vdsm_test_net_remover.py


-- 
To view, visit http://gerrit.ovirt.org/20364
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib2d300af57d78f1dc39cc971dc5abbd3607a3a80
Gerrit-PatchSet: 1
Gerrit-Project: jenkins
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegu...@redhat.com>
Gerrit-Reviewer: David Caro <dcaro...@redhat.com>
Gerrit-Reviewer: Ewoud Kohl van Wijngaarden <ew...@kohlvanwijngaarden.nl>
Gerrit-Reviewer: Kiril Nesenko <knese...@redhat.com>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to