Merge "Apply six for metaclass"

This commit is contained in:
Jenkins 2013-11-27 20:31:05 +00:00 committed by Gerrit Code Review
commit ee3ef14efa
3 changed files with 9 additions and 4 deletions

View File

@ -16,9 +16,11 @@
# under the License.
import abc
import six
@six.add_metaclass(abc.ABCMeta)
class DeviceDriver(object):
__metaclass__ = abc.ABCMeta
def __init__(self, agent, host):
pass

View File

@ -23,6 +23,7 @@ import shutil
import jinja2
import netaddr
from oslo.config import cfg
import six
from neutron.agent.linux import ip_lib
from neutron.agent.linux import utils
@ -85,13 +86,13 @@ def _get_template(template_file):
return JINJA_ENV.get_template(template_file)
@six.add_metaclass(abc.ABCMeta)
class BaseSwanProcess():
"""Swan Family Process Manager
This class manages start/restart/stop ipsec process.
This class create/delete config template
"""
__metaclass__ = abc.ABCMeta
binary = "ipsec"
CONFIG_DIRS = [
@ -465,6 +466,7 @@ class IPsecVpnDriverApi(proxy.RpcProxy):
topic=self.topic)
@six.add_metaclass(abc.ABCMeta)
class IPsecDriver(device_drivers.DeviceDriver):
"""VPN Device Driver for IPSec.
@ -478,7 +480,6 @@ class IPsecDriver(device_drivers.DeviceDriver):
# 1.0 Initial version
RPC_API_VERSION = '1.0'
__metaclass__ = abc.ABCMeta
def __init__(self, agent, host):
self.agent = agent

View File

@ -17,9 +17,11 @@
import abc
import six
@six.add_metaclass(abc.ABCMeta)
class VpnDriver(object):
__metaclass__ = abc.ABCMeta
@property
def service_type(self):