Bug 1280257

Summary: Containers: Failed to create OpenShift Provider in ContainerManager
Product: Red Hat CloudForms Management Engine Reporter: Avi Tal <atal>
Component: APIAssignee: Gregg Tanzillo <gtanzill>
Status: CLOSED DUPLICATE QA Contact: Dave Johnson <dajohnso>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.5.0CC: jhardy, jhenner, jmatthew, obarenbo, srevivo
Target Milestone: GA   
Target Release: 5.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: container
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Using openshift installed on OpenStack Installing CFME VM on OpenStack as well
Last Closed: 2015-11-11 11:12:07 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 Avi Tal 2015-11-11 10:50:07 UTC
Description of problem:
Using REST API to add new OpenShift provider is failing due to missing userid/password credentials.

Version-Release number of selected component (if applicable):
CFME 4.0 beta2 5.5.0.9

How reproducible:
<cfme> == cfme ip
<token> == generated token on OpenShift master

use postman chrome extension
Add credentials to postman
or
login, on a different tab, to cfme ui


Steps to Reproduce:
POST https://<cfme>/api/providers

{
  "type"      : "ManageIQ::Providers::Openshift::ContainerManager",
  "name"      : "atal-oc",
  "hostname" : "10.8.48.66",
  "ipaddress" : "10.8.48.66",
  "credentials" : {
    "token" : "<token>"
  }
}


Actual results:
{
error: {
kind: "bad_request"
message: "Could not create the new provider - Unsupported credential attributes token specified, ManageIQ::Providers::Openshift::ContainerManager supports: userid, password"
klass: "ApiController::BadRequestError"
}-
}

Expected results:
{
  "results": [
    {
      "id": 105,
      "name": "atal-oc",
      "hostname": "10.8.48.66",
      "ipaddress": "10.8.48.66",
      "created_on": "2015-05-05T15:47:41Z",
      "updated_on": "2015-05-05T15:47:41Z",
      "guid": "10360312-f33e-11e4-86c7-b8e85646e742",
      "zone_id": 1,
      "type": "ManageIQ::Providers::Openshift::ContainerManager"
    }
  ]
}

Additional info:

Comment 2 Jaroslav Henner 2015-11-11 11:12:07 UTC

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