Merge "Remove _show_resource in mistral"

This commit is contained in:
Jenkins 2016-06-09 13:02:59 +00:00 committed by Gerrit Code Review
commit 2c1a03c21c
4 changed files with 6 additions and 14 deletions

View File

@ -141,13 +141,6 @@ class CronTrigger(resource.Resource):
elif name == self.REMAINING_EXECUTIONS:
return trigger.remaining_executions
# TODO(tlashchova): remove this method when mistralclient>1.0.0 is used.
def _show_resource(self):
cron_trigger = self.client().cron_triggers.get(self.resource_id)
if hasattr(cron_trigger, 'to_dict'):
super(CronTrigger, self)._show_resource()
return cron_trigger._data
def get_live_state(self, resource_properties):
# Currently mistral just deletes cron trigger that was executed
# (i.e. remaining execution is reached zero). In this case we can't

View File

@ -599,13 +599,6 @@ class Workflow(signal_responder.SignalResponder,
elif name == self.ALARM_URL and self.resource_id is not None:
return six.text_type(self._get_ec2_signed_url())
# TODO(tlashchova): remove this method when mistralclient>1.0.0 is used.
def _show_resource(self):
workflow = self.client().workflows.get(self.resource_id)
if hasattr(workflow, 'to_dict'):
super(Workflow, self)._show_resource()
return workflow._data
def resource_mapping():
return {

View File

@ -44,6 +44,9 @@ class FakeCronTrigger(object):
self.remaining_executions = 3
self._data = {'trigger': 'info'}
def to_dict(self):
return self._data
class MistralCronTriggerTest(common.HeatTestCase):

View File

@ -314,6 +314,9 @@ class FakeWorkflow(object):
self.name = name
self._data = {'workflow': 'info'}
def to_dict(self):
return self._data
class TestMistralWorkflow(common.HeatTestCase):
def setUp(self):