mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-591: Changed bridge name parsing in security_group.py to support bridges named with dashes
This commit is contained in:
parent
f05cd36634
commit
1ae2d720a3
@ -24,6 +24,7 @@ import sys
|
|||||||
import os
|
import os
|
||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
from optparse import OptionParser, OptionGroup, OptParseError, BadOptionError, OptionError, OptionConflictError, OptionValueError
|
from optparse import OptionParser, OptionGroup, OptParseError, BadOptionError, OptionError, OptionConflictError, OptionValueError
|
||||||
|
import re
|
||||||
iptables = Command("iptables")
|
iptables = Command("iptables")
|
||||||
bash = Command("/bin/bash")
|
bash = Command("/bin/bash")
|
||||||
virsh = Command("virsh")
|
virsh = Command("virsh")
|
||||||
@ -425,7 +426,7 @@ def network_rules_for_rebooted_vm(vmName):
|
|||||||
brName = "cloudbr0"
|
brName = "cloudbr0"
|
||||||
else:
|
else:
|
||||||
brName.pop()
|
brName.pop()
|
||||||
brName = brName[0].split("-")[1]
|
brName = re.sub("^BF-", "", brName[0])
|
||||||
|
|
||||||
if 1 in [ vm_name.startswith(c) for c in ['r-', 's-', 'v-'] ]:
|
if 1 in [ vm_name.startswith(c) for c in ['r-', 's-', 'v-'] ]:
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user