From a79b4614d6e366a93055639a54e1bad236ffc89a Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Sat, 6 Aug 2022 14:39:18 +0530 Subject: [PATCH] contrib/apiage: Do not leave empty sections for packages in markdown For those packages without any preview/deprecated APIs we used to include a header despite any content under it. We could instead mention the state in a meaningful sentence. Signed-off-by: Anoop C S --- contrib/apiage.py | 4 ++++ docs/api-status.md | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/contrib/apiage.py b/contrib/apiage.py index 949e5d4..4ff8ff7 100755 --- a/contrib/apiage.py +++ b/contrib/apiage.py @@ -184,6 +184,10 @@ def format_markdown(tracked, outfh): outfh=outfh, ) print("", file=outfh) + if all(x not in pkg_api for x in ("preview_api", "deprecated_api")): + print("No Preview/Deprecated APIs found. " + "All APIs are considered stable.", file=outfh) + print("", file=outfh) def _table(data, columns, outfh): diff --git a/docs/api-status.md b/docs/api-status.md index 578680d..36d52a8 100644 --- a/docs/api-status.md +++ b/docs/api-status.md @@ -4,6 +4,8 @@ ## Package: cephfs +No Preview/Deprecated APIs found. All APIs are considered stable. + ## Package: cephfs/admin ### Preview APIs @@ -47,6 +49,8 @@ Snapshot.Set | v0.10.0 | | ## Package: rbd/admin +No Preview/Deprecated APIs found. All APIs are considered stable. + ## Package: rgw/admin ### Preview APIs @@ -66,6 +70,8 @@ API.SetIndividualBucketQuota | v0.17.0 | v0.19.0 | ## Package: common/admin/manager +No Preview/Deprecated APIs found. All APIs are considered stable. + ## Package: common/log ### Preview APIs