from quantum.common import constants
from quantum.common import exceptions
from quantum.common import topics
+from quantum.common import utils
from quantum import context
from quantum import manager
from quantum.openstack.common import importutils
from quantum.openstack.common import jsonutils
-from quantum.openstack.common import lockutils
from quantum.openstack.common import log as logging
from quantum.openstack.common import loopingcall
from quantum.openstack.common.rpc import proxy
else:
self.disable_dhcp_helper(network.id)
- @lockutils.synchronized('agent', 'dhcp-')
+ @utils.synchronized('dhcp-agent')
def network_create_end(self, context, payload):
"""Handle the network.create.end notification event."""
network_id = payload['network']['id']
self.enable_dhcp_helper(network_id)
- @lockutils.synchronized('agent', 'dhcp-')
+ @utils.synchronized('dhcp-agent')
def network_update_end(self, context, payload):
"""Handle the network.update.end notification event."""
network_id = payload['network']['id']
else:
self.disable_dhcp_helper(network_id)
- @lockutils.synchronized('agent', 'dhcp-')
+ @utils.synchronized('dhcp-agent')
def network_delete_end(self, context, payload):
"""Handle the network.delete.end notification event."""
self.disable_dhcp_helper(payload['network_id'])
- @lockutils.synchronized('agent', 'dhcp-')
+ @utils.synchronized('dhcp-agent')
def subnet_update_end(self, context, payload):
"""Handle the subnet.update.end notification event."""
network_id = payload['subnet']['network_id']
# Use the update handler for the subnet create event.
subnet_create_end = subnet_update_end
- @lockutils.synchronized('agent', 'dhcp-')
+ @utils.synchronized('dhcp-agent')
def subnet_delete_end(self, context, payload):
"""Handle the subnet.delete.end notification event."""
subnet_id = payload['subnet_id']
if network:
self.refresh_dhcp_helper(network.id)
- @lockutils.synchronized('agent', 'dhcp-')
+ @utils.synchronized('dhcp-agent')
def port_update_end(self, context, payload):
"""Handle the port.update.end notification event."""
port = DictModel(payload['port'])
# Use the update handler for the port create event.
port_create_end = port_update_end
- @lockutils.synchronized('agent', 'dhcp-')
+ @utils.synchronized('dhcp-agent')
def port_delete_end(self, context, payload):
"""Handle the port.delete.end notification event."""
port = self.cache.get_port_by_id(payload['port_id'])
import inspect
import os
-from quantum.agent.linux import utils
-from quantum.openstack.common import lockutils
+from quantum.agent.linux import utils as linux_utils
+from quantum.common import utils
from quantum.openstack.common import log as logging
LOG = logging.getLogger(__name__)
if _execute:
self.execute = _execute
else:
- self.execute = utils.execute
+ self.execute = linux_utils.execute
self.use_ipv6 = use_ipv6
self.root_helper = root_helper
self._apply()
- @lockutils.synchronized('iptables', 'quantum-', external=True)
+ @utils.synchronized('iptables', external=True)
def _apply(self):
"""Apply the current in-memory set of iptables rules.
from oslo.config import cfg
+from quantum.common import utils
from quantum.openstack.common import importutils
-from quantum.openstack.common import lockutils
from quantum.openstack.common import log as logging
from quantum.openstack.common import periodic_task
from quantum.plugins.common import constants
"desc": plugin_inst.get_plugin_description()})
@classmethod
- @lockutils.synchronized("qmlock", "qml-")
+ @utils.synchronized("manager")
def _create_instance(cls):
if cls._instance is None:
cls._instance = cls()
from quantum.db import l3_db
from quantum.extensions import l3
from quantum.extensions import portbindings
-from quantum.openstack.common import lockutils
from quantum.openstack.common import log as logging
from quantum.openstack.common import rpc
from quantum.plugins.bigswitch.version import version_string_with_vcs
if auth:
self.auth = 'Basic ' + base64.encodestring(auth).strip()
- @lockutils.synchronized('rest_call', 'bsn-', external=True)
+ @utils.synchronized('bsn-rest-call', external=True)
def rest_call(self, action, resource, data, headers):
uri = self.base_uri + resource
body = json.dumps(data)