UNPKG

azure-cli

Version:

Microsoft Azure Cross Platform Command Line tool

54 lines (21 loc) 1.93 kB
/*** 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,__tryCatch=__rt.__tryCatch; var __ = require("underscore"); var utils = require("../../../util/utils"); var $ = utils.getLocaleString; function StaticIp(cli, networkManagementClient) { this.networkManagementClient = networkManagementClient; this.output = cli.output; this.interaction = cli.interaction;}; __.extend(StaticIp.prototype, { check: function check__1(vnet, ipAddress, options, _) { var self, progress, response, checkResult, __this = this; var __frame = { name: "check__1", line: 27 }; return __func(_, this, arguments, check__1, 3, __frame, function __$check__1() { self = __this; progress = self.interaction.progress($("Checking static IP address")); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$check__1() { return self.networkManagementClient.staticIPs.check(vnet, ipAddress, __cb(_, __frame, 6, 56, function ___(__0, __1) { response = __1; _(null, null, true); }, true)); }); })(function ___(__e, __r, __cont) { (function ___(__then) { __tryCatch(_, function __$check__1() { progress.end(); __then(); }); })(function ___() { __tryCatch(_, function ___() { if (__cont) { __then(); } else { _(__e, __r); }; }); }); }); })(function ___() { __tryCatch(_, function __$check__1() { checkResult = { isAvailable: response.isAvailable, availableAddresses: response.availableAddresses }; self.interaction.formatOutput(checkResult, function(data) { if ((data.length === 0)) { self.output.warn($("No static IP addresses found")); } else { utils.logLineFormat(data, self.output.data); } ; }); _(); }); }); }); }}); module.exports = StaticIp;