summaryrefslogtreecommitdiff
path: root/nova/virt/firewall.py
diff options
context:
space:
mode:
authorZhongyue Luo <zhongyue.nah@intel.com>2013-05-11 21:25:16 +0800
committerZhongyue Luo <zhongyue.nah@intel.com>2013-05-14 15:01:45 +0800
commit3c36cbdbc83c1fe1e83fb0733101f84a7a61a0f7 (patch)
treed3a556517225e3ab5451dbcb4a0bda8ac6568c72 /nova/virt/firewall.py
parent966c6fbdfc038ff5d5d01b7ea29e83bddbb083bf (diff)
downloadnova-3c36cbdbc83c1fe1e83fb0733101f84a7a61a0f7.tar.gz
Hide lock_prefix argument using synchronized_with_prefix()
The lockfile module has a new convenience API which sets the lockfile prefix. Using this API, the prefix is not required everytime synchronized is used. Change-Id: Iac1cfcc83b59108164de924d20127c1cf4dd7dcd
Diffstat (limited to 'nova/virt/firewall.py')
-rw-r--r--nova/virt/firewall.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/virt/firewall.py b/nova/virt/firewall.py
index b61b57cfbb..cf290dd10d 100644
--- a/nova/virt/firewall.py
+++ b/nova/virt/firewall.py
@@ -24,8 +24,8 @@ from nova import context
from nova import network
from nova.network import linux_net
from nova.openstack.common import importutils
-from nova.openstack.common import lockutils
from nova.openstack.common import log as logging
+from nova import utils
from nova.virt import netutils
LOG = logging.getLogger(__name__)
@@ -453,7 +453,7 @@ class IptablesFirewallDriver(FirewallDriver):
self.do_refresh_instance_rules(instance)
self.iptables.apply()
- @lockutils.synchronized('iptables', 'nova-', external=True)
+ @utils.synchronized('iptables', external=True)
def _inner_do_refresh_rules(self, instance, ipv4_rules,
ipv6_rules):
self.remove_filters_for_instance(instance)
@@ -476,7 +476,7 @@ class IptablesFirewallDriver(FirewallDriver):
self._do_refresh_provider_fw_rules()
self.iptables.apply()
- @lockutils.synchronized('iptables', 'nova-', external=True)
+ @utils.synchronized('iptables', external=True)
def _do_refresh_provider_fw_rules(self):
"""Internal, synchronized version of refresh_provider_fw_rules."""
self._purge_provider_fw_rules()