Bug 1476381 - creating new authentication using REST API fails with undefined method `id' for nil:NilClass
Summary: creating new authentication using REST API fails with undefined method `id' f...
Keywords:
Status: CLOSED DUPLICATE of bug 1476327
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: cfme-future
Assignee: James Wong
QA Contact: Martin Kourim
URL:
Whiteboard: api:rest
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-28 18:47 UTC by Martin Kourim
Modified: 2017-12-05 15:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-07 14:39:41 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.