Exemplo n.º 1
0
 def post(request, environment_id, action_id):
     if api.action_allowed(request, environment_id):
         task_id = api.run_action(request, environment_id, action_id)
         url = reverse("horizon:murano:environments:action_result", args=(environment_id, task_id))
         return JSONResponse({"url": url})
     else:
         return JSONResponse()
Exemplo n.º 2
0
 def post(request, environment_id, action_id):
     if api.action_allowed(request, environment_id):
         task_id = api.run_action(request, environment_id, action_id)
         url = reverse('horizon:murano:scheduler:action_result',
                       args=(environment_id, task_id))
         return JSONResponse({'url': url})
     else:
         return JSONResponse()
Exemplo n.º 3
0
 def post(request, environment_id, action_id):
     if api.action_allowed(request, environment_id):
         task_id = api.run_action(request, environment_id, action_id)
         url = reverse('horizon:murano:environments:action_result',
                       args=(environment_id, task_id))
         return JSONResponse({'url': url})
     else:
         return JSONResponse()
Exemplo n.º 4
0
 def test_run_action(self, mock_api):
     env_api.run_action(self.mock_request, self.env_id, 'foo_action_id')
     env_api.api.muranoclient.assert_called_with(self.mock_request)
Exemplo n.º 5
0
 def test_run_action(self, mock_api):
     env_api.run_action(self.mock_request, self.env_id, 'foo_action_id')
     env_api.api.muranoclient.assert_called_with(self.mock_request)