add bonding support, as long as people create a bonding device and a bridge on it by themself, then cloud-agent can use it

This commit is contained in:
Edison Su 2011-01-15 09:51:07 -05:00
parent 72e82c8c8c
commit f45a8238fe

View File

@ -646,10 +646,10 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
String pubPif = null; String pubPif = null;
String privPif = null; String privPif = null;
if (_publicBridgeName != null) { if (_publicBridgeName != null) {
pubPif = Script.runSimpleBashScript("ls /sys/class/net/" + _publicBridgeName + "/brif/ |egrep eth[0-9]+"); pubPif = Script.runSimpleBashScript("brctl show | grep " + _publicBridgeName + " | awk '{print $4}'");
} }
if (_privBridgeName != null) { if (_privBridgeName != null) {
privPif = Script.runSimpleBashScript("ls /sys/class/net/" + _privBridgeName + "/brif/ |egrep eth[0-9]+"); privPif = Script.runSimpleBashScript("brctl show | grep " + _privBridgeName + " | awk '{print $4}'");
} }
return new Pair<String, String>(privPif, pubPif); return new Pair<String, String>(privPif, pubPif);
} }