Code Review
/
sim
/
o1-interface.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Allow multiple NTS Manager instances to run on the same machine.
[sim/o1-interface.git]
/
ntsimulator
/
src
/
ntsimulator-manager
/
simulator-operations.c
diff --git
a/ntsimulator/src/ntsimulator-manager/simulator-operations.c
b/ntsimulator/src/ntsimulator-manager/simulator-operations.c
index
8520d2b
..
a4adcc3
100644
(file)
--- a/
ntsimulator/src/ntsimulator-manager/simulator-operations.c
+++ b/
ntsimulator/src/ntsimulator-manager/simulator-operations.c
@@
-92,8
+92,8
@@
static cJSON* get_docker_container_bindings(void)
curl_easy_reset(curl);
set_curl_common_info();
curl_easy_reset(curl);
set_curl_common_info();
- char url[
1
00];
- sprintf(url, "http:/v%s/containers/
NTS_Manager/json", getenv("DOCKER_ENGINE_VERSION
"));
+ char url[
2
00];
+ sprintf(url, "http:/v%s/containers/
%s/json", getenv("DOCKER_ENGINE_VERSION"), getenv("HOSTNAME
"));
curl_easy_setopt(curl, CURLOPT_URL, url);
curl_easy_setopt(curl, CURLOPT_URL, url);
@@
-253,6
+253,12
@@
static char* create_docker_container_curl(int base_netconf_port, cJSON* managerB
return NULL;
}
return NULL;
}
+ if (cJSON_AddStringToObject(labels, "NTS_Manager", getenv("HOSTNAME")) == NULL)
+ {
+ printf("Could not create JSON object: NTS Manager\n");
+ return NULL;
+ }
+
cJSON *env_variables_array = cJSON_CreateArray();
if (env_variables_array == NULL)
{
cJSON *env_variables_array = cJSON_CreateArray();
if (env_variables_array == NULL)
{