Bug 967409 - Can not create app or add cartridge with vendorname-cartridgename-version via RESTAPI
Can not create app or add cartridge with vendorname-cartridgename-version via...
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Master (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Rajat Chopra
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-27 00:41 EDT by Wei Sun
Modified: 2015-05-14 20:54 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-06-11 00:11:30 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 Wei Sun 2013-05-27 00:41:40 EDT
Description of problem:
Create an app or add cartridge to the app with vendorname-cartridgename-version via RESTAPI,but it failed.

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

How reproducible:
Always

Steps to Reproduce:
1.Create an app with vendorname-cartridgename-version
2.Add cartridge to the app with vendorname-cartridgename-version
3.

Actual results:
1.[sunwei@dhcp-8-229 ~]$ curl -k -X POST -H 'Accept: application/xml' --user wsun+3@redhat.com:x https://ec2-107-22-121-221.compute-1.amazonaws.com/broker/rest/domains/wsundev3277/applications -d name=app2 -d cartridges=redhat-php-5.3
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>unprocessable_entity</status>
  <type nil="true"></type>
  <data>
    <datum nil="true"></datum>
  </data>
  <messages>
    <message>
      <severity>error</severity>
      <text>Each application must contain one web cartridge.  None of the specified cartridges redhat-php-5.3 is a web cartridge. Please include one of the following cartridges: diy-0.1, php-5.3, jbossas-7, perl-5.10, mock-0.1, mock-0.2, zend-5.6, jenkins-1.4, nodejs-0.6, jbossews-2.0, jbossews-1.0, jbosseap-6.0, python-2.6, python-2.7, python-3.3, ruby-1.9, and ruby-1.8 or supply a valid url to a custom web_framework cartridge.</text>
      <exit-code>109</exit-code>
      <field>cartridge</field>
    </message>
  </messages>
  <version>1.4</version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
    <supported-api-version>1.2</supported-api-version>
    <supported-api-version>1.3</supported-api-version>
    <supported-api-version>1.4</supported-api-version>
  </supported-api-versions>
  <errors/>
</response>

2.[sunwei@dhcp-8-229 ~]$ curl -k -X POST -H 'Accept: application/xml' --user wsun+3@redhat.com:x https://ec2-107-22-121-221.compute-1.amazonaws.com/broker/rest/domains/wsundev3277/applications/app1/cartridges -d name=redhat-mongodb-2.2
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8" />
  <title>Action Controller: Exception caught</title>
  <style>
    body { background-color: #fff; color: #333; }

    body, p, ol, ul, td {
      font-family: helvetica, verdana, arial, sans-serif;
      font-size:   13px;
      line-height: 18px;
    }

    pre {
      background-color: #eee;
      padding: 10px;
      font-size: 11px;
      white-space: pre-wrap;
    }

    a { color: #000; }
    a:visited { color: #666; }
    a:hover { color: #fff; background-color:#000; }
  </style>
</head>
<body>

<h1>
  NoMethodError
    in EmbCartController#create
</h1>
<pre>undefined method `components&#x27; for #&lt;Array:0x000000076a7668&gt;</pre>


<p><code>Rails.root: /var/www/openshift/broker</code></p>

<div id="traces">
    <a href="#" onclick="document.getElementById(&#x27;Framework-Trace&#x27;).style.display=&#x27;none&#x27;;document.getElementById(&#x27;Full-Trace&#x27;).style.display=&#x27;none&#x27;;document.getElementById(&#x27;Application-Trace&#x27;).style.display=&#x27;block&#x27;;; return false;">Application Trace</a> |
    <a href="#" onclick="document.getElementById(&#x27;Application-Trace&#x27;).style.display=&#x27;none&#x27;;document.getElementById(&#x27;Full-Trace&#x27;).style.display=&#x27;none&#x27;;document.getElementById(&#x27;Framework-Trace&#x27;).style.display=&#x27;block&#x27;;; return false;">Framework Trace</a> |
    <a href="#" onclick="document.getElementById(&#x27;Application-Trace&#x27;).style.display=&#x27;none&#x27;;document.getElementById(&#x27;Framework-Trace&#x27;).style.display=&#x27;none&#x27;;document.getElementById(&#x27;Full-Trace&#x27;).style.display=&#x27;block&#x27;;; return false;">Full Trace</a> 

    <div id="Application-Trace" style="display: block;">
      <pre><code></code></pre>
    </div>
    <div id="Framework-Trace" style="display: none;">
      <pre><code>openshift-origin-controller (1.9.7) app/controllers/emb_cart_controller.rb:109:in `create&#x27;
actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:4:in `send_action&#x27;
actionpack (3.2.8) lib/abstract_controller/base.rb:167:in `process_action&#x27;
actionpack (3.2.8) lib/action_controller/metal/rendering.rb:10:in `process_action&#x27;
actionpack (3.2.8) lib/abstract_controller/callbacks.rb:18:in `block in process_action&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:492:in `block in _run__3734149610772897003__process_action__3943389121041754559__callbacks&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_370&#x27;
openshift-origin-controller (1.9.7) lib/openshift/controller/action_log.rb:34:in `set_logged_request&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:214:in `_conditional_callback_around_370&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:403:in `_run__3734149610772897003__process_action__3943389121041754559__callbacks&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks&#x27;
actionpack (3.2.8) lib/abstract_controller/callbacks.rb:17:in `process_action&#x27;
actionpack (3.2.8) lib/action_controller/metal/rescue.rb:29:in `process_action&#x27;
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action&#x27;
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `block in instrument&#x27;
activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument&#x27;
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument&#x27;
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:29:in `process_action&#x27;
actionpack (3.2.8) lib/action_controller/metal/params_wrapper.rb:207:in `process_action&#x27;
actionpack (3.2.8) lib/abstract_controller/base.rb:121:in `process&#x27;
actionpack (3.2.8) lib/abstract_controller/rendering.rb:45:in `process&#x27;
actionpack (3.2.8) lib/action_controller/metal.rb:203:in `dispatch&#x27;
actionpack (3.2.8) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch&#x27;
actionpack (3.2.8) lib/action_controller/metal.rb:246:in `block in action&#x27;
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `dispatch&#x27;
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:36:in `call&#x27;
journey (1.0.4) lib/journey/router.rb:68:in `block in call&#x27;
journey (1.0.4) lib/journey/router.rb:56:in `each&#x27;
journey (1.0.4) lib/journey/router.rb:56:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:600:in `call&#x27;
mongo_mapper (0.11.1) lib/mongo_mapper/middleware/identity_map.rb:10:in `call&#x27;
mongoid (3.0.21) lib/rack/mongoid/middleware/identity_map.rb:34:in `block in call&#x27;
mongoid (3.0.21) lib/mongoid/unit_of_work.rb:39:in `unit_of_work&#x27;
mongoid (3.0.21) lib/rack/mongoid/middleware/identity_map.rb:34:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call&#x27;
rack (1.4.1) lib/rack/etag.rb:23:in `call&#x27;
rack (1.4.1) lib/rack/conditionalget.rb:35:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/head.rb:14:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/params_parser.rb:21:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/flash.rb:242:in `call&#x27;
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context&#x27;
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/cookies.rb:339:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `_run__428905170405914238__call__4160279545740313806__callbacks&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_call_callbacks&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:27:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/remote_ip.rb:31:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call&#x27;
railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app&#x27;
railties (3.2.8) lib/rails/rack/logger.rb:16:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call&#x27;
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call&#x27;
rack (1.4.1) lib/rack/runtime.rb:17:in `call&#x27;
activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call&#x27;
rack (1.4.1) lib/rack/lock.rb:15:in `call&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call&#x27;
railties (3.2.8) lib/rails/engine.rb:479:in `call&#x27;
railties (3.2.8) lib/rails/application.rb:223:in `call&#x27;
railties (3.2.8) lib/rails/railtie/configurable.rb:30:in `method_missing&#x27;
passenger (3.0.17) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request&#x27;
passenger (3.0.17) lib/phusion_passenger/abstract_request_handler.rb:517:in `accept_and_process_next_request&#x27;
passenger (3.0.17) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop&#x27;
passenger (3.0.17) lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler&#x27;
passenger (3.0.17) lib/phusion_passenger/rack/application_spawner.rb:79:in `block in spawn_application&#x27;
passenger (3.0.17) lib/phusion_passenger/utils.rb:470:in `safe_fork&#x27;
passenger (3.0.17) lib/phusion_passenger/rack/application_spawner.rb:64:in `spawn_application&#x27;
passenger (3.0.17) lib/phusion_passenger/spawn_manager.rb:264:in `spawn_rack_application&#x27;
passenger (3.0.17) lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application&#x27;
passenger (3.0.17) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application&#x27;
passenger (3.0.17) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop&#x27;
passenger (3.0.17) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously&#x27;
passenger (3.0.17) helper-scripts/passenger-spawn-server:102:in `&lt;main&gt;&#x27;</code></pre>
    </div>
    <div id="Full-Trace" style="display: none;">
      <pre><code>openshift-origin-controller (1.9.7) app/controllers/emb_cart_controller.rb:109:in `create&#x27;
actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:4:in `send_action&#x27;
actionpack (3.2.8) lib/abstract_controller/base.rb:167:in `process_action&#x27;
actionpack (3.2.8) lib/action_controller/metal/rendering.rb:10:in `process_action&#x27;
actionpack (3.2.8) lib/abstract_controller/callbacks.rb:18:in `block in process_action&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:492:in `block in _run__3734149610772897003__process_action__3943389121041754559__callbacks&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_370&#x27;
openshift-origin-controller (1.9.7) lib/openshift/controller/action_log.rb:34:in `set_logged_request&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:214:in `_conditional_callback_around_370&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:403:in `_run__3734149610772897003__process_action__3943389121041754559__callbacks&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks&#x27;
actionpack (3.2.8) lib/abstract_controller/callbacks.rb:17:in `process_action&#x27;
actionpack (3.2.8) lib/action_controller/metal/rescue.rb:29:in `process_action&#x27;
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action&#x27;
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `block in instrument&#x27;
activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument&#x27;
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument&#x27;
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:29:in `process_action&#x27;
actionpack (3.2.8) lib/action_controller/metal/params_wrapper.rb:207:in `process_action&#x27;
actionpack (3.2.8) lib/abstract_controller/base.rb:121:in `process&#x27;
actionpack (3.2.8) lib/abstract_controller/rendering.rb:45:in `process&#x27;
actionpack (3.2.8) lib/action_controller/metal.rb:203:in `dispatch&#x27;
actionpack (3.2.8) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch&#x27;
actionpack (3.2.8) lib/action_controller/metal.rb:246:in `block in action&#x27;
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `dispatch&#x27;
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:36:in `call&#x27;
journey (1.0.4) lib/journey/router.rb:68:in `block in call&#x27;
journey (1.0.4) lib/journey/router.rb:56:in `each&#x27;
journey (1.0.4) lib/journey/router.rb:56:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:600:in `call&#x27;
mongo_mapper (0.11.1) lib/mongo_mapper/middleware/identity_map.rb:10:in `call&#x27;
mongoid (3.0.21) lib/rack/mongoid/middleware/identity_map.rb:34:in `block in call&#x27;
mongoid (3.0.21) lib/mongoid/unit_of_work.rb:39:in `unit_of_work&#x27;
mongoid (3.0.21) lib/rack/mongoid/middleware/identity_map.rb:34:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call&#x27;
rack (1.4.1) lib/rack/etag.rb:23:in `call&#x27;
rack (1.4.1) lib/rack/conditionalget.rb:35:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/head.rb:14:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/params_parser.rb:21:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/flash.rb:242:in `call&#x27;
rack (1.4.1) lib/rack/session/abstract/id.rb:205:in `context&#x27;
rack (1.4.1) lib/rack/session/abstract/id.rb:200:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/cookies.rb:339:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `_run__428905170405914238__call__4160279545740313806__callbacks&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_call_callbacks&#x27;
activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:27:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/remote_ip.rb:31:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call&#x27;
railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app&#x27;
railties (3.2.8) lib/rails/rack/logger.rb:16:in `call&#x27;
actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call&#x27;
rack (1.4.1) lib/rack/methodoverride.rb:21:in `call&#x27;
rack (1.4.1) lib/rack/runtime.rb:17:in `call&#x27;
activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call&#x27;
rack (1.4.1) lib/rack/lock.rb:15:in `call&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:136:in `forward&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:143:in `pass&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:155:in `invalidate&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:71:in `call!&#x27;
rack-cache (1.2) lib/rack/cache/context.rb:51:in `call&#x27;
railties (3.2.8) lib/rails/engine.rb:479:in `call&#x27;
railties (3.2.8) lib/rails/application.rb:223:in `call&#x27;
railties (3.2.8) lib/rails/railtie/configurable.rb:30:in `method_missing&#x27;
passenger (3.0.17) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request&#x27;
passenger (3.0.17) lib/phusion_passenger/abstract_request_handler.rb:517:in `accept_and_process_next_request&#x27;
passenger (3.0.17) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop&#x27;
passenger (3.0.17) lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler&#x27;
passenger (3.0.17) lib/phusion_passenger/rack/application_spawner.rb:79:in `block in spawn_application&#x27;
passenger (3.0.17) lib/phusion_passenger/utils.rb:470:in `safe_fork&#x27;
passenger (3.0.17) lib/phusion_passenger/rack/application_spawner.rb:64:in `spawn_application&#x27;
passenger (3.0.17) lib/phusion_passenger/spawn_manager.rb:264:in `spawn_rack_application&#x27;
passenger (3.0.17) lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application&#x27;
passenger (3.0.17) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application&#x27;
passenger (3.0.17) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop&#x27;
passenger (3.0.17) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously&#x27;
passenger (3.0.17) helper-scripts/passenger-spawn-server:102:in `&lt;main&gt;&#x27;</code></pre>
    </div>
</div>



<h2 style="margin-top: 30px">Request</h2>
<p><b>Parameters</b>: <pre>{&quot;name&quot;=&gt;&quot;redhat-mongodb-2.2&quot;,
 &quot;domain_id&quot;=&gt;&quot;wsundev3277&quot;,
 &quot;application_id&quot;=&gt;&quot;app1&quot;}</pre></p>

<p><a href="#" onclick="document.getElementById('session_dump').style.display='block'; return false;">Show session dump</a></p>
<div id="session_dump" style="display:none"><pre></pre></div>

<p><a href="#" onclick="document.getElementById('env_dump').style.display='block'; return false;">Show env dump</a></p>
<div id="env_dump" style="display:none"><pre>HTTP_ACCEPT: &quot;application/xml&quot;
REMOTE_ADDR: &quot;127.0.0.1&quot;
SERVER_NAME: &quot;ec2-107-22-121-221.compute-1.amazonaws.com&quot;
SERVER_PROTOCOL: &quot;HTTP/1.1&quot;</pre></div>


<h2 style="margin-top: 30px">Response</h2>
<p><b>Headers</b>: <pre>None</pre></p>



</body>
</html>


Expected results:
Can create the app or add cartridge to the app with vendorname-cartridgename-version successfully.

Additional info:
Comment 1 Rajat Chopra 2013-05-28 16:04:15 EDT
Fixed with pull request #2654
Comment 2 chunchen 2013-05-29 02:32:15 EDT
It's fixed, verified on devenv_3282, please refer to the following results:

1. For creating app
[root@F17-CCY ~]# curl -k -H "Accept: application/xml" --user "chunchen:redhat" https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications -d name=testpp1 -d cartridges=redhat-php-5.3 -X POST
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>created</status>
  <type>application</type>
  <data>
    <application>
      <embedded>
      </embedded>
      <framework>php-5.3</framework>
      <name>testpp1</name>
      <creation-time>2013-05-29T06:26:43Z</creation-time>
      <uuid>babfbf82c82811e2b83822000a8dc1df</uuid>
      <aliases/>
      <gear-count>1</gear-count>
      <domain-id>cdm</domain-id>
      <gear-profile>small</gear-profile>
      <scalable>false</scalable>
      <git-url>ssh://babfbf82c82811e2b83822000a8dc1df@testpp1-cdm.dev.rhcloud.com/~/git/testpp1.git/</git-url>
      <app-url>http://testpp1-cdm.dev.rhcloud.com/</app-url>
      <ssh-url>ssh://babfbf82c82811e2b83822000a8dc1df@testpp1-cdm.dev.rhcloud.com</ssh-url>
      <health-check-path>health_check.php</health-check-path>
      <building-with nil="true"></building-with>
      <building-app nil="true"></building-app>
      <build-job-url nil="true"></build-job-url>
      <initial-git-url nil="true"></initial-git-url>
      <links>
        <link>
          <rel>Get application</rel>
          <method>GET</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1</href>
          <required-params/>
          <optional-params/>
        </link>
        <link>
          <rel>Get application descriptor</rel>
          <method>GET</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/descriptor</href>
          <required-params/>
          <optional-params/>
        </link>
        <link>
          <rel>Get application gear groups</rel>
          <method>GET</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/gear_groups</href>
          <required-params/>
          <optional-params/>
        </link>
        <link>
          <rel>Start application</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>start</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Stop application</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>stop</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Restart application</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>restart</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Force stop application</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>force-stop</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Scale up application</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>scale-up</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Scale down application</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>scale-down</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Tidy the application framework</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>tidy</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Reload the application</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>reload</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Trigger thread dump</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>thread-dump</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Delete application</rel>
          <method>DELETE</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1</href>
          <required-params/>
          <optional-params/>
        </link>
        <link>
          <rel>Add embedded cartridge</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/cartridges</href>
          <required-params>
            <param>
              <name>name</name>
              <type>string</type>
              <description>framework-type, e.g.: mongodb-2.0</description>
              <valid-options>
                <valid-option>mongodb-2.2</valid-option>
                <valid-option>cron-1.4</valid-option>
                <valid-option>phpmyadmin-3.4</valid-option>
                <valid-option>haproxy-1.4</valid-option>
                <valid-option>mock-plugin-0.1</valid-option>
                <valid-option>10gen-mms-agent-0.1</valid-option>
                <valid-option>postgresql-8.4</valid-option>
                <valid-option>switchyard-0</valid-option>
                <valid-option>metrics-0.1</valid-option>
                <valid-option>jenkins-client-1.4</valid-option>
                <valid-option>mysql-5.1</valid-option>
                <valid-option>rockmongo-1.1</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params>
            <optional-param>
              <name>colocate_with</name>
              <type>string</type>
              <description>The component to colocate with</description>
              <valid-options>
                <valid-option>php-5.3</valid-option>
              </valid-options>
              <default-value nil="true"></default-value>
            </optional-param>
            <optional-param>
              <name>scales_from</name>
              <type>integer</type>
              <description>Minimum number of gears to run the component on.</description>
              <valid-options/>
              <default-value nil="true"></default-value>
            </optional-param>
            <optional-param>
              <name>scales_to</name>
              <type>integer</type>
              <description>Maximum number of gears to run the component on.</description>
              <valid-options/>
              <default-value nil="true"></default-value>
            </optional-param>
            <optional-param>
              <name>additional_storage</name>
              <type>integer</type>
              <description>Additional GB of space to request on all gears running this component.</description>
              <valid-options/>
              <default-value nil="true"></default-value>
            </optional-param>
            <optional-param>
              <name>url</name>
              <type>string</type>
              <description>A URL to a downloadable cartridge.</description>
              <valid-options/>
              <default-value nil="true"></default-value>
            </optional-param>
          </optional-params>
        </link>
        <link>
          <rel>List embedded cartridges</rel>
          <method>GET</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/cartridges</href>
          <required-params/>
          <optional-params/>
        </link>
        <link>
          <rel>Resolve DNS</rel>
          <method>GET</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/dns_resolvable</href>
          <required-params/>
          <optional-params/>
        </link>
        <link>
          <rel>Create new alias</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/aliases</href>
          <required-params>
            <param>
              <name>id</name>
              <type>string</type>
              <description>Alias for application</description>
              <valid-options/>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params>
            <optional-param>
              <name>ssl_certificate</name>
              <type>string</type>
              <description>Content of SSL Certificate</description>
              <valid-options/>
              <default-value nil="true"></default-value>
            </optional-param>
            <optional-param>
              <name>private_key</name>
              <type>string</type>
              <description>Private key for the certificate.  Required if adding a certificate</description>
              <valid-options/>
              <default-value nil="true"></default-value>
            </optional-param>
            <optional-param>
              <name>pass_phrase</name>
              <type>string</type>
              <description>Optional passphrase for the private key</description>
              <valid-options/>
              <default-value nil="true"></default-value>
            </optional-param>
          </optional-params>
        </link>
        <link>
          <rel>List application aliases</rel>
          <method>GET</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/aliases</href>
          <required-params/>
          <optional-params/>
        </link>
      </links>
    </application>
  </data>
  <messages>
    <message>
      <severity>info</severity>
      <text>Application testpp1 was created.</text>
      <exit-code nil="true"></exit-code>
      <field nil="true"></field>
    </message>
    <message>
      <severity>info</severity>
      <text></text>
      <exit-code>0</exit-code>
      <field>result</field>
    </message>
  </messages>
  <version>1.4</version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
    <supported-api-version>1.2</supported-api-version>
    <supported-api-version>1.3</supported-api-version>
    <supported-api-version>1.4</supported-api-version>
  </supported-api-versions>
  <errors/>
</response>

2. For adding cartridge
[root@F17-CCY ~]# curl -k -H "Accept: application/xml" --user "chunchen:redhat" https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/cartridges -d name=redhat-mongodb-2.2 -X POST
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <status>created</status>
  <type>cartridge</type>
  <data>
    <cartridge>
      <name>mongodb-2.2</name>
      <status-messages nil="true"></status-messages>
      <version>2.2</version>
      <display-name>MongoDB NoSQL Database 2.2</display-name>
      <description>MongoDB is a scalable, high-performance, open source NoSQL database.</description>
      <license>ASL 2.0</license>
      <license-url></license-url>
      <tags>
        <tag>service</tag>
        <tag>database</tag>
        <tag>nosql</tag>
        <tag>embedded</tag>
      </tags>
      <website>http://www.10gen.com</website>
      <url nil="true"></url>
      <type>embedded</type>
      <usage-rates/>
      <scales-from>1</scales-from>
      <scales-to>1</scales-to>
      <current-scale>1</current-scale>
      <gear-profile>small</gear-profile>
      <base-gear-storage>1</base-gear-storage>
      <additional-gear-storage>0</additional-gear-storage>
      <collocated-with>
        <collocated-with>php-5.3</collocated-with>
      </collocated-with>
      <supported-scales-from>1</supported-scales-from>
      <supported-scales-to>1</supported-scales-to>
      <properties>
        <property>
          <name>username</name>
          <type>cart_data</type>
          <description>Root user on mongo database</description>
          <value>admin</value>
        </property>
        <property>
          <name>password</name>
          <type>cart_data</type>
          <description>Password for root user on mongo database</description>
          <value>UZf1m2r24Gcs</value>
        </property>
        <property>
          <name>database_name</name>
          <type>cart_data</type>
          <description>Mongo DB name</description>
          <value>testpp1</value>
        </property>
        <property>
          <name>connection_url</name>
          <type>cart_data</type>
          <description>Mongo DB connection URL</description>
          <value>mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/</value>
        </property>
      </properties>
      <scales-with nil="true"></scales-with>
      <help-topics>
        <help-topic>
          <Building-with-MongoDB>https://www.openshift.com/developers/mongodb</Building-with-MongoDB>
        </help-topic>
      </help-topics>
      <links>
        <link>
          <rel>Get cartridge</rel>
          <method>GET</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/cartridges/mongodb-2.2</href>
          <required-params/>
          <optional-params/>
        </link>
        <link>
          <rel>Update cartridge configuration</rel>
          <method>PUT</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/cartridges/mongodb-2.2</href>
          <required-params/>
          <optional-params>
            <optional-param>
              <name>additional_gear_storage</name>
              <type>integer</type>
              <description>Additional filesystem storage in gigabytes on each gear having cartridge mongodb-2.2</description>
              <valid-options/>
              <default-value nil="true"></default-value>
            </optional-param>
            <optional-param>
              <name>scales_from</name>
              <type>integer</type>
              <description>Minimum number of gears having cartridge mongodb-2.2</description>
              <valid-options/>
              <default-value nil="true"></default-value>
            </optional-param>
            <optional-param>
              <name>scales_to</name>
              <type>integer</type>
              <description>Maximum number of gears having cartridge mongodb-2.2</description>
              <valid-options/>
              <default-value nil="true"></default-value>
            </optional-param>
          </optional-params>
        </link>
        <link>
          <rel>Start embedded cartridge</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/cartridges/mongodb-2.2/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>start</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Stop cartridge</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/cartridges/mongodb-2.2/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>stop</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Restart cartridge</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/cartridges/mongodb-2.2/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>restart</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Reload cartridge</rel>
          <method>POST</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/cartridges/mongodb-2.2/events</href>
          <required-params>
            <param>
              <name>event</name>
              <type>string</type>
              <description>event</description>
              <valid-options>
                <valid-option>reload</valid-option>
              </valid-options>
              <invalid-options/>
            </param>
          </required-params>
          <optional-params/>
        </link>
        <link>
          <rel>Delete cartridge</rel>
          <method>DELETE</method>
          <href>https://ec2-107-22-81-12.compute-1.amazonaws.com/broker/rest/domains/cdm/applications/testpp1/cartridges/mongodb-2.2</href>
          <required-params/>
          <optional-params/>
        </link>
      </links>
    </cartridge>
  </data>
  <messages>
    <message>
      <severity>info</severity>
      <text>Added redhat-mongodb-2.2 to application testpp1</text>
      <exit-code nil="true"></exit-code>
      <field nil="true"></field>
    </message>
    <message>
      <severity>info</severity>
      <text>MongoDB 2.2 database added.  Please make note of these credentials:
   Root User:     admin
   Root Password: UZf1m2r24Gcs
   Database Name: testpp1
Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/
</text>
      <exit-code>0</exit-code>
      <field>result</field>
    </message>
    <message>
      <severity>info</severity>
      <text>Connection URL: mongodb://$OPENSHIFT_MONGODB_DB_HOST:$OPENSHIFT_MONGODB_DB_PORT/
</text>
      <exit-code>0</exit-code>
      <field>appinfo</field>
    </message>
  </messages>
  <version>1.4</version>
  <supported-api-versions>
    <supported-api-version>1.0</supported-api-version>
    <supported-api-version>1.1</supported-api-version>
    <supported-api-version>1.2</supported-api-version>
    <supported-api-version>1.3</supported-api-version>
    <supported-api-version>1.4</supported-api-version>
  </supported-api-versions>
  <errors/>
</response>

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