cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [2/2] git commit: CLOUDSTACK-591: Changed bridge name parsing in security_group.py to support bridges named with dashes
Date Fri, 14 Dec 2012 01:17:05 GMT
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/d42f3df9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/d42f3df9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/d42f3df9

Branch: refs/heads/4.0
Commit: d42f3df91ab6c05c202a5ed7c45801607cca78a4
Parents: 7abf117
Author: Bill Rich <bill.rich@gmail.com>
Authored: Fri Dec 7 08:39:13 2012 -0800
Committer: Rohit Yadav <bhaisaab@apache.org>
Committed: Thu Dec 13 17:16:17 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/d42f3df9/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-'] ]:
         


Mime
View raw message