awxkit? plain requests? Options abound!
Commenting to put @john-westcott-iv on the conversation. There's also some more background on this.
A pull request https://github.com/ansible/ansible/pull/48649 was raised as a WIP to do exactly this, but it was never fully finished.
@beeankha + @john-westcott-iv, @squidboylan will be your contact for testing this
@beeankha @squidboylan so uh...we ready to needs_test or close this one 馃槃
I think it makes sense to leave this open until all of the modules are ported
Currently remaining:
$ grep -l "from tower_cli" awx_collection/plugins/modules/*.py
awx_collection/plugins/modules/tower_credential.py
awx_collection/plugins/modules/tower_job_template.py
awx_collection/plugins/modules/tower_job_wait.py
awx_collection/plugins/modules/tower_label.py
awx_collection/plugins/modules/tower_notification.py
awx_collection/plugins/modules/tower_receive.py
awx_collection/plugins/modules/tower_role.py
awx_collection/plugins/modules/tower_send.py
awx_collection/plugins/modules/tower_workflow_launch.py
awx_collection/plugins/modules/tower_workflow_template.py
Active PRs that would close out modules:
tower_job_template in progress - https://github.com/ansible/awx/pull/6353tower_workflow_template getting close - https://github.com/ansible/awx/pull/6291tower_send / tower_receive not functional yet - https://github.com/jbradberry/awx/pull/3~These 4 modules~ The latter 3 modules are the ones that we would _replace_, but not _port_. In initial discussions (JT is ported), we talked about replacing tower_role too, but this doesn't make sense to me after looking more at the code. With the association stuff in, I feel fine about doing a straight-forward refactor of that module.
The other 5 of these 10 modules should not be anywhere near the same difficulty. However, not all of them are CRUD type modules (the CRUD modules are eligible to be auto-generated), so similar to tower_role, someone just has to sit down and refactor the code.
tower_label in progress - #6361 tower_role in progress https://github.com/ansible/awx/pull/6370Latest, after a few merges we recently got in:
grep -l "from tower_cli" awx_collection/plugins/modules/*.py
awx_collection/plugins/modules/tower_credential.py
awx_collection/plugins/modules/tower_job_template.py
awx_collection/plugins/modules/tower_job_wait.py
awx_collection/plugins/modules/tower_notification.py
awx_collection/plugins/modules/tower_receive.py
awx_collection/plugins/modules/tower_send.py
awx_collection/plugins/modules/tower_workflow_launch.py
awx_collection/plugins/modules/tower_workflow_template.py
In progress:
WF: https://github.com/ansible/awx/pull/6291
JT: https://github.com/ansible/awx/pull/6353
cc @beeankha @AlanCoding @john-westcott-iv in case there's anything you're aware of that I'm not.
By this metric this is complete:
$ grep -l "from tower_cli" awx_collection/plugins/modules/*.py
awx_collection/plugins/modules/tower_receive.py
awx_collection/plugins/modules/tower_send.py
awx_collection/plugins/modules/tower_workflow_template.py
Only remaining thing that should be considered is to get better across-the-board messaging.
This description for both send & receive should loudly proclaim its deprecation. We don't have a line limit here, this can talk in as much detail as people want about what @jbradberry has in the works. We also need to re-word the send/receive module.deprecate message.
I tried a meta/routing.yml file like in:
But it didn't seem to do anything. I do not remember from prior conversations if this is still in the works (probably along with flatmapping), or it's supposed to work now. If it did work, I would add this file:
plugin_routing:
modules:
tower_receive:
deprecation:
removal_date: TBD
warning_text: will be replaced by export command in the new AWX CLI
tower_send:
deprecation:
removal_date: TBD
warning_text: will be replaced by import command in the new AWX CLI
tower_workflow_template:
deprecation:
removal_date: TBD
warning_text: replaced by tower_workflow_job_template and tower_workflow_job_template_node
I think we _also_ need to update the status
from "preview" to "deprecated", as done here:
Also done there - the DOCUMENTATION has a deprecated: key. We tried this before, but it failed the sanity tests.
So we have several TODO items here. Some basic documentation touchups can be done now, but the overall way of deprecating content in collections is blocked pending clear messaging by the Ansible core team now.
This takes care of some minor things I mentioned
@squidboylan I think you are best to say if this is done. AFAIK you've been testing each step of the way, so probably ready to close
is this done even though import/export isnt done? Should we close this and add issues for import/export modules?
@wenottingham could use some clarification here.
I'm thinking we can make a new issue for the import/export new implementation based on awx cli and call this issue done.
linking https://github.com/ansible/awx/issues/5146 ...thats the "implement import/export in awx cli" issue.
Yeah, I'm fine with closing this out and having import/export as a followon issue.
@kdelee I don't want to munge this in with #5146. Jeff was in agreement with me in-principal that we could add those to his branch / PR. But we shouldn't block the import/export work on having AWX collection modules for them, unless someone has them ready to go. Right now I don't have time for that.
Let's make a new issue for the specific and well-defined task of adding new tower_import and tower_export modules.
Most helpful comment
@kdelee I don't want to munge this in with #5146. Jeff was in agreement with me in-principal that we could add those to his branch / PR. But we shouldn't block the import/export work on having AWX collection modules for them, unless someone has them ready to go. Right now I don't have time for that.
Let's make a new issue for the specific and well-defined task of adding new
tower_importandtower_exportmodules.