Ejemplo n.º 1
0
 def setUp(self):
     super(TriggerApiTest, self).setUp()
     self.controller = trigger_api.TriggersController()
     self.controller.operationengine_api = FakeRemoteOperationApi()
     self.ctxt = context.RequestContext('demo', 'fakeproject', True)
     self.req = fakes.HTTPRequest.blank('/v1/triggers')
     self.default_create_trigger_param = {
         "name": "123",
         "type": "time",
         "properties": {
             "format": "crontab",
             "pattern": "* * * * *"
         },
     }
Ejemplo n.º 2
0
 def _create_trigger(self):
     create_trigger_param = {
         "trigger_info": {
             "name": "123",
             "type": "time",
             "properties": {
                 "format": "crontab",
                 "pattern": "* * * * *"
             },
         }
     }
     controller = trigger_api.TriggersController()
     controller.operationengine_api = test_triggers.FakeRemoteOperationApi()
     req = fakes.HTTPRequest.blank('/v1/triggers')
     return controller.create(req, create_trigger_param)