-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add describe pool command #20
Conversation
} | ||
|
||
for _, bd := range BdInfo { | ||
err = util.PrintByTemplate("bd", blockDevicesInfoFromCSPI, bd) |
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.
PrintByTemplate
may not be a good UI/UX as in case of multiple BDs the above will generate something like this:-
Block Device Details :
----------------
Name : blockdevice-c21bc3b79a98c7e8508f47558cc94f36
Capacity : 107374182400
State : Active
Block Device Details :
----------------
Name : blockdevice-c21bc3b79a98c7e8508f47558cc94f36
Capacity : 107374182400
State : Active
The above should have been like this, similar to kubectl get
list.
Block Device Details :
----------------
Name Capacity State
bd-1 107641 active
bd-2 187261 active
You can refer this code for the same:-
if cvrs != nil && len(cvrs.Items) > 0 { |
} | ||
|
||
for _, cvr := range CVRInfoInPool { | ||
err = util.PrintByTemplate("cvr", provisionedReplicasInfoFromCSPI, cvr) |
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.
PrintByTemplate
may not be a good UI/UX as in case of multiple CVRs the above will generate something like this:-
Provisioned Replicas Details :
----------------
Name : pvc-b84f60ae-3f26-4110-a85d-bce7ec00dacc-default-cstor-disk-dcrm
PVC Name : mongo
Size : 1.04G
Status : Healthy
Provisioned Replicas Details :
----------------
Name : pvc-b84f60ae-3f26-4110-a85d-bce7ec00dacc-default-cstor-disk-dcrm
PVC Name : mongo
Size : 1.04G
Status : Healthy
The above should have been like this, similar to kubectl get
list.
Provisioned Replicas Details :
----------------
Name PvcName Size Status
cvr-1 pvc-1 107641 Healthy
cvr-2 pvc-2 187261 Degraded
You can refer this code for the same:-
if cvrs != nil && len(cvrs.Items) > 0 { |
---------------- | ||
Name : {{.Name}} | ||
Capacity : {{.Capacity}} | ||
State : {{.State}} |
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.
- Indentation is a bit off here.
You can ignore this comment if the above comments are addressed.
poolInfoCommandHelpText = ` | ||
This command fetches information and status of the various aspects | ||
of the cStor Pool Instance and its underlying related resources in the provided namespace. | ||
If no namespace is provided it uses default namespace for execution. |
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.
- Please change the line to
If no namespace is provided it uses openebs namespace for execution.
This command fetches information and status of the various aspects | ||
of the cStor Pool Instance and its underlying related resources in the provided namespace. | ||
If no namespace is provided it uses default namespace for execution. | ||
$ kubectl openebs describe pool [cspi-name] -n [namespace] |
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.
Please change the namespace
word to openebs ns
$ kubectl openebs describe pool [cspi-name] -n [openebs ns]
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.
lgtm
@ParthS007 Please send in a new PR to ACK these review comments. |
Line no. 297 in k8s.go has repeated 'while' text. Please rectify the same. |
Line no. 306 as well. |
closes #15