{ "cells": [ { "cell_type": "markdown", "id": "ad36ae4c-6359-41f6-b9c5-971c96a678f0", "metadata": {}, "source": [ "# GNA : MOSI UseCase\n", "\n", "This notebooks provides a testing bed and configuration utility for GNA - MOSI use case served by gCube CMS Suite, by:\n", "\n", "- Creating UCD from schema URL\n", "- Registering MOSI UCD in corrent gCube Context\n", "- Parsing and registration of MOSI records from CSV (if provided)\n", "- Publication of registered MOSI records\n", "- Deletion of registered MOSI records\n", "\n", "NB This notebook relies on commons.ipynb distributed along with gCube CMS Suite" ] }, { "cell_type": "markdown", "id": "f82576d0-5896-4c6f-ad55-bef0bff21fdb", "metadata": { "jp-MarkdownHeadingCollapsed": true, "tags": [] }, "source": [ "## Parameters Initialization" ] }, { "cell_type": "code", "execution_count": 32, "id": "ca65023e-ae07-45de-ba75-4d39d66df53b", "metadata": { "tags": [] }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Requirement already satisfied: simplejson in /opt/conda/lib/python3.9/site-packages (3.17.6)\n", "Requirement already satisfied: rich[jupyter] in /opt/conda/lib/python3.9/site-packages (12.2.0)\n", "Requirement already satisfied: pygments<3.0.0,>=2.6.0 in /opt/conda/lib/python3.9/site-packages (from rich[jupyter]) (2.11.2)\n", "Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in /opt/conda/lib/python3.9/site-packages (from rich[jupyter]) (0.9.1)\n", "Requirement already satisfied: ipywidgets<8.0.0,>=7.5.1 in /opt/conda/lib/python3.9/site-packages (from rich[jupyter]) (7.7.0)\n", "Requirement already satisfied: jupyterlab-widgets>=1.0.0 in /opt/conda/lib/python3.9/site-packages (from ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (1.1.0)\n", "Requirement already satisfied: ipython-genutils~=0.2.0 in /opt/conda/lib/python3.9/site-packages (from ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.2.0)\n", "Requirement already satisfied: traitlets>=4.3.1 in /opt/conda/lib/python3.9/site-packages (from ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (5.1.1)\n", "Requirement already satisfied: widgetsnbextension~=3.6.0 in /opt/conda/lib/python3.9/site-packages (from ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (3.6.0)\n", "Requirement already satisfied: ipython>=4.0.0 in /opt/conda/lib/python3.9/site-packages (from ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (8.2.0)\n", "Requirement already satisfied: ipykernel>=4.5.1 in /opt/conda/lib/python3.9/site-packages (from ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (6.11.0)\n", "Requirement already satisfied: nbformat>=4.2.0 in /opt/conda/lib/python3.9/site-packages (from ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (5.2.0)\n", "Requirement already satisfied: tornado>=6.1 in /opt/conda/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (6.1)\n", "Requirement already satisfied: setuptools>=60 in /opt/conda/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (61.3.1)\n", "Requirement already satisfied: nest-asyncio in /opt/conda/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (1.5.5)\n", "Requirement already satisfied: matplotlib-inline>=0.1 in /opt/conda/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.1.3)\n", "Requirement already satisfied: psutil in /opt/conda/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (5.9.0)\n", "Requirement already satisfied: jupyter-client>=6.1.12 in /opt/conda/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (7.2.1)\n", "Requirement already satisfied: debugpy>=1.0 in /opt/conda/lib/python3.9/site-packages (from ipykernel>=4.5.1->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (1.5.1)\n", "Requirement already satisfied: backcall in /opt/conda/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.2.0)\n", "Requirement already satisfied: stack-data in /opt/conda/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.2.0)\n", "Requirement already satisfied: jedi>=0.16 in /opt/conda/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.18.1)\n", "Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /opt/conda/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (3.0.27)\n", "Requirement already satisfied: pickleshare in /opt/conda/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.7.5)\n", "Requirement already satisfied: pexpect>4.3 in /opt/conda/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (4.8.0)\n", "Requirement already satisfied: decorator in /opt/conda/lib/python3.9/site-packages (from ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (5.1.1)\n", "Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in /opt/conda/lib/python3.9/site-packages (from nbformat>=4.2.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (4.4.0)\n", "Requirement already satisfied: jupyter-core in /opt/conda/lib/python3.9/site-packages (from nbformat>=4.2.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (4.9.2)\n", "Requirement already satisfied: notebook>=4.4.1 in /opt/conda/lib/python3.9/site-packages (from widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (6.4.10)\n", "Requirement already satisfied: parso<0.9.0,>=0.8.0 in /opt/conda/lib/python3.9/site-packages (from jedi>=0.16->ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.8.3)\n", "Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /opt/conda/lib/python3.9/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.18.1)\n", "Requirement already satisfied: attrs>=17.4.0 in /opt/conda/lib/python3.9/site-packages (from jsonschema!=2.5.0,>=2.4->nbformat>=4.2.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (21.4.0)\n", "Requirement already satisfied: python-dateutil>=2.8.2 in /opt/conda/lib/python3.9/site-packages (from jupyter-client>=6.1.12->ipykernel>=4.5.1->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (2.8.2)\n", "Requirement already satisfied: pyzmq>=22.3 in /opt/conda/lib/python3.9/site-packages (from jupyter-client>=6.1.12->ipykernel>=4.5.1->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (22.3.0)\n", "Requirement already satisfied: entrypoints in /opt/conda/lib/python3.9/site-packages (from jupyter-client>=6.1.12->ipykernel>=4.5.1->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.4)\n", "Requirement already satisfied: argon2-cffi in /opt/conda/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (21.3.0)\n", "Requirement already satisfied: nbconvert>=5 in /opt/conda/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (6.4.5)\n", "Requirement already satisfied: Send2Trash>=1.8.0 in /opt/conda/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (1.8.0)\n", "Requirement already satisfied: terminado>=0.8.3 in /opt/conda/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.13.3)\n", "Requirement already satisfied: jinja2 in /opt/conda/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (3.1.1)\n", "Requirement already satisfied: prometheus-client in /opt/conda/lib/python3.9/site-packages (from notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.13.1)\n", "Requirement already satisfied: ptyprocess>=0.5 in /opt/conda/lib/python3.9/site-packages (from pexpect>4.3->ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.7.0)\n", "Requirement already satisfied: wcwidth in /opt/conda/lib/python3.9/site-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.2.5)\n", "Requirement already satisfied: asttokens in /opt/conda/lib/python3.9/site-packages (from stack-data->ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (2.0.5)\n", "Requirement already satisfied: executing in /opt/conda/lib/python3.9/site-packages (from stack-data->ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.8.3)\n", "Requirement already satisfied: pure-eval in /opt/conda/lib/python3.9/site-packages (from stack-data->ipython>=4.0.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.2.2)\n", "Requirement already satisfied: mistune<2,>=0.8.1 in /opt/conda/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.8.4)\n", "Requirement already satisfied: testpath in /opt/conda/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.6.0)\n", "Requirement already satisfied: defusedxml in /opt/conda/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.7.1)\n", "Requirement already satisfied: beautifulsoup4 in /opt/conda/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (4.10.0)\n", "Requirement already satisfied: bleach in /opt/conda/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (4.1.0)\n", "Requirement already satisfied: MarkupSafe>=2.0 in /opt/conda/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (2.1.1)\n", "Requirement already satisfied: jupyterlab-pygments in /opt/conda/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.1.2)\n", "Requirement already satisfied: pandocfilters>=1.4.1 in /opt/conda/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (1.5.0)\n", "Requirement already satisfied: nbclient<0.6.0,>=0.5.0 in /opt/conda/lib/python3.9/site-packages (from nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.5.13)\n", "Requirement already satisfied: six>=1.5 in /opt/conda/lib/python3.9/site-packages (from python-dateutil>=2.8.2->jupyter-client>=6.1.12->ipykernel>=4.5.1->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (1.16.0)\n", "Requirement already satisfied: argon2-cffi-bindings in /opt/conda/lib/python3.9/site-packages (from argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (21.2.0)\n", "Requirement already satisfied: cffi>=1.0.1 in /opt/conda/lib/python3.9/site-packages (from argon2-cffi-bindings->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (1.15.0)\n", "Requirement already satisfied: soupsieve>1.2 in /opt/conda/lib/python3.9/site-packages (from beautifulsoup4->nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (2.3.1)\n", "Requirement already satisfied: webencodings in /opt/conda/lib/python3.9/site-packages (from bleach->nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (0.5.1)\n", "Requirement already satisfied: packaging in /opt/conda/lib/python3.9/site-packages (from bleach->nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (21.3)\n", "Requirement already satisfied: pycparser in /opt/conda/lib/python3.9/site-packages (from cffi>=1.0.1->argon2-cffi-bindings->argon2-cffi->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (2.21)\n", "Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /opt/conda/lib/python3.9/site-packages (from packaging->bleach->nbconvert>=5->notebook>=4.4.1->widgetsnbextension~=3.6.0->ipywidgets<8.0.0,>=7.5.1->rich[jupyter]) (3.0.7)\n" ] } ], "source": [ "%run commons.ipynb\n", "# These parameters should be discovered / initialized by common gcube libraries. \n", "gcube_token = \"3aa85bbf-d5f3-4df4-ad03-4f8f788eba3d-98187548\"\n", "service_base_endpoint =\"https://geoportal.dev.int.d4science.net/geoportal-service/srv\"\n", "\n", "# Actual customizable parameters\n", "ucid = \"GNA-MOSI\"\n", "gpkgFile = \"templateItalia.gpkg\"\n", "verbose=False\n", "\n", "#NB The following should not be changed \n", "projects_endpoint = service_base_endpoint + \"/projects/\"+ucid\n", "ucds_endpoint = service_base_endpoint + \"/ucd/\"\n", "ucd_endpoint = ucds_endpoint+ucid\n", "plugins_endpoint=service_base_endpoint + \"/plugins/\"" ] }, { "cell_type": "code", "execution_count": 4, "id": "a3fae252-963e-4a20-9968-e906d3709681", "metadata": {}, "outputs": [], "source": [ "# Init parameters\n", "UCD = {\n", " \"_id\" : ucid,\n", " \"_mongoId\":None,\n", " \"_version\" : \"1.0.0\",\n", " \"_name\" : \"GNA : MOSI\",\n", " \"_description\" : \"Modulistica siti\",\n", " \"_handlers\" : []\n", "}" ] }, { "cell_type": "markdown", "id": "c43579c9-0c2c-4e30-a1c6-0565f27f9a55", "metadata": { "jp-MarkdownHeadingCollapsed": true, "tags": [] }, "source": [ "## UCD Definition and Registration" ] }, { "cell_type": "code", "execution_count": 25, "id": "5e591ce5-0341-4d77-a6ff-08cdfd90b566", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "{'_mongoId': '626a972102ad3d3b47050dfd',\n", " '_id': 'GNA-MOSI',\n", " '_version': '1.0.0',\n", " '_name': 'GNA : MOSI',\n", " '_description': 'Modulistica siti',\n", " '_creationInfo': None,\n", " '_schema': None,\n", " '_handlers': [{'_id': 'DEFAULT-SINGLE-STEP',\n", " '_type': 'LifecycleManagement',\n", " '_configuration': {'step_access': [{'STEP': 'PUBLISH', 'roles': []}]}},\n", " {'_id': 'SDI-Indexer-Plugin',\n", " '_type': 'Indexer',\n", " '_configuration': {'explicitFieldMapping': [],\n", " 'additionalLayers': [{'source': {'url': '...'}, 'toSetTitle': ''}]}}],\n", " '_dataAccessPolicies': [{'_policy': {'_write': 'own', '_read': 'any'},\n", " '_roles': [],\n", " '_enforcer': None}]}" ] }, "execution_count": 25, "metadata": {}, "output_type": "execute_result" } ], "source": [ "#Check if already existing\n", "send(method=\"GET\",dest=ucd_endpoint)" ] }, { "cell_type": "code", "execution_count": null, "id": "7c0a9d27-86d3-4a9c-a51a-c47a80f2cadc", "metadata": {}, "outputs": [], "source": [ "# should read schema from git repo\n", "schema_url=\"https://code-repo.d4science.org/gCubeSystem/gcube-cms-suite/raw/branch/%2322686/test-data/profiledDocuments/schemas/MOSI-schema.json\"\n", "schema=send(method=\"GET\",dest=schema_url)\n", "#NB Cannot set schema from gpkg.MOSI if we want it structured\n", "#with fiona.open(gpkgFile, layer='MOSI_multipolygon') as layer:\n", "# feature = layer[0]\n", " #feature is GeoJSON\n", "UCD.update({\"_schema\" :schema})" ] }, { "cell_type": "code", "execution_count": 6, "id": "44280c2e-e513-4aec-825a-b4f9504ad35b", "metadata": {}, "outputs": [], "source": [ "#TODO DEFINE ROLES\n", "UCD.update({\"_dataAccessPolicies\" : [\n", " {\"_policy\" : {\"_read\" : \"any\", \"_write\" : \"own\"}, \"_roles\":[]},\n", " ]})" ] }, { "cell_type": "code", "execution_count": 7, "id": "9e3afe4a-a301-4eea-acd3-95cb03dd26b1", "metadata": {}, "outputs": [], "source": [ "# UPDATE Lifecycle Settings\n", "UCD[\"_handlers\"].append({\n", " \"_id\" : \"DEFAULT-SINGLE-STEP\",\n", " \"_type\" : \"LifecycleManagement\",\n", " \"_configuration\" : {\n", " \"step_access\" : [\n", " {\"STEP\" : \"PUBLISH\", \"roles\" :[]}\n", " ]\n", " }\n", " })" ] }, { "cell_type": "code", "execution_count": 9, "id": "c6ce3205-38e7-4531-9a46-bea2d48a9321", "metadata": {}, "outputs": [], "source": [ "# UPDATE Lifecycle Settings\n", "UCD[\"_handlers\"].append({\n", " \"_id\" : \"SDI-Indexer-Plugin\",\n", " \"_type\" : \"Indexer\",\n", " \"_configuration\" : {\n", "# TODO use \n", "# \"bboxEvaluation\" : [\"$..posizionamentoScavo.._bbox\"],\n", " \"explicitFieldMapping\" : [\n", "#TODO READ FROM MOSI LAYER \n", " ],\n", " \"additionalLayers\" : [\n", "# TODO CONFIGURE Additional\n", " {\"source\" : {\"url\" : \"...\"},\"toSetTitle\":\"\"}\n", " ]\n", " }\n", " }\n", " )" ] }, { "cell_type": "code", "execution_count": 11, "id": "3e32f361-31f0-4fb7-a0dd-f4b730c94ac4", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
{\n", " \"_id\": \"GNA-MOSI\",\n", " \"_mongoId\": null,\n", " \"_version\": \"1.0.0\",\n", " \"_name\": \"GNA : MOSI\",\n", " \"_description\": \"Modulistica siti\",\n", " \"_handlers\": [\n", " {\n", " \"_id\": \"DEFAULT-SINGLE-STEP\",\n", " \"_type\": \"LifecycleManagement\",\n", " \"_configuration\": {\n", " \"step_access\": [\n", " {\n", " \"STEP\": \"PUBLISH\",\n", " \"roles\": []\n", " }\n", " ]\n", " }\n", " },\n", " {\n", " \"_id\": \"SDI-Indexer-Plugin\",\n", " \"_type\": \"Indexer\",\n", " \"_configuration\": {\n", " \"explicitFieldMapping\": [],\n", " \"additionalLayers\": [\n", " {\n", " \"source\": {\n", " \"url\": \"...\"\n", " },\n", " \"toSetTitle\": \"\"\n", " }\n", " ]\n", " }\n", " }\n", " ],\n", " \"_dataAccessPolicies\": [\n", " {\n", " \"_policy\": {\n", " \"_read\": \"any\",\n", " \"_write\": \"own\"\n", " },\n", " \"_roles\": []\n", " }\n", " ]\n", "}\n", "\n" ], "text/plain": [ "\u001b[1m{\u001b[0m\n", " \u001b[1;34m\"_id\"\u001b[0m: \u001b[32m\"GNA-MOSI\"\u001b[0m,\n", " \u001b[1;34m\"_mongoId\"\u001b[0m: \u001b[3;35mnull\u001b[0m,\n", " \u001b[1;34m\"_version\"\u001b[0m: \u001b[32m\"1.0.0\"\u001b[0m,\n", " \u001b[1;34m\"_name\"\u001b[0m: \u001b[32m\"GNA : MOSI\"\u001b[0m,\n", " \u001b[1;34m\"_description\"\u001b[0m: \u001b[32m\"Modulistica siti\"\u001b[0m,\n", " \u001b[1;34m\"_handlers\"\u001b[0m: \u001b[1m[\u001b[0m\n", " \u001b[1m{\u001b[0m\n", " \u001b[1;34m\"_id\"\u001b[0m: \u001b[32m\"DEFAULT-SINGLE-STEP\"\u001b[0m,\n", " \u001b[1;34m\"_type\"\u001b[0m: \u001b[32m\"LifecycleManagement\"\u001b[0m,\n", " \u001b[1;34m\"_configuration\"\u001b[0m: \u001b[1m{\u001b[0m\n", " \u001b[1;34m\"step_access\"\u001b[0m: \u001b[1m[\u001b[0m\n", " \u001b[1m{\u001b[0m\n", " \u001b[1;34m\"STEP\"\u001b[0m: \u001b[32m\"PUBLISH\"\u001b[0m,\n", " \u001b[1;34m\"roles\"\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m\n", " \u001b[1m}\u001b[0m\n", " \u001b[1m]\u001b[0m\n", " \u001b[1m}\u001b[0m\n", " \u001b[1m}\u001b[0m,\n", " \u001b[1m{\u001b[0m\n", " \u001b[1;34m\"_id\"\u001b[0m: \u001b[32m\"SDI-Indexer-Plugin\"\u001b[0m,\n", " \u001b[1;34m\"_type\"\u001b[0m: \u001b[32m\"Indexer\"\u001b[0m,\n", " \u001b[1;34m\"_configuration\"\u001b[0m: \u001b[1m{\u001b[0m\n", " \u001b[1;34m\"explicitFieldMapping\"\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m,\n", " \u001b[1;34m\"additionalLayers\"\u001b[0m: \u001b[1m[\u001b[0m\n", " \u001b[1m{\u001b[0m\n", " \u001b[1;34m\"source\"\u001b[0m: \u001b[1m{\u001b[0m\n", " \u001b[1;34m\"url\"\u001b[0m: \u001b[32m\"...\"\u001b[0m\n", " \u001b[1m}\u001b[0m,\n", " \u001b[1;34m\"toSetTitle\"\u001b[0m: \u001b[32m\"\"\u001b[0m\n", " \u001b[1m}\u001b[0m\n", " \u001b[1m]\u001b[0m\n", " \u001b[1m}\u001b[0m\n", " \u001b[1m}\u001b[0m\n", " \u001b[1m]\u001b[0m,\n", " \u001b[1;34m\"_dataAccessPolicies\"\u001b[0m: \u001b[1m[\u001b[0m\n", " \u001b[1m{\u001b[0m\n", " \u001b[1;34m\"_policy\"\u001b[0m: \u001b[1m{\u001b[0m\n", " \u001b[1;34m\"_read\"\u001b[0m: \u001b[32m\"any\"\u001b[0m,\n", " \u001b[1;34m\"_write\"\u001b[0m: \u001b[32m\"own\"\u001b[0m\n", " \u001b[1m}\u001b[0m,\n", " \u001b[1;34m\"_roles\"\u001b[0m: \u001b[1m[\u001b[0m\u001b[1m]\u001b[0m\n", " \u001b[1m}\u001b[0m\n", " \u001b[1m]\u001b[0m\n", "\u001b[1m}\u001b[0m\n" ] }, "metadata": {}, "output_type": "display_data" }, { "name": "stdout", "output_type": "stream", "text": [ "GOING TO SEND POST REQUEST TO https://geoportal.dev.int.d4science.net/geoportal-service/srv/ucd/\n", "Data is {'_id': 'GNA-MOSI', '_mongoId': None, '_version': '1.0.0', '_name': 'GNA : MOSI', '_description': 'Modulistica siti', '_handlers': [{'_id': 'DEFAULT-SINGLE-STEP', '_type': 'LifecycleManagement', '_configuration': {'step_access': [{'STEP': 'PUBLISH', 'roles': []}]}}, {'_id': 'SDI-Indexer-Plugin', '_type': 'Indexer', '_configuration': {'explicitFieldMapping': [], 'additionalLayers': [{'source': {'url': '...'}, 'toSetTitle': ''}]}}], '_dataAccessPolicies': [{'_policy': {'_read': 'any', '_write': 'own'}, '_roles': []}]}\n", "RESPONSE STATUS 500\n", "CAUSE \n", "
Type Status Report
Message Request failed.
Description The server encountered an unexpected condition that prevented it from fulfilling the request.