-
Notifications
You must be signed in to change notification settings - Fork 82
update reconfigurator-cli, blueprint show, blueprint diff for SP updates
#8016
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5ddb16a
update reconfigurator-cli, blueprint editor, blueprint display, tests
davepacheco 11fc3cb
first cut: impl diff
davepacheco d4d0252
move to subtype
davepacheco c90c234
stop treating modified rows as remove + add
davepacheco 0f845f1
review feedback
davepacheco File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
42 changes: 42 additions & 0 deletions
42
dev-tools/reconfigurator-cli/tests/input/cmds-set-mgs-updates.txt
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # Load example system | ||
| load-example --nsleds 3 --ndisks-per-sled 3 | ||
| blueprint-show ad97e762-7bf1-45a6-a98f-60afb7e491c0 | ||
|
|
||
| # Configure an MGS-managed update to one of the SPs. | ||
| blueprint-edit ad97e762-7bf1-45a6-a98f-60afb7e491c0 sp-update-set serial2 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 1.1.0 sp 1.0.0 1.0.1 | ||
| blueprint-show cca24b71-09b5-4042-9185-b33e9f2ebba0 | ||
| blueprint-diff ad97e762-7bf1-45a6-a98f-60afb7e491c0 cca24b71-09b5-4042-9185-b33e9f2ebba0 | ||
| # diff in the reverse direction. Should show one removal. | ||
| blueprint-diff cca24b71-09b5-4042-9185-b33e9f2ebba0 ad97e762-7bf1-45a6-a98f-60afb7e491c0 | ||
|
|
||
| # Change that configuration. It should replace the previous one. | ||
| # This also exercises versions that are not semver. | ||
| blueprint-edit cca24b71-09b5-4042-9185-b33e9f2ebba0 sp-update-set serial2 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 newest sp newer older | ||
| blueprint-show 5bf974f3-81f9-455b-b24e-3099f765664c | ||
| blueprint-diff cca24b71-09b5-4042-9185-b33e9f2ebba0 5bf974f3-81f9-455b-b24e-3099f765664c | ||
| # diff in the reverse direction. Should still show one modification. | ||
| blueprint-diff 5bf974f3-81f9-455b-b24e-3099f765664c cca24b71-09b5-4042-9185-b33e9f2ebba0 | ||
|
|
||
| # Configure an MGS-managed update to a different SP. | ||
| # This should *not* replace the existing one. | ||
| # This also exercises the special "invalid" string for a version number. | ||
| blueprint-edit 5bf974f3-81f9-455b-b24e-3099f765664c sp-update-set serial0 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 three sp two invalid | ||
| blueprint-show 1b837a27-3be1-4fcb-8499-a921c839e1d0 | ||
| blueprint-diff 5bf974f3-81f9-455b-b24e-3099f765664c 1b837a27-3be1-4fcb-8499-a921c839e1d0 | ||
|
|
||
| # Delete one of these updates. | ||
| blueprint-edit 1b837a27-3be1-4fcb-8499-a921c839e1d0 sp-update-delete serial2 | ||
| blueprint-show 3682a71b-c6ca-4b7e-8f84-16df80c85960 | ||
| blueprint-diff 1b837a27-3be1-4fcb-8499-a921c839e1d0 3682a71b-c6ca-4b7e-8f84-16df80c85960 | ||
|
|
||
| # test help output | ||
| blueprint-edit ad97e762-7bf1-45a6-a98f-60afb7e491c0 help | ||
| blueprint-edit ad97e762-7bf1-45a6-a98f-60afb7e491c0 sp-update-set help | ||
| blueprint-edit ad97e762-7bf1-45a6-a98f-60afb7e491c0 sp-update-set serial0 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 three --help | ||
| blueprint-edit ad97e762-7bf1-45a6-a98f-60afb7e491c0 sp-update-set serial0 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 three sp --help | ||
| blueprint-edit ad97e762-7bf1-45a6-a98f-60afb7e491c0 sp-update-delete help | ||
|
|
||
| # test error case: no such serial | ||
| blueprint-edit ad97e762-7bf1-45a6-a98f-60afb7e491c0 sp-update-set not-a-serial e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 1.1.0 sp 1.0.0 1.0.1 | ||
| # test error case: bad hash | ||
| blueprint-edit ad97e762-7bf1-45a6-a98f-60afb7e491c0 sp-update-set serial0 bogus-hash 1.1.0 sp 1.0.0 1.0.1 |
3 changes: 3 additions & 0 deletions
3
dev-tools/reconfigurator-cli/tests/output/cmd-set-mgs-updates-stderr
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| error: invalid value 'bogus-hash' for '<ARTIFACT_HASH>': Invalid string length | ||
|
|
||
| For more information, try '--help'. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.