nolabs: Add correct floating ip to db 65/2465/2
authorFatih Degirmenci <fdegir@gmail.com>
Tue, 1 Oct 2019 17:14:56 +0000 (19:14 +0200)
committerFatih Degirmenci <fdegir@gmail.com>
Tue, 1 Oct 2019 17:18:15 +0000 (19:18 +0200)
Change-Id: Ic62d26992ed5cc680ac6d826276872a8215b8dcf

jjb/nolabs/delete-booking.sh
jjb/nolabs/handle-booking.sh

index 9a0053e963afe000d2f96b66233b774608d10149..e5516b759a2308d0e9ed3115957bdedba3d65c93 100644 (file)
@@ -25,6 +25,6 @@ NOLABS_TOKEN=$(http --ignore-stdin POST $NOLABS_API_TOKENS_ENDPOINT --auth $NOLA
 # update booking status
 echo "API Request: http --ignore-stdin PUT $NOLABS_API_BOOKINGS_ENDPOINT/$BOOKING_ID \"status_text=deploying\" \"Authorization:Bearer DUMMY_TOKEN\""
 http --ignore-stdin PUT $NOLABS_API_BOOKINGS_ENDPOINT/$BOOKING_ID \
-       "Authorization:Bearer $NOLABS_TOKEN" \
-       status_text=expired \
-       floating_ip="N/A"
+    "Authorization:Bearer $NOLABS_TOKEN" \
+    status_text=expired \
+    floating_ip="N/A"
index cb6786dd37c8bc8f3b24c033bdd7881758ed62c9..4b011027d49ced4005531d6e39e081fa60cc3f4d 100644 (file)
@@ -22,7 +22,7 @@ echo "API Request: http --ignore-stdin POST $NOLABS_API_TOKENS_ENDPOINT --auth d
 NOLABS_TOKEN=$(http --ignore-stdin POST $NOLABS_API_TOKENS_ENDPOINT --auth $NOLABS_API_USERNAME:$NOLABS_API_PASSWORD | jq -r '.token')
 echo "API Request: http --ignore-stdin PUT $NOLABS_API_BOOKINGS_ENDPOINT/$BOOKING_ID \"status_text=deploying\" \"Authorization:Bearer DUMMY_TOKEN\""
 http --ignore-stdin PUT $NOLABS_API_BOOKINGS_ENDPOINT/$BOOKING_ID "status_text=deploying" \
-  "Authorization:Bearer $NOLABS_TOKEN"
+    "Authorization:Bearer $NOLABS_TOKEN"
 
 # get ssh public key of the user
 echo "API Request: http GET $NOLABS_API_BOOKINGS_ENDPOINT/$BOOKING_ID | jq -r '.user_id'"
@@ -50,8 +50,7 @@ ENGINE_VERSION=$(git rev-parse HEAD)
 cd $WORKSPACE/.cache/repos/swconfig
 SCENARIO_VERSION=$(git rev-parse HEAD)
 cd $WORKSPACE
-#FLOATING_IP=$(cat .cache/config/inventory.ini | grep 'jumphost ansible_host' | awk '{print $2}' | cut -d'=' -f2)
-FLOATING_IP=10.10.10.10
+FLOATING_IP=$(cat .cache/config/inventory.ini | grep 'jumphost ansible_host' | awk '{print $2}' | cut -d'=' -f2)
 
 # get authentication token
 echo "API Request: http --ignore-stdin POST $NOLABS_API_TOKENS_ENDPOINT --auth dummy@dummy.com:dummy | jq -r '.token'"
@@ -59,16 +58,16 @@ NOLABS_TOKEN=$(http --ignore-stdin POST $NOLABS_API_TOKENS_ENDPOINT --auth $NOLA
 
 # update booking
 echo "API Request: http --ignore-stdin PUT $NOLABS_API_BOOKINGS_ENDPOINT/$BOOKING_ID \
-       \"Authorization:Bearer DUMMY_TOKEN\" \
-       status_text=active \
+    \"Authorization:Bearer DUMMY_TOKEN\" \
+    status_text=active \
     floating_ip=$FLOATING_IP \
     heat_stack_name=$STACK_NAME \
     scenario_deploy_log_url=${BUILD_URL}consoleFull \
     engine_version=$ENGINE_VERSION \
     scenario_version=$SCENARIO_VERSION"
 http --ignore-stdin PUT $NOLABS_API_BOOKINGS_ENDPOINT/$BOOKING_ID \
-       "Authorization:Bearer $NOLABS_TOKEN" \
-       status_text=active \
+    "Authorization:Bearer $NOLABS_TOKEN" \
+    status_text=active \
     floating_ip=$FLOATING_IP \
     heat_stack_name=$STACK_NAME \
     scenario_deploy_log_url=${BUILD_URL}consoleFull \