Bug 1351253

Summary: Cannot specify security_protocol when creating a cloud provider via the API
Product: Red Hat CloudForms Management Engine Reporter: Jason Montleon <jmontleo>
Component: APIAssignee: Šimon Lukašík <slukasik>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Kourim <mkourim>
Severity: high Docs Contact:
Priority: high    
Version: 5.6.0CC: arubin, cpelland, gtanzill, jhardy, obarenbo, simaishi, tcarlin
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.7.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1352011 (view as bug list) Environment:
Last Closed: 2017-01-11 19:51:52 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:
Bug Depends On:    
Bug Blocks: 1282895, 1309373, 1352011    

Description Jason Montleon 2016-06-29 14:23:21 UTC
Description of problem:
We cannot create a Cloud Provider while specifying the security protocol when trying to do so via the CFME API

Version-Release number of selected component (if applicable):
5.6.0.9-rc2.20160531154046_b4e2f6d 

How reproducible:
Always

Steps to Reproduce:
1. Install CFME 5.6.0.9-rc2.20160531154046_b4e2f6d 
2. Try to create a cloud provider via the api while specifying the security_protocol

Actual results:
{"error":{"kind":"bad_request","message":"Could not create the new provider - Invalid Provider attributes security_protocol specified","klass":"ApiController::BadRequestError"}} 

Expected results:
cloud provider is created

Additional info:
I added security_protocol to ENDPOINT_ATTRS in /var/www/miq/vmdb/app/controllers/api_controller/providers.rb and restarted evmserverd. After that I was able to create the cloud provider as expected.

Comment 3 Šimon Lukašík 2016-07-01 11:36:54 UTC
https://github.com/ManageIQ/manageiq/pull/9570

Comment 5 Martin Kourim 2016-10-06 14:56:01 UTC
Verified that it's possible to specify security_protocol when creating a cloud provider via the API using following request:

POST /api/providers
{
  "name" : "openstack test",
  "type" : "ManageIQ::Providers::Openstack::CloudManager",
  "hostname" : "<ip_address>",
  "ipaddress" : "<ip_address>",
  "security_protocol" : "ssl",
  "credentials" :  {
    "userid" : "<id>",
    "password" : "<password>"
  }
}