-
Notifications
You must be signed in to change notification settings - Fork 23.9k
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
ansible-galaxy collection search #77064
base: devel
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a nice addition!
@@ -238,6 +238,7 @@ def init_parser(self): | |||
self.add_install_options(collection_parser, parents=[common, force, cache_options]) | |||
self.add_list_options(collection_parser, parents=[common, collections_path]) | |||
self.add_verify_options(collection_parser, parents=[common, collections_path]) | |||
self.add_search_options(collection_parser, parents=[common]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the options show up with ansible-galaxy collection search --help
right now but filtering by author (github username)/platform doesn't work for collections I think. add_search_options
could add a --namespace
option + not add --author
/--platform
for collections.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to find the name of the parameters that work before i can add them, right now i just found one that works , mostly by accident
# https://galaxy.ansible.com/search?keywords=<term>&order_by=-relevance&deprecated=false&type=collection&page=1 | ||
# api_path = self.available_api_versions.get('v3', self.available_api_versions.get('v2')) | ||
# url_paths = [self.api_server, api_path, 'collections', '/?search=%s' % term] | ||
url_paths = ['https://galaxy.ansible.com', 'api', 'internal', 'ui', 'search', '/?type=collection&deprecated=false&keywords=%s' % term] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use self.api_server instead:
url_paths = ['https://galaxy.ansible.com', 'api', 'internal', 'ui', 'search', '/?type=collection&deprecated=false&keywords=%s' % term] | |
url_paths = [self.api_server, 'internal', 'ui', 'search', '/?type=collection&deprecated=false&keywords=%s' % term] |
Unless it's hardcoded because it doesn't work with v3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nor v2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't v2 community galaxy collections? v1 is roles
But noticed the conversation about internal/ui not being a supported, so it doesn't really matter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for roles we still use the v1, i tried equivalent v2 and v3 but could not find, will resolve with help of galaxy team
ISSUE TYPE
COMPONENT NAME
ansible-galaxy