ManageIQ / manageiq-providers-ansible_tower

ManageIQ plugin for the Ansible Tower provider.
https://github.com/ansible/awx
Apache License 2.0
9 stars 54 forks source link

Unable to create authentications via REST for ansible tower 3.6 that only supports API version v2. #236

Open valaparthvi opened 4 years ago

valaparthvi commented 4 years ago

Description: Creating authentications via REST fails for ansible tower 3.6 that only supports API version v2.

POST /api/authentications
{
    "action": "create",
    "resources": [
        {
            "description": "TestDescription",
            "name": "test_credentials_36",
            "related": {},
            "user": 1,
            "userid": "foo",
            "password": "foo",
            "host": "baz_36",
            "type": "ManageIQ::Providers::AnsibleTower::AutomationManager::VmwareCredential",
            "manager_resource": {
                "href": "https://192.168.122.33/api/providers/6"
            }
        }
    ]
}
Response:
{
  "results": [
    {
      "success": true,
      "message": "Creating Authentication",
      "task_id": "35",
      "task_href": "https://192.168.122.33/api/tasks/35"
    }
  ]
}

GET /api/tasks/35
Reponse : 
{
  "href": "https://192.168.122.33/api/tasks/35",
  "id": "35",
  "name": "Creating Ansible Tower Credential (name=test_credentials_36)",
  "state": "Finished",
  "status": "Error",
  "message": "{\"credential_type\":[\"This field is required.\"]}",
  "userid": "system",
  ...
  ...
  ...
  "actions": [
    ...
    ...
  ]
}
  1. Is there an existing issue already reported or any related bugzilla? https://bugzilla.redhat.com/show_bug.cgi?id=1794047

  2. Severity: High

  3. Version: 5.11.8.0 Note: I believe this issue has existed since the beginning. We started testing with ansible tower 3.6 recently and discovered this bug and for other tower providers that we have, we use v1.

agrare commented 4 years ago

Thanks for the bug report @valaparthvi! What version of MIQ are you using?

valaparthvi commented 4 years ago

Hi @agrare I updated the description, sorry I forgot to mention that earlier.

Version: 5.11.8.0 Note: I believe this issue has existed since the beginning. We started testing with ansible tower 3.6 recently and discovered this bug and for other tower providers that we have, we use v1.