From b27fef3cb89071367b1de2eea8e1bf07f374b2b6 Mon Sep 17 00:00:00 2001 From: Olivier Levitt Date: Thu, 21 Nov 2024 22:18:50 +0100 Subject: [PATCH] Cleanup : remove unused region geo location (#524) --- docs/region-configuration.md | 1 - onyxia-api/src/main/resources/regions.json | 5 -- .../fr/insee/onyxia/model/region/Region.java | 46 ------------------- 3 files changed, 52 deletions(-) diff --git a/docs/region-configuration.md b/docs/region-configuration.md index 2017cf77..c276af71 100644 --- a/docs/region-configuration.md +++ b/docs/region-configuration.md @@ -32,7 +32,6 @@ See [regions.json](/onyxia-api/src/main/resources/regions.json) for a complete e | `id` | Unique name of the region | "mycloud" | | `name` | Descriptive name for the region | "mycloud region" | | `description` | Description of the region | "This region is in an awesome cloud" | -| `location` | Geographical position of the data center on which the region is supposed to run. | {lat: 48.864716, longitude: 2.349014, name: "Paris" } | | `includedGroupPattern` | Pattern of user groups considered for the user in the region. Patterns are case-sensitive. | ".*_Onyxia" | | `excludedGroupPattern` | Pattern of user groups that will not be considered for the user in the region. Patterns are case-sensitive. | ".*_BadGroup" | | `transformGroupPattern` | Indicate how to transform a group based on `includedGroupPattern` to make a project name used for a namespace or S3 bucket for example. For example with an `includedGroupPattern` of "(.*)_Onxyia" and a `transformGroupPattern` of "$1-k8s", a mygroup_Onyxia will generate a mygroup-k8s namespace. | "$1-k8s" | diff --git a/onyxia-api/src/main/resources/regions.json b/onyxia-api/src/main/resources/regions.json index 29f3afde..89107074 100644 --- a/onyxia-api/src/main/resources/regions.json +++ b/onyxia-api/src/main/resources/regions.json @@ -68,11 +68,6 @@ }, "auth": { "type": "openidconnect" - }, - "location": { - "name": "Paris", - "lat": 48.8453225, - "long": 2.3024401 } } ] diff --git a/onyxia-model/src/main/java/fr/insee/onyxia/model/region/Region.java b/onyxia-model/src/main/java/fr/insee/onyxia/model/region/Region.java index 5befa88d..e839a27a 100644 --- a/onyxia-model/src/main/java/fr/insee/onyxia/model/region/Region.java +++ b/onyxia-model/src/main/java/fr/insee/onyxia/model/region/Region.java @@ -30,9 +30,6 @@ public class Region { @Schema(description = "") private String excludedGroupPattern; - @Schema(description = "") - private Location location; - @Schema(description = "") private Services services = new Services(); @@ -105,14 +102,6 @@ public void setExcludedGroupPattern(String excludedGroupPattern) { this.excludedGroupPattern = excludedGroupPattern; } - public Location getLocation() { - return location; - } - - public void setLocation(Location location) { - this.location = location; - } - public Services getServices() { return services; } @@ -1077,41 +1066,6 @@ public void setPypiProxyUrl(String pypiProxyUrl) { } } - @Schema(description = "") - public static class Location { - - private double lat; - - @JsonProperty("long") - private double longitude; - - private String name; - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public double getLongitude() { - return longitude; - } - - public void setLongitude(double longitude) { - this.longitude = longitude; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - } - public static class Auth { private String token; private String username, password;