Skip to content
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

usability: message for no resources found #56

Closed
kmova opened this issue Jul 17, 2021 · 2 comments · Fixed by #103
Closed

usability: message for no resources found #56

kmova opened this issue Jul 17, 2021 · 2 comments · Fixed by #103
Labels
good first issue Good for newcomers

Comments

@kmova
Copy link
Member

kmova commented Jul 17, 2021

When the cluster doesn't have required resources, display a helpful message instead of displaying nothing.

In my cluster that doesn't have any pools setup at, I get the following:

kiran_mova_mayadata_io@kmova-dev:~$ kubectl openebs get storage
kiran_mova_mayadata_io@kmova-dev:~$ 

It would nice to display a message like this:

kiran_mova_mayadata_io@kmova-dev:~$ kubectl get cspc
No resources found in default namespace.

Also, while at this - check the message displayed when there is no openebs installed in the cluster.

@kmova kmova added the good first issue Good for newcomers label Jul 17, 2021
@vharsh
Copy link
Member

vharsh commented Jul 21, 2021

Okay starting notes on implementation:

  • For the volume & storage sub-commands, the code can run a single function(when cas-type is given in via flags) or run all functions when no cas-type flags are given.
  • The code under interest is, pkg/storage/storage.go, pkg/volume/volume.go, pkg/persistentvolumeclaim/persistentvolumeclaim.go & pkg/blockdevice/blockdevice.go
  • If a single function is executed(i.e. cas-type is supplied), a standard message & a standard error can be thrown by that cas-implementer function
  • When cas-type isn't supplied, the errors might be stored in a slice & shown accordingly(a volume is a PersistentVolume, but a storage can be a two or three different kinds of resources, so having all errors would help)

For more help, do join the OpenEBS-Dev slack.

@Abhishek-kumar09
Copy link
Contributor

Working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants