From 5a1705cd48ce10e63899fc37ce3d347dd50bec81 Mon Sep 17 00:00:00 2001 From: Simon Ebner Date: Tue, 16 Mar 2021 08:28:01 +0100 Subject: [PATCH] changes upload script --- Config Tests.ipynb | 79 ++++++++++++++++++++++++++-------------------- 1 file changed, 45 insertions(+), 34 deletions(-) diff --git a/Config Tests.ipynb b/Config Tests.ipynb index 74b99df..f12bdb5 100644 --- a/Config Tests.ipynb +++ b/Config Tests.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 12, "metadata": { "hide_input": false }, @@ -10,12 +10,13 @@ "source": [ "from pathlib import Path\n", "import json\n", - "import re" + "import re\n", + "import requests" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -69,7 +70,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -83,7 +84,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -99,7 +100,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -108,7 +109,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -127,6 +128,7 @@ " {'stream': 'tcp://SLAAR21-CPPM-MOT6991:9999'},\n", " {'stream': 'tcp://SLAAR21-CVME-LAS6991:9999'},\n", " {'stream': 'tcp://SARES20-CVME-01:9999'},\n", + " {'stream': 'tcp://sf-daqsync-06:9003'},\n", " {'stream': 'tcp://sf-daqsync-06:9001'},\n", " {'stream': 'tcp://sf-daqsync-06:9011'},\n", " {'stream': 'tcp://sf-daqsync-06.psi.ch:9015'},\n", @@ -495,6 +497,9 @@ " {'stream': 'tcp://daqsf-daqsync-05.psi.ch:9002',\n", " 'split': 4,\n", " 'backend': 'sf-imagebuffer'},\n", + " {'stream': 'tcp://daqsf-daqsync-06.psi.ch:9002',\n", + " 'split': 4,\n", + " 'backend': 'sf-imagebuffer'},\n", " {'stream': 'tcp://daqsf-daqsync-06.psi.ch:9000',\n", " 'split': 4,\n", " 'backend': 'sf-imagebuffer'},\n", @@ -654,7 +659,7 @@ " {'stream': 'tcp://SFTEST-CVME-DBPM1:9000'}]}" ] }, - "execution_count": 28, + "execution_count": 7, "metadata": {}, "output_type": "execute_result" } @@ -665,7 +670,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ @@ -674,7 +679,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -868,7 +873,7 @@ " 'data_reduction': {'default': [{'ttl': 'P3M', 'modulo': 1}]}}]}" ] }, - "execution_count": 29, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -879,27 +884,7 @@ }, { "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'{\"sources\": [{\"stream\": \"tcp://SIN-CVME-LAS0041:9999\"}, {\"stream\": \"tcp://SIN-CVME-LAS0042:9999\"}, {\"stream\": \"tcp://SIN-CVME-LAS0051:9999\"}, {\"stream\": \"tcp://SIN-CVME-LAS0051:9989\"}, {\"stream\": \"tcp://SIN-CVME-LAS0071:9999\"}, {\"stream\": \"tcp://SIN-CVME-LAS0201:9999\"}, {\"stream\": \"tcp://SARES21-CPCL-GES1:9999\"}, {\"stream\": \"tcp://SARES21-CPCL-GES1:9990\"}, {\"stream\": \"tcp://SARES21-CPCL-GES1:9980\"}, {\"stream\": \"tcp://SARES21-CPCL-GES1:9970\"}, {\"stream\": \"tcp://SLAAR21-CPPM-MOT6991:9999\"}, {\"stream\": \"tcp://SLAAR21-CVME-LAS6991:9999\"}, {\"stream\": \"tcp://SARES20-CVME-01:9999\"}, {\"stream\": \"tcp://sf-daqsync-06:9001\"}, {\"stream\": \"tcp://sf-daqsync-06:9011\"}, {\"stream\": \"tcp://sf-daqsync-06.psi.ch:9015\"}, {\"stream\": \"tcp://sf-daqsync-06.psi.ch:9016\"}, {\"stream\": \"tcp://sf-daqsync-06.psi.ch:9017\"}, {\"stream\": \"tcp://sf-daqsync-06.psi.ch:9018\"}, {\"stream\": \"tcp://SINLH01-CVME-DBAM12:9999\"}, {\"stream\": \"tcp://S10BC01-CVME-DBAM32:9999\"}, {\"stream\": \"tcp://SARCL01-CVME-DBAM42:9999\"}, {\"stream\": \"tcp://SARUN20-CVME-DBAM52:9999\"}, {\"stream\": \"tcp://sf-daqsync-02:8889\"}, {\"stream\": \"tcp://SIN-CVME-MPS0151:9999\"}, {\"stream\": \"tcp://SLAAR-CVME-LAS6861:9999\"}, {\"stream\": \"tcp://SLAAR-CVME-LAS6891:9999\"}, {\"stream\": \"tcp://SIN-CVME-TIFGUN:9999\"}, {\"stream\": \"tcp://SFTEST-CVME-CON1331:9999\"}, {\"stream\": \"tcp://SAR-CVME-TIFALL4:9999\"}, {\"stream\": \"tcp://SAR-CVME-TIFALL5:9999\"}, {\"stream\": \"tcp://SAT-CVME-TIFALL5:9999\"}, {\"stream\": \"tcp://SAT-CVME-TIFALL6:9999\"}, {\"stream\": \"tcp://SINEG01-CVME-DICT009:9999\"}, {\"stream\": \"tcp://S10DI01-CVME-DICT113:9999\"}, {\"stream\": \"tcp://SATDI01-CVME-DICT344:9999\"}, {\"stream\": \"tcp://SATBD02-CVME-DICT499:9999\"}, {\"stream\": \"tcp://SARMA01-CVME-DICT482:9999\"}, {\"stream\": \"tcp://SARBD01-CVME-DICT599:9999\"}, {\"stream\": \"tcp://sates20-cvme-maloja1:9999\"}, {\"stream\": \"tcp://sates21-cpcl-ges1:9999\"}, {\"stream\": \"tcp://sates21-cpcl-ges1:9989\"}, {\"stream\": \"tcp://sf-daqsync-04.psi.ch:9001\"}, {\"stream\": \"tcp://sf-daqsync-04.psi.ch:9011\"}, {\"stream\": \"tcp://SINEG01-CVME-DBLM009:9999\"}, {\"stream\": \"tcp://SINLH02-CVME-DBLM018:9999\"}, {\"stream\": \"tcp://SINDI02-CVME-DBLM084:9999\"}, {\"stream\": \"tcp://S10DI01-CVME-DBLM113:9999\"}, {\"stream\": \"tcp://S10CB04-CVME-DBLM130:9999\"}, {\"stream\": \"tcp://S10CB06-CVME-DBLM153:9999\"}, {\"stream\": \"tcp://S10CB08-CVME-DBLM170:9999\"}, {\"stream\": \"tcp://S10BC01-CVME-DBLM184:9999\"}, {\"stream\": \"tcp://S20CB02-CVME-DBLM234:9999\"}, {\"stream\": \"tcp://S20CB04-CVME-DBLM255:9999\"}, {\"stream\": \"tcp://S20SY03-CVME-DBLM269:9999\"}, {\"stream\": \"tcp://S20SY03-CVME-DBLM292:9999\"}, {\"stream\": \"tcp://S30CB02-CVME-DBLM310:9999\"}, {\"stream\": \"tcp://SATCL01-CVME-DBLM328:9999\"}, {\"stream\": \"tcp://SATDI01-CVME-DBLM344:9999\"}, {\"stream\": \"tcp://SATCB01-CVME-DBLM355:9999\"}, {\"stream\": \"tcp://S30CB10-CVME-DBLM381:9999\"}, {\"stream\": \"tcp://S30CB14-CVME-DBLM417:9999\"}, {\"stream\": \"tcp://SARCL02-CVME-DBLM457:9999\"}, {\"stream\": \"tcp://SARCL02-CVME-DBLM469:9999\"}, {\"stream\": \"tcp://SARMA01-CVME-DBLM482:9999\"}, {\"stream\": \"tcp://SARUN01-CVME-DBLM499:9999\"}, {\"stream\": \"tcp://SARUN04-CVME-DBLM516:9999\"}, {\"stream\": \"tcp://SARUN08-CVME-DBLM537:9999\"}, {\"stream\": \"tcp://SARUN11-CVME-DBLM546:9999\"}, {\"stream\": \"tcp://SARUN13-CVME-DBLM555:9999\"}, {\"stream\": \"tcp://SARUN15-CVME-DBLM567:9999\"}, {\"stream\": \"tcp://SARUN20-CVME-DBLM599:9999\"}, {\"stream\": \"tcp://S20CB04-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB01-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB02-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB03-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB04-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB05-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB06-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB07-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB08-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB09-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB10-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB11-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB12-CVME-ILK:9000\"}, {\"stream\": \"tcp://S30CB13-CVME-ILK:9000\"}, {\"stream\": \"tcp://sf-ecmc-04.psi.ch:9999\"}, {\"stream\": \"tcp://SINEG01-CVME-ILK:9999\"}, {\"stream\": \"tcp://SINSB01-CVME-ILK:9999\"}, {\"stream\": \"tcp://SINSB02-CVME-ILK:9999\"}, {\"stream\": \"tcp://SINSB03-CVME-ILK:9999\"}, {\"stream\": \"tcp://SINSB04-CVME-ILK:9999\"}, {\"stream\": \"tcp://SINXB01-CVME-ILK:9999\"}, {\"stream\": \"tcp://SINDI01-CVME-ILK:9999\"}, {\"stream\": \"tcp://S10CB01-CVME-ILK:9999\"}, {\"stream\": \"tcp://S10CB02-CVME-ILK:9999\"}, {\"stream\": \"tcp://S10CB03-CVME-ILK:9999\"}, {\"stream\": \"tcp://S10CB04-CVME-ILK:9999\"}, {\"stream\": \"tcp://S10CB05-CVME-ILK:9999\"}, {\"stream\": \"tcp://S10CB06-CVME-ILK:9999\"}, {\"stream\": \"tcp://S10CB07-CVME-ILK:9999\"}, {\"stream\": \"tcp://S10CB08-CVME-ILK:9999\"}, {\"stream\": \"tcp://S10CB09-CVME-ILK:9999\"}, {\"stream\": \"tcp://S20CB01-CVME-ILK:9999\"}, {\"stream\": \"tcp://S20CB02-CVME-ILK:9999\"}, {\"stream\": \"tcp://S20CB03-CVME-ILK:9999\"}, {\"stream\": \"tcp://S20CB04-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB01-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB02-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB03-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB04-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB05-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB06-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB07-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB08-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB09-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB10-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB11-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB12-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB13-CVME-ILK:9999\"}, {\"stream\": \"tcp://S30CB14-CVME-ILK:9999\"}, {\"stream\": \"tcp://SATCB01-CVME-ILK:9999\"}, {\"stream\": \"tcp://SINEGTS-CVME-ILK:9999\"}, {\"stream\": \"tcp://SAROP11-CPCL-PALM118:9990\"}, {\"stream\": \"tcp://SAROP11-CPCL-PALM118:9999\"}, {\"stream\": \"tcp://SAROP21-CPCL-PALM134:9999\"}, {\"stream\": \"tcp://SINBC02-CVME-DBCM077:9999\"}, {\"stream\": \"tcp://SINDI02-CVME-DCDR083:9999\"}, {\"stream\": \"tcp://S10MA01-CVME-DCDR216:9999\"}, {\"stream\": \"tcp://daqsf-sioc-cs-01.psi.ch:8160\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:8020\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:8030\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:8040\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9020\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9030\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9040\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9050\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9060\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9070\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9080\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9100\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9110\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9120\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9130\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9140\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9150\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9160\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9170\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9180\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-11.psi.ch:9190\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-12.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-12.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-13.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-13.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-14.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-14.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-14.psi.ch:9020\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-21.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-21.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-31.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-31.psi.ch:9020\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-31.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-41.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-41.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-51.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-61.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-61.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-62.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-62.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-63.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-63.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-64.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-64.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-65.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-65.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-65.psi.ch:9020\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9020\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9030\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9040\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9050\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9060\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9070\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9090\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9100\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9120\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9130\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9140\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9150\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-74.psi.ch:9160\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-81.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-81.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-81.psi.ch:9030\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-81.psi.ch:8080\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-83.psi.ch:8060\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-83.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-83.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-83.psi.ch:9020\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-84.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-c2.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-c2.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-c2.psi.ch:9020\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-c2.psi.ch:9030\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-c2.psi.ch:9040\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-c2.psi.ch:9050\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-c2.psi.ch:9060\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-sioc-cs-c2.psi.ch:9070\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-daqsync-05.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-daqsync-05.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-daqsync-05.psi.ch:9002\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-daqsync-06.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-daqsync-06.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-daqsync-04.psi.ch:9000\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-daqsync-04.psi.ch:9010\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-daqsync-02.psi.ch:8890\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://daqsf-daqsync-06.psi.ch:9005\", \"split\": 4, \"backend\": \"sf-imagebuffer\"}, {\"stream\": \"tcp://SARES11-CPCL-GES1:9999\"}, {\"stream\": \"tcp://SARES11-CPCL-GES1:9990\"}, {\"stream\": \"tcp://SARES11-CPCL-GES1:9980\"}, {\"stream\": \"tcp://SARES11-CPCL-GES1:9970\"}, {\"stream\": \"tcp://SLAAR11-CPPM-MOT6891:9999\"}, {\"stream\": \"tcp://SLAAR11-CVME-LAS6891:9999\"}, {\"stream\": \"tcp://SARES11-CVME-PRIME1:9999\"}, {\"stream\": \"tcp://SARES12-CPCL-GES1:9999\"}, {\"stream\": \"tcp://SARES12-CVME-FLEX1:9999\"}, {\"stream\": \"tcp://SARES11-CPPM-MOT6912:9999\"}, {\"stream\": \"tcp://SARES12-CPPM-MOT6952:9999\"}, {\"stream\": \"tcp://sf-daqsync-05:9001\"}, {\"stream\": \"tcp://sf-daqsync-05:9011\"}, {\"stream\": \"tcp://sf-daqsync-05:9003\"}, {\"stream\": \"tcp://sf-sioc-cs-61:9030\"}, {\"stream\": \"tcp://SIN-CPPM-MOT0841:9999\"}, {\"stream\": \"tcp://S10-CPPM-MOT0991:9999\"}, {\"stream\": \"tcp://S10-CPPM-MOT1531:9999\"}, {\"stream\": \"tcp://S10-CPPM-MOT2161:9999\"}, {\"stream\": \"tcp://S20-CPPM-MOT2551:9999\"}, {\"stream\": \"tcp://S30-CPPM-MOT3101:9999\"}, {\"stream\": \"tcp://SAT-CPPM-MOT3391:9999\"}, {\"stream\": \"tcp://SAT-CPPM-MOT4001:9999\"}, {\"stream\": \"tcp://SAR-CPPM-MOT4693:9999\"}, {\"stream\": \"tcp://SAT-CPPM-MOT4891:9999\"}, {\"stream\": \"tcp://SAR-CPPM-MOT5631:9999\"}, {\"stream\": \"tcp://SINEG01-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://SINEG01-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://SINSB01-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://SINSB01-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://SINSB02-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://SINSB02-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://SINSB03-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://SINSB03-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://SINSB04-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://SINSB04-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://SINXB01-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://SINXB01-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://SINDI01-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://SINDI01-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S10CB01-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S10CB01-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S10CB02-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S10CB02-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S10CB03-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S10CB03-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S10CB04-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S10CB04-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S10CB05-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S10CB05-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S10CB06-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S10CB06-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S10CB07-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S10CB07-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S10CB08-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S10CB08-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S10CB09-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S10CB09-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S20CB01-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S20CB01-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S20CB02-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S20CB02-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S20CB03-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S20CB03-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S20CB04-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S20CB04-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB01-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB01-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB02-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB02-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB03-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB03-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB04-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB04-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB05-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB05-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB06-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB06-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB07-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB07-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB08-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB08-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB09-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB09-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB10-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB10-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB11-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB11-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB12-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB12-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB13-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB13-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://S30CB14-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://S30CB14-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://SATCB01-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://SATCB01-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://SINEGTS-CVME-LLRF1:20000\"}, {\"stream\": \"tcp://SINEGTS-CVME-LLRF2:20000\"}, {\"stream\": \"tcp://SARFE10-CVME-PHO6211:9999\"}, {\"stream\": \"tcp://SARFE10-CVME-PHO6212:9999\"}, {\"stream\": \"tcp://SARFE10-CVME-PBIG050:9999\"}, {\"stream\": \"tcp://SAROP11-CVME-PBPS1:9999\"}, {\"stream\": \"tcp://SAROP11-CVME-PBPS2:9999\"}, {\"stream\": \"tcp://SAROP21-CVME-PBPS1:9999\"}, {\"stream\": \"tcp://SAROP21-CVME-PBPS2:9999\"}, {\"stream\": \"tcp://SAROP21-CVME-PBPS3:9999\"}, {\"stream\": \"SATFE10-CVME-PEPG046:9999\"}, {\"stream\": \"tcp://SIN-CVME-DBPM0421:9000\"}, {\"stream\": \"tcp://SIN-CVME-DBPM0422:9000\"}, {\"stream\": \"tcp://S10-CVME-DBPM1431:9000\"}, {\"stream\": \"tcp://S20-CVME-DBPM2371:9000\"}, {\"stream\": \"tcp://S30-CVME-DBPM3391:9000\"}, {\"stream\": \"tcp://S30-CVME-DBPM3392:9000\"}, {\"stream\": \"tcp://S30-CVME-DBPM4101:9000\"}, {\"stream\": \"tcp://S30-CVME-DBPM4102:9000\"}, {\"stream\": \"tcp://S30-CVME-DBPM4103:9000\"}, {\"stream\": \"tcp://SARUN-CVME-DBPM4941:9000\"}, {\"stream\": \"tcp://SARUN-CVME-DBPM4942:9000\"}, {\"stream\": \"tcp://SARUN-CVME-DBPM5411:9000\"}, {\"stream\": \"tcp://SARUN-CVME-DBPM5412:9000\"}, {\"stream\": \"tcp://SATUN06-DBPM-DIA4261:9000\"}, {\"stream\": \"tcp://SATUN06-DBPM-DIA4261:9002\"}, {\"stream\": \"tcp://SATUN06-DBPM-DIA4261:9004\"}, {\"stream\": \"tcp://SATUN06-DBPM-DIA4261:9006\"}, {\"stream\": \"tcp://SATUN06-DBPM-DIA4262:9000\"}, {\"stream\": \"tcp://SATUN06-DBPM-DIA4262:9002\"}, {\"stream\": \"tcp://SATUN06-DBPM-DIA4262:9004\"}, {\"stream\": \"tcp://SATUN06-DBPM-DIA4262:9006\"}, {\"stream\": \"tcp://SATMA01-DBPM-DIA3901:9000\"}, {\"stream\": \"tcp://SATMA01-DBPM-DIA3901:9002\"}, {\"stream\": \"tcp://SATMA01-DBPM-DIA3902:9000\"}, {\"stream\": \"tcp://SATMA01-DBPM-DIA3902:9004\"}, {\"stream\": \"tcp://SATMA01-DBPM-DIA4191:9000\"}, {\"stream\": \"tcp://SATMA01-DBPM-DIA4191:9002\"}, {\"stream\": \"tcp://SATMA01-DBPM-DIA4191:9004\"}, {\"stream\": \"tcp://SATMA01-DBPM-DIA4191:9006\"}, {\"stream\": \"tcp://SATUN21-DBPM-DIA4711:9004\"}, {\"stream\": \"tcp://SATUN21-DBPM-DIA4711:9006\"}, {\"stream\": \"tcp://SFTEST-CVME-DBPM1:9000\"}]}'" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "json.dumps(upload_config)" - ] - }, - { - "cell_type": "code", - "execution_count": 30, + "execution_count": 23, "metadata": {}, "outputs": [], "source": [ @@ -910,11 +895,12 @@ "\n", "def upload(sources, policies):\n", " upload_url = \"https://dispatcher-api.psi.ch/sf/configuration/upload\"\n", + "# upload_url = \"http://localhost:1234\"\n", " \n", "# upload_files = [(\"all.sources\", open(\"my_file.txt\", \"rb\")),\n", "# (\"all.policies\", open(\"my_file_2.txt\", \"rb\"))]\n", - " upload_files = [(\"file\", (\"all.sources\", StringIO(json.dumps(sources)))),\n", - " (\"file\", (\"all.policies\", StringIO(json.dumps(policies))))]\n", + " upload_files = [(\"files\", (\"all.sources\", StringIO(json.dumps(sources)))),\n", + " (\"files\", (\"all.policies\", StringIO(json.dumps(policies))))]\n", "\n", " test_response = requests.post(upload_url, files = upload_files)\n", "\n", @@ -925,6 +911,31 @@ " print(\"Something went wrong!\")" ] }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Upload completed successfully!\n", + "\n" + ] + } + ], + "source": [ + "upload(sources, policies)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": null,