-
Notifications
You must be signed in to change notification settings - Fork 547
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cleanup: simplify rbdGetDeviceList()
#4364
Conversation
/test ci/centos/mini-e2e/k8s-1.29 |
GetRadosNamespace() string | ||
GetDevice() string | ||
} | ||
|
||
// rbdDeviceInfo strongly typed JSON spec for rbd device list output (of type krbd). | ||
type rbdDeviceInfo struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We no longer have to save ID ?
It's not used anywhere ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it is not used anywhere for attaching/mounting.
@Mergifyio rebase |
The `rbdGetDeviceList()` function uses two very similar types for converting krbd and NBD device information from JSON. There is no need to use this distinction, and callers of `rbdGetDeviceList()` should not need to care about it either. By introducing a `deviceInfo` interface with Get-functions, the `rbdGetDeviceList()` function becomes a little simpler, with a clearly defined API for the returned list. Signed-off-by: Niels de Vos <[email protected]>
✅ Branch has been successfully rebased |
3e74837
to
e780afb
Compare
@Mergifyio queue |
✅ The pull request has been merged automaticallyThe pull request has been merged automatically at 3bf5c0e |
/test ci/centos/upgrade-tests-cephfs |
/test ci/centos/upgrade-tests-rbd |
/test ci/centos/k8s-e2e-external-storage/1.29 |
/test ci/centos/k8s-e2e-external-storage/1.28 |
/test ci/centos/mini-e2e-helm/k8s-1.29 |
/test ci/centos/k8s-e2e-external-storage/1.27 |
/test ci/centos/mini-e2e-helm/k8s-1.28 |
/test ci/centos/mini-e2e/k8s-1.29 |
/test ci/centos/k8s-e2e-external-storage/1.26 |
/test ci/centos/mini-e2e-helm/k8s-1.27 |
/test ci/centos/mini-e2e/k8s-1.28 |
/test ci/centos/mini-e2e-helm/k8s-1.26 |
/test ci/centos/mini-e2e/k8s-1.27 |
/test ci/centos/mini-e2e/k8s-1.26 |
The
rbdGetDeviceList()
function uses two very similar types forconverting krbd and NBD device information from JSON. There is no need
to use this distinction, and callers of
rbdGetDeviceList()
should notneed to care about it either.
By introducing a
deviceInfo
interface with Get-functions, therbdGetDeviceList()
function becomes a little simpler, with a clearlydefined API for the returned list.