diff --git a/neutron/callbacks/resources.py b/neutron/callbacks/resources.py index defe1e36545..73667a598d5 100644 --- a/neutron/callbacks/resources.py +++ b/neutron/callbacks/resources.py @@ -12,7 +12,6 @@ # String literals representing core resources. AGENT = 'agent' -EXTERNAL_NETWORK = 'external_network' FLOATING_IP = 'floatingip' NETWORK = 'network' NETWORKS = 'networks' diff --git a/neutron/db/external_net_db.py b/neutron/db/external_net_db.py index 3e32bd58a6e..bed831228b6 100644 --- a/neutron/db/external_net_db.py +++ b/neutron/db/external_net_db.py @@ -22,7 +22,6 @@ from sqlalchemy.sql import expression as expr from neutron._i18n import _ from neutron.api.v2 import attributes from neutron.callbacks import events -from neutron.callbacks import exceptions as c_exc from neutron.callbacks import registry from neutron.callbacks import resources from neutron.db import _model_query as model_query @@ -103,26 +102,9 @@ class External_net_db_mixin(object): context.session.add(rbac_db.NetworkRBAC( object_id=net_data['id'], action='access_as_external', target_tenant='*', tenant_id=net_data['tenant_id'])) - try: - registry.notify( - resources.EXTERNAL_NETWORK, events.PRECOMMIT_CREATE, - self, context=context, - request=req_data, network=net_data) - except c_exc.CallbackFailure as e: - # raise the underlying exception - raise e.errors[0].error net_data[external_net.EXTERNAL] = external def _process_l3_update(self, context, net_data, req_data, allow_all=True): - try: - registry.notify( - resources.EXTERNAL_NETWORK, events.BEFORE_UPDATE, - self, context=context, - request=req_data, network=net_data) - except c_exc.CallbackFailure as e: - # raise the underlying exception - raise e.errors[0].error - new_value = req_data.get(external_net.EXTERNAL) net_id = net_data['id'] if not validators.is_attr_set(new_value):