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

Fixed: consistent user experience across tink-cli list command -q #404

Merged
merged 4 commits into from
Dec 28, 2020

Conversation

gauravgahlot
Copy link
Contributor

Description

The PR introduces a new flag --quiet or -q to only display IDs while listing hardware and workflow.

/ # tink hardware list
+--------------------------------------+-------------------+-------------+-----------+
| ID                                   | MAC ADDRESS       | IP ADDRESS  | HOSTNAME  |
+--------------------------------------+-------------------+-------------+-----------+
| 0eba0bf8-3772-4b4a-ab9f-6ebe93b90a95 | 08:00:27:00:00:01 | 192.168.1.5 | server001 |
| 1eba0bf8-3772-4b4a-ab9f-6ebe93b90a95 | 08:00:27:00:00:02 | 192.168.1.5 | server001 |
+--------------------------------------+-------------------+-------------+-----------+

/ # tink hardware list -q
0eba0bf8-3772-4b4a-ab9f-6ebe93b90a95
1eba0bf8-3772-4b4a-ab9f-6ebe93b90a95

/ # tink workflow list
+--------------------------------------+--------------------------------------+-----------------------------------+-------------------------------+-------------------------------+
| WORKFLOW ID                          | TEMPLATE ID                          | HARDWARE DEVICE                   | CREATED AT                    | UPDATED AT                    |
+--------------------------------------+--------------------------------------+-----------------------------------+-------------------------------+-------------------------------+
| c465b4b2-48e6-11eb-a673-0242ac120004 | aabad754-48e6-11eb-a673-0242ac120004 | {"device_1": "08:00:27:00:00:02"} | 2020-12-28 08:29:13 +0000 UTC | 2020-12-28 08:29:13 +0000 UTC |
| c7812ec3-48e6-11eb-a673-0242ac120004 | aabad754-48e6-11eb-a673-0242ac120004 | {"device_1": "08:00:27:00:00:02"} | 2020-12-28 08:29:19 +0000 UTC | 2020-12-28 08:29:19 +0000 UTC |
+--------------------------------------+--------------------------------------+-----------------------------------+-------------------------------+-------------------------------+

/ # tink workflow list -q
c465b4b2-48e6-11eb-a673-0242ac120004
c7812ec3-48e6-11eb-a673-0242ac120004

Why is this needed

Fixes: #403

How Has This Been Tested?

Tested manually over the vagrant setup.

Checklist:

I have:

  • updated the documentation and/or roadmap (if required)
  • added unit or e2e tests
  • provided instructions on how to upgrade

Signed-off-by: Gaurav Gahlot <gauravgahlot0107@gmail.com>
Signed-off-by: Gaurav Gahlot <gauravgahlot0107@gmail.com>
Signed-off-by: Gaurav Gahlot <gauravgahlot0107@gmail.com>
Signed-off-by: Gaurav Gahlot <gauravgahlot0107@gmail.com>
@gauravgahlot gauravgahlot added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 28, 2020
@gauravgahlot gauravgahlot self-assigned this Dec 28, 2020
@gauravgahlot gauravgahlot requested a review from gianarb December 28, 2020 08:31
@codecov
Copy link

codecov bot commented Dec 28, 2020

Codecov Report

Merging #404 (a1dac32) into master (65a446c) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #404   +/-   ##
=======================================
  Coverage   21.24%   21.24%           
=======================================
  Files          24       24           
  Lines        2170     2170           
=======================================
  Hits          461      461           
  Misses       1667     1667           
  Partials       42       42           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65a446c...a1dac32. Read the comment docs.

Copy link
Contributor

@gianarb gianarb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic! Thanks

@gianarb gianarb added the ready-to-merge Signal to Mergify to merge the PR. label Dec 28, 2020
@mergify mergify bot merged commit d7856c9 into tinkerbell:master Dec 28, 2020
@gauravgahlot gauravgahlot deleted the list-quiet branch December 28, 2020 10:10
@mmlb mmlb removed the ready-to-merge Signal to Mergify to merge the PR. label Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consistent user experience across tink-cli list command -q
3 participants