-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[k8sconfiguration] Parameter Validation and Table Formatting #2871
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 27 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
6f9c044
Push updates to k8sconfiguration keys and fix issue with known hosts
jonathan-innis b24dd9c
Remove print statement
jonathan-innis 867e0d2
Increase CLI version and add to changelog
jonathan-innis 7cf2ca2
Remove deprecated CLIError and reduce history.rst text
b9ef423
Joinnis/add validators (#1)
jonathan-innis a2b8c1b
Merge branch 'master' of github.com:jonathan-innis/azure-cli-extensions
jonathan-innis de54467
Remove dots from the regex for naming
jonathan-innis e85b6ea
Add the scenario tests back
jonathan-innis 944b620
Add good key scenario test to scenarios
jonathan-innis e507608
Remove numeric checks for configurations
jonathan-innis 6dde7d6
Reduce scneario testing
jonathan-innis 47ab31e
Merge branch 'master' of https://github.com/jonathan-innis/azure-cli-…
jonathan-innis 4d6ed8f
Merge branch 'master' of github.com:Azure/azure-cli-extensions into m…
jonathan-innis 9ec9f9d
Move validation of configuration name into creation command
jonathan-innis e361a52
Add table formatting for list and show
jonathan-innis 393c2e2
Update version
jonathan-innis b26eded
Update the error message for validation failure
jonathan-innis 63cf182
Update the test cases for the new error messages
jonathan-innis 4d09d53
Change error message and regex check
jonathan-innis a246002
Add proper formatting to code files
jonathan-innis a2bebf4
Updated final formatting checks
jonathan-innis b6d4c36
Updated error messages
jonathan-innis abcad8f
Update error message and help text
jonathan-innis 1006398
Final update to error messaging
jonathan-innis c302cc2
Merge branch 'master' of github.com:Azure/azure-cli-extensions into m…
jonathan-innis 6e27f78
Merge branch 'master' of github.com:Azure/azure-cli-extensions into m…
jonathan-innis a66106b
Update test_validators.py
jonathan-innis d46ce16
Update based on PR comments
jonathan-innis 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
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,33 @@ | ||
| # -------------------------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| from collections import OrderedDict | ||
|
|
||
|
|
||
| def k8sconfiguration_list_table_format(results): | ||
| formatted_result = [] | ||
| for result in results: | ||
| formatted_result.append( | ||
| OrderedDict([ | ||
| ('name', result['name']), | ||
| ('repositoryUrl', result['repositoryUrl']), | ||
| ('operatorName', result['operatorInstanceName']), | ||
| ('operatorNamespace', result['operatorNamespace']), | ||
| ('scope', result['operatorScope']), | ||
| ('provisioningState', result['provisioningState']) | ||
| ]) | ||
| ) | ||
| return formatted_result | ||
|
|
||
|
|
||
| def k8sconfiguration_show_table_format(result): | ||
| return OrderedDict([ | ||
| ('name', result['name']), | ||
| ('repositoryUrl', result['repositoryUrl']), | ||
| ('operatorName', result['operatorInstanceName']), | ||
| ('operatorNamespace', result['operatorNamespace']), | ||
| ('scope', result['operatorScope']), | ||
| ('provisioningState', result['provisioningState']) | ||
| ]) | ||
jonathan-innis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
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
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
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
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.