Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1355750 - It should be possible to define/modify the relevant hawkular endpoint
Summary: It should be possible to define/modify the relevant hawkular endpoint
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: API
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: GA
: 5.7.0
Assignee: Yaacov Zamir
QA Contact: Jaroslav Henner
URL:
Whiteboard: container
Depends On:
Blocks: 1355785
TreeView+ depends on / blocked
 
Reported: 2016-07-12 12:28 UTC by Yaacov Zamir
Modified: 2017-01-11 20:20 UTC (History)
6 users (show)

Fixed In Version: 5.7.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1355785 (view as bug list)
Environment:
Last Closed: 2017-01-11 20:20:23 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)

Description Yaacov Zamir 2016-07-12 12:28:36 UTC
Description of problem:
As it is possible to create/modify container providers through Rest-API, it should be possible to define/modify the relevant hawkular endpoint.


How reproducible:
Use ManageIQ api ant create a new container providers with hawkular endpoint.

Steps to Reproduce:
1. call the POST method for:
http://localhost:3000/api/providers with a body containing information about multple endpoints.

Actual results:
We get an error

Expected results:
A new provider is created with multiple endpoints

Submited upstream:
https://github.com/ManageIQ/manageiq/pull/9648
Issue:
https://github.com/ManageIQ/manageiq/issues/9506

Comment 2 Yaacov Zamir 2016-07-12 12:34:20 UTC
We would like to have this z stream

Comment 4 Yaacov Zamir 2016-08-02 08:42:57 UTC
Merged:
https://github.com/ManageIQ/manageiq/pull/9648

Comment 5 Jaroslav Henner 2016-10-18 16:14:35 UTC
Works. Tested with these:

cfme-5.6.2.1-1.el7cf.x86_64
cfme-5.7.0.0-1.el7cf.x86_64


$ cat /tmp/json 
{
    "action": "edit",
    "name": "test3",
    "connection_configurations": [
	{ "endpoint": {
			"role": "default",
			"hostname": "barar",
			"port": "54321"}},
	{ "endpoint": {
		"role": "hawkular",
		"hostname": "barfoo",
		"port": "54322"}}
    ]
}

$ curl -X POST -u admin:smartvm -k https://10.A.B.C/api/providers/1 --data @/tmp/json | json_pp 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   541    0   299  100   242    336    272 --:--:-- --:--:-- --:--:--   336
{
   "zone_id" : 1,
   "href" : "https://10.A.B.C/api/providers/1",
   "id" : 1,
   "guid" : "3b35e106-954d-11e6-b9df-fa163ef66118",
   "api_version" : "v1",
   "tenant_id" : 1,
   "name" : "test3",
   "created_on" : "2016-10-18T16:09:22Z",
   "type" : "ManageIQ::Providers::OpenshiftEnterprise::ContainerManager",
   "updated_on" : "2016-10-18T16:09:22Z"
}

$curl -u admin:smartvm -k 'https://10.A.B.C/api/providers/1?attributes=authentications,endpoints' | json_pp                                                                             
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1779    0  1779    0     0   2383      0 --:--:-- --:--:-- --:--:--  2381
{
   "name" : "test3",
   "href" : "https://10.A.B.C/api/providers/1",
   "created_on" : "2016-10-18T16:09:22Z",
   "tenant_id" : 1,
   "endpoints" : [
      {
         "resource_id" : 1,
         "updated_at" : "2016-10-18T16:10:11Z",
         "hostname" : "barar",
         "created_at" : "2016-10-18T16:09:22Z",
         "port" : 54321,
         "verify_ssl" : 1,
         "id" : 1,
         "role" : "default",
         "resource_type" : "ExtManagementSystem"
      },
      {
         "verify_ssl" : 1,
         "port" : 54322,
         "resource_type" : "ExtManagementSystem",
         "role" : "hawkular",
         "id" : 2,
         "resource_id" : 1,
         "updated_at" : "2016-10-18T16:10:11Z",
         "created_at" : "2016-10-18T16:09:22Z",
         "hostname" : "barfoo"
      }
   ],
   "id" : 1,
   "guid" : "3b35e106-954d-11e6-b9df-fa163ef66118",
...
   "type" : "ManageIQ::Providers::OpenshiftEnterprise::ContainerManager",
   "updated_on" : "2016-10-18T16:09:22Z",
   "api_version" : "v1",
   "zone_id" : 1,
   "authentications" : []
}


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