diff --git a/docs/helpers/changed_envvars.py b/docs/helpers/changed_envvars.py index 5ba6921804..28a5ccf72a 100644 --- a/docs/helpers/changed_envvars.py +++ b/docs/helpers/changed_envvars.py @@ -94,19 +94,20 @@ def get_deprecated(fileNew): deprecatedWith[key] = value return deprecatedWith -def create_adoc_start(type_text, from_version, to_version, creation_date, default): +def create_adoc_start(type_text, from_version, to_version, creation_date, columns, closing): # create the page/table header + # 'closing' contains variable column names dependen if added/removed ir deprecated a = '''// # {ftype} Variables between oCIS {ffrom} and oCIS {fto} // commenting the headline to make it better includable // table created per {fdate} // the table should be recreated/updated on source () changes -[width="100%",cols="~,~,~,~",options="header"] +[width="100%",cols="{fcolumns}",options="header"] |=== -| Service| Variable| Description| {fdefault} +| Service | Variable | Description | {fclosing} -'''.format(ftype = type_text, ffrom = from_version, fto = to_version, fdate = creation_date, fdefault = default) +'''.format(ftype = type_text, ffrom = from_version, fto = to_version, fdate = creation_date, fcolumns = columns, fclosing = closing) return a def create_adoc_end(): @@ -116,38 +117,77 @@ def create_adoc_end(): ''' return a -def add_adoc_line(service, variable, description, default): - # add a table line +def add_adoc_line_1(service, variable, description, value): + # add a table line for added/removed + # the dummy values are only here to have the same number of parameters as add_adoc_line_2 a = '''| {fservice} | {fvariable} | {fdescription} -| {fdefault} +| {fvalue} -'''.format(fservice = service, fvariable = variable, fdescription = description, fdefault = default) +'''.format(fservice = service, fvariable = variable, fdescription = description, fvalue = value) return a -def create_table(type_text, source_dict, from_version, to_version, date_today, default = 'Default'): +def add_adoc_line_2(service, variable, description, removalVersion, deprecationInfo): + # add a table line for deprecated, this has different columns + a = '''| {fservice} +| {fvariable} +| {fdescription} +| {fremovalVersion} +| {fdeprecationInfo} + +'''.format(fservice = service, fvariable = variable, fdescription = description, fremovalVersion = removalVersion, fdeprecationInfo = deprecationInfo) + return a + +def create_table(type_text, source_dict, from_version, to_version, date_today, type = False): # get the table header - a = create_adoc_start(type_text, from_version, to_version, date_today, default) - cond_value = 'defaultValue' if default == 'Default' else 'removalVersion' - # first add all ocis_ - for key, value in source_dict.items(): - if key.startswith('OCIS_'): - a += add_adoc_line( - 'xref:deployment/services/env-vars-special-scope.adoc[Special Scope Envvars]', - key, - value['description'], - value[cond_value] - ) - # then add all others - for key, value in source_dict.items(): - if not key.startswith('OCIS_'): - a += add_adoc_line( - 'xref:{s-path}/xxx.adoc[xxx]', - key, - value['description'], - value[cond_value] - ) + columns = '~,~,~,~' if type == False else '~,~,~,~,~' + closing = 'Default' if type == False else 'Removal Version | Deprecation Info' + a = create_adoc_start(type_text, from_version, to_version, date_today, columns, closing) + + if not type: + # added and removed envvars + # first add all ocis_ + for key, value in source_dict.items(): + if key.startswith('OCIS_'): + a += add_adoc_line_1( + 'xref:deployment/services/env-vars-special-scope.adoc[Special Scope Envvars]', + key, + value['description'], + value['defaultValue'] + ) + # then add all others + for key, value in source_dict.items(): + if not key.startswith('OCIS_'): + a += add_adoc_line_1( + 'xref:{s-path}/xxx.adoc[xxx]', + key, + value['description'], + value['defaultValue'] + ) + else: + # deprecated envvars + # first add all ocis_ + for key, value in source_dict.items(): + if key.startswith('OCIS_'): + a += add_adoc_line_2( + 'xref:deployment/services/env-vars-special-scope.adoc[Special Scope Envvars]', + key, + value['description'], + value['removalVersion'], + value['deprecationInfo'] + ) + # then add all others + for key, value in source_dict.items(): + if not key.startswith('OCIS_'): + a += add_adoc_line_2( + 'xref:{s-path}/xxx.adoc[xxx]', + key, + value['description'], + value['removalVersion'], + value['deprecationInfo'] + ) + # finally close the table a += create_adoc_end() return a @@ -172,7 +212,7 @@ deprecatedWith = get_deprecated(fileNew) a = create_table('Added', addedWith, from_version, to_version, date.today().strftime('%Y.%m.%d')) r = create_table('Removed', removedWith, from_version, to_version, date.today().strftime('%Y.%m.%d')) -d = create_table('Deprecated', deprecatedWith, from_version, to_version, date.today().strftime('%Y.%m.%d'), 'Removalversion') +d = create_table('Deprecated', deprecatedWith, from_version, to_version, date.today().strftime('%Y.%m.%d'), True) write_output(a, 'added') write_output(r, 'removed') diff --git a/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-added.adoc b/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-added.adoc index 680067ce0a..6df7acfee1 100644 --- a/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-added.adoc +++ b/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-added.adoc @@ -6,7 +6,7 @@ [width="100%",cols="~,~,~,~",options="header"] |=== -| Service| Variable| Description| Default +| Service | Variable | Description | Default | xref:deployment/services/env-vars-special-scope.adoc[Special Scope Envvars] | OCIS_ASSET_THEMES_PATH diff --git a/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-deprecated.adoc b/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-deprecated.adoc index 1ad01d8140..ddddcfac0d 100644 --- a/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-deprecated.adoc +++ b/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-deprecated.adoc @@ -4,89 +4,99 @@ // table created per 2024.11.26 // the table should be recreated/updated on source () changes -[width="100%",cols="~,~,~,~",options="header"] +[width="100%",cols="~,~,~,~,~",options="header"] |=== -| Service| Variable| Description| Removalversion - -| xref:{s-path}/antivirus.adoc[Antivirus] -| ANTIVIRUS_ICAP_TIMEOUT -| Timeout for the ICAP client. -| %%NEXT_PRODUCTION_VERSION%% +| Service | Variable | Description | Removal Version | Deprecation Info | xref:{s-path}/clientlog.adoc[Clientlog] | CLIENTLOG_REVA_GATEWAY | CS3 gateway used to look up user metadata | %%NEXT_PRODUCTION_VERSION%% +| CLIENTLOG_REVA_GATEWAY removed for simplicity. | xref:{s-path}/frontend.adoc[Frontend] | FRONTEND_OCS_ADDITIONAL_INFO_ATTRIBUTE | Additional information attribute for the user like {{.Mail}}. | %%NEXT_PRODUCTION_VERSION%% +| The OCS API is deprecated | | FRONTEND_OCS_ENABLE_DENIALS | EXPERIMENTAL: enable the feature to deny access on folders. | %%NEXT_PRODUCTION_VERSION%% +| The OCS API is deprecated | | FRONTEND_OCS_INCLUDE_OCM_SHAREES | Include OCM sharees when listing sharees. | %%NEXT_PRODUCTION_VERSION%% +| FRONTEND_OCS_INCLUDE_OCM_SHAREES, the OCS API is deprecated | | FRONTEND_OCS_LIST_OCM_SHARES | Include OCM shares when listing shares. See the OCM service documentation for more details. | %%NEXT_PRODUCTION_VERSION%% +| FRONTEND_OCS_LIST_OCM_SHARES, the OCS API is deprecated | | FRONTEND_OCS_PERSONAL_NAMESPACE | Home namespace identifier. | %%NEXT_PRODUCTION_VERSION%% +| The OCS API is deprecated | | FRONTEND_OCS_PREFIX | URL path prefix for the OCS service. Note that the string must not start with '/'. | %%NEXT_PRODUCTION_VERSION%% +| The OCS API is deprecated | | FRONTEND_OCS_SHARE_PREFIX | Path prefix for shares as part of an ocis resource. Note that the path must start with '/'. | %%NEXT_PRODUCTION_VERSION%% +| The OCS API is deprecated | | FRONTEND_OCS_STAT_CACHE_AUTH_PASSWORD | The password to use for authentication. Only applies when using the 'nats-js-kv' store type. | %%NEXT_PRODUCTION_VERSION%% +| FRONTEND_OCS_STAT_CACHE_AUTH_PASSWORD, the OCS API is deprecated | | FRONTEND_OCS_STAT_CACHE_AUTH_USERNAME | The username to use for authentication. Only applies when using the 'nats-js-kv' store type. | %%NEXT_PRODUCTION_VERSION%% +| FRONTEND_OCS_STAT_CACHE_AUTH_USERNAME, the OCS API is deprecated | | FRONTEND_OCS_STAT_CACHE_DISABLE_PERSISTENCE | Disable persistence of the cache. Only applies when using the 'nats-js-kv' store type. Defaults to false. | %%NEXT_PRODUCTION_VERSION%% +| FRONTEND_OCS_STAT_CACHE_DISABLE_PERSISTENCE, the OCS API is deprecated | | FRONTEND_OCS_STAT_CACHE_STORE | The type of the cache store. Supported values are: 'memory', 'redis-sentinel', 'nats-js-kv', 'noop'. See the text description for details. | %%NEXT_PRODUCTION_VERSION%% +| FRONTEND_OCS_STAT_CACHE_STORE, the OCS API is deprecated | | FRONTEND_OCS_STAT_CACHE_STORE_NODES | A list of nodes to access the configured store. This has no effect when 'memory' store is configured. Note that the behaviour how nodes are used is dependent on the library of the configured store. See the Environment Variable Types description for more details. | %%NEXT_PRODUCTION_VERSION%% +| FRONTEND_OCS_STAT_CACHE_STORE_NODES, the OCS API is deprecated | | FRONTEND_OCS_STAT_CACHE_TABLE | The database table the store should use. | %%NEXT_PRODUCTION_VERSION%% +| The OCS API is deprecated | | FRONTEND_OCS_STAT_CACHE_TTL | Default time to live for user info in the cache. Only applied when access tokens has no expiration. See the Environment Variable Types description for more details. | %%NEXT_PRODUCTION_VERSION%% +| FRONTEND_OCS_STAT_CACHE_TTL, the OCS API is deprecated |=== diff --git a/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-removed.adoc b/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-removed.adoc index e97420f0ba..b0c9d68564 100644 --- a/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-removed.adoc +++ b/docs/services/general-info/env-var-deltas/5.0.0-7.0.0-removed.adoc @@ -6,7 +6,7 @@ [width="100%",cols="~,~,~,~",options="header"] |=== -| Service| Variable| Description| Default +| Service | Variable | Description | Default | xref:deployment/services/env-vars-special-scope.adoc[Special Scope Envvars] | OCIS_CACHE_SIZE