cf8b92af9a
The following functionality changes were made: 1. Multiple plugins are loaded one per type 2. QuantumManager now holds dictionary {plugin_type: plugin_instance} Core plugin is stored there as well 3. Extensions are checked against all loaded plugins 4. Service plugins are specified by service_plugins option in quantum.conf file 5. Provide basic interface for service plugins 6. Introduce dummy service plugin as example and PoC 7. Service plugin's REST calls get corresponding plugin's common prefix 8. Add UTs for new extension framework functionality and for QuantumManager Implements: blueprint quantum-service-framework Change-Id: I1d00d6f848937410bccd91c852ff0871a86d7bb8
36 lines
1.1 KiB
Python
36 lines
1.1 KiB
Python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
|
|
|
# Copyright 2012 OpenStack LLC.
|
|
# 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.
|
|
|
|
import abc
|
|
|
|
|
|
class ServicePluginBase(object):
|
|
""" defines base interface for any Advanced Service plugin """
|
|
__metaclass__ = abc.ABCMeta
|
|
supported_extension_aliases = []
|
|
|
|
@abc.abstractmethod
|
|
def get_plugin_type(self):
|
|
""" returns one of predefine service types. see
|
|
quantum/plugins/common/constants.py """
|
|
pass
|
|
|
|
@abc.abstractmethod
|
|
def get_plugin_description(self):
|
|
""" returns string description of the plugin """
|
|
pass
|