Commit f43e562a by Eli Ben Baruch

mde: configuration files for ge pedestrian

parent d14b065d
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
"onResponse": { "onResponse": {
"onSuccess": { "onSuccess": {
"actionsInput": "CONTENT", "actionsInput": "CONTENT",
"actions": [{ "actions": [
{
"metaDataActionClass": "logic.adapter.action.ExtractValueAction", "metaDataActionClass": "logic.adapter.action.ExtractValueAction",
"params": { "params": {
"path": "/_embedded/locations", "path": "/_embedded/locations",
......
{
"config": {
"metaDataConfig": "logic.adapter.HttpAdapter.model.HttpAdapterConfig",
"configHttpRequestParams": {
"baseUrl": "ie-pedestrian.run.aws-usw02-pr.ice.predix.io/",
"basePath": "v1/",
"headers": [{
"name": "predix-zone-id",
"value": "c1e012d3-653f-4f71-b03d-76810db8d48e"
}]
},
"authentication": {
"type": "oauth2",
"credential": {
"uaa": "9deacc64-7c53-4790-9a6c-c9de0fdebcdf.predix-uaa.run.aws-usw02-pr.ice.predix.io/oauth/token",
"clientId": "ipgallery",
"clientSecret": "1PGall3ry"
}
}
},
"flows": [
{
"action": {
"metaDataActionClass": "logic.adapter.HttpAdapter.action.SimpleHttpAction",
"params": {
"id": "GetAllCrosswalks",
"httpMethod": "GET",
"path": "locations/search",
"queryParams": [{
"name": "bbox",
"value": "32.123:-117,32.723179:-117.172655"
}, {
"name": "q",
"value": "location-type:CROSSWALK"
}, {
"name": "size",
"value": "30"
}],
"headers": [],
"content": null
}
},
"onResponse": {
"onSuccess": {
"actionsInput": "CONTENT",
"actions": [{
"metaDataActionClass": "logic.adapter.action.ExtractValueAction",
"params": {
"path": "/_embedded/locations",
"valueType": "ARRAY-NODE"
}
}, {
"metaDataActionClass": "logic.adapter.action.JsonConvertAction",
"params": {
"intermediateOperations": [{
"metaDataOperationClass": "logic.adapter.HttpAdapter.model.MapStringToJsonOperation",
"operationParams": {
"action": {
"metaDataActionClass": "logic.adapter.HttpAdapter.action.SimpleHttpAction",
"params": {
"variables": {
"id": {
"action": {
"metaDataActionClass": "logic.adapter.HttpAdapter.action.ExtractSubStringAction",
"extract": {
"path": "/_links/self/href",
"valueType": "STRING"
},
"subString": {
"from": {
"str": "/",
"location": "LAST",
"index": null
},
"to": null
}
}
}},
"id": "getLocationDetails",
"httpMethod": "GET",
"path": "locations/$id",
"queryParams": null,
"headers": [],
"content": null
}
}
}
},
{
"metaDataOperationClass": "logic.adapter.HttpAdapter.model.MapJsonToJsonOperation",
"operationParams": {
"action": {
"metaDataActionClass": "logic.adapter.action.JsonPatchAction",
"params": {
"variables": {
"mdeKey": {
"action": {
"metaDataActionClass": "logic.adapter.HttpAdapter.action.ExtractSubStringAction",
"extract": {
"path": "/_embedded/assets/0/_links/self/href",
"valueType": "STRING"
},
"subString": {
"from": {
"str": "/",
"location": "LAST",
"index": null
},
"to": null
}
}
}
},
"fileInput": null,
"filePatch": "crosswalkJsonPatch.json"
}
}
}
}],
"terminateOperation": null
}
}]
},
"onError": null
}
}, {
"action": {
"metaDataActionClass": "logic.adapter.HttpAdapter.action.SimpleHttpAction",
"params": {
"id": "getLocationDetails",
"httpMethod": "GET",
"path": "locations/$id",
"queryParams": [],
"headers": [],
"content": null
}
},
"onResponse": {
"onSuccess": {
"actionsInput": "CONTENT",
"actions": []
},
"onError": {
"actionsInput": "CONTENT",
"actions": []
}
}
},
{
"action": {
"metaDataActionClass": "logic.adapter.HttpAdapter.action.SimpleHttpAction",
"params": {
"id": "subscribe",
"httpMethod": "GET",
"path": "assets/$mdeKey/live-events",
"queryParams": [
{
"name": "event-types",
"value": "SFIN,SFOUT"
}
],
"headers": [],
"content": null
}
},
"onResponse": {
"onSuccess": {
"actionsInput": "CONTENT",
"actions": [
{
"metaDataActionClass": "logic.adapter.HttpAdapter.action.WebSocketAction",
"params": {
"variables": {
"webSocket": {
"action": {
"metaDataActionClass": "logic.adapter.HttpAdapter.action.ExtractSubStringAction",
"extract": {
"path": "/url",
"valueType": "STRING"
},
"subString": {
"from": null,
"to": null
}
}
}
},
"headers": [
{
"name": "predix-zone-id",
"value": "c1e012d3-653f-4f71-b03d-76810db8d48e"
}
],
"webSocket": "$webSocket",
"mdeKey": "$mdeKey",
"uid": "$uid"
}
}
]
},
"onError": {
"actionsInput": "CONTENT",
"actions": []
}
}
}
]
}
\ No newline at end of file
...@@ -6,5 +6,9 @@ ...@@ -6,5 +6,9 @@
{ {
"id": "adapter.ge.traffic", "id": "adapter.ge.traffic",
"type": "HttpAdapter" "type": "HttpAdapter"
},
{
"id": "adapter.ge.pedestrian",
"type": "HttpAdapter"
}] }]
} }
\ No newline at end of file
...@@ -6,5 +6,5 @@ log4j.prop.file.path=/logs/conf/log4j.xml ...@@ -6,5 +6,5 @@ log4j.prop.file.path=/logs/conf/log4j.xml
### microservice/rest server ### microservice/rest server
server.port=50040 server.port=50040
server.host=0.0.0.0 server.host=0.0.0.0
server.worker.threads=6 server.worker.threads=1
[
{ "op": "remove", "path": "/city"},
{ "op": "remove", "path": "/state"},
{ "op": "remove", "path": "/country"},
{ "op": "remove", "path": "/zipcode"},
{ "op": "remove", "path": "/_links"},
{ "op": "remove", "path": "/location-type"},
{ "op": "remove", "path": "/address"},
{ "op": "remove", "path": "/_embedded"},
{ "op": "remove", "path": "/analytic-category"},
{ "op": "add", "path": "/properties", "value": {"mde-key": "$mdeKey"}}
]
\ No newline at end of file
{
"apiList": [
{
"apiIn": { "name": "cross-walks", "paramsTypes": null},
"method": "GET",
"actions": [{
"adapterId": "adapter.ge.pedestrian",
"apiOut": "GetAllCrosswalks"
}]
},
{
"apiIn": {"name": "resources/devices/$id", "paramsTypes": ["DIGITS"]},
"method": "GET",
"actions": [{
"adapterId": "adapter.ge.pedestrian",
"apiOut": "getLastEventDetails"
}]
},
{
"apiIn": {"name": "subscribe/$mdeKey/$uid", "paramsTypes": ["DIGITS","NO_CHECK"]},
"method": "POST",
"actions": [{
"adapterId": "adapter.ge.pedestrian",
"apiOut": "subscribe"
}]
}
]
}
{ {
"services": [ { "id": "ge.parking" } , { "id": "ge.traffic" } ] "services": [ { "id": "ge.parking" } , { "id": "ge.traffic" } , { "id": "ge.pedestrian" }]
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment