This may be a misunderstanding of the underlying model, but approaching this from a user perspective: GET /broker/rest/domains/id/applications/name/gears.json "data": [ { "git_url": "ssh://b70753105c914bf2a0cc4713885e6b1f.rhcloud.com/~/git/testscale.git/", "uuid": "b70753105c914bf2a0cc4713885e6b1f", "components": [ { "proxy_host": "testscale-fav2345.dev.rhcloud.com", "name": "jbossas-7", "proxy_port": 35691, "internal_port": 8080 }, { "proxy_host": null, "name": "haproxy-1.4", "proxy_port": null, "internal_port": null } ] }, { "git_url": "ssh://516078ca81074b98865f7f6f13d62796.rhcloud.com/~/git/testscale.git/", "uuid": "516078ca81074b98865f7f6f13d62796", "components": [ { "proxy_host": "516078ca81-fav2345.dev.rhcloud.com", "name": "jbossas-7", "proxy_port": 35696, "internal_port": 8080 } ] } ], git_url on the gear object implies that this is an individual instance of a gear - but the git repository is associated with the ruby-1.8 component, not the actual gear (to a user). When I roll up these gears to display to a user - which git_url should I use? When it scales up.... should my git url change? How does a caller know that gear 1 and gear 2 are equivalent for the purposes of reporting they are the same "cartridge"? Name is currently unique, but this implies that in the future all applications can only have one web cartridge. I think the caller needs an unequivocal way to report which cartridges are associated (arbitrary id) - if I had a scaled database, and have multiple database carts added to an app, how do i know which database gears are linked? Doesn't seem possible here.
*** Bug 817172 has been marked as a duplicate of this bug. ***
https://github.com/openshift/crankcase/pull/15
Verified this bug on devenv_1762, and PASS. create a scalable app with mysql embedded, and then scale up, call gear_groups to get the following: $ curl -k -X GET -H 'Accept: application/xml' --user jialiu:xxx https://ec2-23-21-0-194.compute-1.amazonaws.com/broker/rest/domains/jialiu/applications/myapp/gear_groups <?xml version="1.0" encoding="UTF-8"?> <response> <status>ok</status> <version>1.0</version> <data> <gear-group> <cartridge> <cartridge> <name>mysql-5.1</name> </cartridge> </cartridge> <name>@@app/comp-proxy/cart-mysql-5.1/group-mysql</name> <gears> <gear> <state>unknown</state> <id>4bf4e9e0818b463684899ac47efba333</id> </gear> </gears> </gear-group> <gear-group> <cartridge> <cartridge> <name>haproxy-1.4</name> </cartridge> <cartridge> <name>php-5.3</name> </cartridge> </cartridge> <name>@@app/comp-proxy/cart-php-5.3</name> <gears> <gear> <state>started</state> <id>2772e9d0d1b842e895987eb7cdd1e723</id> </gear> </gears> </gear-group> <gear-group> <cartridge> <cartridge> <name>php-5.3</name> </cartridge> </cartridge> <name>@@app/comp-web/cart-php-5.3</name> <gears> <gear> <state>started</state> <id>fcc8641a439e409dabe5f449b593c764</id> </gear> <gear> <state>started</state> <id>c9395e6de5394779a138fc3d016d38b4</id> </gear> </gears> </gear-group> </data> <supported-api-versions> <supported-api-version>1.0</supported-api-version> </supported-api-versions> <messages/> <type>gear_groups</type> </response>