Skip to content

Commit

Permalink
Merge branch 'dev' into arm-app-gw-show-fixes
Browse files Browse the repository at this point in the history
# Conflicts:
#	test/commands/arm/network/arm.network.application-gateway-tests.js
  • Loading branch information
MikhailTryakhov committed Dec 5, 2016
2 parents f143829 + 51c65d0 commit 99609cd
Show file tree
Hide file tree
Showing 12 changed files with 1,775 additions and 497 deletions.
4 changes: 1 addition & 3 deletions bin/azure.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ var TelemetryClient = require('../lib/util/telemetry');
utilsCore.isTelemetryEnabled(function (err, isEnabled) {
// err will always be null
TelemetryClient.init(isEnabled);
if (isEnabled) {
TelemetryClient.start(process.argv);
}
TelemetryClient.start(process.argv);

if (process.argv[2] !== '--gen') {
cli = new AzureCli();
Expand Down
2 changes: 2 additions & 0 deletions cli.njsproj
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
<Compile Include="lib\util\profile\account.js" />
<Compile Include="lib\util\storage.util.js" />
<Compile Include="lib\util\telemetry.js" />
<Compile Include="lib\util\userAgentCore.js" />
<Compile Include="lib\util\vmConstants.js" />
<Compile Include="lib\util\vnet.util.js" />
<Compile Include="scripts\extract-labels.js" />
Expand Down Expand Up @@ -249,6 +250,7 @@
<Compile Include="test\commands\cli.storage.queue-tests.js" />
<Compile Include="test\commands\cli.storage.service-tests.js" />
<Compile Include="test\commands\cli.storage.table-tests.js" />
<Compile Include="test\commands\cli.telemetry-test.js" />
<Compile Include="test\commands\cli.vm.acl-tests.js" />
<Compile Include="test\commands\cli.vm.capture-tests.js" />
<Compile Include="test\commands\cli.vm.create_affin_vnet_vm-tests.js" />
Expand Down
27 changes: 12 additions & 15 deletions lib/commands/arm/network/appGateway._js
Original file line number Diff line number Diff line change
Expand Up @@ -1832,13 +1832,9 @@ __.extend(AppGateways.prototype, {

if (!indent) indent = 0;
self.interaction.formatOutput(appGateway.urlPathMaps, function (urlPathMaps) {
if(urlPathMaps.length === 0) {
self.output.warn(util.format($('No URL path map found in application gateway "%s"'), appGateway.name));
} else {
urlPathMaps.forEach(function (urlPathMap) {
self._showAppGatewayUrlPathMap(urlPathMap, indent);
});
}
urlPathMaps.forEach(function (urlPathMap) {
self._showAppGatewayUrlPathMap(urlPathMap, indent);
});
});
},

Expand Down Expand Up @@ -1965,7 +1961,6 @@ __.extend(AppGateways.prototype, {
httpSettings.probe = {
id: self._generateResourceId(resourceGroup, appGatewayName, 'probes', options.probeName)
};
console.log('PROBE: '+httpSettings.probe.id);
}

return httpSettings;
Expand Down Expand Up @@ -2066,7 +2061,7 @@ __.extend(AppGateways.prototype, {
}
}
if (!options.gatewayIpName) {
options.gatewayIpName = 'ipConfig01';
options.gatewayIpName = constants.appGateway.gatewayIp.name;
self.output.warn(util.format($('Using default gateway ip name: %s'), options.gatewayIpName));
}
if (!options.skuName) {
Expand All @@ -2086,11 +2081,11 @@ __.extend(AppGateways.prototype, {
}
}
if (!options.frontendIpName) {
options.frontendIpName = 'frontendIp01';
options.frontendIpName = constants.appGateway.frontendIp.name;
self.output.warn(util.format($('Using default frontend ip name: %s'), options.frontendIpName));
}
if (!options.frontendPortName) {
options.frontendPortName = 'frontendPort01';
options.frontendPortName = constants.appGateway.frontendPort.name;
self.output.warn(util.format($('Using default frontend port name: %s'), options.frontendPortName));
}
if (!options.frontendPort) {
Expand Down Expand Up @@ -2118,11 +2113,11 @@ __.extend(AppGateways.prototype, {
self.output.warn(util.format($('Using default http settings cookie based affinity: %s'), options.httpSettingsCookieBasedAffinity));
}
if (!options.httpListenerName) {
options.httpListenerName = 'listener01';
options.httpListenerName = constants.appGateway.httpListener.name;
self.output.warn(util.format($('Using default http listener name: %s'), options.httpListenerName));
}
if (!options.routingRuleName) {
options.routingRuleName = 'rule01';
options.routingRuleName = constants.appGateway.routingRule.name;
self.output.warn(util.format($('Using default request routing rule name: %s'), options.routingRuleName));
}
if (!options.routingRuleType) {
Expand All @@ -2146,8 +2141,10 @@ __.extend(AppGateways.prototype, {
self.output.nameValue($('Resource Group'), resource.resourceGroup);
self.output.nameValue($('Tags'), tagUtils.getTagsInfo(appGateway.tags));
self.output.nameValue($('Gateway IP configations'), self._getAttributeNames(appGateway.gatewayIPConfigurations));
self.output.header($('SSL cerificates'));
self._listAppGatewaySslCerificates(appGateway, indent);
if(utils.findFirstCaseIgnore(appGateway.httpListeners, {protocol: constants.appGateway.httpListener.protocol[1]})) {
self.output.header($('SSL cerificates'));
self._listAppGatewaySslCerificates(appGateway, indent);
}
self.output.header($('Frontend ip configurations'));
self._listAppGatewayFrontendIpConfigs(appGateway, indent);
self.output.header($('Frontend ports'));
Expand Down
8 changes: 8 additions & 0 deletions lib/commands/arm/network/constants._js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@ module.exports = {
name: 'frontendIp01',
privateIPAllocationMethod: ['Dynamic', 'Static']
},
frontendPort: {
name: 'frontendPort01'
},
gatewayIp: {
name: 'ipConfig01'
},
httpListener: {
name: 'listener01',
protocol: ['http', 'https']
},
probe: {
Expand All @@ -140,6 +147,7 @@ module.exports = {
unhealthyThreshold: 5
},
routingRule: {
name: 'rule01',
type: ['Basic']
},
pool: {
Expand Down
14 changes: 14 additions & 0 deletions lib/commands/arm/network/network._js
Original file line number Diff line number Diff line change
Expand Up @@ -2678,7 +2678,11 @@ exports.init = function (cli) {
'\n e.g. %s'), constants.help.id.subnet))
.option('-y, --cert-file [cert-file]', $('the path to the certificate'))
.option('-x, --cert-password [cert-password]', $('the certificate password'))
.option('-A, --address-pool-name [address-pool-name]', util.format($('the address pool name. ' +
'\n Default value is "%s"'), constants.appGateway.pool.name))
.option('-r, --servers <servers>', $('comma separated list of IP addresses or DNS names corresponding to backend servers'))
.option('-O, --http-settings-name [http-settings-name]', util.format($('the HTTP settings name. ' +
'\n Default value is "%s"'), constants.appGateway.settings.name))
.option('-i, --http-settings-protocol [http-settings-protocol]',
util.format($('the HTTP settings protocol, valid values are \[%s\]'), constants.appGateway.settings.protocol))
.option('-o, --http-settings-port [http-settings-port]', util.format($('the HTTP settings port, valid range is'),
Expand All @@ -2688,13 +2692,23 @@ exports.init = function (cli) {
'\n [%s],' +
'\n default value is "%s"'),
constants.appGateway.settings.affinity, constants.appGateway.settings.affinity[0]))
.option('-J, --frontend-port-name [frontend-port-name]', util.format($('the frontend port name.' +
'\n Default value is "%s"'), constants.appGateway.frontendPort.name))
.option('-j, --frontend-port [frontend-port]', util.format($('the frontend port value, valid range is'),
utils.toRange(constants.appGateway.settings.port)))
.option('-F, --frontend-ip-name [frontend-ip-name]', util.format($('the frontend ip name. ' +
'\n Default value is "%s"'), constants.appGateway.frontendIp.name))
.option('-k, --public-ip-name [public-ip-name]', $('the name of the public ip'))
.option('-p, --public-ip-id [public-ip-id]', util.format($('the public ip identifier.' +
'\n e.g. %s'), constants.help.id.publicIp))
.option('-G, --gateway-ip-name [gateway-ip-name]', util.format($('the gateway ip name.' +
'\n Default value is "%s"'), constants.appGateway.gatewayIp.name))
.option('-L, --http-listener-name [http-listener-name]', util.format($('the HTTP listener name.' +
'\n Default value is "%s"'), constants.appGateway.httpListener.name))
.option('-b, --http-listener-protocol [http-listener-protocol]',
util.format($('the HTTP listener protocol, valid values are \[%s\]'), constants.appGateway.httpListener.protocol))
.option('-R, --routing-rule-name [routing-rule-name]', util.format($('the routing rule name.' +
'\n Default name is "%s"'), constants.appGateway.routingRule.name))
.option('-w, --routing-rule-type [routing-rule-type]',
util.format($('the request routing rule type, default is "%s"'), constants.appGateway.routingRule.type[0]))
.option('-a, --sku-name [sku-name]',
Expand Down
65 changes: 64 additions & 1 deletion lib/plugins.arm.json
Original file line number Diff line number Diff line change
Expand Up @@ -45280,7 +45280,7 @@
"categories": {
"template": {
"name": "template",
"description": "Commands to manager your deployment template in a resource group",
"description": "Commands to manage your deployment template in a resource group",
"fullName": "group deployment template",
"usage": "[options] [command]",
"options": [],
Expand Down Expand Up @@ -68078,6 +68078,15 @@
"long": "--cert-password",
"description": "the certificate password"
},
{
"flags": "-A, --address-pool-name [address-pool-name]",
"required": 0,
"optional": -25,
"bool": true,
"short": "-A",
"long": "--address-pool-name",
"description": "the address pool name. \n Default value is \"pool01\""
},
{
"flags": "-r, --servers <servers>",
"required": -15,
Expand All @@ -68087,6 +68096,15 @@
"long": "--servers",
"description": "comma separated list of IP addresses or DNS names corresponding to backend servers"
},
{
"flags": "-O, --http-settings-name [http-settings-name]",
"required": 0,
"optional": -26,
"bool": true,
"short": "-O",
"long": "--http-settings-name",
"description": "the HTTP settings name. \n Default value is \"httpSettings01\""
},
{
"flags": "-i, --http-settings-protocol [http-settings-protocol]",
"required": 0,
Expand Down Expand Up @@ -68114,6 +68132,15 @@
"long": "--http-settings-cookie-based-affinity",
"description": "Enable or disable HTTP settings cookie based affinity, valid values are\n [Disabled,Enabled],\n default value is \"Disabled\""
},
{
"flags": "-J, --frontend-port-name [frontend-port-name]",
"required": 0,
"optional": -26,
"bool": true,
"short": "-J",
"long": "--frontend-port-name",
"description": "the frontend port name.\n Default value is \"frontendPort01\""
},
{
"flags": "-j, --frontend-port [frontend-port]",
"required": 0,
Expand All @@ -68123,6 +68150,15 @@
"long": "--frontend-port",
"description": "the frontend port value, valid range is [0-65535]"
},
{
"flags": "-F, --frontend-ip-name [frontend-ip-name]",
"required": 0,
"optional": -24,
"bool": true,
"short": "-F",
"long": "--frontend-ip-name",
"description": "the frontend ip name. \n Default value is \"frontendIp01\""
},
{
"flags": "-k, --public-ip-name [public-ip-name]",
"required": 0,
Expand All @@ -68141,6 +68177,24 @@
"long": "--public-ip-id",
"description": "the public ip identifier.\n e.g. /subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.Network/publicIPAddresses/<public-ip-name>"
},
{
"flags": "-G, --gateway-ip-name [gateway-ip-name]",
"required": 0,
"optional": -23,
"bool": true,
"short": "-G",
"long": "--gateway-ip-name",
"description": "the gateway ip name.\n Default value is \"ipConfig01\""
},
{
"flags": "-L, --http-listener-name [http-listener-name]",
"required": 0,
"optional": -26,
"bool": true,
"short": "-L",
"long": "--http-listener-name",
"description": "the HTTP listener name.\n Default value is \"listener01\""
},
{
"flags": "-b, --http-listener-protocol [http-listener-protocol]",
"required": 0,
Expand All @@ -68150,6 +68204,15 @@
"long": "--http-listener-protocol",
"description": "the HTTP listener protocol, valid values are [http,https]"
},
{
"flags": "-R, --routing-rule-name [routing-rule-name]",
"required": 0,
"optional": -25,
"bool": true,
"short": "-R",
"long": "--routing-rule-name",
"description": "the routing rule name.\n Default name is \"rule01\""
},
{
"flags": "-w, --routing-rule-type [routing-rule-type]",
"required": 0,
Expand Down
Loading

0 comments on commit 99609cd

Please sign in to comment.