-
Notifications
You must be signed in to change notification settings - Fork 41
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
Beautify output for dhcpserver commands #592
Conversation
/cc @Karthik-K-N |
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.
also post the sample output in the PR
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.
One small change, otherwise LGTM
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
cmd/dhcpserver/get.go
Outdated
} | ||
var IPandMAC string | ||
for _, lease := range server.Leases { | ||
IPandMAC += fmt.Sprintf("%s - %s ", *lease.InstanceIP, *lease.InstanceMacAddress) |
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.
space is the delim here for the entries, wondering if there is an option of using newline and see how it looks?
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.
The closest i could bring by having a new line, introducing a space around -
seems to push content the MAC address to the next line. Hope this is ok!
Kishens-MacBook-Pro bin : pretty-dhcp : ./pvsadm dhcpserver get --instance-id eeabbe9d-2dcd-4e04-aed3-eb35739cf0d2 --id 73bbe812-f758-4707-8170-2427f79eab0e
I0423 12:16:05.275645 78108 root.go:50] Using an API key from IBMCLOUD_API_KEY environment variable
+----------------------------------------------------+--------------------------------+--------+
| NETWORK NAME | IP - MAC | STATUS |
+----------------------------------------------------+--------------------------------+--------+
| DHCPSERVER6e9d7e95424d42ed8b7ff68305b03543_Private | 192.168.0.10-fa:16:3e:2f:66:e4 | ACTIVE |
| | 192.168.0.11-fa:16:3e:16:6f:02 | |
| | | |
+----------------------------------------------------+--------------------------------+--------+
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kishen-v, mkumatag The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes: #590