azure-cli
Version:
Microsoft Azure Cross Platform Command Line tool
449 lines (145 loc) • 22.9 kB
JavaScript
/*** 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 networkAbortMigration = cli.category("network").description("Commands to invoke service management operations.").category("vnet").description($("Commands to manage your network. "));
networkAbortMigration.command("abort-migration [name]").description($("Abort Virtual Network migration api validates and aborts the given virtual network for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __1(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__1", line: 91 }; return __func(_, this, arguments, __1, 2, __frame, function __$__1() { return (function __$__1(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__1() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.networks.abortMigration(name, __cb(_, __frame, 8, 39, function __$__1() { _(); }, true)); }); }); });
var networkCommitMigration = cli.category("network").description("Commands to invoke service management operations.").category("vnet").description($("Commands to manage your network. "));
networkCommitMigration.command("commit-migration [name]").description($("Commit Virtual Network migration api validates and commits the given virtual network for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __2(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__2", line: 113 }; return __func(_, this, arguments, __2, 2, __frame, function __$__2() { return (function __$__2(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__2() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.networks.commitMigration(name, __cb(_, __frame, 8, 39, function __$__2() { _(); }, true)); }); }); });
var networkPrepareMigration = cli.category("network").description("Commands to invoke service management operations.").category("vnet").description($("Commands to manage your network. "));
networkPrepareMigration.command("prepare-migration [name]").description($("Prepare Virtual Network migration api validates and prepare the given virtual network for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __3(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__3", line: 135 }; return __func(_, this, arguments, __3, 2, __frame, function __$__3() { return (function __$__3(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__3() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.networks.prepareMigration(name, __cb(_, __frame, 8, 39, function __$__3() { _(); }, true)); }); }); });
var networkValidateMigration = cli.category("network").description("Commands to invoke service management operations.").category("vnet").description($("Commands to manage your network. "));
networkValidateMigration.command("validate-migration [name]").description($("Validate Virtual Network migration api validates the given virtual network for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __4(name, options, _) { var subscription, networkManagementClient, result; var __frame = { name: "__4", line: 157 }; return __func(_, this, arguments, __4, 2, __frame, function __$__4() { return (function __$__4(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__4() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.networks.validateMigration(name, __cb(_, __frame, 8, 52, function ___(__0, __2) { result = __2;
if (result) {
_showValidationResults(result); } ; _(); }, true)); }); }); });
var reservedIPAbortMigration = cli.category("network").description("Commands to invoke service management operations.").category("reserved-ip").description($("Commands to manage your reserved ip. "));
reservedIPAbortMigration.command("abort-migration [name]").description($("Abort Reserved IP migration api validates and aborts the given reserved IP for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __5(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__5", line: 182 }; return __func(_, this, arguments, __5, 2, __frame, function __$__5() { return (function __$__5(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__5() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.reservedIPs.abortMigration(name, __cb(_, __frame, 8, 42, function __$__5() { _(); }, true)); }); }); });
var reservedIPCommitMigration = cli.category("network").description("Commands to invoke service management operations.").category("reserved-ip").description($("Commands to manage your reserved ip. "));
reservedIPCommitMigration.command("commit-migration [name]").description($("Commit Reserved IP migration api validates and commits the given reserved IP for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __6(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__6", line: 204 }; return __func(_, this, arguments, __6, 2, __frame, function __$__6() { return (function __$__6(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__6() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.reservedIPs.commitMigration(name, __cb(_, __frame, 8, 42, function __$__6() { _(); }, true)); }); }); });
var reservedIPPrepareMigration = cli.category("network").description("Commands to invoke service management operations.").category("reserved-ip").description($("Commands to manage your reserved ip. "));
reservedIPPrepareMigration.command("prepare-migration [name]").description($("Prepare Reserved IP migration api validates and prepare the given reserved IP for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __7(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__7", line: 226 }; return __func(_, this, arguments, __7, 2, __frame, function __$__7() { return (function __$__7(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__7() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.reservedIPs.prepareMigration(name, __cb(_, __frame, 8, 42, function __$__7() { _(); }, true)); }); }); });
var reservedIPValidateMigration = cli.category("network").description("Commands to invoke service management operations.").category("reserved-ip").description($("Commands to manage your reserved ip. "));
reservedIPValidateMigration.command("validate-migration [name]").description($("Validate Reserved IP migration api validates the given reserved IP for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __8(name, options, _) { var subscription, networkManagementClient, result; var __frame = { name: "__8", line: 248 }; return __func(_, this, arguments, __8, 2, __frame, function __$__8() { return (function __$__8(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__8() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.reservedIPs.validateMigration(name, __cb(_, __frame, 8, 55, function ___(__0, __2) { result = __2;
if (result) {
_showValidationResults(result); } ; _(); }, true)); }); }); });
var networkSecurityGroupAbortMigration = cli.category("network").description("Commands to invoke service management operations.").category("nsg").description($("Commands to manage your network security group. "));
networkSecurityGroupAbortMigration.command("abort-migration [name]").description($("Abort Network Security Group migration api validates and aborts the given network security group for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __9(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__9", line: 273 }; return __func(_, this, arguments, __9, 2, __frame, function __$__9() { return (function __$__9(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("Name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__9() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.networkSecurityGroups.abortMigration(name, __cb(_, __frame, 8, 52, function __$__9() { _(); }, true)); }); }); });
var networkSecurityGroupCommitMigration = cli.category("network").description("Commands to invoke service management operations.").category("nsg").description($("Commands to manage your network security group. "));
networkSecurityGroupCommitMigration.command("commit-migration [name]").description($("Commit Network Security Group migration api validates and commits the given network security group for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __10(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__10", line: 295 }; return __func(_, this, arguments, __10, 2, __frame, function __$__10() { return (function __$__10(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("Name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__10() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.networkSecurityGroups.commitMigration(name, __cb(_, __frame, 8, 52, function __$__10() { _(); }, true)); }); }); });
var networkSecurityGroupPrepareMigration = cli.category("network").description("Commands to invoke service management operations.").category("nsg").description($("Commands to manage your network security group. "));
networkSecurityGroupPrepareMigration.command("prepare-migration [name]").description($("Prepare Network Security Group migration api validates and prepare the given network security group for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __11(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__11", line: 317 }; return __func(_, this, arguments, __11, 2, __frame, function __$__11() { return (function __$__11(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("Name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__11() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.networkSecurityGroups.prepareMigration(name, __cb(_, __frame, 8, 52, function __$__11() { _(); }, true)); }); }); });
var networkSecurityGroupValidateMigration = cli.category("network").description("Commands to invoke service management operations.").category("nsg").description($("Commands to manage your network security group. "));
networkSecurityGroupValidateMigration.command("validate-migration [name]").description($("Validate Network Security Group migration api validates the given network security group for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __12(name, options, _) { var subscription, networkManagementClient, result; var __frame = { name: "__12", line: 339 }; return __func(_, this, arguments, __12, 2, __frame, function __$__12() { return (function __$__12(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("Name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__12() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.networkSecurityGroups.validateMigration(name, __cb(_, __frame, 8, 65, function ___(__0, __2) { result = __2;
if (result) {
_showValidationResults(result); } ; _(); }, true)); }); }); });
var routeTableAbortMigration = cli.category("network").description("Commands to invoke service management operations.").category("route-table").description($("Commands to manage your route table. "));
routeTableAbortMigration.command("abort-migration [name]").description($("Abort Route Table migration api validates and aborts the given route table group for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __13(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__13", line: 364 }; return __func(_, this, arguments, __13, 2, __frame, function __$__13() { return (function __$__13(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("Name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__13() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.routes.abortMigration(name, __cb(_, __frame, 8, 37, function __$__13() { _(); }, true)); }); }); });
var routeTableCommitMigration = cli.category("network").description("Commands to invoke service management operations.").category("route-table").description($("Commands to manage your route table. "));
routeTableCommitMigration.command("commit-migration [name]").description($("Commit Route Table migration api validates and commits the given route table for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __14(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__14", line: 386 }; return __func(_, this, arguments, __14, 2, __frame, function __$__14() { return (function __$__14(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__14() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.routes.commitMigration(name, __cb(_, __frame, 8, 37, function __$__14() { _(); }, true)); }); }); });
var routeTablePrepareMigration = cli.category("network").description("Commands to invoke service management operations.").category("route-table").description($("Commands to manage your route table. "));
routeTablePrepareMigration.command("prepare-migration [name]").description($("Prepare Route Table migration api validates and prepare the given route table for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __15(name, options, _) { var subscription, networkManagementClient; var __frame = { name: "__15", line: 408 }; return __func(_, this, arguments, __15, 2, __frame, function __$__15() { return (function __$__15(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("Name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__15() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.routes.prepareMigration(name, __cb(_, __frame, 8, 37, function __$__15() { _(); }, true)); }); }); });
var routeTableValidateMigration = cli.category("network").description("Commands to invoke service management operations.").category("route-table").description($("Commands to manage your route table. "));
routeTableValidateMigration.command("validate-migration [name]").description($("Validate Route Table migration api validates the given route table for IaaS Classic to ARM migration.")).usage("[options] <name>").option("-n, --name <name>", $("name")).option("-s, --subscription <subscription>", $("The subscription identifier")).execute(function __16(name, options, _) { var subscription, networkManagementClient, result; var __frame = { name: "__16", line: 430 }; return __func(_, this, arguments, __16, 2, __frame, function __$__16() { return (function __$__16(__then) {
if (!name) {
return cli.interaction.promptIfNotGiven($("Name : "), name, __cb(_, __frame, 2, 31, function ___(__0, __1) { name = __1; __then(); }, true)); } else { __then(); } ; })(function __$__16() {
cli.output.verbose(("name = " + name));
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkClient(subscription);
return networkManagementClient.routes.validateMigration(name, __cb(_, __frame, 8, 50, function ___(__0, __2) { result = __2;
if (result) {
_showValidationResults(result); } ; _(); }, true)); }); }); });
function _showValidationResults(result) {
cli.interaction.formatOutput(result, function(item) {
if (item.validationMessages) {
item.validationMessages.forEach(function(msg) {
cli.output.nameValue(msg.category, msg.message); }); } ; }); };};