Fix every class that should be abstract
Change-Id: I19d2738da067a0a36c3a81167f5df92de2f7d5b8
This commit is contained in:
parent
0afbadd3ee
commit
f9f6097276
@ -19,6 +19,7 @@ import time
|
|||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
from oslo_log import log as oslo_logging
|
from oslo_log import log as oslo_logging
|
||||||
|
import six
|
||||||
|
|
||||||
from cloudbaseinit.utils import encoding
|
from cloudbaseinit.utils import encoding
|
||||||
|
|
||||||
@ -60,6 +61,7 @@ class NotExistingMetadataException(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@six.add_metaclass(abc.ABCMeta)
|
||||||
class BaseMetadataService(object):
|
class BaseMetadataService(object):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._cache = {}
|
self._cache = {}
|
||||||
|
@ -14,7 +14,10 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
import six
|
||||||
|
|
||||||
|
|
||||||
|
@six.add_metaclass(abc.ABCMeta)
|
||||||
class BaseConfigDriveManager(object):
|
class BaseConfigDriveManager(object):
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
|
@ -14,7 +14,10 @@
|
|||||||
|
|
||||||
import abc
|
import abc
|
||||||
|
|
||||||
|
import six
|
||||||
|
|
||||||
|
|
||||||
|
@six.add_metaclass(abc.ABCMeta)
|
||||||
class BaseUserDataPlugin(object):
|
class BaseUserDataPlugin(object):
|
||||||
|
|
||||||
def __init__(self, mime_type):
|
def __init__(self, mime_type):
|
||||||
|
@ -34,11 +34,17 @@ CONF = cfg.CONF
|
|||||||
MODPATH = "cloudbaseinit.metadata.services.baseopenstackservice"
|
MODPATH = "cloudbaseinit.metadata.services.baseopenstackservice"
|
||||||
|
|
||||||
|
|
||||||
|
class FinalBaseOpenStackService(baseopenstackservice.BaseOpenStackService):
|
||||||
|
|
||||||
|
def _get_data(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
class TestBaseOpenStackService(unittest.TestCase):
|
class TestBaseOpenStackService(unittest.TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
CONF.set_override("retry_count_interval", 0)
|
CONF.set_override("retry_count_interval", 0)
|
||||||
self._service = baseopenstackservice.BaseOpenStackService()
|
self._service = FinalBaseOpenStackService()
|
||||||
date = "2013-04-04"
|
date = "2013-04-04"
|
||||||
fake_metadata = fake_json_response.get_fake_metadata_json(date)
|
fake_metadata = fake_json_response.get_fake_metadata_json(date)
|
||||||
self._fake_network_config = fake_metadata["network_config"]
|
self._fake_network_config = fake_metadata["network_config"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user