bcacff60c9
This patch moves the cni plugins that were split between api.py, main.py and daemon/service.py to have then in a unified path. Change-Id: Ief15e3f8a722237649dd5a1fb8c4e26f51143072
31 lines
895 B
Python
31 lines
895 B
Python
# Copyright (c) 2016 Mirantis, 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.
|
|
|
|
|
|
import abc
|
|
import six
|
|
|
|
|
|
@six.add_metaclass(abc.ABCMeta)
|
|
class CNIPlugin(object):
|
|
|
|
@abc.abstractmethod
|
|
def add(self, params):
|
|
raise NotImplementedError()
|
|
|
|
@abc.abstractmethod
|
|
def delete(self, params):
|
|
raise NotImplementedError()
|