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_log import log as oslo_logging
|
||||
import six
|
||||
|
||||
from cloudbaseinit.utils import encoding
|
||||
|
||||
@ -60,6 +61,7 @@ class NotExistingMetadataException(Exception):
|
||||
pass
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class BaseMetadataService(object):
|
||||
def __init__(self):
|
||||
self._cache = {}
|
||||
|
@ -14,7 +14,10 @@
|
||||
|
||||
import abc
|
||||
|
||||
import six
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class BaseConfigDriveManager(object):
|
||||
|
||||
@abc.abstractmethod
|
||||
|
@ -14,7 +14,10 @@
|
||||
|
||||
import abc
|
||||
|
||||
import six
|
||||
|
||||
|
||||
@six.add_metaclass(abc.ABCMeta)
|
||||
class BaseUserDataPlugin(object):
|
||||
|
||||
def __init__(self, mime_type):
|
||||
|
@ -34,11 +34,17 @@ CONF = cfg.CONF
|
||||
MODPATH = "cloudbaseinit.metadata.services.baseopenstackservice"
|
||||
|
||||
|
||||
class FinalBaseOpenStackService(baseopenstackservice.BaseOpenStackService):
|
||||
|
||||
def _get_data(self):
|
||||
pass
|
||||
|
||||
|
||||
class TestBaseOpenStackService(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
CONF.set_override("retry_count_interval", 0)
|
||||
self._service = baseopenstackservice.BaseOpenStackService()
|
||||
self._service = FinalBaseOpenStackService()
|
||||
date = "2013-04-04"
|
||||
fake_metadata = fake_json_response.get_fake_metadata_json(date)
|
||||
self._fake_network_config = fake_metadata["network_config"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user