Bug 1476381

Summary: creating new authentication using REST API fails with undefined method `id' for nil:NilClass
Product: Red Hat CloudForms Management Engine Reporter: Martin Kourim <mkourim>
Component: APIAssignee: James Wong <jwong>
Status: CLOSED DUPLICATE QA Contact: Martin Kourim <mkourim>
Severity: medium Docs Contact:
Priority: high    
Version: 5.8.0CC: jhardy, jtullo, obarenbo, smallamp
Target Milestone: GA   
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: api:rest
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-07 14:39:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Kourim 2017-07-28 18:47:40 UTC
Description of problem:
When creating authentications using /api/authentications the action fails with undefined method `id' for nil:NilClass


Version-Release number of selected component (if applicable):
5.8.1.5


How reproducible:
very


Steps to Reproduce:
1.
POST /api/authentications
{
  "description" : "Authentication Description1",
  "name" : "SomeCredentials1",
  "related" : {},
  "type" : "ManageIQ::Providers::AnsibleTower::AutomationManager::Credential",
  "manager_resource" : { "href" : "https://<address>/api/providers/:id_of_ansible_provider" }
}
2. check corresponding task


Actual results:
{
...
    "name": "Creating Ansible Tower Credential (name=SomeCredentials1)",
    "state": "Finished",
    "status": "Error",
    "message": "undefined method `id' for nil:NilClass",
    "userid": "system",
...
}


Expected results:
Authentication is created

Comment 3 Jillian Tullo 2017-10-16 18:05:55 UTC
Assigning to James as he knows the issue behind this error.

Comment 4 James Wong 2017-11-07 14:39:41 UTC

*** This bug has been marked as a duplicate of bug 1476327 ***

Comment 5 James Wong 2017-11-07 14:41:04 UTC
As discussed and with the agreement from Martin, I've closed this as duplicate and will provide fix in https://bugzilla.redhat.com/show_bug.cgi?id=1476327