Merge "Remove _show_resource in mistral"
This commit is contained in:
commit
2c1a03c21c
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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):
|
||||
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user