Bug 961904 - Downloadable cartridge metadata on an application is not showing the 'url' attribute
Downloadable cartridge metadata on an application is not showing the 'url' at...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-10 13:17 EDT by Clayton Coleman
Modified: 2015-05-14 20:54 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-11 00:03:05 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Clayton Coleman 2013-05-10 13:17:29 EDT
Create an application based on a downloadable cartridge.  Execute:

/broker/rest/domains/abc/applications?include=cartridges

The cartridge representing the downloadable cartridge should have an attribute "url" that is equal to the value used to create the cartridge during creation.

GET /broker/rest/domains/abc/applications/cartridges
GET /broker/rest/domains/abc/applications/cartridges/<id>

should also return that value.

Blocks the UI from reporting the cartridge is custom.
Comment 1 Clayton Coleman 2013-05-10 13:53:13 EDT
Next sprint
Comment 2 Rajat Chopra 2013-05-16 13:36:30 EDT
Fixed with rev#6964cf019bf6316b53f6fe5dc1f33350c8db48cc
Comment 3 Xiaoli Tian 2013-05-17 06:40:31 EDT
Tested it on devenv_3238, created an app with 
https://raw.github.com/openshift/downloadable-mock/master/metadata/manifest.yml,
but the url is null:

#curl -s -k -H 'Content-Type: Application/json' --user xtian+t1@redhat.com:12
https://localhost/broker/rest/domains/domx1/applications/mockapp/cartridges/downloadable-mock-0.1
-X GET|python -m json.tool|grep url
        "license_url": "", 
        "url": null, 
# curl -s -k -H 'Content-Type: Application/json' --user xtian+t1@redhat.com:12
https://localhost/broker/rest/domains/domx1/applications/mockapp/cartridges -X
GET|python -m json.tool |grep url
            "license_url": "", 
            "url": null, 



# curl -s -k -H 'Content-Type: Application/json' --user xtian+t1@redhat.com:12
https://localhost/broker/rest/domains/domx1/applications/mockapp/cartridges -X
GET|python -m json.tool
{
    "data": [
        {
            "additional_gear_storage": 0, 
            "base_gear_storage": 1, 
            "collocated_with": [], 
            "current_scale": 1, 
            "description": "A downloadable mock cartridge for development use
only.", 
            "display_name": "Downloadable Mock Cartridge 0.1", 
            "gear_profile": "small", 
            "help_topics": {}, 
            "license": "ASL 2.0", 
            "license_url": "", 
            "links": {
                "DELETE": {
              ''''''''
             "tags": [
              "service", 
              "web_framework"
            ], 
            "type": "standalone", 
            "url": null, 
            "usage_rates": [], 
            "version": "0.1", 
            "website": 


# curl -s -k -H 'Content-Type: Application/json' --user xtian+t1@redhat.com:12
https://localhost/broker/rest/domains/domx1/applications/mockapp/cartridges/downloadable-mock-0.1
-X GET|python -m json.tool
{
    "data": {
        "additional_gear_storage": 0, 
        "base_gear_storage": 1, 
        "collocated_with": [], 
        "current_scale": 1, 
        "description": "A downloadable mock cartridge for development use
only.", 
        "display_name": "Downloadable Mock Cartridge 0.1", 
        "gear_profile": "small", 
        "help_topics": {}, 
        "license": "ASL 2.0", 
        "license_url": "", 
        "links": {
            "DELETE": {
                "href":
"https://localhost/broker/rest/domains/domx1/applications/mockapp/cartridges/downloadable-mock-0.1", 
                "method": "DELETE", 

 '''''''''
  "scales_from": 1, 
        "scales_to": 1, 
        "scales_with": null, 
        "status_messages": null, 
        "supported_scales_from": 1, 
        "supported_scales_to": 1, 
        "tags": [
            "service", 
            "web_framework"
        ], 
        "type": "standalone", 
        "url": null, 
        "usage_rates": [], 
        "version": "0.1", 
        "website": ""
Comment 4 Rajat Chopra 2013-05-17 11:07:52 EDT
refixed in pull request#2531
Comment 5 Clayton Coleman 2013-05-17 19:21:26 EDT
UI changes are in https://github.com/openshift/rhc/pull/386 to show this in the CLI (console is already showing it)
Comment 6 Jianwei Hou 2013-05-20 03:47:02 EDT
Verified on devenv_3247

Invoke REST API, GET:
/broker/rest/domains/abc/applications?include=cartridges
/broker/rest/domains/abc/applications/<app>/cartridges 
/broker/rest/domains/abc/applications/<app>/cartridges/<cartridge>

The cartridge"type": "standalone",
        "url": "https://raw.github.com/xltian/perltestonly/master/metadata/manifest.yml",
        "usage_rates": [
 url can be returned:
<-------------------------->
..................
"type": "standalone",
        "url": "https://raw.github.com/xltian/perltestonly/master/metadata/manifest.yml",
        "usage_rates": [
............
<-------------------------->

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