Move API v1, v2 hooks to API Common
This patch moves hooks present in octavia/api/v1/hooks.py and octavia/api/v2/hooks.py to octavia/api/common/hooks.py since they both are the same. Change-Id: I3388d9020f19cb4e392cd3053ceed97d97162027
This commit is contained in:
parent
bf90231f58
commit
a33eae305a
|
@ -12,7 +12,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from octavia.api.v1 import hooks
|
||||
from octavia.api.common import hooks
|
||||
|
||||
# Pecan Application Configurations
|
||||
# See https://pecan.readthedocs.org/en/latest/configuration.html#application-configuration # noqa
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
# Copyright 2014 Rackspace
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from pecan import hooks
|
||||
|
||||
from octavia.common import context
|
||||
|
||||
|
||||
class ContextHook(hooks.PecanHook):
|
||||
|
||||
def on_route(self, state):
|
||||
context_obj = context.Context.from_environ(state.request.environ)
|
||||
state.request.context['octavia_context'] = context_obj
|
Loading…
Reference in New Issue