Bug 848956
Summary: | Rest api for list plans via XML is not working | ||
---|---|---|---|
Product: | OKD | Reporter: | Chandrika Gole <cgole> |
Component: | Master | Assignee: | Lili Nader <lnader> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 2.x | CC: | bmeng, mfisher, mshao, qgong, xtian |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-09-17 21:29:15 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
Chandrika Gole
2012-08-16 22:46:54 UTC
Checked this on devenv_2008, list plan via REST API got correct info when using json format. And will get the same issue with xml format [root@domU-12-31-39-0B-E0-61 cartridges]# curl -3 -k -H "Accept: application/json" --user "bmeng:123456" https://localhost/broker/rest/plans/ -X GET |python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 120 362 0 362 0 0 5469 0 --:--:-- --:--:-- --:--:-- 36200 { "data": [ { "capabilities": { "gear_sizes": [ "small" ], "max_gears": 3 }, "id": "freeshift", "name": "FreeShift", "plan_no": 10044929 }, { "capabilities": { "gear_sizes": [ "small", "medium" ], "max_gears": 16, "max_storage_per_gear": 30 }, "id": "megashift", "name": "MegaShift", "plan_no": 10044931 } ], "messages": [], "status": "ok", "supported_api_versions": [ 1.0, 1.1000000000000001 ], "type": "plans", "version": "1.1" } Since this is merged: li commit : 2cfae3fa200310b2aac670f72b07d4e86c30d8bc Move this to ON_QA to test Verified on INT(devenv_2036) [rony@localhost qsruby8]$ curl -3 -k -H "Accept: application/xml" --user "qgong:111111" https://int.openshift.redhat.com/broker/rest/plans <?xml version="1.0" encoding="UTF-8"?> <response> <type>plans</type> <version>1.1</version> <messages/> <data> <plan> <plan-no>10044931</plan-no> <id>megashift</id> <name>MegaShift</name> <capabilities> <gear-sizes> <gear-size>small</gear-size> <gear-size>medium</gear-size> </gear-sizes> <max-gears>16</max-gears> <max-storage-per-gear>30</max-storage-per-gear> </capabilities> </plan> <plan> <plan-no>10044929</plan-no> <id>freeshift</id> <name>FreeShift</name> <capabilities> <gear-sizes> <gear-size>small</gear-size> </gear-sizes> <max-gears>3</max-gears> </capabilities> </plan> </data> <supported-api-versions> <supported-api-version>1.0</supported-api-version> <supported-api-version>1.1</supported-api-version> </supported-api-versions> <status>ok</status> </response> [rony@localhost qsruby8]$ curl -3 -k -H "Accept: application/json" --user "qgong:111111" https://int.openshift.redhat.com/broker/rest/planspython -mjson.tool curl: option -mjson.tool: expected a proper numerical parameter curl: try 'curl --help' or 'curl --manual' for more information [rony@localhost qsruby8]$ curl -3 -k -H "Accept: application/json" --user "qgong:111111" https://int.openshift.redhat.com/broker/rest/plans|python -mjson.tool % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 120 362 0 362 0 0 230 0 --:--:-- 0:00:01 --:--:-- 1124 { "data": [ { "capabilities": { "gear_sizes": [ "small", "medium" ], "max_gears": 16, "max_storage_per_gear": 30 }, "id": "megashift", "name": "MegaShift", "plan_no": 10044931 }, { "capabilities": { "gear_sizes": [ "small" ], "max_gears": 3 }, "id": "freeshift", "name": "FreeShift", "plan_no": 10044929 } ], "messages": [], "status": "ok", "supported_api_versions": [ 1.0, 1.1000000000000001 ], "type": "plans", "version": "1.1" } |