azure-cli
Version:
Microsoft Azure Cross Platform Command Line tool
409 lines (180 loc) • 29.2 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,__catch=__rt.__catch,__tryCatch=__rt.__tryCatch; var generatorUtils = require("../../../util/generatorUtils");
var util = require("util");
var validation = require("../../../util/validation");
var profile = require("../../../util/profile");
var utils = require("../../../util/utils");
var $ = utils.getLocaleString;
exports.init = function(cli) {
var network = cli.category("network").description($("Commands to manage network resources"));
var expressRoutes = network.category("express-route").description($("Commands to manage express routes"));
var expressRouteCircuitPeerings = expressRoutes.category("peering").description($("Commands to manage express route circuit peerings"));
var defaultPeeringType = "AzurePrivatePeering";
expressRouteCircuitPeerings.command("create [resource-group] [circuit-name] [name] [peer-asn] [primary-address-prefix] [secondary-address-prefix] [vlan-id]").description($("Create an express route circuit peering")).usage("[options] <resource-group> <circuit-name> <name> <peer-asn> <primary-address-prefix> <secondary-address-prefix> <vlan-id>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-c, --circuit-name <circuit-name>", $("the circuit name")).option("-n, --name <name>", $("the name of the express route circuit peering")).option("-y, --type [type]", $(("the PeeringType. Possible values are:" + "\n 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'"))).option("-a, --azure-asn [azure-asn]", $("the Azure ASN")).option("-p, --peer-asn <peer-asn>", $("the peer ASN")).option("-r, --primary-address-prefix <primary-address-prefix>", $("the primary address prefix")).option("-o, --secondary-address-prefix <secondary-address-prefix>", $("the secondary address prefix")).option("-d, --primary-azure-port [primary-azure-port]", $("the primary port")).option("-b, --secondary-azure-port [secondary-azure-port]", $("the secondary port")).option("-k, --shared-key [shared-key]", $("the shared key")).option("-i, --vlan-id <vlan-id>", $("the VLAN ID")).option("-f, --ms-advertised-public-prefixes [ms-advertised-public-prefixes]", $(("the reference of" + "\n AdvertisedPublicPrefixes"))).option("-m, --ms-advertised-public-prefix-state [ms-advertised-public-prefix-state]", $((("advertisedPublicPrefixState of the" + "\n Peering resource. Possible values are 'NotConfigured', 'Configuring',") + "\n 'Configured', and 'ValidationNeeded'"))).option("-l, --ms-customer-asn [ms-customer-asn]", $("the CustomerASN of the peering")).option("-u, --ms-routing-registry-name [ms-routing-registry-name]", $(("the RoutingRegistryName of the" + "\n configuration"))).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __1(resourceGroup, circuitName, name, peerAsn, primaryAddressPrefix, secondaryAddressPrefix, vlanId, options, _) { var useDefaults, subscription, networkManagementClient, expressRouteCircuitPeering, progress, parameters; var __frame = { name: "__1", line: 67 }; return __func(_, this, arguments, __1, 8, __frame, function __$__1() {
useDefaults = true;
return cli.interaction.promptIfNotGiven($("resource group : "), resourceGroup, __cb(_, __frame, 2, 38, function ___(__0, __1) { resourceGroup = __1;
return cli.interaction.promptIfNotGiven($("circuit name : "), circuitName, __cb(_, __frame, 3, 36, function ___(__0, __2) { circuitName = __2;
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 4, 29, function ___(__0, __3) { name = __3;
return cli.interaction.promptIfNotGiven($("peer asn : "), peerAsn, __cb(_, __frame, 5, 40, function ___(__0, __4) { options.peerAsn = __4;
return cli.interaction.promptIfNotGiven($("primary address prefix : "), primaryAddressPrefix, __cb(_, __frame, 6, 53, function ___(__0, __5) { options.primaryAddressPrefix = __5;
return cli.interaction.promptIfNotGiven($("secondary address prefix : "), secondaryAddressPrefix, __cb(_, __frame, 7, 55, function ___(__0, __6) { options.secondaryAddressPrefix = __6;
return cli.interaction.promptIfNotGiven($("vlan id : "), vlanId, __cb(_, __frame, 8, 39, function ___(__0, __7) { options.vlanId = __7;
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkManagementClient(subscription);
progress = cli.interaction.progress(util.format($("Looking up the express route circuit peering \"%s\""), name)); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__1() { return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__1() {
return networkManagementClient.expressRouteCircuitPeerings.get(resourceGroup, circuitName, name, null, __cb(_, __frame, 16, 89, function ___(__0, __8) { expressRouteCircuitPeering = __8; __then(); }, true)); }); })(function ___(e, __result) { __catch(function __$__1() { if (e) {
if ((e.statusCode === 404)) {
expressRouteCircuitPeering = null; }
else {
return _(e); } ; __then(); } else { _(null, __result); } ; }, _); }); })(function ___() { __tryCatch(_, function __$__1() { _(null, null, true); }); }); }); })(function ___(__e, __r, __cont) { (function ___(__then) { __tryCatch(_, function __$__1() {
progress.end(); __then(); }); })(function ___() { __tryCatch(_, function ___() { if (__cont) { __then(); } else { _(__e, __r); }; }); }); }); })(function ___() { __tryCatch(_, function __$__1() {
if (expressRouteCircuitPeering) {
return _(new Error(util.format($("express route circuit peering with name \"%s\" already exists in the resource group \"%s\""), name, resourceGroup))); } ;
parameters = { };
if (options.type) {
parameters.peeringType = validation.isIn(options.type, ["AzurePublicPeering","AzurePrivatePeering","MicrosoftPeering",], "--type"); } else {
if (useDefaults) {
parameters.peeringType = defaultPeeringType; } ; } ;
if (options.azureAsn) {
parameters.azureASN = parseInt(options.azureAsn, 10); } ;
if (options.peerAsn) {
parameters.peerASN = parseInt(options.peerAsn, 10); } ;
if (options.primaryAddressPrefix) {
parameters.primaryPeerAddressPrefix = options.primaryAddressPrefix; } ;
if (options.secondaryAddressPrefix) {
parameters.secondaryPeerAddressPrefix = options.secondaryAddressPrefix; } ;
if (options.primaryAzurePort) {
parameters.primaryAzurePort = options.primaryAzurePort; } ;
if (options.secondaryAzurePort) {
parameters.secondaryAzurePort = options.secondaryAzurePort; } ;
if (options.sharedKey) {
parameters.sharedKey = options.sharedKey; } ;
if (options.vlanId) {
parameters.vlanId = parseInt(options.vlanId, 10); } ;
if (!parameters.microsoftPeeringConfig) {
parameters.microsoftPeeringConfig = { }; } ;
if (options.msAdvertisedPublicPrefixes) {
parameters.microsoftPeeringConfig.advertisedPublicPrefixes = [];
parameters.microsoftPeeringConfig.advertisedPublicPrefixes = parameters.microsoftPeeringConfig.advertisedPublicPrefixes.concat(generatorUtils.splitStringByCharacter(options.msAdvertisedPublicPrefixes, ",")); } ;
if (options.msAdvertisedPublicPrefixState) {
parameters.microsoftPeeringConfig.advertisedPublicPrefixesState = validation.isIn(options.msAdvertisedPublicPrefixState, ["NotConfigured","Configuring","Configured","ValidationNeeded",], "--ms-advertised-public-prefix-state"); } ;
if (options.msCustomerAsn) {
parameters.microsoftPeeringConfig.customerASN = parseInt(options.msCustomerAsn, 10); } ;
if (options.msRoutingRegistryName) {
parameters.microsoftPeeringConfig.routingRegistryName = options.msRoutingRegistryName; } ;
generatorUtils.removeEmptyObjects(parameters);
progress = cli.interaction.progress(util.format($("Creating express route circuit peering \"%s\""), name)); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__1() {
return networkManagementClient.expressRouteCircuitPeerings.createOrUpdate(resourceGroup, circuitName, name, parameters, __cb(_, __frame, 93, 89, function ___(__0, __9) { expressRouteCircuitPeering = __9; _(null, null, true); }, true)); }); })(function ___(__e, __r, __cont) { (function ___(__then) { __tryCatch(_, function __$__1() {
progress.end(); __then(); }); })(function ___() { __tryCatch(_, function ___() { if (__cont) { __then(); } else { _(__e, __r); }; }); }); }); })(function ___() { __tryCatch(_, function __$__1() {
cli.interaction.formatOutput(expressRouteCircuitPeering, generatorUtils.traverse); _(); }); }); }); }); }, true)); }, true)); }, true)); }, true)); }, true)); }, true)); }, true)); }); });
expressRouteCircuitPeerings.command("set [resource-group] [circuit-name] [name]").description($("Update an express route circuit peering")).usage("[options] <resource-group> <circuit-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-c, --circuit-name <circuit-name>", $("the circuit name")).option("-n, --name <name>", $("the name of the express route circuit peering")).option("-a, --azure-asn [azure-asn]", $("the Azure ASN")).option("-p, --peer-asn [peer-asn]", $("the peer ASN")).option("-r, --primary-address-prefix [primary-address-prefix]", $("the primary address prefix")).option("-o, --secondary-address-prefix [secondary-address-prefix]", $("the secondary address prefix")).option("-d, --primary-azure-port [primary-azure-port]", $("the primary port")).option("-b, --secondary-azure-port [secondary-azure-port]", $("the secondary port")).option("-k, --shared-key [shared-key]", $("the shared key")).option("-i, --vlan-id [vlan-id]", $("the VLAN ID")).option("-f, --ms-advertised-public-prefixes [ms-advertised-public-prefixes]", $(("the reference of" + "\n AdvertisedPublicPrefixes"))).option("-m, --ms-advertised-public-prefix-state [ms-advertised-public-prefix-state]", $((("advertisedPublicPrefixState of the" + "\n Peering resource. Possible values are 'NotConfigured', 'Configuring',") + "\n 'Configured', and 'ValidationNeeded'"))).option("-l, --ms-customer-asn [ms-customer-asn]", $("the CustomerASN of the peering")).option("-u, --ms-routing-registry-name [ms-routing-registry-name]", $(("the RoutingRegistryName of the" + "\n configuration"))).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __2(resourceGroup, circuitName, name, options, _) { var subscription, networkManagementClient, expressRouteCircuitPeering, progress, parameters; var __frame = { name: "__2", line: 191 }; return __func(_, this, arguments, __2, 4, __frame, function __$__2() {
return cli.interaction.promptIfNotGiven($("resource group : "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
return cli.interaction.promptIfNotGiven($("circuit name : "), circuitName, __cb(_, __frame, 2, 36, function ___(__0, __2) { circuitName = __2;
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3;
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkManagementClient(subscription);
progress = cli.interaction.progress(util.format($("Looking up the express route circuit peering \"%s\""), name)); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__2() { return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__2() {
return networkManagementClient.expressRouteCircuitPeerings.get(resourceGroup, circuitName, name, null, __cb(_, __frame, 11, 89, function ___(__0, __4) { expressRouteCircuitPeering = __4; __then(); }, true)); }); })(function ___(e, __result) { __catch(function __$__2() { if (e) {
if ((e.statusCode === 404)) {
expressRouteCircuitPeering = null; }
else {
return _(e); } ; __then(); } else { _(null, __result); } ; }, _); }); })(function ___() { __tryCatch(_, function __$__2() { _(null, null, true); }); }); }); })(function ___(__e, __r, __cont) { (function ___(__then) { __tryCatch(_, function __$__2() {
progress.end(); __then(); }); })(function ___() { __tryCatch(_, function ___() { if (__cont) { __then(); } else { _(__e, __r); }; }); }); }); })(function ___() { __tryCatch(_, function __$__2() {
if (!expressRouteCircuitPeering) {
return _(new Error(util.format($("express route circuit peering with name \"%s\" not found in the resource group \"%s\""), name, resourceGroup))); } ;
parameters = expressRouteCircuitPeering;
if (options.azureAsn) {
parameters.azureASN = parseInt(options.azureAsn, 10); } ;
if (options.peerAsn) {
parameters.peerASN = parseInt(options.peerAsn, 10); } ;
if (options.primaryAddressPrefix) {
parameters.primaryPeerAddressPrefix = options.primaryAddressPrefix; } ;
if (options.secondaryAddressPrefix) {
parameters.secondaryPeerAddressPrefix = options.secondaryAddressPrefix; } ;
if (options.primaryAzurePort) {
parameters.primaryAzurePort = options.primaryAzurePort; } ;
if (options.secondaryAzurePort) {
parameters.secondaryAzurePort = options.secondaryAzurePort; } ;
if (options.sharedKey) {
parameters.sharedKey = options.sharedKey; } ;
if (options.vlanId) {
parameters.vlanId = parseInt(options.vlanId, 10); } ;
if (!parameters.microsoftPeeringConfig) {
parameters.microsoftPeeringConfig = { }; } ;
if (options.msAdvertisedPublicPrefixes) {
if (((expressRouteCircuitPeering && expressRouteCircuitPeering.microsoftPeeringConfig) && expressRouteCircuitPeering.microsoftPeeringConfig.advertisedPublicPrefixes)) {
parameters.microsoftPeeringConfig.advertisedPublicPrefixes = expressRouteCircuitPeering.microsoftPeeringConfig.advertisedPublicPrefixes; }
else {
parameters.microsoftPeeringConfig.advertisedPublicPrefixes = []; } ;
parameters.microsoftPeeringConfig.advertisedPublicPrefixes = parameters.microsoftPeeringConfig.advertisedPublicPrefixes.concat(generatorUtils.splitStringByCharacter(options.msAdvertisedPublicPrefixes, ",")); } ;
if (options.msAdvertisedPublicPrefixState) {
parameters.microsoftPeeringConfig.advertisedPublicPrefixesState = validation.isIn(options.msAdvertisedPublicPrefixState, ["NotConfigured","Configuring","Configured","ValidationNeeded",], "--ms-advertised-public-prefix-state"); } ;
if (options.msCustomerAsn) {
parameters.microsoftPeeringConfig.customerASN = parseInt(options.msCustomerAsn, 10); } ;
if (options.msRoutingRegistryName) {
parameters.microsoftPeeringConfig.routingRegistryName = options.msRoutingRegistryName; } ;
generatorUtils.removeEmptyObjects(parameters);
progress = cli.interaction.progress(util.format($("Updating express route circuit peering \"%s\""), name)); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__2() {
return networkManagementClient.expressRouteCircuitPeerings.createOrUpdate(resourceGroup, circuitName, name, parameters, __cb(_, __frame, 86, 89, function ___(__0, __5) { expressRouteCircuitPeering = __5; _(null, null, true); }, true)); }); })(function ___(__e, __r, __cont) { (function ___(__then) { __tryCatch(_, function __$__2() {
progress.end(); __then(); }); })(function ___() { __tryCatch(_, function ___() { if (__cont) { __then(); } else { _(__e, __r); }; }); }); }); })(function ___() { __tryCatch(_, function __$__2() {
cli.interaction.formatOutput(expressRouteCircuitPeering, generatorUtils.traverse); _(); }); }); }); }); }, true)); }, true)); }, true)); }); });
expressRouteCircuitPeerings.command("delete [resource-group] [circuit-name] [name]").description($("Delete an express route circuit peering")).usage("[options] <resource-group> <circuit-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-c, --circuit-name <circuit-name>", $("the circuit name")).option("-n, --name <name>", $("the name of the express route circuit peering")).option("-q, --quiet", $("quiet mode, do not ask for delete confirmation")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __3(resourceGroup, circuitName, name, options, _) { var subscription, networkManagementClient, expressRouteCircuitPeering, progress; var __frame = { name: "__3", line: 293 }; return __func(_, this, arguments, __3, 4, __frame, function __$__3() {
return cli.interaction.promptIfNotGiven($("resource group : "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __2) { resourceGroup = __2;
return cli.interaction.promptIfNotGiven($("circuit name : "), circuitName, __cb(_, __frame, 2, 36, function ___(__0, __3) { circuitName = __3;
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 3, 29, function ___(__0, __4) { name = __4;
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkManagementClient(subscription);
progress = cli.interaction.progress(util.format($("Looking up the express route circuit peering \"%s\""), name)); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__3() { return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__3() {
return networkManagementClient.expressRouteCircuitPeerings.get(resourceGroup, circuitName, name, null, __cb(_, __frame, 11, 89, function ___(__0, __5) { expressRouteCircuitPeering = __5; __then(); }, true)); }); })(function ___(e, __result) { __catch(function __$__3() { if (e) {
if ((e.statusCode === 404)) {
expressRouteCircuitPeering = null; }
else {
return _(e); } ; __then(); } else { _(null, __result); } ; }, _); }); })(function ___() { __tryCatch(_, function __$__3() { _(null, null, true); }); }); }); })(function ___(__e, __r, __cont) { (function ___(__then) { __tryCatch(_, function __$__3() {
progress.end(); __then(); }); })(function ___() { __tryCatch(_, function ___() { if (__cont) { __then(); } else { _(__e, __r); }; }); }); }); })(function ___() { __tryCatch(_, function __$__3() {
if (!expressRouteCircuitPeering) {
return _(new Error(util.format($("express route circuit peering with name \"%s\" not found in the resource group \"%s\""), name, resourceGroup))); } ; return (function __$__3(_) {
var __1 = !options.quiet; if (!__1) { return _(null, __1); } ; return cli.interaction.confirm(util.format($("Delete express route circuit peering \"%s\"? [y/n] "), name), __cb(_, __frame, 26, 45, function ___(__0, __3) { var __2 = !__3; return _(null, __2); }, true)); })(__cb(_, __frame, -292, 17, function ___(__0, __6) { return (function __$__3(__then) { if (__6) {
cli.output.info(util.format($("express route circuit peering \"%s\" was not deleted and still exists in the resource group \"%s\""), name, resourceGroup)); return _(null); } else { __then(); } ; })(function __$__3() {
progress = cli.interaction.progress(util.format($("Deleting express route circuit peering \"%s\""), name)); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__3() {
return networkManagementClient.expressRouteCircuitPeerings.deleteMethod(resourceGroup, circuitName, name, __cb(_, __frame, 33, 89, function ___(__0, __7) { expressRouteCircuitPeering = __7;
cli.output.info(util.format($("express route circuit peering \"%s\" was successfully deleted from resource group \"%s\""), name, resourceGroup)); _(null, null, true); }, true)); }); })(function ___(__e, __r, __cont) { (function ___(__then) { __tryCatch(_, function __$__3() {
progress.end(); __then(); }); })(function ___() { __tryCatch(_, function ___() { if (__cont) { __then(); } else { _(__e, __r); }; }); }); }); })(function ___() { __tryCatch(_, function __$__3() { _(); }); }); }); }, true)); }); }); }, true)); }, true)); }, true)); }); });
expressRouteCircuitPeerings.command("show [resource-group] [circuit-name] [name]").description($("Show an express route circuit peering")).usage("[options] <resource-group> <circuit-name> <name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-c, --circuit-name <circuit-name>", $("the circuit name")).option("-n, --name <name>", $("the name of the express route circuit peering")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __4(resourceGroup, circuitName, name, options, _) { var subscription, networkManagementClient, expressRouteCircuitPeering, progress; var __frame = { name: "__4", line: 340 }; return __func(_, this, arguments, __4, 4, __frame, function __$__4() {
return cli.interaction.promptIfNotGiven($("resource group : "), resourceGroup, __cb(_, __frame, 1, 38, function ___(__0, __1) { resourceGroup = __1;
return cli.interaction.promptIfNotGiven($("circuit name : "), circuitName, __cb(_, __frame, 2, 36, function ___(__0, __2) { circuitName = __2;
return cli.interaction.promptIfNotGiven($("name : "), name, __cb(_, __frame, 3, 29, function ___(__0, __3) { name = __3;
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkManagementClient(subscription);
progress = cli.interaction.progress(util.format($("Looking up the express route circuit peering \"%s\""), name)); return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__4() { return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__4() {
return networkManagementClient.expressRouteCircuitPeerings.get(resourceGroup, circuitName, name, null, __cb(_, __frame, 11, 89, function ___(__0, __4) { expressRouteCircuitPeering = __4; __then(); }, true)); }); })(function ___(e, __result) { __catch(function __$__4() { if (e) {
if ((e.statusCode === 404)) {
expressRouteCircuitPeering = null; }
else {
return _(e); } ; __then(); } else { _(null, __result); } ; }, _); }); })(function ___() { __tryCatch(_, function __$__4() { _(null, null, true); }); }); }); })(function ___(__e, __r, __cont) { (function ___(__then) { __tryCatch(_, function __$__4() {
progress.end(); __then(); }); })(function ___() { __tryCatch(_, function ___() { if (__cont) { __then(); } else { _(__e, __r); }; }); }); }); })(function ___() { __tryCatch(_, function __$__4() {
if (!expressRouteCircuitPeering) {
cli.output.warn(util.format($("express route circuit peering with name \"%s\" not found in the resource group \"%s\""), name, resourceGroup)); } ;
cli.interaction.formatOutput(expressRouteCircuitPeering, generatorUtils.traverse); _(); }); }); }, true)); }, true)); }, true)); }); });
expressRouteCircuitPeerings.command("list [resource-group] [circuit-name]").description($("List express route circuit peerings")).usage("[options] <resource-group> <circuit-name>").option("-g, --resource-group <resource-group>", $("the name of the resource group")).option("-c, --circuit-name <circuit-name>", $("the circuit name")).option("-s, --subscription <subscription>", $("the subscription identifier")).execute(function __5(resourceGroup, circuitName, options, _) { var subscription, networkManagementClient, expressRouteCircuitPeering, progress; var __frame = { name: "__5", line: 375 }; return __func(_, this, arguments, __5, 3, __frame, function __$__5() {
options.resourceGroup = resourceGroup;
subscription = profile.current.getSubscription(options.subscription);
networkManagementClient = utils.createNetworkManagementClient(subscription);
expressRouteCircuitPeering = null; return (function ___(__then) { (function ___(_) { __tryCatch(_, function __$__5() { return (function __$__5(__then) {
if ((typeof networkManagementClient.expressRouteCircuitPeerings.listAll != "function")) {
return cli.interaction.promptIfNotGiven($("resource-group : "), resourceGroup, __cb(_, __frame, 9, 42, function ___(__0, __1) { resourceGroup = __1;
return cli.interaction.promptIfNotGiven($("express route circuit : "), circuitName, __cb(_, __frame, 10, 40, function ___(__0, __2) { circuitName = __2;
progress = cli.interaction.progress($("Getting the express route circuit peerings"));
return networkManagementClient.expressRouteCircuitPeerings.list(resourceGroup, circuitName, __cb(_, __frame, 12, 91, function ___(__0, __3) { expressRouteCircuitPeering = __3; __then(); }, true)); }, true)); }, true)); } else { return (function __$__5(__then) {
if (options.resourceGroup) {
return cli.interaction.promptIfNotGiven($("express route circuit : "), circuitName, __cb(_, __frame, 15, 42, function ___(__0, __4) { circuitName = __4;
progress = cli.interaction.progress($("Getting the express route circuit peerings"));
return networkManagementClient.expressRouteCircuitPeerings.list(resourceGroup, circuitName, __cb(_, __frame, 17, 93, function ___(__0, __5) { expressRouteCircuitPeering = __5; __then(); }, true)); }, true)); } else {
return cli.interaction.promptIfNotGiven($("express route circuit : "), circuitName, __cb(_, __frame, 19, 42, function ___(__0, __6) { circuitName = __6;
progress = cli.interaction.progress($("Getting the express route circuit peerings"));
return networkManagementClient.expressRouteCircuitPeerings.listAll(circuitName, __cb(_, __frame, 21, 93, function ___(__0, __7) { expressRouteCircuitPeering = __7; __then(); }, true)); }, true)); } ; })(__then); } ; })(function __$__5() { _(null, null, true); }); }); })(function ___(__e, __r, __cont) { (function ___(__then) { __tryCatch(_, function __$__5() {
progress.end(); __then(); }); })(function ___() { __tryCatch(_, function ___() { if (__cont) { __then(); } else { _(__e, __r); }; }); }); }); })(function ___() { __tryCatch(_, function __$__5() {
cli.interaction.formatOutput(expressRouteCircuitPeering, function(expressRouteCircuitPeering) {
if ((!expressRouteCircuitPeering || (expressRouteCircuitPeering.length === 0))) {
cli.output.warn($("No express route circuit peerings found")); }
else {
cli.output.table(expressRouteCircuitPeering, function(row, item) {
generatorUtils.showTableRow(row, item); }); } ; }); _(); }); }); }); });};