Skip to content
Snippets Groups Projects
Commit ebdb49bb authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

director-cli: check http status instead of existcode on object creation

parent 0cc08944
No related branches found
No related tags found
1 merge request!39director-cli: check http status instead of existcode on object creation
......@@ -503,7 +503,9 @@ hostDefaultgroups="groups[]=iml groups[]=iml-server"
_action=update
fi
if ObjAction $_action service; then
# if ObjAction $_action service; then
ObjAction $_action service
if [ -z "$(http.isOk)" ]; then
echo "OK $_action service ${IDC_service__obj_name}"
return 0
else
......@@ -525,7 +527,9 @@ hostDefaultgroups="groups[]=iml groups[]=iml-server"
# create command if it does not exist
if serviceCreateOrUpdate >/dev/null ; then
if ! ObjAction exists svclink; then
if ObjAction create svclink; then
# if ObjAction create svclink; then
ObjAction create svclink
if [ -z "$(http.isOk)" ]; then
echo "OK: linked service ${checkName} on host [$MY_NAME] was created"
else
echo "ERROR :-/ unable to create linked service ${checkName} on host [$MY_NAME]"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment