UNPKG

azure-cli

Version:

Microsoft Azure Cross Platform Command Line tool

720 lines (267 loc) 122 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; var profile = require("../../../util/profile/index"); var util = require("util"); var utils = require("../../../util/utils"); var constants = require("./constants"); var $ = utils.getLocaleString; var NetworkConfig = require("./networkConfig"); var VirtualNetwork = require("./virtualNetwork"); var DnsServer = require("./dnsServer"); var StaticIp = require("./staticIp"); var ReservedIp = require("./reservedIp"); var Nsg = require("./nsg"); var RouteTable = require("./routeTable"); var Subnet = require("./subnet"); var LocalNetwork = require("./localNetwork"); var VpnGateway = require("./vpnGateway"); var AppGateway = require("./appGateway"); var TrafficManager = require("./trafficManager"); exports.init = function(cli) { var network = cli.category("network").description($("Commands to manage your networks")); network.command("export <file-path>").usage("[options] <file-path>").description($("Export the current network configuration to a file")).option("-s, --subscription <id>", $("the subscription id")).execute(function __1(filePath, options, _) { var networkManagementClient, networkConfig; var __frame = { name: "__1", line: 44 }; return __func(_, this, arguments, __1, 2, __frame, function __$__1() { networkManagementClient = createNetworkManagementClient(options); networkConfig = new NetworkConfig(cli, networkManagementClient); return networkConfig.export(filePath, options, __cb(_, __frame, 3, 20, function __$__1() { _(); }, true)); }); }); network.command("import <file-path>").usage("[options] <file-path>").description($("Set the network configuration from a file")).option("-s, --subscription <id>", $("the subscription id")).execute(function __2(filePath, options, _) { var networkManagementClient, networkConfig; var __frame = { name: "__2", line: 54 }; return __func(_, this, arguments, __2, 2, __frame, function __$__2() { networkManagementClient = createNetworkManagementClient(options); networkConfig = new NetworkConfig(cli, networkManagementClient); return networkConfig.import(filePath, options, __cb(_, __frame, 3, 20, function __$__2() { _(); }, true)); }); }); var dnsServer = network.category("dns-server").description($("Commands to manage your DNS servers")); dnsServer.command("list").usage("[options]").description($("List DNS servers registered in network")).option("-s, --subscription <id>", $("the subscription id")).execute(function __3(options, _) { var networkManagementClient, dnsServer; var __frame = { name: "__3", line: 67 }; return __func(_, this, arguments, __3, 1, __frame, function __$__3() { networkManagementClient = createNetworkManagementClient(options); dnsServer = new DnsServer(cli, networkManagementClient); return dnsServer.list(options, __cb(_, __frame, 3, 16, function __$__3() { _(); }, true)); }); }); dnsServer.command("register [dns-ip]").usage("[options] <dns-ip>").description($("Register a DNS server with network")).option("-p, --dns-ip <dns-ip>", $("the IP address of the DNS server")).option("-i, --dns-id <dns-id>", $("the name identifier of the DNS server")).option("-s, --subscription <id>", $("the subscription id")).execute(function __4(dnsIp, options, _) { var networkManagementClient, dnsServer; var __frame = { name: "__4", line: 79 }; return __func(_, this, arguments, __4, 2, __frame, function __$__4() { return cli.interaction.promptIfNotGiven($("DNS IP: "), dnsIp, __cb(_, __frame, 1, 30, function ___(__0, __1) { dnsIp = __1; networkManagementClient = createNetworkManagementClient(options); dnsServer = new DnsServer(cli, networkManagementClient); return dnsServer.register(dnsIp, options, __cb(_, __frame, 5, 16, function __$__4() { _(); }, true)); }, true)); }); }); dnsServer.command("unregister [dns-ip]").usage("[options] <dns-ip>").description($("Unregister a DNS server registered in the current network")).option("-p, --dns-ip <dns-ip>", $("the IP address of the DNS server")).option("-i, --dns-id <dns-id>", $("the name identifier of the DNS server")).option("-q, --quiet", $("quiet mode, do not ask for unregister confirmation")).option("-s, --subscription <id>", $("the subscription id")).execute(function __5(dnsIp, options, _) { var networkManagementClient, dnsServer; var __frame = { name: "__5", line: 94 }; return __func(_, this, arguments, __5, 2, __frame, function __$__5() { networkManagementClient = createNetworkManagementClient(options); dnsServer = new DnsServer(cli, networkManagementClient); return dnsServer.unregister(dnsIp, options, __cb(_, __frame, 3, 16, function __$__5() { _(); }, true)); }); }); var vnet = network.category("vnet").description($("Commands to manage your virtual networks")); vnet.command("create [vnet]").usage("[options] <vnet>").description($("Create a virtual network")).option("--vnet <vnet>", $("the name of the virtual network")).option("-e, --address-space <ipv4>", $("the address space for the virtual network")).option("-m, --max-vm-count <number>", $("the maximum number of VMs in the address space")).option("-i, --cidr <number>", $("the address space network mask in CIDR format")).option("-p, --subnet-start-ip <ipv4>", $("the start IP address of subnet")).option("-n, --subnet-name <name>", $("the name for the subnet")).option("-c, --subnet-vm-count <number>", $("the maximum number of VMs in the subnet")).option("-r, --subnet-cidr <number>", $("the subnet network mask in CIDR format")).option("-l, --location <name>", $("the location")).option("-f, --create-new-affinity-group", $("creates a new affinity group at the location specified in --location")).option("-a, --affinity-group <name>", $("the affinity group")).option("-d, --dns-server-id <dns-id>", $("the name identifier of the DNS server")).option("-s, --subscription <id>", $("the subscription id")).execute(function __6(vnet, options, _) { var managementClient, networkManagementClient, virtualNetwork; var __frame = { name: "__6", line: 119 }; return __func(_, this, arguments, __6, 2, __frame, function __$__6() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnet, __cb(_, __frame, 1, 29, function ___(__0, __1) { vnet = __1; managementClient = createManagementClient(options); networkManagementClient = createNetworkManagementClient(options); virtualNetwork = new VirtualNetwork(cli, managementClient, networkManagementClient); return virtualNetwork.create(vnet, options, __cb(_, __frame, 6, 21, function __$__6() { _(); }, true)); }, true)); }); }); vnet.command("list").usage("[options]").description($("List your virtual networks")).option("-s, --subscription <id>", $("the subscription id")).execute(function __7(options, _) { var managementClient, networkManagementClient, virtualNetwork; var __frame = { name: "__7", line: 132 }; return __func(_, this, arguments, __7, 1, __frame, function __$__7() { managementClient = createManagementClient(options); networkManagementClient = createNetworkManagementClient(options); virtualNetwork = new VirtualNetwork(cli, managementClient, networkManagementClient); return virtualNetwork.list(options, __cb(_, __frame, 4, 21, function __$__7() { _(); }, true)); }); }); vnet.command("show [vnet]").usage("<vnet> [options]").description($("Show details about a virtual network")).option("--vnet <vnet>", $("the name of the virtual network")).option("-s, --subscription <id>", $("the subscription id")).execute(function __8(vnet, options, _) { var managementClient, networkManagementClient, virtualNetwork; var __frame = { name: "__8", line: 144 }; return __func(_, this, arguments, __8, 2, __frame, function __$__8() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnet, __cb(_, __frame, 1, 29, function ___(__0, __1) { vnet = __1; managementClient = createManagementClient(options); networkManagementClient = createNetworkManagementClient(options); virtualNetwork = new VirtualNetwork(cli, managementClient, networkManagementClient); return virtualNetwork.show(vnet, options, __cb(_, __frame, 6, 21, function __$__8() { _(); }, true)); }, true)); }); }); vnet.command("delete [vnet]").usage("[options] <vnet>").description($("Delete a virtual network")).option("--vnet <vnet>", $("the name of the virtual network")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <id>", $("the subscription id")).execute(function __9(vnet, options, _) { var managementClient, networkManagementClient, virtualNetwork; var __frame = { name: "__9", line: 159 }; return __func(_, this, arguments, __9, 2, __frame, function __$__9() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnet, __cb(_, __frame, 1, 29, function ___(__0, __1) { vnet = __1; managementClient = createManagementClient(options); networkManagementClient = createNetworkManagementClient(options); virtualNetwork = new VirtualNetwork(cli, managementClient, networkManagementClient); return virtualNetwork.delete(vnet, options, __cb(_, __frame, 6, 21, function __$__9() { _(); }, true)); }, true)); }); }); var vnetLocalNetwork = vnet.category("local-network").description($("Commands to manage association between virtual network and local network")); vnetLocalNetwork.command("add [name] [local-network-name]").usage("[options] <name> <local-network-name>").description($("Associate a local network with a virtual network")).option("-n, --name <name>", $("the name of the virtual network")).option("-l, --local-network-name <local-network-name>", $("the name of the local network")).option("-s, --subscription <id>", $("the subscription id")).execute(function __10(virtualNetworkName, localNetworkName, options, _) { var networkManagementClient, localNetwork; var __frame = { name: "__10", line: 177 }; return __func(_, this, arguments, __10, 3, __frame, function __$__10() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), virtualNetworkName, __cb(_, __frame, 1, 43, function ___(__0, __1) { virtualNetworkName = __1; return cli.interaction.promptIfNotGiven($("Local network name: "), localNetworkName, __cb(_, __frame, 2, 41, function ___(__0, __2) { localNetworkName = __2; networkManagementClient = createNetworkManagementClient(options); localNetwork = new LocalNetwork(cli, networkManagementClient); return localNetwork.addAssociation(virtualNetworkName, localNetworkName, options, __cb(_, __frame, 6, 19, function __$__10() { _(); }, true)); }, true)); }, true)); }); }); vnetLocalNetwork.command("remove [name] [local-network-name]").usage("[options] <name> <local-network-name>").description($("Remove association between a local network and a virtual network")).option("-n, --name <name>", $("the name of the virtual network")).option("-l, --local-network-name <local-network-name>", $("the name of the local network")).option("-s, --subscription <id>", $("the subscription id")).execute(function __11(virtualNetworkName, localNetworkName, options, _) { var networkManagementClient, localNetwork; var __frame = { name: "__11", line: 192 }; return __func(_, this, arguments, __11, 3, __frame, function __$__11() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), virtualNetworkName, __cb(_, __frame, 1, 43, function ___(__0, __1) { virtualNetworkName = __1; return cli.interaction.promptIfNotGiven($("Local network name: "), localNetworkName, __cb(_, __frame, 2, 41, function ___(__0, __2) { localNetworkName = __2; networkManagementClient = createNetworkManagementClient(options); localNetwork = new LocalNetwork(cli, networkManagementClient); return localNetwork.removeAssociation(virtualNetworkName, localNetworkName, options, __cb(_, __frame, 6, 19, function __$__11() { _(); }, true)); }, true)); }, true)); }); }); var staticIP = vnet.category("static-ip").description($("Commands to manage your virtual network static IP addresses")); staticIP.command("check [vnet] [ip-address]").usage("[options] <vnet> <ip-address>").description($("Check the availability of a static IP address")).option("-s, --subscription <id>", $("the subscription id")).execute(function __12(vnet, ipAddress, options, _) { var networkManagementClient, staticIP; var __frame = { name: "__12", line: 208 }; return __func(_, this, arguments, __12, 3, __frame, function __$__12() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnet, __cb(_, __frame, 1, 29, function ___(__0, __1) { vnet = __1; return cli.interaction.promptIfNotGiven($("Static IP address: "), ipAddress, __cb(_, __frame, 2, 34, function ___(__0, __2) { ipAddress = __2; networkManagementClient = createNetworkManagementClient(options); staticIP = new StaticIp(cli, networkManagementClient); return staticIP.check(vnet, ipAddress, options, __cb(_, __frame, 6, 15, function __$__12() { _(); }, true)); }, true)); }, true)); }); }); var reservedIP = network.category("reserved-ip").description($("Commands to manage your reserved public virtual IP addresses")); reservedIP.command("create <name> <location>").usage("[options] <name> <location>").description($("Create a reserved IP address")).option("-e, --label <label>", $("the reserved IP address label")).option("-r, --service-name <service-name>", $("the reserved IP service name")).option("-d, --deployment-name <deployment-name>", $("the deployment name")).option("-s, --subscription <id>", $("the subscription id")).execute(function __13(name, location, options, _) { var networkManagementClient, reservedIp; var __frame = { name: "__13", line: 227 }; return __func(_, this, arguments, __13, 3, __frame, function __$__13() { networkManagementClient = createNetworkManagementClient(options); reservedIp = new ReservedIp(cli, networkManagementClient); return reservedIp.create(name, location, options, __cb(_, __frame, 3, 17, function __$__13() { _(); }, true)); }); }); reservedIP.command("list").usage("[options]").description($("List your reserved IP addresses")).option("-s, --subscription <id>", $("the subscription id")).execute(function __14(options, _) { var networkManagementClient, reservedIp; var __frame = { name: "__14", line: 237 }; return __func(_, this, arguments, __14, 1, __frame, function __$__14() { networkManagementClient = createNetworkManagementClient(options); reservedIp = new ReservedIp(cli, networkManagementClient); return reservedIp.list(options, __cb(_, __frame, 3, 17, function __$__14() { _(); }, true)); }); }); reservedIP.command("show <name>").usage("[options] <name>").description($("Show details about a reserved IP address")).option("-s, --subscription <id>", $("the subscription id")).execute(function __15(name, options, _) { var networkManagementClient, reservedIp; var __frame = { name: "__15", line: 247 }; return __func(_, this, arguments, __15, 2, __frame, function __$__15() { networkManagementClient = createNetworkManagementClient(options); reservedIp = new ReservedIp(cli, networkManagementClient); return reservedIp.show(name, options, __cb(_, __frame, 3, 17, function __$__15() { _(); }, true)); }); }); reservedIP.command("delete <name>").usage("[options] <name>").description($("Delete a reserved IP address")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <id>", $("the subscription id")).execute(function __16(name, options, _) { var networkManagementClient, reservedIp; var __frame = { name: "__16", line: 258 }; return __func(_, this, arguments, __16, 2, __frame, function __$__16() { networkManagementClient = createNetworkManagementClient(options); reservedIp = new ReservedIp(cli, networkManagementClient); return reservedIp.delete(name, options, __cb(_, __frame, 3, 17, function __$__16() { _(); }, true)); }); }); reservedIP.command("associate <name> <service-name> <deployment-name>").usage("[options] <name> <service-name> <deployment-name>").description($("Set a reserved IP address and cloud service association")).option("-s, --subscription <id>", $("the subscription id")).execute(function __17(name, serviceName, deploymentName, options, _) { var networkManagementClient, reservedIp; var __frame = { name: "__17", line: 268 }; return __func(_, this, arguments, __17, 4, __frame, function __$__17() { networkManagementClient = createNetworkManagementClient(options); reservedIp = new ReservedIp(cli, networkManagementClient); return reservedIp.associate(name, serviceName, deploymentName, options, __cb(_, __frame, 3, 17, function __$__17() { _(); }, true)); }); }); reservedIP.command("disassociate <name> <service-name> <deployment-name>").usage("[options] <name> <service-name> <deployment-name>").description($("Remove a reserved IP address and cloud service association")).option("-s, --subscription <id>", $("the subscription id")).execute(function __18(name, serviceName, deploymentName, options, _) { var networkManagementClient, reservedIp; var __frame = { name: "__18", line: 278 }; return __func(_, this, arguments, __18, 4, __frame, function __$__18() { networkManagementClient = createNetworkManagementClient(options); reservedIp = new ReservedIp(cli, networkManagementClient); return reservedIp.disassociate(name, serviceName, deploymentName, options, __cb(_, __frame, 3, 17, function __$__18() { _(); }, true)); }); }); var nsg = network.category("nsg").description($("Commands to manage network security groups")); nsg.command("create [name] [location]").description($("Create a network security group")).usage("[options] <name> <location>").option("-n, --name <name>", $("the name of the network security group")).option("-l, --location <location>", $("the location")).option("-b, --label <label>", $("the label of the network security group")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __19(name, location, options, _) { var networkManagementClient, nsg; var __frame = { name: "__19", line: 294 }; return __func(_, this, arguments, __19, 3, __frame, function __$__19() { return cli.interaction.promptIfNotGiven($("Network security group name: "), name, __cb(_, __frame, 1, 29, function ___(__0, __1) { name = __1; return cli.interaction.promptIfNotGiven($("Location: "), location, __cb(_, __frame, 2, 33, function ___(__0, __2) { location = __2; networkManagementClient = createNetworkManagementClient(options); nsg = new Nsg(cli, networkManagementClient); return nsg.create(name, location, options, __cb(_, __frame, 6, 10, function __$__19() { _(); }, true)); }, true)); }, true)); }); }); nsg.command("list").usage("[options]").description($("List network security groups")).option("-s, --subscription <id>", $("the subscription id")).execute(function __20(options, _) { var networkManagementClient, nsg; var __frame = { name: "__20", line: 307 }; return __func(_, this, arguments, __20, 1, __frame, function __$__20() { networkManagementClient = createNetworkManagementClient(options); nsg = new Nsg(cli, networkManagementClient); return nsg.list(options, __cb(_, __frame, 3, 10, function __$__20() { _(); }, true)); }); }); nsg.command("show [name]").description($("Show the details about a network security group")).usage("[options] <name>").option("-n, --name <name>", $("the name of the network security group")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __21(name, options, _) { var networkManagementClient, nsg; var __frame = { name: "__21", line: 318 }; return __func(_, this, arguments, __21, 2, __frame, function __$__21() { return cli.interaction.promptIfNotGiven($("Network security group name: "), name, __cb(_, __frame, 1, 29, function ___(__0, __1) { name = __1; networkManagementClient = createNetworkManagementClient(options); nsg = new Nsg(cli, networkManagementClient); return nsg.show(name, options, __cb(_, __frame, 5, 10, function __$__21() { _(); }, true)); }, true)); }); }); nsg.command("delete [name]").description($("Delete a network security group")).usage("[options] <name>").option("-n, --name <name>", $("the name of the network security group")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __22(name, options, _) { var networkManagementClient, nsg; var __frame = { name: "__22", line: 332 }; return __func(_, this, arguments, __22, 2, __frame, function __$__22() { return cli.interaction.promptIfNotGiven($("Network security group name: "), name, __cb(_, __frame, 1, 29, function ___(__0, __1) { name = __1; networkManagementClient = createNetworkManagementClient(options); nsg = new Nsg(cli, networkManagementClient); return nsg.delete(name, options, __cb(_, __frame, 5, 10, function __$__22() { _(); }, true)); }, true)); }); }); var nsgRule = nsg.category("rule").description($("Commands to manage network security group rules")); nsgRule.command("create [nsg-name] [name]").usage("[options] <nsg-name> <name>").description($("Create a network security group rule")).option("-a, --nsg-name <nsg-name>", $("the name of the network security group")).option("-n, --name <name>", $("the name of the rule")).option("-p, --protocol <protocol>", $("the protocol")).option("-f, --source-address-prefix <source-address-prefix>", $("the source address prefix")).option("-o, --source-port-range <source-port-range>", $("the source port range")).option("-e, --destination-address-prefix <destination-address-prefix>", $("the destination address prefix")).option("-u, --destination-port-range <destination-port-range>", $("the destination port range")).option("-c, --action <action>", $("the action mode [Allow, Deny]")).option("-y, --priority <priority>", $("the priority")).option("-r, --type <type>", $("the type")).option("-s, --subscription <id>", $("the subscription id")).execute(function __23(nsgName, ruleName, options, _) { var networkManagementClient, nsg; var __frame = { name: "__23", line: 357 }; return __func(_, this, arguments, __23, 3, __frame, function __$__23() { return cli.interaction.promptIfNotGiven($("Network security group name: "), nsgName, __cb(_, __frame, 1, 32, function ___(__0, __1) { nsgName = __1; return cli.interaction.promptIfNotGiven($("Rule name: "), ruleName, __cb(_, __frame, 2, 33, function ___(__0, __2) { ruleName = __2; networkManagementClient = createNetworkManagementClient(options); nsg = new Nsg(cli, networkManagementClient); return nsg.createRule(nsgName, ruleName, options, __cb(_, __frame, 6, 10, function __$__23() { _(); }, true)); }, true)); }, true)); }); }); nsgRule.command("set [nsg-name] [name]").usage("[options] <nsg-name> <name>").description($("Set a network security group rule")).option("-a, --nsg-name <nsg-name>", $("the name of the network security group")).option("-n, --name <name>", $("the name of the rule")).option("-p, --protocol <protocol>", $("the protocol")).option("-f, --source-address-prefix <source-address-prefix>", $("the source address prefix")).option("-o, --source-port-range <source-port-range>", $("the source port range")).option("-e, --destination-address-prefix <destination-address-prefix>", $("the destination address prefix")).option("-u, --destination-port-range <destination-port-range>", $("the destination port range")).option("-c, --action <action>", $("the action mode [Allow, Deny]")).option("-y, --priority <priority>", $("the priority")).option("-r, --type <type>", $("the type")).option("-s, --subscription <id>", $("the subscription id")).execute(function __24(nsgName, ruleName, options, _) { var networkManagementClient, nsg; var __frame = { name: "__24", line: 380 }; return __func(_, this, arguments, __24, 3, __frame, function __$__24() { return cli.interaction.promptIfNotGiven($("Network security group name: "), nsgName, __cb(_, __frame, 1, 32, function ___(__0, __1) { nsgName = __1; return cli.interaction.promptIfNotGiven($("Rule name: "), ruleName, __cb(_, __frame, 2, 33, function ___(__0, __2) { ruleName = __2; networkManagementClient = createNetworkManagementClient(options); nsg = new Nsg(cli, networkManagementClient); return nsg.setRule(nsgName, ruleName, options, __cb(_, __frame, 6, 10, function __$__24() { _(); }, true)); }, true)); }, true)); }); }); nsgRule.command("list [nsg-name]").usage("[options] <nsg-name>").description($("List rules in a network security group")).option("-a, --nsg-name <nsg-name>", $("the name of the network security group")).option("-s, --subscription <id>", $("the subscription id")).execute(function __25(nsgName, options, _) { var networkManagementClient, nsg; var __frame = { name: "__25", line: 394 }; return __func(_, this, arguments, __25, 2, __frame, function __$__25() { return cli.interaction.promptIfNotGiven($("Network security group name: "), nsgName, __cb(_, __frame, 1, 32, function ___(__0, __1) { nsgName = __1; networkManagementClient = createNetworkManagementClient(options); nsg = new Nsg(cli, networkManagementClient); return nsg.listRules(nsgName, options, __cb(_, __frame, 5, 10, function __$__25() { _(); }, true)); }, true)); }); }); nsgRule.command("show [nsg-name] [name]").usage("[options] <nsg-name> <name>").description($("Show rule in a network security group")).option("-a, --nsg-name <nsg-name>", $("the name of the network security group")).option("-n, --name <name>", $("the name of the rule")).option("-s, --subscription <id>", $("the subscription id")).execute(function __26(nsgName, ruleName, options, _) { var networkManagementClient, nsg; var __frame = { name: "__26", line: 408 }; return __func(_, this, arguments, __26, 3, __frame, function __$__26() { return cli.interaction.promptIfNotGiven($("Network security group name: "), nsgName, __cb(_, __frame, 1, 32, function ___(__0, __1) { nsgName = __1; return cli.interaction.promptIfNotGiven($("Rule name: "), ruleName, __cb(_, __frame, 2, 33, function ___(__0, __2) { ruleName = __2; networkManagementClient = createNetworkManagementClient(options); nsg = new Nsg(cli, networkManagementClient); return nsg.showRule(nsgName, ruleName, options, __cb(_, __frame, 6, 10, function __$__26() { _(); }, true)); }, true)); }, true)); }); }); nsgRule.command("delete [nsg-name] [name]").usage("[options] <nsg-name> <name>").description($("Delete a network security group rule")).option("-a, --nsg-name <nsg-name>", $("the name of the network security group")).option("-n, --name <name>", $("the name of the rule")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <id>", $("the subscription id")).execute(function __27(nsgName, ruleName, options, _) { var networkManagementClient, nsg; var __frame = { name: "__27", line: 424 }; return __func(_, this, arguments, __27, 3, __frame, function __$__27() { return cli.interaction.promptIfNotGiven($("Network security group name: "), nsgName, __cb(_, __frame, 1, 32, function ___(__0, __1) { nsgName = __1; return cli.interaction.promptIfNotGiven($("Rule name: "), ruleName, __cb(_, __frame, 2, 33, function ___(__0, __2) { ruleName = __2; networkManagementClient = createNetworkManagementClient(options); nsg = new Nsg(cli, networkManagementClient); return nsg.deleteRule(nsgName, ruleName, options, __cb(_, __frame, 6, 10, function __$__27() { _(); }, true)); }, true)); }, true)); }); }); var nsgSubnet = nsg.category("subnet").description("Commands to manage network security group of subnet"); nsgSubnet.command("add [nsg-name] [vnet-name] [subnet-name]").usage("[options] <nsg-name> <vnet-name> <subnet-name>").description("Associate a network security group with a subnet").option("-a, --nsg-name <nsg-name>", $("the name of the network security group")).option("-n, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --subnet-name <subnet-name>", $("the name of the virtual network subnet")).option("-s, --subscription <id>", $("the subscription id")).execute(function __28(nsgName, vnetName, subnetName, options, _) { var networkManagementClient, subnet; var __frame = { name: "__28", line: 443 }; return __func(_, this, arguments, __28, 4, __frame, function __$__28() { return cli.interaction.promptIfNotGiven($("Network Security group name: "), nsgName, __cb(_, __frame, 1, 32, function ___(__0, __1) { nsgName = __1; return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vnetName = __2; return cli.interaction.promptIfNotGiven($("Virtual network subnet name: "), subnetName, __cb(_, __frame, 3, 35, function ___(__0, __3) { subnetName = __3; networkManagementClient = createNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.addNsg(nsgName, vnetName, subnetName, options, __cb(_, __frame, 7, 13, function __$__28() { _(); }, true)); }, true)); }, true)); }, true)); }); }); nsgSubnet.command("remove [nsg-name] [vnet-name] [subnet-name]").usage("[options] <nsg-name> <vnet-name> <subnet-name>").description("Remove association between a network security group and subnet").option("-a, --nsg-name <nsg-name>", $("the name of the network security group")).option("-n, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --subnet-name <subnet-name>", $("the name of the virtual network subnet")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <id>", $("the subscription id")).execute(function __29(nsgName, vnetName, subnetName, options, _) { var networkManagementClient, subnet; var __frame = { name: "__29", line: 461 }; return __func(_, this, arguments, __29, 4, __frame, function __$__29() { return cli.interaction.promptIfNotGiven($("Network Security group name: "), nsgName, __cb(_, __frame, 1, 32, function ___(__0, __1) { nsgName = __1; return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 2, 33, function ___(__0, __2) { vnetName = __2; return cli.interaction.promptIfNotGiven($("Virtual network subnet name: "), subnetName, __cb(_, __frame, 3, 35, function ___(__0, __3) { subnetName = __3; networkManagementClient = createNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.removeNsg(nsgName, vnetName, subnetName, options, __cb(_, __frame, 7, 13, function __$__29() { _(); }, true)); }, true)); }, true)); }, true)); }); }); var subnet = vnet.category("subnet").description($("Commands to manage your virtual network subnets")); subnet.command("create [vnet-name] [name]").usage("[options] <vnet-name> <name>").description($("Create a virtual network subnet")).option("-t, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --name <name>", $("the name of the subnet")).option("-a, --address-prefix <address-prefix>", $("the address prefix")).option("-o, --network-security-group-name <network-security-group-name>", $("the network security group name")).option("-s, --subscription <id>", $("the subscription id")).execute(function __30(vnetName, name, options, _) { var networkManagementClient, subnet; var __frame = { name: "__30", line: 482 }; return __func(_, this, arguments, __30, 3, __frame, function __$__30() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 1, 33, function ___(__0, __1) { vnetName = __1; return cli.interaction.promptIfNotGiven($("Subnet name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; return cli.interaction.promptIfNotGiven($("Address prefix: "), options.addressPrefix, __cb(_, __frame, 3, 46, function ___(__0, __3) { options.addressPrefix = __3; networkManagementClient = createNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.create(vnetName, name, options, __cb(_, __frame, 7, 13, function __$__30() { _(); }, true)); }, true)); }, true)); }, true)); }); }); subnet.command("set [vnet-name] [name]").usage("[options] <vnet-name> <name>").description($("Set a virtual network subnet")).option("-t, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --name <name>", $("the name of the subnet")).option("-a, --address-prefix <address-prefix>", $("the address prefix")).option("-s, --subscription <id>", $("the subscription id")).execute(function __31(vnetName, name, options, _) { var networkManagementClient, subnet; var __frame = { name: "__31", line: 499 }; return __func(_, this, arguments, __31, 3, __frame, function __$__31() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 1, 33, function ___(__0, __1) { vnetName = __1; return cli.interaction.promptIfNotGiven($("Subnet name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; networkManagementClient = createNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.set(vnetName, name, options, __cb(_, __frame, 6, 13, function __$__31() { _(); }, true)); }, true)); }, true)); }); }); subnet.command("list [vnet-name]").usage("[options] <vnet-name>").description($("Get all subnets in a virtual network")).option("-e, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-s, --subscription <id>", $("the subscription id")).execute(function __32(vnetName, options, _) { var networkManagementClient, subnet; var __frame = { name: "__32", line: 513 }; return __func(_, this, arguments, __32, 2, __frame, function __$__32() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 1, 33, function ___(__0, __1) { vnetName = __1; networkManagementClient = createNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.list(vnetName, options, __cb(_, __frame, 5, 13, function __$__32() { _(); }, true)); }, true)); }); }); subnet.command("show [vnet-name] [name]").usage("[options] <vnet-name>").description($("Show a details about subnet in a virtual network")).option("-e, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --name <name>", $("the name of the subnet")).option("-s, --subscription <id>", $("the subscription id")).execute(function __33(vnetName, name, options, _) { var networkManagementClient, subnet; var __frame = { name: "__33", line: 527 }; return __func(_, this, arguments, __33, 3, __frame, function __$__33() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 1, 33, function ___(__0, __1) { vnetName = __1; return cli.interaction.promptIfNotGiven($("Virtual network subnet name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; networkManagementClient = createNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.show(vnetName, name, options, __cb(_, __frame, 6, 13, function __$__33() { _(); }, true)); }, true)); }, true)); }); }); subnet.command("delete [vnet-name] [name]").usage("[options] <vnet-name> <name>").description($("Delete a virtual network subnet")).option("-e, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --name <name>", $("the name of the subnet")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <id>", $("the subscription id")).execute(function __34(vnetName, name, options, _) { var networkManagementClient, subnet; var __frame = { name: "__34", line: 543 }; return __func(_, this, arguments, __34, 3, __frame, function __$__34() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 1, 33, function ___(__0, __1) { vnetName = __1; return cli.interaction.promptIfNotGiven($("Subnet name: "), name, __cb(_, __frame, 2, 29, function ___(__0, __2) { name = __2; networkManagementClient = createNetworkManagementClient(options); subnet = new Subnet(cli, networkManagementClient); return subnet.delete(vnetName, name, options, __cb(_, __frame, 6, 13, function __$__34() { _(); }, true)); }, true)); }, true)); }); }); var subnetRouteTable = subnet.category("route-table").description($("Commands to manage subnet Route Tables")); subnetRouteTable.command("add [vnet-name] [subnet-name] [route-table-name]").usage("[options] <vnet-name> <subnet-name> <route-table-name>").description($("Add Route Table to a subnet")).option("-t, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --subnet-name <subnet-name>", $("the name of the subnet")).option("-r, --route-table-name <route-table-name>", $("the name of the Route Table that needs to be applied to the subnet")).option("-s, --subscription <id>", $("the subscription id")).execute(function __35(vnetName, subnetName, routeTableName, options, _) { var networkManagementClient, routeTable; var __frame = { name: "__35", line: 562 }; return __func(_, this, arguments, __35, 4, __frame, function __$__35() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 1, 33, function ___(__0, __1) { vnetName = __1; return cli.interaction.promptIfNotGiven($("Subnet name: "), subnetName, __cb(_, __frame, 2, 35, function ___(__0, __2) { subnetName = __2; return cli.interaction.promptIfNotGiven($("Route Table name: "), routeTableName, __cb(_, __frame, 3, 39, function ___(__0, __3) { routeTableName = __3; networkManagementClient = createNetworkManagementClient(options); routeTable = new RouteTable(cli, networkManagementClient); return routeTable.addRouteTableToSubnet(vnetName, subnetName, routeTableName, options, __cb(_, __frame, 7, 17, function __$__35() { _(); }, true)); }, true)); }, true)); }, true)); }); }); subnetRouteTable.command("delete [vnet-name] [subnet-name] [route-table-name]").usage("[options] <vnet-name> <subnet-name> <route-table-name>").description($("Remove Route Table from a subnet")).option("-t, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --subnet-name <subnet-name>", $("the name of the subnet")).option("-r, --route-table-name <route-table-name>", $("the name of the Route Table that needs to be applied to the subnet")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <id>", $("the subscription id")).execute(function __36(vnetName, subnetName, routeTableName, options, _) { var networkManagementClient, routeTable; var __frame = { name: "__36", line: 580 }; return __func(_, this, arguments, __36, 4, __frame, function __$__36() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 1, 33, function ___(__0, __1) { vnetName = __1; return cli.interaction.promptIfNotGiven($("Subnet name: "), subnetName, __cb(_, __frame, 2, 35, function ___(__0, __2) { subnetName = __2; return cli.interaction.promptIfNotGiven($("Route Table name: "), routeTableName, __cb(_, __frame, 3, 39, function ___(__0, __3) { routeTableName = __3; networkManagementClient = createNetworkManagementClient(options); routeTable = new RouteTable(cli, networkManagementClient); return routeTable.deleteRouteTableFromSubnet(vnetName, subnetName, routeTableName, options, __cb(_, __frame, 7, 17, function __$__36() { _(); }, true)); }, true)); }, true)); }, true)); }); }); subnetRouteTable.command("show [vnet-name] [subnet-name]").usage("[options] <vnet-name> <subnet-name>").description($("Get Route Table for a subnet")).option("-t, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-n, --subnet-name <subnet-name>", $("the name of the subnet")).option("-d, --detailed", util.format($(("get full details of the Route Table, without this flag only" + "\n Route Table name will be shown")))).option("-s, --subscription <id>", $("the subscription id")).execute(function __37(vnetName, subnetName, routeTableName, options, _) { var networkManagementClient, routeTable; var __frame = { name: "__37", line: 598 }; return __func(_, this, arguments, __37, 4, __frame, function __$__37() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 1, 33, function ___(__0, __1) { vnetName = __1; return cli.interaction.promptIfNotGiven($("Subnet name: "), subnetName, __cb(_, __frame, 2, 35, function ___(__0, __2) { subnetName = __2; networkManagementClient = createNetworkManagementClient(options); routeTable = new RouteTable(cli, networkManagementClient); return routeTable.showRouteTableForSubnet(vnetName, subnetName, options, __cb(_, __frame, 6, 17, function __$__37() { _(); }, true)); }, true)); }, true)); }); }); var localNetwork = network.category("local-network").description($("Commands to manage local network")); localNetwork.command("create [name] [address-prefixes]").description($("Create a local network")).usage("[options] <name> <address-prefixes>").option("-n, --name <name>", $("the name of the local network")).option("-a, --address-prefixes <address-prefixes>", $("the comma separated list of address prefixes")).option("-w, --vpn-gateway-address <vpn-gateway-address>", $("the VPN Gateway address")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __38(name, addressPrefixes, options, _) { var networkManagementClient, localNetwork; var __frame = { name: "__38", line: 617 }; return __func(_, this, arguments, __38, 3, __frame, function __$__38() { return cli.interaction.promptIfNotGiven($("Local network name: "), name, __cb(_, __frame, 1, 29, function ___(__0, __1) { name = __1; return cli.interaction.promptIfNotGiven($("Address prefixes: "), addressPrefixes, __cb(_, __frame, 2, 40, function ___(__0, __2) { addressPrefixes = __2; networkManagementClient = createNetworkManagementClient(options); localNetwork = new LocalNetwork(cli, networkManagementClient); return localNetwork.create(name, addressPrefixes, options, __cb(_, __frame, 6, 19, function __$__38() { _(); }, true)); }, true)); }, true)); }); }); localNetwork.command("set [name]").description($("Set a local network")).usage("[options] <name>").option("-n, --name <name>", $("the name of the local network")).option("-a, --address-prefixes <address-prefixes>", $("the comma separated list of address prefixes")).option("-w, --vpn-gateway-address <vpn-gateway-address>", $("the VPN Gateway address")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __39(name, options, _) { var networkManagementClient, localNetwork; var __frame = { name: "__39", line: 633 }; return __func(_, this, arguments, __39, 2, __frame, function __$__39() { return cli.interaction.promptIfNotGiven($("Local network name: "), name, __cb(_, __frame, 1, 29, function ___(__0, __1) { name = __1; networkManagementClient = createNetworkManagementClient(options); localNetwork = new LocalNetwork(cli, networkManagementClient); return localNetwork.set(name, options, __cb(_, __frame, 5, 19, function __$__39() { _(); }, true)); }, true)); }); }); localNetwork.command("list").usage("[options]").description($("Get all local networks")).option("-s, --subscription <id>", $("the subscription id")).execute(function __40(options, _) { var networkManagementClient, localNetwork; var __frame = { name: "__40", line: 645 }; return __func(_, this, arguments, __40, 1, __frame, function __$__40() { networkManagementClient = createNetworkManagementClient(options); localNetwork = new LocalNetwork(cli, networkManagementClient); return localNetwork.list(options, __cb(_, __frame, 3, 19, function __$__40() { _(); }, true)); }); }); localNetwork.command("show [name]").usage("[options]").description($("Get a local network")).option("-n, --name <name>", $("the name of the local network")).option("-s, --subscription <id>", $("the subscription id")).execute(function __41(name, options, _) { var networkManagementClient, localNetwork; var __frame = { name: "__41", line: 656 }; return __func(_, this, arguments, __41, 2, __frame, function __$__41() { return cli.interaction.promptIfNotGiven($("Local network name: "), name, __cb(_, __frame, 1, 29, function ___(__0, __1) { name = __1; networkManagementClient = createNetworkManagementClient(options); localNetwork = new LocalNetwork(cli, networkManagementClient); return localNetwork.show(name, options, __cb(_, __frame, 5, 19, function __$__41() { _(); }, true)); }, true)); }); }); localNetwork.command("delete [name]").usage("[options] <name>").description($("Delete a local network")).option("-n, --name <name>", $("the name of the local network")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <id>", $("the subscription id")).execute(function __42(name, options, _) { var networkManagementClient, localNetwork; var __frame = { name: "__42", line: 670 }; return __func(_, this, arguments, __42, 2, __frame, function __$__42() { return cli.interaction.promptIfNotGiven($("Local network name: "), name, __cb(_, __frame, 1, 29, function ___(__0, __1) { name = __1; networkManagementClient = createNetworkManagementClient(options); localNetwork = new LocalNetwork(cli, networkManagementClient); return localNetwork.delete(name, options, __cb(_, __frame, 5, 19, function __$__42() { _(); }, true)); }, true)); }); }); var vpnGateway = network.category("vpn-gateway").description($("Commands to manage VPN Gateways")); vpnGateway.command("create [vnet-name]").description($("Create a virtual network gateway")).usage("[options] <vnet-name>").option("-n, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-t, --type <type>", util.format($((("the gateway type, valid values are:" + "\n [%s],") + "\n default is StaticRouting")), constants.vpnGateway.type)).option("-k, --sku <sku>", util.format($((("the gateway SKU, valid values are:" + "\n [%s],") + "\n default is Default")), constants.vpnGateway.sku)).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __43(vnetName, options, _) { var networkManagementClient, vpnGateway; var __frame = { name: "__43", line: 692 }; return __func(_, this, arguments, __43, 2, __frame, function __$__43() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 1, 33, function ___(__0, __1) { vnetName = __1; networkManagementClient = createNetworkManagementClient(options); vpnGateway = new VpnGateway(cli, networkManagementClient); return vpnGateway.create(vnetName, options, __cb(_, __frame, 5, 17, function __$__43() { _(); }, true)); }, true)); }); }); vpnGateway.command("show [vnet-name]").description($("Get a virtual network gateway")).usage("[options] <vnet-name>").option("-n, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __44(vnetName, options, _) { var networkManagementClient, vpnGateway; var __frame = { name: "__44", line: 705 }; return __func(_, this, arguments, __44, 2, __frame, function __$__44() { return cli.interaction.promptIfNotGiven($("Virtual network name: "), vnetName, __cb(_, __frame, 1, 33, function ___(__0, __1) { vnetName = __1; networkManagementClient = createNetworkManagementClient(options); vpnGateway = new VpnGateway(cli, networkManagementClient); return vpnGateway.show(vnetName, options, __cb(_, __frame, 5, 17, function __$__44() { _(); }, true)); }, true)); }); }); vpnGateway.command("delete [vnet-name]").description($("Delete a virtual network gateway")).usage("[options] <vnet-name>").option("-n, --vnet-name <vnet-name>", $("the name of the virtual network")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __45(vnetName, options, _) { var networkManagementClient, vpnGateway; var __frame = { name: "__45", line: 719 }; return __func(_, this, arguments, __45, 2, __frame, function __$__45() { return cli.interaction.promptIfNotGiv