OLD | NEW |
1 'use strict'; | 1 'use strict'; |
2 | 2 |
3 /** | 3 /** |
4 * The Python store environment. | 4 * The Python store environment. |
5 * | 5 * |
6 * @module env | 6 * @module env |
7 * @submodule env.python | 7 * @submodule env.python |
8 */ | 8 */ |
9 | 9 |
10 YUI.add('juju-env-python', function(Y) { | 10 YUI.add('juju-env-python', function(Y) { |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 operation is performed. | 180 operation is performed. |
181 * @return {undefined} Sends a message to the server only. | 181 * @return {undefined} Sends a message to the server only. |
182 */ | 182 */ |
183 add_relation: function(endpointA, endpointB, callback) { | 183 add_relation: function(endpointA, endpointB, callback) { |
184 this._send_rpc({ | 184 this._send_rpc({ |
185 'op': 'add_relation', | 185 'op': 'add_relation', |
186 'endpoint_a': endpointToName(endpointA), | 186 'endpoint_a': endpointToName(endpointA), |
187 'endpoint_b': endpointToName(endpointB)}, callback, true); | 187 'endpoint_b': endpointToName(endpointB)}, callback, true); |
188 }, | 188 }, |
189 | 189 |
190 get_charm: function(charm_url, callback) { | 190 /** |
191 this._send_rpc({'op': 'get_charm', 'charm_url': charm_url}, callback); | 191 Retrieve charm info. |
| 192 |
| 193 @method get_charm |
| 194 @param {String} charmURL The URL of the charm. |
| 195 @param {Function} callback A callable that must be called once the |
| 196 operation is performed. It will receive an object with an "err" |
| 197 attribute containing a string describing the problem (if an error |
| 198 occurred), and with a "result" attribute containing information |
| 199 about the charm. The "result" object includes "config" options, a list |
| 200 of "peers", "provides" and "requires", and the charm URL. |
| 201 @return {undefined} Sends a message to the server only. |
| 202 */ |
| 203 get_charm: function(charmURL, callback) { |
| 204 this._send_rpc({op: 'get_charm', charm_url: charmURL}, callback); |
192 }, | 205 }, |
193 | 206 |
194 get_service: function(service_name, callback) { | 207 get_service: function(service_name, callback) { |
195 this._send_rpc( | 208 this._send_rpc( |
196 {'op': 'get_service', 'service_name': service_name}, callback); | 209 {'op': 'get_service', 'service_name': service_name}, callback); |
197 }, | 210 }, |
198 | 211 |
199 /** | 212 /** |
200 * Deploy a charm. | 213 * Deploy a charm. |
201 * | 214 * |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 environments.PythonEnvironment = PythonEnvironment; | 457 environments.PythonEnvironment = PythonEnvironment; |
445 | 458 |
446 }, '0.1.0', { | 459 }, '0.1.0', { |
447 requires: [ | 460 requires: [ |
448 'base', | 461 'base', |
449 'json-parse', | 462 'json-parse', |
450 'json-stringify', | 463 'json-stringify', |
451 'juju-env-base' | 464 'juju-env-base' |
452 ] | 465 ] |
453 }); | 466 }); |
OLD | NEW |