Issue Support env var `CP_CAP_SHARE_FS_SIZE` to specify share lustre size
@@ -20,7 +20,13 @@ REQUEST_FOLDER_FOR_ID="$2"
REQUEST_TYPE="$3"
FS_SETUP_TASK="$4"
-_MOUNT_STORAGE_JSON=$(curl -k -s --fail -X $REQUEST_TYPE --header "Authorization: Bearer $API_TOKEN" $API/lustre/$REQUEST_FOLDER_FOR_ID)
+if [ "$REQUEST_TYPE" == "POST" ] && [ ! -z "$CP_CAP_SHARE_FS_SIZE" ] ; then
+ _SIZE_REQUEST="?size=${CP_CAP_SHARE_FS_SIZE}"
+else
+ _SIZE_REQUEST=""
+fi
+
+_MOUNT_STORAGE_JSON=$(curl -k -s --fail -X $REQUEST_TYPE --header "Authorization: Bearer $API_TOKEN" $API/lustre/${REQUEST_FOLDER_FOR_ID}${_SIZE_REQUEST})
_STORAGE_PATH=$(echo "$_MOUNT_STORAGE_JSON" | jq -r '.payload.mountPath')
_MOUNT_OPTIONS=$(echo "$_MOUNT_STORAGE_JSON" | jq -r '.payload.mountOptions')
_STORAGE_STATUS=$(echo "$_MOUNT_STORAGE_JSON" | jq -r '.payload.status')
