Skip to content

Commit

Permalink
cephfs admin: remove deprecated New function
Browse files Browse the repository at this point in the history
Signed-off-by: John Mulligan <jmulligan@redhat.com>
  • Loading branch information
phlogistonjohn authored and mergify[bot] committed Oct 5, 2023
1 parent 4fef2fe commit 81dc038
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 36 deletions.
23 changes: 0 additions & 23 deletions cephfs/admin/fsadmin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 1 addition & 8 deletions docs/api-status.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
6 changes: 1 addition & 5 deletions docs/api-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 81dc038

Please sign in to comment.