azure-cli
Version:
Microsoft Azure Cross Platform Command Line tool
45 lines (18 loc) • 2.03 kB
JavaScript
/*** Generated by streamline 0.10.17 (callbacks) - DO NOT EDIT ***/ var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename, false),__func=__rt.__func,__cb=__rt.__cb,__catch=__rt.__catch,__tryCatch=__rt.__tryCatch; var __ = require("underscore");
var util = require("util");
var utils = require("../../../util/utils");
var $ = utils.getLocaleString;
function LoadBalancer(cli, networkManagementClient) {
this.networkManagementClient = networkManagementClient;
this.output = cli.output;
this.interaction = cli.interaction;};
__.extend(LoadBalancer.prototype, {
get: function get__1(resourceGroupName, lbName, _) { var self, progress, lb, __this = this; var __frame = { name: "get__1", line: 27 }; return __func(_, this, arguments, get__1, 2, __frame, function __$get__1() { self = __this;
progress = self.interaction.progress(util.format($("Looking up the load balancer \"%s\""), lbName)); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$get__1() { return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$get__1() {
return self.networkManagementClient.loadBalancers.get(resourceGroupName, lbName, __cb(_, __frame, 4, 58, function ___(__0, __1) { lb = __1;
return _(null, lb); }, true)); }); })(function ___(e, __result) { __catch(function __$get__1() { if (e) {
if ((e.statusCode === 404)) {
return _(null, null); } ;
return _(e); } else { _(null, __result); } ; }, _); }); })(function ___() { __tryCatch(_, function __$get__1() { _(null, null, true); }); }); }); })(function ___(__e, __r, __cont) { (function ___(__then) { __tryCatch(_, function __$get__1() {
progress.end(); __then(); }); })(function ___() { __tryCatch(_, function ___() { if (__cont) { __then(); } else { _(__e, __r); }; }); }); }); })(function ___() { __tryCatch(_, function __$get__1() { _(); }); }); }); }});
module.exports = LoadBalancer;