-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support fetching templates by name (#349)
## Description <!--- Please describe what this PR is going to change --> Adds the ability to query templates by name. The `ListTemplates` method has been changed to accept a `FilterRequest` instead of just `Empty`. The `FilterRequest` has a field `filter` that accepts a string used to match the names of templates. A wildcard `*` can be used to match a sequence of zero or more characters. Passing an empty `FilterRequest` will return all templates. ## Why is this needed <!--- Link to issue you have raised --> A user might have the following templates: `hello-world`, `ubuntu-01`, `ubuntu-02`, `ubuntu-03`, `goodbye-world` and wants to list only the linux templates. Before, they would only be able to either list all of the templates, or only one (and only if they already know the id). With this PR, they can just call `ListTemplates` with the `FilterRequest`'s filter field to `ubuntu-*` and it will return only `ubuntu-01`, `ubuntu-02`, and `ubuntu-03`. Fixes: #352 / ENG-9455 ## How Has This Been Tested? <!--- Please describe in detail how you tested your changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> * manually * TBD ## How are existing users impacted? What migration steps/scripts do we need? <!--- Fixes a bug, unblocks installation, removes a component of the stack etc --> <!--- Requires a DB migration script, etc. --> Users using an older version of the tink-cli may experience errors. Best solution is to update the tink-server, tink-cli, and tink-worker to use the images built from this PR ## Checklist: I have: - [ ] updated the documentation and/or roadmap (if required) - [ ] added unit or e2e tests - [ ] provided instructions on how to upgrade
- Loading branch information
Showing
19 changed files
with
619 additions
and
163 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
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
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
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.