UNPKG

azure-cli

Version:

Microsoft Azure Cross Platform Command Line tool

142 lines (43 loc) 6.34 kB
/*** Generated by streamline 0.10.17 (callbacks) - DO NOT EDIT ***/ "use strict"; var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename, false),__func=__rt.__func,__cb=__rt.__cb; var profile = require("../../../util/profile"); var utils = require("../../../util/utils"); var $ = utils.getLocaleString; exports.init = function(cli) { var virtualMachineScaleSetRollingUpgradesCancel = cli.category("vmss").description($("Commands to manage your virtual machine scale set rolling upgrades. ")); virtualMachineScaleSetRollingUpgradesCancel.command("cancel-rolling-upgrade [resource-group] [name]").description($("Cancels the current virtual machine scale set rolling upgrade.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("resource-group")).option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __1(resourceGroup, name, options, _) { var subscription, computeManagementClient, result; var __frame = { name: "__1", line: 64 }; return __func(_, this, arguments, __1, 3, __frame, function __$__1() { return (function __$__1(__then) { if (!resourceGroup) { return cli.interaction.promptIfNotGiven($("resource-group : "), resourceGroup, __cb(_, __frame, 2, 38, function ___(__0, __1) { resourceGroup = __1; __then(); }, true)); } else { __then(); } ; })(function __$__1() { cli.output.verbose(("resourceGroup = " + resourceGroup)); return (function __$__1(__then) { if (!name) { return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 7, 29, function ___(__0, __2) { name = __2; __then(); }, true)); } else { __then(); } ; })(function __$__1() { cli.output.verbose(("name = " + name)); subscription = profile.current.getSubscription(options.subscription); computeManagementClient = utils.createComputeManagementClient(subscription); return computeManagementClient.virtualMachineScaleSetRollingUpgrades.cancel(resourceGroup, name, __cb(_, __frame, 13, 79, function ___(__0, __3) { result = __3; if (result) { cli.output.json(result); } ; _(); }, true)); }); }); }); }); var virtualMachineScaleSetRollingUpgradesGetLatest = cli.category("vmss").description($("Commands to manage your virtual machine scale set rolling upgrades. ")); virtualMachineScaleSetRollingUpgradesGetLatest.command("get-latest-rolling-upgrade [resource-group] [name]").description($("Gets the status of the latest virtual machine scale set rolling upgrade.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("resource-group")).option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __2(resourceGroup, name, options, _) { var subscription, computeManagementClient, result; var __frame = { name: "__2", line: 95 }; return __func(_, this, arguments, __2, 3, __frame, function __$__2() { return (function __$__2(__then) { if (!resourceGroup) { return cli.interaction.promptIfNotGiven($("resource-group : "), resourceGroup, __cb(_, __frame, 2, 38, function ___(__0, __1) { resourceGroup = __1; __then(); }, true)); } else { __then(); } ; })(function __$__2() { cli.output.verbose(("resourceGroup = " + resourceGroup)); return (function __$__2(__then) { if (!name) { return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 7, 29, function ___(__0, __2) { name = __2; __then(); }, true)); } else { __then(); } ; })(function __$__2() { cli.output.verbose(("name = " + name)); subscription = profile.current.getSubscription(options.subscription); computeManagementClient = utils.createComputeManagementClient(subscription); return computeManagementClient.virtualMachineScaleSetRollingUpgrades.getLatest(resourceGroup, name, __cb(_, __frame, 13, 79, function ___(__0, __3) { result = __3; if (result) { cli.output.json(result); } ; _(); }, true)); }); }); }); }); var virtualMachineScaleSetRollingUpgradesStartOSUpgrade = cli.category("vmss").description($("Commands to manage your virtual machine scale set rolling upgrades. ")); virtualMachineScaleSetRollingUpgradesStartOSUpgrade.command("start-os-rolling-upgrade [resource-group] [name]").description($("Starts a rolling upgrade to move all virtual machine scale set instances to the latest available Platform Image OS version. Instances which are already running the latest available OS version are not affected.")).usage("[options] <resource-group> <name>").option("-g, --resource-group <resource-group>", $("resource-group")).option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __3(resourceGroup, name, options, _) { var subscription, computeManagementClient, result; var __frame = { name: "__3", line: 126 }; return __func(_, this, arguments, __3, 3, __frame, function __$__3() { return (function __$__3(__then) { if (!resourceGroup) { return cli.interaction.promptIfNotGiven($("resource-group : "), resourceGroup, __cb(_, __frame, 2, 38, function ___(__0, __1) { resourceGroup = __1; __then(); }, true)); } else { __then(); } ; })(function __$__3() { cli.output.verbose(("resourceGroup = " + resourceGroup)); return (function __$__3(__then) { if (!name) { return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 7, 29, function ___(__0, __2) { name = __2; __then(); }, true)); } else { __then(); } ; })(function __$__3() { cli.output.verbose(("name = " + name)); subscription = profile.current.getSubscription(options.subscription); computeManagementClient = utils.createComputeManagementClient(subscription); return computeManagementClient.virtualMachineScaleSetRollingUpgrades.startOSUpgrade(resourceGroup, name, __cb(_, __frame, 13, 79, function ___(__0, __3) { result = __3; if (result) { cli.output.json(result); } ; _(); }, true)); }); }); }); });};