"copy" features are missed.
on awx web UI, users may create job templates or inventories by copying existing ones. it would be great helpful if the towerlib supports theses features.
Yes, you may be right. But while waiting for someone to fix that, there is neat workaround to excute a copy action with towerlib:
towerlib = Tower("tower.com", "tower_user", "tower_pw", secure=True, ssl_verify=False)
job_template = towerlib_obj.get_job_template_by_name("My Job Template")
relative_url_copy = job_template.__dict__['_data']['related']['copy']
url = f'{towerlib.api[:-7]}{relative_url_copy}'
new_job_template_name = { "name": f'{job_template.name} - Copy' }
new_job_template = towerlib.session.post(url, json=new_job_template_name)
This should be easy to implement. I will try to make some time next week for this.
@phospi @costastf thank you guys.
@hongzhaoo, @phospi apologies for not picking this up, but I have been busy with the birth of my son and parental leave. Any chance @phospi you would like to provide a PR with the feature?
@costastf Sorry, we are currently short-staffed. The workaround is sufficient for us. We don't plan to implement this feature at the time being.
Thanks @phospi I appreciate the response.