diff --git a/CHANGELOG.md b/CHANGELOG.md index cb009652e..dd2e5ea3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - NetCom SSL reimplementation: Fixed buffer handling, SSL handshake/negotiation/renegotiation - Prohibit disk accesses in DrbdLayer while SkipDisk is set +### Deprecated + +- Support for EXOS + ### Removed - Support for OpenFlex diff --git a/controller/src/main/java/com/linbit/linstor/api/rest/v1/serializer/JsonGenTypes.java b/controller/src/main/java/com/linbit/linstor/api/rest/v1/serializer/JsonGenTypes.java index 1a69bb807..ad91bee06 100644 --- a/controller/src/main/java/com/linbit/linstor/api/rest/v1/serializer/JsonGenTypes.java +++ b/controller/src/main/java/com/linbit/linstor/api/rest/v1/serializer/JsonGenTypes.java @@ -1717,15 +1717,17 @@ public static class EventNodeModified * Default settings for EXOS enclosures */ @JsonInclude(JsonInclude.Include.NON_EMPTY) + @Deprecated(forRemoval = true) public static class ExosDefaults { - public String username; - public String username_env; - public String password; - public String password_env; + @Deprecated(forRemoval = true) public String username; + @Deprecated(forRemoval = true) public String username_env; + @Deprecated(forRemoval = true) public String password; + @Deprecated(forRemoval = true) public String password_env; } @JsonInclude(JsonInclude.Include.NON_EMPTY) + @Deprecated(forRemoval = true) public static class ExosDefaultsModify extends ExosDefaults { @@ -1739,52 +1741,56 @@ public static class ExosDefaultsModify * EXOS enclosure name, controller IPs and health status */ @JsonInclude(JsonInclude.Include.NON_EMPTY) + @Deprecated(forRemoval = true) public static class ExosEnclosureHealth { - public String name; - public String ctrl_a_ip; - public String ctrl_b_ip; - public String health; - public String health_reason; + @Deprecated(forRemoval = true) public String name; + @Deprecated(forRemoval = true) public String ctrl_a_ip; + @Deprecated(forRemoval = true) public String ctrl_b_ip; + @Deprecated(forRemoval = true) public String health; + @Deprecated(forRemoval = true) public String health_reason; } /** * EXOS enclosure */ @JsonInclude(JsonInclude.Include.NON_EMPTY) + @Deprecated(forRemoval = true) public static class ExosEnclosure { - public String name; - public String ctrl_a_ip; - public String ctrl_b_ip; - public String username; - public String username_env; - public String password; - public String password_env; + @Deprecated(forRemoval = true) public String name; + @Deprecated(forRemoval = true) public String ctrl_a_ip; + @Deprecated(forRemoval = true) public String ctrl_b_ip; + @Deprecated(forRemoval = true) public String username; + @Deprecated(forRemoval = true) public String username_env; + @Deprecated(forRemoval = true) public String password; + @Deprecated(forRemoval = true) public String password_env; } /** * EXOS event */ @JsonInclude(JsonInclude.Include.NON_EMPTY) + @Deprecated(forRemoval = true) public static class ExosEnclosureEvent { - public String severity; - public String event_id; - public String controller; - public String time_stamp; - public Long time_stamp_numeric; - public String message; - public String additional_information; - public String recommended_action; + @Deprecated(forRemoval = true) public String severity; + @Deprecated(forRemoval = true) public String event_id; + @Deprecated(forRemoval = true) public String controller; + @Deprecated(forRemoval = true) public String time_stamp; + @Deprecated(forRemoval = true) public Long time_stamp_numeric; + @Deprecated(forRemoval = true) public String message; + @Deprecated(forRemoval = true) public String additional_information; + @Deprecated(forRemoval = true) public String recommended_action; } @JsonInclude(JsonInclude.Include.NON_EMPTY) + @Deprecated(forRemoval = true) public static class ExosConnectionMap { - public String node_name; - public String enclosure_name; - public List connections = Collections.emptyList(); + @Deprecated(forRemoval = true) public String node_name; + @Deprecated(forRemoval = true) public String enclosure_name; + @Deprecated(forRemoval = true) public List connections = Collections.emptyList(); } /** diff --git a/docs/rest_v1_openapi.yaml b/docs/rest_v1_openapi.yaml index 0ae71f218..01f987775 100644 --- a/docs/rest_v1_openapi.yaml +++ b/docs/rest_v1_openapi.yaml @@ -28,6 +28,7 @@ info: - Added GET /v1/files/{extFileName}/check/{node} - Added ExtFileCheckResult - Added storpool_rename to SnapshotRestore and BackupSchedule + - Deprecated EXOS entry points * 1.20.2 - Added EffectivePropertiesMap, EffectivePropertiesMapValue and PropertyWithDescription objects * 1.20.1 @@ -5671,6 +5672,7 @@ paths: $ref: '#/components/schemas/EventNodeModified' /v1/vendor/seagate/exos/defaults: get: + deprecated: true tags: - developers summary: Lists default setting for all EXOS enclosures @@ -5685,6 +5687,7 @@ paths: items: $ref: '#/components/schemas/ExosDefaults' put: + deprecated: true tags: - developers summary: modify default settings of EXOS configurations @@ -5705,6 +5708,7 @@ paths: $ref: '#/components/schemas/ExosDefaultsModify' /v1/vendor/seagate/exos/enclosures: get: + deprecated: true tags: - developers summary: List of EXOS enclosures @@ -5725,6 +5729,7 @@ paths: items: $ref: '#/components/schemas/ExosEnclosureHealth' post: + deprecated: true tags: - developers summary: creates a new enclosure @@ -5744,6 +5749,7 @@ paths: $ref: '#/components/schemas/ExosEnclosure' /v1/vendor/seagate/exos/enclosures/{enclosure}: put: + deprecated: true tags: - developers summary: modifies an existing enclosure @@ -5769,6 +5775,7 @@ paths: schema: $ref: '#/components/schemas/ExosEnclosure' delete: + deprecated: true tags: - developers summary: modifies an existing enclosure @@ -5790,6 +5797,7 @@ paths: $ref: '#/components/schemas/ApiCallRcList' /v1/vendor/seagate/exos/{enclosure}/events: get: + deprecated: true tags: - developers summary: Returns the last EXOS events @@ -5819,6 +5827,7 @@ paths: $ref: '#/components/schemas/ExosEnclosureEvent' /v1/vendor/seagate/exos/map: get: + deprecated: true tags: - developers summary: Lists all EXOS Ports connected to each Linstor Node @@ -8698,6 +8707,7 @@ components: new_node: $ref: '#/components/schemas/Node' ExosDefaults: + deprecated: true type: object description: Default settings for EXOS enclosures properties: @@ -8710,6 +8720,7 @@ components: password_env: type: string ExosDefaultsModify: + deprecated: true allOf: - $ref: '#/components/schemas/ExosDefaults' - type: object @@ -8721,6 +8732,7 @@ components: description: | A list of keys to unset. The keys have to exist in ExosDefaults ExosEnclosureHealth: + deprecated: true type: object description: EXOS enclosure name, controller IPs and health status properties: @@ -8735,6 +8747,7 @@ components: health_reason: type: string ExosEnclosure: + deprecated: true type: object description: EXOS enclosure properties: @@ -8753,6 +8766,7 @@ components: password_env: type: string ExosEnclosureEvent: + deprecated: true type: object description: EXOS event properties: @@ -8774,6 +8788,7 @@ components: recommended_action: type: string ExosConnectionMap: + deprecated: true type: object properties: node_name: diff --git a/scripts/rest-gen.py b/scripts/rest-gen.py index 1710d26ad..83741eadf 100644 --- a/scripts/rest-gen.py +++ b/scripts/rest-gen.py @@ -119,6 +119,8 @@ def generate_class(schema_type: str, schema: OrderedDict, schema_lookup: Ordered out = gen_description_javadoc(schema, indent, 1) out += indent + "@JsonInclude(JsonInclude.Include.NON_EMPTY)\n" + if schema.get("deprecated"): + out += indent + "@Deprecated(forRemoval = true)\n" out += indent + "public static class " + schema_type + "\n" if "allOf" in schema: out += indent * 2 + "extends " + schema["allOf"][0]["$ref"][len('#/components/schemas/'):] + "\n" @@ -129,37 +131,38 @@ def generate_class(schema_type: str, schema: OrderedDict, schema_lookup: Ordered field = schema["properties"][fieldname] out += gen_description_javadoc(field, indent, 2) t = resolve_type_str(schema_lookup, field) + depr = "@Deprecated(forRemoval = true) " if schema.get("deprecated") else "" if t.startswith("Map"): dval = 'null' if "default" in field and field['default'] is None else 'Collections.emptyMap()' - out += indent * 2 + "public {t} {n} = {v};\n".format(t=t, n=fieldname, v=dval) + out += indent * 2 + depr + "public {t} {n} = {v};\n".format(t=t, n=fieldname, v=dval) elif t.startswith("List"): dval = 'null' if "default" in field and field['default'] is None else 'Collections.emptyList()' - out += indent * 2 + "public {t} {n} = {v};\n".format(t=t, n=fieldname, v=dval) + out += indent * 2 + depr + "public {t} {n} = {v};\n".format(t=t, n=fieldname, v=dval) else: if "default" in field: dval = field['default'] if t == "String": if dval is None: - out += indent * 2 + 'public {t} {n} = null;\n'.format( + out += indent * 2 + depr + 'public {t} {n} = null;\n'.format( t=t, n=fieldname ) else: - out += indent * 2 + 'public {t} {n} = "{v}";\n'.format( + out += indent * 2 + depr + 'public {t} {n} = "{v}";\n'.format( t=t, n=fieldname, v=value_to_string(dval) ) else: - out += indent * 2 + "public {t} {n} = {v};\n".format(t=t, n=fieldname, v=value_to_string(dval)) + out += indent * 2 + depr + "public {t} {n} = {v};\n".format(t=t, n=fieldname, v=value_to_string(dval)) elif "required" in schema and fieldname in schema["required"]: if t not in ["String", "Integer", "Long", "Double", "Boolean"]: - out += indent * 2 + "public {t} {n} = new {v};\n".format(t=t, n=fieldname, v=t + "()") + out += indent * 2 + depr + "public {t} {n} = new {v};\n".format(t=t, n=fieldname, v=t + "()") elif t == "Integer": - out += indent * 2 + "public int {n};\n".format(n=fieldname) + out += indent * 2 + depr + "public int {n};\n".format(n=fieldname) elif t == "String": - out += indent * 2 + "public String {n};\n".format(n=fieldname) + out += indent * 2 + depr + "public String {n};\n".format(n=fieldname) else: - out += indent * 2 + "public {t} {n};\n".format(t=t.lower(), n=fieldname) + out += indent * 2 + depr + "public {t} {n};\n".format(t=t.lower(), n=fieldname) else: - out += indent * 2 + "public {t} {n};\n".format(t=t, n=fieldname) + out += indent * 2 + depr + "public {t} {n};\n".format(t=t, n=fieldname) out += indent + "}\n" return out