Add REST API for invoking workflow.
Currently, there is no way to invoking using REST API.
I've added REST API.
json data example:
{
"op": "workflow.invoke",
"params": {
"workplace": "Nova-000",
"id": "of-overlay.workflow-nova",
"data": {
"mgmtIp": "192.168.10.8",
"ovsdbPort": 6641,
"sshAccessInfo": {
"remoteIp": "192.168.10.8",
"port": 22,
"user": "root",
"password": "iloveyou",
"keyfile": "~/.ssh/id_rsa"
},
"ovsDatapathType": "system",
"physicalPorts": [
"nova0_1"
],
"vtepIp": "120.0.0.200/24",
"annotations": {
"rackId": 1,
"rackPosition": 3
}
}
}
}
Change-Id: I2ce3bc5a59ce1cbe91c8c6f83bd1f25e81933ce3
diff --git a/apps/workflow/app/BUILD b/apps/workflow/app/BUILD
index d5af5a2..a0339da 100644
--- a/apps/workflow/app/BUILD
+++ b/apps/workflow/app/BUILD
@@ -1,10 +1,17 @@
-COMPILE_DEPS = CORE_DEPS + KRYO + JACKSON + CLI + [
+COMPILE_DEPS = CORE_DEPS + KRYO + JACKSON + CLI + REST + [
+ "@jersey_server//jar",
"//core/store/serializers:onos-core-serializers",
"//core/store/primitives:onos-core-primitives",
"//apps/workflow/api:onos-apps-workflow-api",
]
-osgi_jar(
+osgi_jar_with_tests(
+ api_description = "REST API for workflow",
+ api_package = "org.onosproject.workflow.rest",
+ api_title = "Workflow REST API",
+ api_version = "1.0",
karaf_command_packages = ["org.onosproject.workflow.cli"],
+ test_deps = TEST_ADAPTERS,
+ web_context = "/onos/workflow",
deps = COMPILE_DEPS,
)