Hide Forgot
Description of problem: estimate the gear consumption of scalable app, will not get the correct gear number. Version-Release number of selected component (if applicable): stage-2.0.9 How reproducible: always Steps to Reproduce: 1.curl -k -X GET -H 'Accept: application/xml' --user <user>:<password> -d descriptor="Name: aa\nRequires: \n- php-5.3\nScalable: true\n" https://<instance_ip>/broker/rest/estimates/application 2. 3. Actual results: there is only one gear can be recognized, php-5.3 Expected results: it should have two gears in total. php-5.3 and haproxy-1.4 Additional info:
'Scalable' param is NOT part of the application descriptor. Current code ONLY estimates non-scalable apps and eventually we want to make this work for scalable apps as well. Note: Unknown params to application descriptor will be ignored. In this case, 'Scalable' param will be ignored. Cleanup is done in git rev c5abbc5b853.
Verified on devenv_1874 non-scalable: [root@localhost qnodejs]# curl -k -X GET -H 'Accept: application/xml' --user qgong:xx -d descriptor="Name: q1ruby19dd\nRequires: \n- ruby-1.9\n \n- mysql-5.1\n" https://ec2-107-21-180-244.compute-1.amazonaws.com/broker/rest/estimates/application <?xml version="1.0" encoding="UTF-8"?> <response> <supported-api-versions> <supported-api-version>1.0</supported-api-version> </supported-api-versions> <data> <gear> <components> <component> <Name>ruby-1.9</Name> </component> <component> <Name>mysql-5.1</Name> </component> </components> </gear> </data> <messages/> <status>ok</status> <type>application_estimates</type> <version>1.0</version> </response> scalable: [root@localhost qnodejs]# curl -k -X GET -H 'Accept: application/xml' --user qgong:xx -d descriptor="Name: qs1ruby19\nRequires: \n- ruby-1.9\n \n- mysql-5.1\nScalable: true\n" https://ec2-107-21-180-244.compute-1.amazonaws.com/broker/rest/estimates/application <?xml version="1.0" encoding="UTF-8"?> <response> <supported-api-versions> <supported-api-version>1.0</supported-api-version> </supported-api-versions> <data> <gear> <components> <component> <Name>mysql-5.1</Name> </component> </components> </gear> <gear> <components> <component> <Name>ruby-1.9</Name> </component> </components> </gear> </data> <messages/> <status>ok</status> <type>application_estimates</type> <version>1.0</version> </response>