You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2012/12/14 00:28:51 UTC
[1/2] git commit: CLOUDSTACK-591: Changed bridge name parsing in
security_group.py to support bridges named with dashes
Updated Branches:
refs/heads/master f05cd3663 -> 6f29317a8
CLOUDSTACK-591: Changed bridge name parsing in security_group.py to support bridges named with dashes
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/1ae2d720
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/1ae2d720
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/1ae2d720
Branch: refs/heads/master
Commit: 1ae2d720a3ca3bde2baacb0d06610e7466f95bfe
Parents: f05cd36
Author: Bill Rich <bi...@gmail.com>
Authored: Fri Dec 7 08:39:13 2012 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Thu Dec 13 15:28:30 2012 -0800
----------------------------------------------------------------------
scripts/vm/network/security_group.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/1ae2d720/scripts/vm/network/security_group.py
----------------------------------------------------------------------
diff --git a/scripts/vm/network/security_group.py b/scripts/vm/network/security_group.py
index b079890..534f384 100755
--- a/scripts/vm/network/security_group.py
+++ b/scripts/vm/network/security_group.py
@@ -24,6 +24,7 @@ import sys
import os
import xml.dom.minidom
from optparse import OptionParser, OptionGroup, OptParseError, BadOptionError, OptionError, OptionConflictError, OptionValueError
+import re
iptables = Command("iptables")
bash = Command("/bin/bash")
virsh = Command("virsh")
@@ -425,7 +426,7 @@ def network_rules_for_rebooted_vm(vmName):
brName = "cloudbr0"
else:
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-'] ]: