cephfs admin: remove deprecated New function

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2023-10-03 10:20:35 -04:00 committed by mergify[bot]
parent 4fef2fe1b1
commit 81dc03889d
3 changed files with 2 additions and 36 deletions

View File

@ -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

View File

@ -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": {

View File

@ -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