-
Notifications
You must be signed in to change notification settings - Fork 137
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
Fix issue #150: Modified the behaviour of few "tink hardware cli" #207
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parauliya
added
the
kind/feature
Categorizes issue or PR as related to a new feature.
label
Jul 6, 2020
parauliya
force-pushed
the
fix_150
branch
2 times, most recently
from
July 6, 2020 12:14
5bec853
to
08e6e2d
Compare
grahamc
reviewed
Jul 6, 2020
parauliya
force-pushed
the
fix_150
branch
2 times, most recently
from
July 7, 2020 07:49
5fb911b
to
4102699
Compare
DailyAlice
added a commit
to tinkerbell/tinkerbell.org
that referenced
this pull request
Jul 7, 2020
Removed `all`, and added new responses for `mac` and `ip` to match tinkerbell/tink#207.
parauliya
force-pushed
the
fix_150
branch
2 times, most recently
from
July 8, 2020 07:49
2a76c92
to
3fd09ec
Compare
parauliya
force-pushed
the
fix_150
branch
2 times, most recently
from
July 9, 2020 09:07
224ee22
to
1c3960f
Compare
gauravgahlot
suggested changes
Jul 9, 2020
…e cli" Following are the change in this commit 1. `tink hardware mac <mac address>` will provide only relevent information instead of complete hardware json 2. `tink hardware ip <ip address>` will provide only relevent information instead of complete hardware json 3. There will be a flag in both of the above clis (--details) which can be provided to get the complete hardware data 4. `tink hardware all` cli has been renamed to `tink hardware list` 5. The above cli will only list the relevent information (which is 'hardware-id', 'mac address', 'ip address' and 'hostname for now) instead of providing the complete json of all the hardware present in the database.
gauravgahlot
approved these changes
Jul 10, 2020
gauravgahlot
requested review from
kqdeng
and removed request for
nathangoulding and
Cbkhare
July 10, 2020 04:56
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Following are the change in this commit
tink hardware mac <mac address>
will provide only relevent information instead of complete hardware jsontink hardware ip <ip address>
will provide only relevent information instead of complete hardware jsontink hardware all
cli has been renamed totink hardware list
Why is this needed
Fixes: #150
How Has This Been Tested?
I have tested this locally by pushing the hardware data for two different hardware using
tink hardware push
command and then try to run the clis mentioned in the above description.Following are the output of the commands.
1. tink hardware list
With the help of above command you will get the list of hardware present in the database. Now you can run following commands:
{"metadata":{"instance":{},"facility":{"facility_code":"onprem"}},"network":{"interfaces":[{"dhcp":{"mac":"98:03:9b:89:d7:da","hostname":"localhost","arch":"x86_64","ip":{"address":"192.168.1.4","netmask":"255.255.255.248","gateway":"192.168.1.1"}},"netboot":{"allow_pxe":true,"allow_workflow":true}}]},"id":"f9f56dff-098a-4c5f-a51c-19ad35de85d2"}
tink hardware ip
command:a. tink hardware ip 192.168.1.4
b. tink hardware ip 192.168.1.4 -d ( provide -d flag )
{"metadata":{"instance":{},"facility":{"facility_code":"onprem"}},"network":{"interfaces":[{"dhcp":{"mac":"98:03:9b:89:d7:da","hostname":"localhost","arch":"x86_64","ip":{"address":"192.168.1.4","netmask":"255.255.255.248","gateway":"192.168.1.1"}},"netboot":{"allow_pxe":true,"allow_workflow":true}}]},"id":"f9f56dff-098a-4c5f-a51c-19ad35de85d2"}
How are existing users impacted? What migration steps/scripts do we need?
There will be a change for existing user for
tink hardware
as mentioned in the description. There is no need of migration steps or scripts.