Skip to content
Snippets Groups Projects
Commit a95877d1 authored by Gunnar Schaefer's avatar Gunnar Schaefer
Browse files

Align upload enpoints with updated reaper

parent edf911da
No related branches found
No related tags found
No related merge requests found
......@@ -80,9 +80,6 @@ routes = [
webapp2.Route(r'/api', root.Root),
webapp2_extras.routes.PathPrefixRoute(r'/api', [
webapp2.Route(r'/download', download.Download, handler_method='download', methods=['GET', 'POST'], name='download'),
# webapp2.Route(r'/reaper', upload.Upload, handler_method='reaper', methods=['POST']),
# upload take a parameter type with possible values ['label', 'uid'] default to 'label'
webapp2.Route(r'/uploader', upload.Upload, handler_method='upload', methods=['POST'], defaults={'strategy': 'label'}),
webapp2.Route(r'/upload/<strategy:label|uid>', upload.Upload, handler_method='upload', methods=['POST']),
webapp2.Route(r'/engine', upload.Upload, handler_method='engine', methods=['POST']),
webapp2.Route(r'/sites', centralclient.CentralClient, handler_method='sites', methods=['GET']),
......
......@@ -31,6 +31,7 @@ SCITRAN_PERSISTENT_DATA_PATH=${SCITRAN_PERSISTENT_DATA_PATH:-"$SCITRAN_PERSISTEN
SCITRAN_PERSISTENT_DB_PATH=${SCITRAN_PERSISTENT_DB_PATH:-"$SCITRAN_PERSISTENT_PATH/db"}
SCITRAN_PERSISTENT_DB_PORT=${SCITRAN_PERSISTENT_DB_PORT:-"9001"}
SCITRAN_PERSISTENT_DB_URI=${SCITRAN_PERSISTENT_DB_URI:-"mongodb://localhost:$SCITRAN_PERSISTENT_DB_PORT/scitran"}
SCITRAN_CORE_DRONE_SECRET=${SCITRAN_CORE_DRONE_SECRET:-"change-me"}
[ -z "$SCITRAN_RUNTIME_SSL_PEM" ] && SCITRAN_SITE_API_URL="http" || SCITRAN_SITE_API_URL="https"
SCITRAN_SITE_API_URL="$SCITRAN_SITE_API_URL://$SCITRAN_RUNTIME_HOST:$SCITRAN_RUNTIME_PORT/api"
......@@ -154,10 +155,7 @@ trap "{
# Wait for everything to come up
sleep 1
sleep 2
# Boostrap users and groups
......@@ -184,7 +182,7 @@ if [ -f "$SCITRAN_PERSISTENT_DATA_PATH/.bootstrapped" ]; then
echo "Persistence store exists at $SCITRAN_PERSISTENT_PATH/data. Not bootstrapping data. Remove to re-bootstrap."
else
echo "Bootstrapping testdata"
folder_reaper --insecure --secret "$SCITRAN_CORE_DRONE_SECRET" $SCITRAN_SITE_API_URL "$SCITRAN_PERSISTENT_PATH/testdata"
folder_uploader --insecure --secret "$SCITRAN_CORE_DRONE_SECRET" $SCITRAN_SITE_API_URL "$SCITRAN_PERSISTENT_PATH/testdata"
echo "Bootstrapped testdata"
touch "$SCITRAN_PERSISTENT_DATA_PATH/.bootstrapped"
fi
......
......@@ -25,7 +25,7 @@ bootstrap_data_label=7d5c3608ff360d6ae28aab0ef262e6781c4ae8d6
# Same as bootstrap_data_label above, except for scitran/reaper.
bootstrap_reaper_label=d809c4a01d83ea7faf3987a0a3ffde053118d3a1
bootstrap_reaper_label=c67502a73e5a297c45aa170f163d0884fb1d3f35
# Move to API folder for relative path assumptions later on
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment