Skip to content

Cli project features#31

Merged
ib-steffen merged 21 commits intomasterfrom
cli_project_features
Apr 25, 2018
Merged

Cli project features#31
ib-steffen merged 21 commits intomasterfrom
cli_project_features

Conversation

@sept-en
Copy link
Collaborator

@sept-en sept-en commented Apr 11, 2018

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.

AndrewAhapov and others added 12 commits March 24, 2018 22:05
* 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.
help="Path to the local cache")

parser_run.add_argument("--memory", required=False, type=float,
help="Override a memory consumption for your job")
Copy link
Contributor

Choose a reason for hiding this comment

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

replace "consumption" with "limit"

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")
Copy link
Contributor

Choose a reason for hiding this comment

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

same

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')
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

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,
Copy link
Contributor

Choose a reason for hiding this comment

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

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')
Copy link
Contributor

Choose a reason for hiding this comment

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

add optional parameters for email and password so we can use it in scripts

sept-en added 8 commits April 16, 2018 17:35
* 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.
@sept-en
Copy link
Collaborator Author

sept-en commented Apr 17, 2018

@ib-steffen could you check an updated PR, please?

@ib-steffen ib-steffen merged commit 772128a into master Apr 25, 2018
@ib-steffen ib-steffen deleted the cli_project_features branch April 25, 2018 11:20
stege pushed a commit that referenced this pull request Apr 25, 2018
This reverts commit 772128a, reversing
changes made to 312d34d.
sept-en added a commit to sept-en/cli that referenced this pull request Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants