-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Added support to collection for named urls #14205
Conversation
006c000
to
990d0fb
Compare
Organizations are vanilla name-unique. So you would have to do |
Vanilla names should still work, What I've been trying to do is make it so it takes the output of export out of the box, and using that as the metric, if we could an output for export to put out the named urls... well that would be /chefskiss |
It might make sense to make it clear that |
I found a bug playing around with this and will be providing an update to the code. |
990d0fb
to
625fb08
Compare
@AlanCoding items with just a single named reference (i.e. Orgs) would skip the named reference task in this current implementation. Since a named reference is a pretty simple git we could remove the check on |
625fb08
to
52e77ed
Compare
caca1b3
to
a2f8846
Compare
How should we document features like this? We have plugin-level docs with examples, but because this is general that's not effective. For stuff like authentication, there are parameters that correspond to features so those options can be documented on their own. To me that leaves the README. Maybe we need a general feature overview that covers stuff like this. Otherwise, how do users find it? |
@AlanCoding I did open an issue for updating all of the docs to say: "name, ID or named URL" #14208. Which would help but yea, we could also do something in the root readme. |
a2f8846
to
21db422
Compare
I put a place holder in the readme which will need a last minute replacement once we know what version this will be released with. |
@@ -68,6 +68,7 @@ Notable releases of the `awx.awx` collection: | |||
- 7.0.0 is intended to be identical to the content prior to the migration, aside from changes necessary to function as a collection. | |||
- 11.0.0 has no non-deprecated modules that depend on the deprecated `tower-cli` [PyPI](https://pypi.org/project/ansible-tower-cli/). | |||
- 19.2.1 large renaming purged "tower" names (like options and module names), adding redirects for old names | |||
- X.X.X added support of named URLs to all modules. Anywhere that previously accepted name or id can also support named URLs |
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.
so it's either going to be 22.5.1 or 22.6.0 or 23.0.0?
@@ -421,7 +443,6 @@ def get_one(self, endpoint, name_or_id=None, allow_none=True, check_exists=False | |||
self.fail_wanted_one(response, endpoint, new_kwargs.get('data')) | |||
|
|||
if check_exists: | |||
name_field = self.get_name_field_from_endpoint(endpoint) |
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.
so surprised no linter could pick this up
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 seems complete, I just want to look for some feedback that people see this and use it and it doesn't mess them up.
21db422
to
07407ec
Compare
SUMMARY
With this change awx.awx colleciton modules can used named URLs. For example:
ISSUE TYPE
COMPONENT NAME
AWX VERSION
ADDITIONAL INFORMATION