Merge "Adding gnocchi client and keystoneauth to rally"

This commit is contained in:
Jenkins 2016-05-12 20:09:35 +00:00 committed by Gerrit Code Review
commit 4d2b7c0f5e
3 changed files with 28 additions and 0 deletions

View File

@ -111,6 +111,7 @@ class _Service(utils.ImmutableMixin, utils.EnumMixin):
MISTRAL = "mistral"
MURANO = "murano"
IRONIC = "ironic"
GNOCCHI = "gnocchi"
class _ServiceType(utils.ImmutableMixin, utils.EnumMixin):
@ -137,6 +138,7 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin):
WORKFLOW_EXECUTION = "workflowv2"
APPLICATION_CATALOG = "application-catalog"
BARE_METAL = "baremetal"
METRIC = "metric"
def __init__(self):
self.__names = {
@ -161,6 +163,7 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin):
self.WORKFLOW_EXECUTION: _Service.MISTRAL,
self.APPLICATION_CATALOG: _Service.MURANO,
self.BARE_METAL: _Service.IRONIC,
self.METRIC: _Service.GNOCCHI,
}
def __getitem__(self, service_type):

View File

@ -19,8 +19,10 @@ pbr>=1.6 # Apache-2.0
PrettyTable<0.8,>=0.7 # BSD
PyYAML>=3.1.0 # MIT
python-designateclient>=1.5.0 # Apache-2.0
gnocchiclient>=2.2.0 # Apache-2.0
python-glanceclient>=2.0.0 # Apache-2.0
python-keystoneclient!=1.8.0,!=2.1.0,>=1.6.0 # Apache-2.0
keystoneauth1>=2.1.0 # Apache-2.0
python-novaclient!=2.33.0,>=2.29.0 # Apache-2.0
python-neutronclient>=4.2.0 # Apache-2.0
python-cinderclient>=1.6.0 # Apache-2.0

View File

@ -207,6 +207,13 @@ class FakeSecurityGroupRule(FakeResource):
setattr(self, key, value)
class FakeMetric(FakeResource):
def __init_(self, manager=None, **kwargs):
super(FakeMetric, self).__init__(manager)
self.metric = kwargs.get("metric_name")
self.optional_args = kwargs.get("optional_args", {})
class FakeAlarm(FakeResource):
def __init__(self, manager=None, **kwargs):
super(FakeAlarm, self).__init__(manager)
@ -714,6 +721,17 @@ class FakeRolesManager(FakeManager):
pass
class FakeMetricManager(FakeManager):
def create(self, **kwargs):
metric = FakeMetric(self, **kwargs)
return self._cache(metric)
def get(self, metric_id):
metric = self.find(metric_id=metric_id)
return [metric]
class FakeAlarmManager(FakeManager):
def get(self, alarm_id):
@ -1036,6 +1054,11 @@ class FakeCeilometerClient(object):
self.query_alarm_history = FakeQueryManager()
class FakeGnocchiClient(object):
def __init__(self):
self.metric = FakeMetricManager()
class FakeMonascaClient(object):
def __init__(self):