Merged
Conversation
* Added `infrabox collaborators list` option; * Added `infrabox project-token list` option; * Project-token now is being printing right after its creation into console; * Commands now are more verbose in output.
* Modified `infrabox project-tokens` scope_push and scope_pull options; * Added more verbosity.
* Added more error handling capabilities to the CLI.
* Added possibility to remove project-token by providing token's description; * Added some more meaningful messages in case of errors on the server side.
* Added possibility to specify needed memory and cpu consumptions for `infrabox run` command; * New limits taken from the command line args are applied to each job taken from current infrabox.json file.
ib-steffen
requested changes
Apr 12, 2018
infraboxcli/__init__.py
Outdated
| help="Path to the local cache") | ||
|
|
||
| parser_run.add_argument("--memory", required=False, type=float, | ||
| help="Override a memory consumption for your job") |
Contributor
There was a problem hiding this comment.
replace "consumption" with "limit"
infraboxcli/__init__.py
Outdated
| parser_run.add_argument("--memory", required=False, type=float, | ||
| help="Override a memory consumption for your job") | ||
| parser_run.add_argument("--cpu", required=False, type=float, | ||
| help="Override a cpu consumption for your job") |
infraboxcli/__init__.py
Outdated
| parser_add_project_token = sub_project_tokens.add_parser('create', help='Create a project token') | ||
| parser_add_project_token.add_argument('--d', required=True, type=str, | ||
| help='Description of the project token you want to create') | ||
| parser_add_project_token.add_argument('--scope_push', required=False, default=True, type=str2bool, help='Scope push') |
Contributor
There was a problem hiding this comment.
leave out the scope_push and scope_pull options. You can hardcode them for now to true. They are not yet properly handled throughout the stack.
infraboxcli/__init__.py
Outdated
| parser_remove_project_token = sub_project_tokens.add_parser('delete', help='Delete a project token') | ||
| parser_remove_project_token.add_argument('--id', required=False, type=str, | ||
| help='Id of the project token you want to delete') | ||
| parser_remove_project_token.add_argument('--d', required=False, type=str, |
Contributor
There was a problem hiding this comment.
use --description instead of --d
| parser_remove_project_token.set_defaults(func=project.delete_project_token) | ||
|
|
||
| # User | ||
| parser_login = sub_parser.add_parser('login', help='Login to infrabox') |
Contributor
There was a problem hiding this comment.
add optional parameters for email and password so we can use it in scripts
* Instead of requesting project-token's id by it's name from API, we request all project-tokens from API, and then process it by ourselves. * Changed cli argument from 'd' to 'description'.
* Instead of requesting user id by collaborator's name from API, we request all collaborators from API, and then process it by ourselves. * Stylystic fixes.
* Temporarily disabled possibility to specify scope_push and scope_pull parameters for project-token until this functionality is implemented in API. * Changed CLI argument on token create from 'd' to 'description'.
* Added possibility to specify email and password as arguments; * It's not allowed to pass password without email as argument.
Collaborator
Author
|
@ib-steffen could you check an updated PR, please? |
ib-steffen
approved these changes
Apr 25, 2018
sept-en
added a commit
to sept-en/cli
that referenced
this pull request
Apr 26, 2018
…ect_features"" This reverts commit 7edafb4.
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
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.
Hi!
Recently @AndrewAhapov and I implemented some useful features for new CLI API.
We've fixed issues #21, #22, #23, #24, #25, #26, #30.
@ib-steffen could you take a look at these, please?
Best regards,
Kirill Abramov.