Register v2 API on keystone by default
Also: - fix missing task name in Execution API model - add naive filtering for Tasks - fix v2 reverse workflow example Change-Id: Ibddd0299786fc16a2b93161dc9b389c7048a0272
This commit is contained in:
parent
1f8cfa5691
commit
61c1994e38
@ -81,9 +81,9 @@ function create_mistral_accounts {
|
||||
openstack endpoint create \
|
||||
$MISTRAL_SERVICE \
|
||||
--region RegionOne \
|
||||
--publicurl "$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v1" \
|
||||
--adminurl "$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v1" \
|
||||
--internalurl "$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v1"
|
||||
--publicurl "$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v2" \
|
||||
--adminurl "$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v2" \
|
||||
--internalurl "$MISTRAL_SERVICE_PROTOCOL://$MISTRAL_SERVICE_HOST:$MISTRAL_SERVICE_PORT/v2"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,7 @@ from wsme import types as wtypes
|
||||
import wsmeext.pecan as wsme_pecan
|
||||
|
||||
from mistral.api.controllers import resource
|
||||
from mistral.api.controllers.v2 import task
|
||||
from mistral.db.v2 import api as db_api
|
||||
from mistral.engine1 import rpc
|
||||
from mistral.openstack.common import log as logging
|
||||
@ -99,6 +100,8 @@ class Executions(resource.Resource):
|
||||
|
||||
|
||||
class ExecutionsController(rest.RestController):
|
||||
tasks = task.ExecutionTasksController()
|
||||
|
||||
@rest_utils.wrap_wsme_controller_exception
|
||||
@wsme_pecan.wsexpose(Execution, wtypes.text)
|
||||
def get(self, id):
|
||||
|
@ -136,3 +136,15 @@ class TasksController(rest.RestController):
|
||||
for db_model in db_api.get_tasks()]
|
||||
|
||||
return Tasks(tasks=tasks)
|
||||
|
||||
|
||||
class ExecutionTasksController(rest.RestController):
|
||||
@wsme_pecan.wsexpose(Tasks, wtypes.text)
|
||||
def get_all(self, execution_id):
|
||||
"""Return all tasks within the execution."""
|
||||
LOG.debug("Fetch tasks")
|
||||
|
||||
tasks = [Task.from_dict(db_model.to_dict())
|
||||
for db_model in db_api.get_tasks(execution_id=execution_id)]
|
||||
|
||||
return Tasks(tasks=tasks)
|
||||
|
@ -1,7 +1,7 @@
|
||||
---
|
||||
Version: '2.0'
|
||||
version: '2.0'
|
||||
|
||||
Workflows:
|
||||
workflows:
|
||||
wf1:
|
||||
type: reverse
|
||||
tasks:
|
||||
|
Loading…
Reference in New Issue
Block a user