From b803c71c334dd33630aac1329cfbcc1de68b131c Mon Sep 17 00:00:00 2001 From: yanyanhu Date: Fri, 25 Mar 2016 04:26:06 -0400 Subject: [PATCH] Add basic support for Senlin service This patch adds basic support for Senlin service including consts of Senlin service name, type and Senlin client implementation in osclients module. Change-Id: I94fa1143553b5ac815087820b6bb5ec54db2f3b0 Partial-bp: add-support-for-clustering-service-senlin --- rally/consts.py | 4 ++++ tests/unit/fakes.py | 13 +++++++++++++ 2 files changed, 17 insertions(+) diff --git a/rally/consts.py b/rally/consts.py index 78ce89cc..e2c54c59 100644 --- a/rally/consts.py +++ b/rally/consts.py @@ -26,6 +26,7 @@ from rally.common import utils class _TempestTestsAPI(utils.ImmutableMixin, utils.EnumMixin): BAREMETAL = "baremetal" + CLUSTERING = "clustering" COMPUTE = "compute" DATA_PROCESSING = "data_processing" DATABASE = "database" @@ -103,6 +104,7 @@ class _Service(utils.ImmutableMixin, utils.EnumMixin): CEILOMETER = "ceilometer" MONASCA = "monasca" S3 = "s3" + SENLIN = "senlin" TROVE = "trove" SAHARA = "sahara" SWIFT = "swift" @@ -121,6 +123,7 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin): CLOUD = "cloudformation" ORCHESTRATION = "orchestration" IDENTITY = "identity" + CLUSTERING = "clustering" COMPUTE = "compute" NETWORK = "network" DNS = "dns" @@ -137,6 +140,7 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin): def __init__(self): self.__names = { + self.CLUSTERING: _Service.SENLIN, self.COMPUTE: _Service.NOVA, self.VOLUME: _Service.CINDER, self.SHARE: _Service.MANILA, diff --git a/tests/unit/fakes.py b/tests/unit/fakes.py index f234960b..80e8ad28 100644 --- a/tests/unit/fakes.py +++ b/tests/unit/fakes.py @@ -1457,6 +1457,13 @@ class FakeCueClient(object): pass +class FakeSenlinClient(object): + + def __init__(self): + # TODO(Yanyan Hu):Fake interfaces of senlinclient. + pass + + class FakeClients(object): def __init__(self, credential_=None): @@ -1476,6 +1483,7 @@ class FakeClients(object): self._murano = None self._monasca = None self._ec2 = None + self._senlin = None self._credential = credential_ or objects.Credential( "http://fake.example.org:5000/v2.0/", "fake_username", @@ -1565,6 +1573,11 @@ class FakeClients(object): self._ec2 = FakeEC2Client() return self._ec2 + def senlin(self): + if not self._senlin: + self._senlin = FakeSenlinClient() + return self._senlin + class FakeRunner(object):