# under the License.
from oslo_config import cfg
+from oslo_log import log as logging
from neutron.api import extensions
from neutron.api.v2 import base
from neutron.plugins.common import constants
from neutron import quota
+LOG = logging.getLogger(__name__)
+
def build_plural_mappings(special_mappings, resource_map):
"""Create plural to singular mapping for all resources.
plugin = manager.NeutronManager.get_service_plugins()[which_service]
else:
plugin = manager.NeutronManager.get_plugin()
+ path_prefix = getattr(plugin, "path_prefix", "")
+ LOG.debug('Service %(service)s assigned prefix: %(prefix)s'
+ % {'service': which_service, 'prefix': path_prefix})
for collection_name in resource_map:
resource_name = plural_mappings[collection_name]
params = resource_map.get(collection_name, {})
allow_bulk=allow_bulk,
allow_pagination=cfg.CONF.allow_pagination,
allow_sorting=cfg.CONF.allow_sorting)
- path_prefix = getattr(plugin, "path_prefix",
- constants.COMMON_PREFIXES.get(which_service, ""))
resource = extensions.ResourceExtension(
collection_name,
controller,