From 2294f19622c5e713d41ecc8a63546601863c4abf Mon Sep 17 00:00:00 2001 From: index-git Date: Fri, 26 Nov 2021 09:33:26 +0100 Subject: [PATCH 1/2] Add Micka and GeoServer error responses logging to changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2118474b..3ce26ebdd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - [#64](https://github.com/LayerManager/layman/issues/64) Responses of [GET Layers](doc/rest.md#get-layers), [GET Workspace Layers](doc/rest.md#get-workspace-layers), [GET Workspace Layer](doc/rest.md#get-workspace-layer), [PATCH Workspace Layer](doc/rest.md#patch-workspace-layer), [GET Maps](doc/rest.md#get-maps), [GET Workspace Maps](doc/rest.md#get-workspace-maps), [GET Workspace Map](doc/rest.md#get-workspace-map), [PATCH Workspace Map](doc/rest.md#patch-workspace-map) contains new attribute - `native_crs` with code of native CRS in form "EPSG:<code>", e.g. "EPSG:4326" - `native_bounding_box` with coordinates and CRS of native CRS [minx, miny, maxx, maxy, "EPSG:<code>"] +- [#489](https://github.com/LayerManager/layman/issues/489) Error responses from Micka and GeoServer are logged into log and also propagated as part of raised exception, so they can be seen from flower. ## v1.15.0 2021-11-18 From 560b51e90b680576b75d9a313a3cf8aeb8034ad6 Mon Sep 17 00:00:00 2001 From: index-git Date: Fri, 26 Nov 2021 09:39:41 +0100 Subject: [PATCH 2/2] Move wms and wfs VERSION to geoserver module --- src/geoserver/util.py | 8 ++++---- src/layman/layer/geoserver/wfs.py | 2 +- src/layman/layer/geoserver/wms.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/geoserver/util.py b/src/geoserver/util.py index 045ca3cc1..2170e4305 100644 --- a/src/geoserver/util.py +++ b/src/geoserver/util.py @@ -18,6 +18,8 @@ logger = logging.getLogger(__name__) FLASK_RULES_KEY = f"{__name__}:RULES" +WMS_VERSION = '1.3.0' +WFS_VERSION = '2.0.0' RESERVED_WORKSPACE_NAMES = [ 'default', @@ -1025,8 +1027,7 @@ def bbox_to_native_bbox(bbox): def wms_direct(wms_url, xml=None, version=None, headers=None): - from layman.layer.geoserver.wms import VERSION - version = version or VERSION + version = version or WMS_VERSION try: wms = WebMapService(wms_url, xml=xml.encode('utf-8') if xml is not None else xml, version=version, headers=headers) except requests.exceptions.HTTPError as exc: @@ -1037,8 +1038,7 @@ def wms_direct(wms_url, xml=None, version=None, headers=None): def wfs_direct(wfs_url, xml=None, version=None, headers=None): - from layman.layer.geoserver.wfs import VERSION - version = version or VERSION + version = version or WFS_VERSION try: wfs = WebFeatureService(wfs_url, xml=xml.encode('utf-8') if xml is not None else xml, version=version, headers=headers) except requests.exceptions.HTTPError as exc: diff --git a/src/layman/layer/geoserver/wfs.py b/src/layman/layer/geoserver/wfs.py index c9d3fdf0c..d3e9f110a 100644 --- a/src/layman/layer/geoserver/wfs.py +++ b/src/layman/layer/geoserver/wfs.py @@ -15,7 +15,7 @@ FLASK_PROXY_KEY = f'{__name__}:PROXY:{{workspace}}' PATCH_MODE = patch_mode.DELETE_IF_DEPENDANT -VERSION = '2.0.0' +VERSION = gs_util.WFS_VERSION get_publication_uuid = empty_method_returns_none pre_publication_action_check = empty_method diff --git a/src/layman/layer/geoserver/wms.py b/src/layman/layer/geoserver/wms.py index d1c383913..71db774f8 100644 --- a/src/layman/layer/geoserver/wms.py +++ b/src/layman/layer/geoserver/wms.py @@ -16,7 +16,7 @@ DEFAULT_GEOTIFF_STORE_PREFIX = 'geotiff' PATCH_MODE = patch_mode.DELETE_IF_DEPENDANT -VERSION = '1.3.0' +VERSION = gs_util.WMS_VERSION pre_publication_action_check = empty_method post_layer = empty_method