Skip to content

Commit c8106b8

Browse files
committed
review comments
1 parent 0e38c74 commit c8106b8

File tree

5 files changed

+23
-4
lines changed

5 files changed

+23
-4
lines changed

src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/ApplicationGatewayTests.ps1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,24 @@
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
1414

15+
function Test-AvailableSslOptions
16+
{
17+
$result = Get-AzureRmApplicationGatewayAvailableWafRuleSets
18+
19+
Assert-NotNull $result
20+
Assert-NotNull $result.Value
21+
Assert-True { $result.Value.Count -gt 0 }
22+
Assert-NotNull $result.Value[0].Name
23+
Assert-NotNull $result.Value[0].RuleSetType
24+
Assert-NotNull $result.Value[0].RuleSetVersion
25+
Assert-NotNull $result.Value[0].RuleGroups
26+
Assert-True { $result.Value[0].RuleGroups.Count -gt 0 }
27+
Assert-NotNull $result.Value[0].RuleGroups[0].RuleGroupName
28+
Assert-NotNull $result.Value[0].RuleGroups[0].Rules
29+
Assert-True { $result.Value[0].RuleGroups[0].Rules.Count -gt 0 }
30+
Assert-NotNull $result.Value[0].RuleGroups[0].Rules[0].RuleId
31+
}
32+
1533
function Test-AvailableWafRuleSets
1634
{
1735
$result = Get-AzureRmApplicationGatewayAvailableWafRuleSets
@@ -374,4 +392,5 @@ function Compare-AzureRmApplicationGateway($expected, $actual)
374392

375393
Assert-AreEqual $expected.HttpListeners.Count $actual.HttpListeners.Count
376394
Assert-AreEqual $expected.RequestRoutingRules.Count $actual.RequestRoutingRules.Count
395+
Assert-AreEqual $expected.RedirectConfigurations.Count $actual.RedirectConfigurations.Count
377396
}

src/ResourceManager/Network/Commands.Network/ApplicationGateway/GetAzureApplicationGatewayAvailableSslOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public override void ExecuteCmdlet()
3232
{
3333
base.ExecuteCmdlet();
3434

35-
var availableSslOptions = this.ApplicationGatewayClient.AvailableSslOptions();
35+
var availableSslOptions = this.ApplicationGatewayClient.ListAvailableSslOptions();
3636
var psAvailableSslOptions = Mapper.Map<PSApplicationGatewayAvailableSslOptions>(availableSslOptions);
3737
WriteObject(psAvailableSslOptions);
3838
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ namespace Microsoft.Azure.Commands.Network
2222

2323
[Cmdlet(VerbsCommon.Get, "AzureRmApplicationGatewaySslPredefinedPolicy"),
2424
OutputType(typeof(PSApplicationGatewaySslPredefinedPolicy), typeof(IEnumerable<PSApplicationGatewaySslPredefinedPolicy>))]
25-
[Alias("Get-AzureRmApplicationGatewaySslPredefinedPolicy")]
25+
[Alias("List-AzureRmApplicationGatewaySslPredefinedPolicy")]
2626
public class GetAzureApplicationGatewaySslPredefinedPolicy : ApplicationGatewayBaseCmdlet
2727
{
2828
[Parameter(

src/ResourceManager/Network/Commands.Network/ApplicationGateway/NewAzureApplicationGatewayCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public class NewAzureApplicationGatewayCommand : ApplicationGatewayBaseCmdlet
130130
public List<PSApplicationGatewayRequestRoutingRule> RequestRoutingRules { get; set; }
131131

132132
[Parameter(
133-
Mandatory = true,
133+
Mandatory = false,
134134
ValueFromPipelineByPropertyName = true,
135135
HelpMessage = "The list of redirect configuration")]
136136
public List<PSApplicationGatewayRedirectConfiguration> RedirectConfigurations { get; set; }

src/ResourceManager/Network/Commands.Network/Commands.Network.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@
175175
<Compile Include="ApplicationGateway\FirewallConfiguration\GetAzureApplicationGatewayWebApplicationFirewallConfigurationCommand.cs" />
176176
<Compile Include="ApplicationGateway\FirewallConfiguration\NewAzureApplicationGatewayWebApplicationFirewallConfigurationCommand.cs" />
177177
<Compile Include="ApplicationGateway\FirewallConfiguration\SetAzureApplicationGatewayWebApplicationFirewallConfigurationCommand.cs" />
178-
<Compile Include="ApplicationGateway\GetAzureApplicationGatewaySslPredefinedPolicy.cs" />
179178
<Compile Include="ApplicationGateway\GetAzureApplicationGatewayAvailableSslOptions.cs" />
179+
<Compile Include="ApplicationGateway\ListAzureApplicationGatewaySslPredefinedPolicy.cs" />
180180
<Compile Include="ApplicationGateway\ProbeHealthResponseMatch\AzureApplicationGatewayProbeHealthResponseMatchBase.cs" />
181181
<Compile Include="ApplicationGateway\ProbeHealthResponseMatch\NewAzureApplicationGatewayProbeHealthResponseMatchCommand.cs" />
182182
<Compile Include="ApplicationGateway\FrontendIPConfiguration\AddAzureApplicationGatewayFrontendIPConfigCommand.cs" />

0 commit comments

Comments
 (0)