mirror of
https://github.com/ansible/awx.git
synced 2026-02-22 05:30:18 -03:30
Convert tower_role to no longer use tower-cli
This commit is contained in:
@@ -190,6 +190,15 @@ class TowerModule(AnsibleModule):
|
||||
else:
|
||||
setattr(self, honorred_setting, config_data[honorred_setting])
|
||||
|
||||
@staticmethod
|
||||
def param_to_endpoint(name):
|
||||
exceptions = {
|
||||
'inventory': 'inventories',
|
||||
'target_team': 'teams',
|
||||
'workflow': 'workflow_job_templates'
|
||||
}
|
||||
return exceptions.get(name, '{0}s'.format(name))
|
||||
|
||||
def head_endpoint(self, endpoint, *args, **kwargs):
|
||||
return self.make_request('HEAD', endpoint, **kwargs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user