-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feature: import targets Implements the feature import target `rstuf admin import-targets`. This feature gives the RSTUF administrator the functionality to import a large number of existent targets. It helps to roll out and deploy the RSTUF in existing repositories. This feature is detailed and explained at these links - repository-service-tuf/repository-service-tuf#188 - BDD Feature: repository-service-tuf/repository-service-tuf#218 Some changes in the ceremony was done to reuse in the code: - The `ceremony._check_server` was converted to `helpers.api_client.get_headers` - The `ceremony._bootstrap_state` was converted to `helpers.api_client.task_status` Added 100% coverage to `helpsers.api_client` Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> * Fix the sentences Co-authored-by: Martin Vrachev <martin.vrachev@gmail.com> * Make the optional dependencies clear and docs The optional dependencies `psycopg2` and `sqlalchemy` are optional. This is required only when the user aim to use the `import-targets` feature. Add to documentation the new feature Add details about the usage and CSV Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> * Add typing notation - add typing notation - make the `_check_csv_files` more explicity Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> * fix tests for changed commited to the ceremony Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> * fix the bootstrap check for ceremony Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> * add unit tests for import-targets - Added some small refactoring in the implementation - 100% coverage for the UT - Fix some comments from the review Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> * Removed unused Mock from test_import_targets Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> * fix linting Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> * Apply suggestions from code review Co-authored-by: Martin Vrachev <martin.vrachev@gmail.com> * Add missing asserts Co-authored-by: Martin Vrachev <martin.vrachev@gmail.com> * fix import-targets params, remove duplicate checks - move parameters to use double dash `--{names}` - remove duplicate check that is done by `is_logged` - fix tests Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> * fix bug in is_logged, typing and typo - fix `is_logged` bug in case of no data with 200 status code - fix typing for the `task_status` response - fix typo/wording for task status Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> * remove `**kw` from `api_client.Login` lambdas - remove login keyword parameters from lambda Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> * update documentation using `--` to the parameters Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> --------- Signed-off-by: Kairo de Araujo <kdearaujo@vmware.com> Co-authored-by: Martin Vrachev <martin.vrachev@gmail.com>
- Loading branch information
Showing
13 changed files
with
1,462 additions
and
410 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Oops, something went wrong.