From 81dc03889d2dc8ec9b73e5fd40b42996ddd86a9c Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Tue, 3 Oct 2023 10:20:35 -0400 Subject: [PATCH] cephfs admin: remove deprecated New function Signed-off-by: John Mulligan --- cephfs/admin/fsadmin.go | 23 ----------------------- docs/api-status.json | 9 +-------- docs/api-status.md | 6 +----- 3 files changed, 2 insertions(+), 36 deletions(-) diff --git a/cephfs/admin/fsadmin.go b/cephfs/admin/fsadmin.go index 8ff2327edb..80b7a4c89a 100644 --- a/cephfs/admin/fsadmin.go +++ b/cephfs/admin/fsadmin.go @@ -17,29 +17,6 @@ type FSAdmin struct { conn RadosCommander } -// New creates an FSAdmin automatically based on the default ceph -// configuration file. If more customization is needed, create a -// *rados.Conn as you see fit and use NewFromConn to use that -// connection with these administrative functions. -// -// Deprecated: Use NewFromConn instead of New. The New function does not expose -// the rados connection and therefore can not be deterministically cleaned up. -func New() (*FSAdmin, error) { - conn, err := rados.NewConn() - if err != nil { - return nil, err - } - err = conn.ReadDefaultConfigFile() - if err != nil { - return nil, err - } - err = conn.Connect() - if err != nil { - return nil, err - } - return NewFromConn(conn), nil -} - // NewFromConn creates an FSAdmin management object from a preexisting // rados connection. The existing connection can be rados.Conn or any // type implementing the RadosCommander interface. This may be useful diff --git a/docs/api-status.json b/docs/api-status.json index 5386d7abba..084f9b881f 100644 --- a/docs/api-status.json +++ b/docs/api-status.json @@ -613,14 +613,7 @@ "became_stable_version": "v0.23.0" } ], - "deprecated_api": [ - { - "name": "New", - "comment": "New creates an FSAdmin automatically based on the default ceph\nconfiguration file. If more customization is needed, create a\n*rados.Conn as you see fit and use NewFromConn to use that\nconnection with these administrative functions.\n\nDeprecated: Use NewFromConn instead of New. The New function does not expose\nthe rados connection and therefore can not be deterministically cleaned up.\n", - "deprecated_in_version": "v0.21.0", - "expected_remove_version": "v0.24.0" - } - ], + "deprecated_api": [], "preview_api": [] }, "rados": { diff --git a/docs/api-status.md b/docs/api-status.md index 5455e218bb..714387a156 100644 --- a/docs/api-status.md +++ b/docs/api-status.md @@ -8,11 +8,7 @@ No Preview/Deprecated APIs found. All APIs are considered stable. ## Package: cephfs/admin -### Deprecated APIs - -Name | Deprecated in Version | Expected Removal Version | ----- | --------------------- | ------------------------ | -New | v0.21.0 | v0.24.0 | +No Preview/Deprecated APIs found. All APIs are considered stable. ## Package: rados