Add murano client to osclient
Change-Id: I80eb5972cd392b2f695d028a312a945471dbd45c
This commit is contained in:
parent
5d53b4465c
commit
4faf6d052f
@ -36,6 +36,7 @@ class _TempestTestsAPI(utils.ImmutableMixin, utils.EnumMixin):
|
||||
ORCHESTRATION = "orchestration"
|
||||
TELEMETRY = "telemetry"
|
||||
VOLUME = "volume"
|
||||
APPLICATION_CATALOG = "application_catalog"
|
||||
|
||||
|
||||
class _TempestTestsSets(utils.ImmutableMixin, utils.EnumMixin):
|
||||
@ -109,6 +110,7 @@ class _Service(utils.ImmutableMixin, utils.EnumMixin):
|
||||
SAHARA = "sahara"
|
||||
SWIFT = "swift"
|
||||
MISTRAL = "mistral"
|
||||
MURANO = "murano"
|
||||
|
||||
|
||||
class _ServiceType(utils.ImmutableMixin, utils.EnumMixin):
|
||||
@ -132,6 +134,7 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin):
|
||||
DATA_PROCESSING = "data_processing"
|
||||
OBJECT_STORE = "object-store"
|
||||
WORKFLOW_EXECUTION = "workflowv2"
|
||||
APPLICATION_CATALOG = "application_catalog"
|
||||
|
||||
def __init__(self):
|
||||
self.__names = {
|
||||
@ -153,6 +156,7 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin):
|
||||
self.DATA_PROCESSING: _Service.SAHARA,
|
||||
self.OBJECT_STORE: _Service.SWIFT,
|
||||
self.WORKFLOW_EXECUTION: _Service.MISTRAL,
|
||||
self.APPLICATION_CATALOG: _Service.MURANO
|
||||
}
|
||||
|
||||
def __getitem__(self, service_type):
|
||||
|
@ -127,6 +127,10 @@ class FakeImage(FakeResource):
|
||||
self.update = mock.MagicMock()
|
||||
|
||||
|
||||
class FakeMurano(FakeResource):
|
||||
pass
|
||||
|
||||
|
||||
class FakeFailedImage(FakeResource):
|
||||
|
||||
def __init__(self, manager=None):
|
||||
@ -157,10 +161,12 @@ class FakeNetwork(FakeResource):
|
||||
|
||||
class FakeFlavor(FakeResource):
|
||||
|
||||
def __init__(self, id="flavor-id-0", manager=None, ram=0, disk=0):
|
||||
def __init__(self, id="flavor-id-0", manager=None, ram=0, disk=0,
|
||||
name="flavor-name-0"):
|
||||
super(FakeFlavor, self).__init__(manager, id=id)
|
||||
self.ram = ram
|
||||
self.disk = disk
|
||||
self.name = name
|
||||
|
||||
|
||||
class FakeKeypair(FakeResource):
|
||||
@ -407,6 +413,14 @@ class FakeImageManager(FakeManager):
|
||||
self.resources_order.remove(resource)
|
||||
|
||||
|
||||
class FakePackageManager(FakeManager):
|
||||
|
||||
def create(self, package_descr, package_arch, package_class=FakeMurano):
|
||||
package = self._cache(package_class(self))
|
||||
package.name = package_arch.keys()[0]
|
||||
return package
|
||||
|
||||
|
||||
class FakeFailedImageManager(FakeImageManager):
|
||||
|
||||
def create(self, name, copy_from, container_format, disk_format):
|
||||
@ -890,6 +904,12 @@ class FakeGlanceClient(object):
|
||||
self.images = FakeImageManager()
|
||||
|
||||
|
||||
class FakeMuranoClient(object):
|
||||
|
||||
def __init__(self):
|
||||
self.packages = FakePackageManager()
|
||||
|
||||
|
||||
class FakeCinderClient(object):
|
||||
|
||||
def __init__(self):
|
||||
@ -1282,6 +1302,7 @@ class FakeClients(object):
|
||||
self._trove = None
|
||||
self._mistral = None
|
||||
self._swift = None
|
||||
self._murano = None
|
||||
self._endpoint = endpoint_ or objects.Endpoint(
|
||||
"http://fake.example.org:5000/v2.0/",
|
||||
"fake_username",
|
||||
@ -1356,6 +1377,11 @@ class FakeClients(object):
|
||||
self._swift = FakeSwiftClient()
|
||||
return self._swift
|
||||
|
||||
def murano(self):
|
||||
if not self._murano:
|
||||
self._murano = FakeMuranoClient()
|
||||
return self._murano
|
||||
|
||||
|
||||
class FakeRunner(object):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user