kuryr-kubernetes/kuryr_kubernetes/tests/unit/controller/handlers/test_fake_handler.py
Antoni Segura Puimedon d3a6cdcf99 Kuryr-Controller: make handlers pluggable
This patch introduces a new way for configuring which handlers the
Kuryr controller should be using. This will allow people to use
externally provided handlers as long as they are installed as
entrypoints of the right namespace.

Implements: blueprint kuryr-pluggable-handlers

Change-Id: I52ce0ef00771c8587d7f7113cc5eb4839d1309a5
Signed-off-by: Antoni Segura Puimedon <antonisp@celebdor.com>
2018-04-17 17:02:00 +03:00

25 lines
863 B
Python

# Copyright (c) 2018 RedHat, Inc.
# All Rights Reserved.
#
# 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 kuryr_kubernetes.handlers import k8s_base
class TestHandler(k8s_base.ResourceEventHandler):
OBJECT_KIND = 'DUMMY'
OBJECT_WATCH_PATH = 'DUMMY_PATH'
def __init__(self):
super(TestHandler, self).__init__()