summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus <mfeuer@jaguarlandrover.com>2014-08-05 16:45:50 -0700
committerMagnus <mfeuer@jaguarlandrover.com>2014-08-05 16:45:50 -0700
commitfc512f4ba76358b435b463e6643e7f75a77d833b (patch)
tree83d8d0dc6f0e4b4d6e1669b0b47c32d5f5fdefa6
parentba6ddf769ed54e945ee9dc8622149e199f29486f (diff)
downloadrvi_core-fc512f4ba76358b435b463e6643e7f75a77d833b.tar.gz
Modified scripts to remove rpc: prefix and other things.
Signed-off-by: Magnus <mfeuer@jaguarlandrover.com>
-rw-r--r--curl_scripts/backend_message.sh2
-rw-r--r--curl_scripts/device_message.sh2
-rw-r--r--curl_scripts/register_service_backend.sh14
-rw-r--r--curl_scripts/register_service_device.sh6
-rw-r--r--priv/setup_backend.config20
-rw-r--r--priv/setup_device.config22
6 files changed, 25 insertions, 41 deletions
diff --git a/curl_scripts/backend_message.sh b/curl_scripts/backend_message.sh
index b6a7ccd..653dfbd 100644
--- a/curl_scripts/backend_message.sh
+++ b/curl_scripts/backend_message.sh
@@ -20,7 +20,7 @@ curl -u $USER_AUTH -k -X POST $URL -d @- << EOF
"params":
{
"calling_service": "hvac_app",
- "target": "rpc:jlr.com/vin/1234/hvac/set_fan_speed",
+ "target": "jlr.com/vin/1234/hvac/set_fan_speed",
"timeout": 1405099531,
"parameters": [
{ "speed": 5 }
diff --git a/curl_scripts/device_message.sh b/curl_scripts/device_message.sh
index a2dba0f..81c144c 100644
--- a/curl_scripts/device_message.sh
+++ b/curl_scripts/device_message.sh
@@ -20,7 +20,7 @@ curl -u $USER_AUTH -k -X POST $URL -d @- << EOF
"params":
{
"calling_service": "hvac_app",
- "target": "rpc:jlr.com/backend/hvac/set_fan_speed",
+ "target": "jlr.com/backend/hvac/publish_fan_speed",
"timeout": 1405099531,
"parameters": [
{ "speed": 5 }
diff --git a/curl_scripts/register_service_backend.sh b/curl_scripts/register_service_backend.sh
index bc812e1..4f0579a 100644
--- a/curl_scripts/register_service_backend.sh
+++ b/curl_scripts/register_service_backend.sh
@@ -19,21 +19,9 @@ curl -u $USER_AUTH -k -X POST $URL -d @- << EOF
"id": "1",
"params":
{
- "service": "hvac/set_fan_speed",
+ "service": "hvac/publish_fan_speed",
"network_address": "http://localhost:8901"
}
}
EOF
-#curl -u $USER_AUTH -k -X POST $URL -d @- << EOF
-#{
-# "jsonrpc": "2.0",
-# "method": "register_service",
-# "id": "1",
-# "params":
-# {
-# "service": "hvac/set_temperature",
-# "network_address": "http://localhost:8901"
-# }
-#}
-#EOF
diff --git a/curl_scripts/register_service_device.sh b/curl_scripts/register_service_device.sh
index 05f8952..e8610b1 100644
--- a/curl_scripts/register_service_device.sh
+++ b/curl_scripts/register_service_device.sh
@@ -19,8 +19,8 @@ curl -u $USER_AUTH -k -X POST $URL -d @- << EOF
"id": "1",
"params":
{
- "service": "hvac",
- "network_address": "http://localhost:8901"
+ "service": "hvac/set_fan_speed",
+ "network_address": "http://localhost:8902"
}
-}
+ }
EOF
diff --git a/priv/setup_backend.config b/priv/setup_backend.config
index 596244d..cb6c96f 100644
--- a/priv/setup_backend.config
+++ b/priv/setup_backend.config
@@ -24,8 +24,8 @@
service_discovery,
authorize,
schedule,
- data_link_backend,
- {data_link_device, load}, %% Load, but do not start.
+ {data_link_backend, load}, %% Load, but do not start.
+ data_link_device,
protocol ]},
%%
@@ -42,10 +42,10 @@
{rvi,
[
- { node_address, "localhost:9990" }, %% Should match bert_rpc_server below
+ { node_address, "127.0.0.1:9990" }, %% Should match bert_rpc_server below
{ node_service_prefix, "jlr.com/backend/"},
- { backend_address, "localhost:9990" },
+ { backend_address, "127.0.0.1:9990" },
{ backend_service_prefix, "jlr.com/backend/" },
%% Fire up a bert rpcserver for the backend data link module.
@@ -53,27 +53,27 @@
{ components,
[
{ service_edge,
- [ { url, "http://localhost:8801" },
+ [ { url, "http://127.0.0.1:8801" },
{ exo_http_opts, [ { port, 8801 } ] }
]
},
{ service_discovery,
- [ { url, "http://localhost:8802" },
+ [ { url, "http://127.0.0.1:8802" },
{ exo_http_opts, [ { port, 8802 } ] }
]
},
{ schedule,
- [ { url, "http://localhost:8803" },
+ [ { url, "http://127.0.0.1:8803" },
{ exo_http_opts, [ { port, 8803 } ] }
]
},
{ authorize,
- [ { url, "http://localhost:8804" },
+ [ { url, "http://127.0.0.1:8804" },
{ exo_http_opts, [ { port, 8804 } ] }
]
},
{ protocol,
- [ { url, "http://localhost:8805" },
+ [ { url, "http://127.0.0.1:8805" },
{ exo_http_opts, [ { port, 8805 } ] }
]
},
@@ -83,7 +83,7 @@
%% the port specified for node_address, which is used by
%% remote nodes to address this node.
{ bert_rpc_server, [ { port, 9990 }]},
- { url, "http://localhost:8806" },
+ { url, "http://127.0.0.1:8806" },
{ exo_http_opts, [ { port, 8806 } ] }
]
diff --git a/priv/setup_device.config b/priv/setup_device.config
index 3ef6bcb..3ef2770 100644
--- a/priv/setup_device.config
+++ b/priv/setup_device.config
@@ -44,46 +44,42 @@
{rvi,
[
- { node_address, "localhost:9991" }, %% Should matcch bert_rpc_server below
+ { node_address, "127.0.0.1:9991" }, %% Should matcch bert_rpc_server below
{ node_service_prefix, "jlr.com/vin/1234/"},
- { backend_address, "localhost:9990" },
+ { backend_address, "127.0.0.1:9990" }, %% See data_link_device:send_data() for details
{ backend_service_prefix, "jlr.com/backend/" },
{ components,
[
{ service_edge,
- [ { url, "http://localhost:8811" },
+ [ { url, "http://127.0.0.1:8811" },
{ exo_http_opts, [ { port, 8811 } ] }
]
},
{ service_discovery,
- [ { url, "http://localhost:8812" },
+ [ { url, "http://127.0.0.1:8812" },
{ exo_http_opts, [ { port, 8812 } ] }
]
},
{ schedule,
- [ { url, "http://localhost:8813" },
+ [ { url, "http://127.0.0.1:8813" },
{ exo_http_opts, [ { port, 8813 } ] }
]
},
{ authorize,
- [ { url, "http://localhost:8814" },
+ [ { url, "http://127.0.0.1:8814" },
{ exo_http_opts, [ { port, 8814 } ] }
]
},
{ protocol,
- [ { url, "http://localhost:8815" },
+ [ { url, "http://127.0.0.1:8815" },
{ exo_http_opts, [ { port, 8815 } ] }
]
},
{ data_link,
- [ { url, "http://localhost:8816" },
- %% Listen to port 9991 for incoming calls. Must match
- %% the port specified for node_address, which is used by
- %% remote nodes to address this node.
- { bert_rpc_server, [ { port, 9991 }]},
-
+ [ { url, "http://127.0.0.1:8816" },
+ { bert_rpc_server, [ {port, 9991 }]},
{ exo_http_opts, [ { port, 8816 } ] }
]
}