From 54c1ad58d7aa35bad14bcb674767ebd3ef643033 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Tue, 26 Mar 2024 16:44:24 +0100 Subject: [PATCH] update creation check --- director-cli.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/director-cli.sh b/director-cli.sh index f840ef8..dd3963d 100755 --- a/director-cli.sh +++ b/director-cli.sh @@ -396,7 +396,7 @@ hostDefaultgroups="groups[]=iml groups[]=iml-server" ObjAction create host if [ -z "$(http.isOk)" ]; then - echo "ERROR, host was NOT created." + echo "ERROR $( http.getStatuscode ): host was NOT created." else echo "OK, host was created successfully." fi @@ -507,11 +507,11 @@ hostDefaultgroups="groups[]=iml groups[]=iml-server" # if ObjAction $_action service; then ObjAction $_action service if [ -z "$(http.isOk)" ]; then + echo "ERROR $( http.getStatuscode ) :/ $_action service ${IDC_service__obj_name}" + return 1 + else echo "OK $_action service ${IDC_service__obj_name}" return 0 - else - echo "ERROR :/ $_action service ${IDC_service__obj_name}" - return 1 fi } @@ -531,9 +531,9 @@ hostDefaultgroups="groups[]=iml groups[]=iml-server" # if ObjAction create svclink; then ObjAction create svclink if [ -z "$(http.isOk)" ]; then - echo "OK: linked service ${checkName} on host [$MY_NAME] was created" + echo "ERROR $( http.getStatuscode ) :-/ unable to create linked service ${checkName} on host [$MY_NAME]" else - echo "ERROR :-/ unable to create linked service ${checkName} on host [$MY_NAME]" + echo "OK: linked service ${checkName} on host [$MY_NAME] was created" fi else echo "SKIP: linked service on host [${IDC_svcathost__obj_name}] exists" -- GitLab