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 981283 - Contents of ADD_CARTRIDGE got messed under applications/<app_name>/cartridges
Summary: Contents of ADD_CARTRIDGE got messed under applications/<app_name>/cartridges
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Master
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Lili Nader
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-04 11:28 UTC by Meng Bo
Modified: 2015-05-15 00:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-22 15:21:25 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Meng Bo 2013-07-04 11:28:38 UTC
Description of problem:
When trying to find the method to add cartridge to app via REST API, found the usage of ADD_CARTRIDGE makes me confusing.

Version-Release number of selected component (if applicable):
devenv_3449

How reproducible:
always

Steps to Reproduce:
1.Trying to find the method to add cartridge to app via REST API
$curl -k -H 'Accept: application/json' --user bmeng@redhat.com:123123 https://ec2-54-234-3-195.compute-1.amazonaws.com/broker/rest/domains/bmengdev/applications/py27/ |json_reformat


Actual results:
1. The "name" field under required_param has value "name", but we cannot add cartridge with "-d name=xxx", the correct value should be "cartridge"
2. The "additional_storage" "scales_from" "scales_to" are listed under the optional_param, but they cannot be performed when adding cartridge.


Expected results:
User can get the correct method to do operation via REST API.


Additional info:
$curl -k -H 'Accept: application/json' --user bmeng@redhat.com:123123 https://ec2-54-234-3-195.compute-1.amazonaws.com/broker/rest/domains/bmengdev/applications/py27/ |json_reformat
<-----snip>
            "ADD_CARTRIDGE": {
                "href": "https://ec2-54-234-3-195.compute-1.amazonaws.com/broker/rest/domains/bmengdev/applications/py27/cartridges",
                "method": "POST",
                "optional_params": [
                    {
                        "default_value": null,
                        "description": "The component to colocate with",
                        "name": "colocate_with",
                        "type": "string",
                        "valid_options": [
                            "python-2.7",
                            "mysql-5.1",
                            "mongodb-2.2",
                            "postgresql-8.4"
                        ]
                    },
                    {
                        "default_value": null,
                        "description": "Minimum number of gears to run the component on.",
                        "name": "scales_from",
                              ^^^^^^^^^^^^^^^^^
                        "type": "integer",
                        "valid_options": [

                        ]
                    },
                    {
                        "default_value": null,
                        "description": "Maximum number of gears to run the component on.",
                        "name": "scales_to",
                          ^^^^^^^^^^^^^^^^^^^^^^^
                        "type": "integer",
                        "valid_options": [

                        ]
                    },
                    {
                        "default_value": null,
                        "description": "Additional GB of space to request on all gears running this component.",
                        "name": "additional_storage",
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                        "type": "integer",
                        "valid_options": [

                        ]
                    },
                    {
                        "default_value": null,
                        "description": "A URL to a downloadable cartridge.",
                        "name": "url",
                        "type": "string",
                        "valid_options": [

                        ]
                    }
                ],
                "rel": "Add embedded cartridge",
                "required_params": [
                    {
                        "description": "framework-type, e.g.: mongodb-2.0",
                        "invalid_options": [

                        ],
                        "name": "name",                 <<----------------
                        "type": "string",
                        "valid_options": [
                            "10gen-mms-agent-0.1",
                            "cron-1.4",
                            "haproxy-1.4",
                            "jenkins-client-1.4",
                            "metrics-0.1",
                            "mock-plugin-0.1",
                            "mongodb-2.2",
                            "mysql-5.1",
                            "phpmyadmin-3.4",
                            "postgresql-8.4",
                            "postgresql-9.2",
                            "rockmongo-1.1",
                            "switchyard-0.6"
                        ]
                    }
                ]
            },

Comment 1 Lili Nader 2013-07-09 17:45:28 UTC
I don't understand why this is a bug.

Actual results:
1. The "name" field under required_param has value "name", but we cannot add cartridge with "-d name=xxx", the correct value should be "cartridge"

Lili: Works for me.


2. The "additional_storage" "scales_from" "scales_to" are listed under the optional_param, but they cannot be performed when adding cartridge.

Lili:Works for me.

Please give an actual example were this API is not working.

Comment 2 Meng Bo 2013-07-10 08:32:55 UTC
That works for me from my side too...

Not sure what happened when I reporting this bug.

Move to verified. Thanks.


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