Merge release branch 4.9 to master

* 4.9:
  CLOUDSTACK-9811: fix duplicated nics on VR caused by nic name p<slot_number>p<port_number>
This commit is contained in:
Rajani Karuturi 2017-03-23 15:19:31 +05:30
commit ec2d4dd422

View File

@ -1516,7 +1516,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
private String getBroadcastUriFromBridge(final String brName) {
final String pif = matchPifFileInDirectory(brName);
final Pattern pattern = Pattern.compile("(\\D+)(\\d+)(\\D*)(\\d*)");
final Pattern pattern = Pattern.compile("(\\D+)(\\d+)(\\D*)(\\d*)(\\D*)(\\d*)");
final Matcher matcher = pattern.matcher(pif);
s_logger.debug("getting broadcast uri for pif " + pif + " and bridge " + brName);
if(matcher.find()) {
@ -1524,7 +1524,9 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
return BroadcastDomainType.Vxlan.toUri(matcher.group(2)).toString();
}
else{
if (!matcher.group(4).isEmpty()) {
if (!matcher.group(6).isEmpty()) {
return BroadcastDomainType.Vlan.toUri(matcher.group(6)).toString();
} else if (!matcher.group(4).isEmpty()) {
return BroadcastDomainType.Vlan.toUri(matcher.group(4)).toString();
} else {
//untagged or not matching (eth|bond|team)#.#