From 739427f03af877db4074ed1ea19e7594f2ac77f8 Mon Sep 17 00:00:00 2001 From: Flynn Date: Thu, 28 Apr 2022 20:15:38 +0800 Subject: [PATCH 1/2] Update wrong parameter --- .../AlertsManagementTestRunner.cs | 59 +++++++++++++++++++ .../help/New-AzFirewallHubIpAddress.md | 42 ++----------- .../help/New-AzFirewallHubPublicIpAddress.md | 10 ++-- 3 files changed, 70 insertions(+), 41 deletions(-) create mode 100644 src/AlertsManagement/AlertsManagement.Test/ScenarioTests/AlertsManagementTestRunner.cs diff --git a/src/AlertsManagement/AlertsManagement.Test/ScenarioTests/AlertsManagementTestRunner.cs b/src/AlertsManagement/AlertsManagement.Test/ScenarioTests/AlertsManagementTestRunner.cs new file mode 100644 index 000000000000..9ee52d3d0825 --- /dev/null +++ b/src/AlertsManagement/AlertsManagement.Test/ScenarioTests/AlertsManagementTestRunner.cs @@ -0,0 +1,59 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.Azure.Commands.TestFx; +using Microsoft.Azure.Internal.Subscriptions; +using Microsoft.Azure.Management.AlertsManagement; +using Microsoft.Azure.Management.ResourceManager; +using Microsoft.Rest.ClientRuntime.Azure.TestFramework; +using Xunit.Abstractions; + +namespace Microsoft.Azure.Commands.AlertsManagement.Test.ScenarioTests +{ + public class AlertsManagementTestRunner + { + protected readonly ITestRunner TestRunner; + + protected AlertsManagementTestRunner(ITestOutputHelper output) + { + TestRunner = TestManager.CreateInstance(output) + .WithNewPsScriptFilename($"{GetType().Name}.ps1") + .WithProjectSubfolderForTests("ScenarioTests") + .WithCommonPsScripts(new[] + { + @"Common.ps1", + @"../AzureRM.Resources.ps1", + }) + .WithNewRmModules(helper => new[] + { + helper.RMProfileModule, + helper.GetRMModulePath("AzureRM.AlertsManagement.psd1") + }) + .WithNewRecordMatcherArguments( + userAgentsToIgnore: new Dictionary + { + {"Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01"}, + }, + resourceProviders: new Dictionary + { + {"Microsoft.AlertsManagement", null} + } + ).WithManagementClients() + .Build(); + } + + + } +} \ No newline at end of file diff --git a/src/Network/Network/help/New-AzFirewallHubIpAddress.md b/src/Network/Network/help/New-AzFirewallHubIpAddress.md index c5d768bd505a..236092c04c52 100644 --- a/src/Network/Network/help/New-AzFirewallHubIpAddress.md +++ b/src/Network/Network/help/New-AzFirewallHubIpAddress.md @@ -13,8 +13,8 @@ Ip addresses assoicated to the firewall on virtual hub ## SYNTAX ``` -New-AzFirewallHubIpAddress [-PrivateIPAddress ] [-PublicIPs ] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] +New-AzFirewallHubIpAddress [-PrivateIPAddress ] [-PublicIP ] + [-DefaultProfile ] [] ``` ## DESCRIPTION @@ -36,7 +36,7 @@ This example creates a Hub Ip address object with a count of 2 public IPs. The H The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential @@ -51,7 +51,7 @@ Accept wildcard characters: False The private Ip Address of the Firewall attached to a Hub ```yaml -Type: String +Type: System.String Parameter Sets: (All) Aliases: @@ -62,11 +62,11 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -PublicIPs +### -PublicIP The IP Addresses of the Firewall attached to a hub ```yaml -Type: PSAzureFirewallHubPublicIpAddresses +Type: Microsoft.Azure.Commands.Network.Models.PSAzureFirewallHubPublicIpAddresses Parameter Sets: (All) Aliases: @@ -77,36 +77,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Confirm -Prompts you for confirmation before running the cmdlet. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: cf - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -WhatIf -Shows what would happen if the cmdlet runs. The cmdlet is not run. - -```yaml -Type: SwitchParameter -Parameter Sets: (All) -Aliases: wi - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### CommonParameters This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). diff --git a/src/Network/Network/help/New-AzFirewallHubPublicIpAddress.md b/src/Network/Network/help/New-AzFirewallHubPublicIpAddress.md index 6f80245283cd..b7349c883c90 100644 --- a/src/Network/Network/help/New-AzFirewallHubPublicIpAddress.md +++ b/src/Network/Network/help/New-AzFirewallHubPublicIpAddress.md @@ -13,7 +13,7 @@ Public Ip assoicated to the firewall on virtual hub ## SYNTAX ``` -New-AzFirewallHubPublicIpAddress [-Count ] [-Addresses ] +New-AzFirewallHubPublicIpAddress [-Count ] [-Address ] [-DefaultProfile ] [] ``` @@ -40,11 +40,11 @@ This will create 1 new public ip on the firewall by retain $publicIp1, $publicIp ## PARAMETERS -### -Addresses +### -Address The Public IP Addresses of the Firewall attached to a hub ```yaml -Type: PSAzureFirewallPublicIpAddress[] +Type: Microsoft.Azure.Commands.Network.Models.PSAzureFirewallPublicIpAddress[] Parameter Sets: (All) Aliases: @@ -59,7 +59,7 @@ Accept wildcard characters: False The count of public Ip addresses ```yaml -Type: Int32 +Type: System.Int32 Parameter Sets: (All) Aliases: @@ -74,7 +74,7 @@ Accept wildcard characters: False The credentials, account, tenant, and subscription used for communication with Azure. ```yaml -Type: IAzureContextContainer +Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer Parameter Sets: (All) Aliases: AzContext, AzureRmContext, AzureCredential From ca06bae23e569cabf04c7e06d33081952435ea22 Mon Sep 17 00:00:00 2001 From: Flynn Date: Thu, 28 Apr 2022 20:16:46 +0800 Subject: [PATCH 2/2] Update wrong parameter --- .../AlertsManagementTestRunner.cs | 59 ------------------- 1 file changed, 59 deletions(-) delete mode 100644 src/AlertsManagement/AlertsManagement.Test/ScenarioTests/AlertsManagementTestRunner.cs diff --git a/src/AlertsManagement/AlertsManagement.Test/ScenarioTests/AlertsManagementTestRunner.cs b/src/AlertsManagement/AlertsManagement.Test/ScenarioTests/AlertsManagementTestRunner.cs deleted file mode 100644 index 9ee52d3d0825..000000000000 --- a/src/AlertsManagement/AlertsManagement.Test/ScenarioTests/AlertsManagementTestRunner.cs +++ /dev/null @@ -1,59 +0,0 @@ -// ---------------------------------------------------------------------------------- -// -// Copyright Microsoft Corporation -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// ---------------------------------------------------------------------------------- - -using System.Collections.Generic; -using Microsoft.Azure.Commands.TestFx; -using Microsoft.Azure.Internal.Subscriptions; -using Microsoft.Azure.Management.AlertsManagement; -using Microsoft.Azure.Management.ResourceManager; -using Microsoft.Rest.ClientRuntime.Azure.TestFramework; -using Xunit.Abstractions; - -namespace Microsoft.Azure.Commands.AlertsManagement.Test.ScenarioTests -{ - public class AlertsManagementTestRunner - { - protected readonly ITestRunner TestRunner; - - protected AlertsManagementTestRunner(ITestOutputHelper output) - { - TestRunner = TestManager.CreateInstance(output) - .WithNewPsScriptFilename($"{GetType().Name}.ps1") - .WithProjectSubfolderForTests("ScenarioTests") - .WithCommonPsScripts(new[] - { - @"Common.ps1", - @"../AzureRM.Resources.ps1", - }) - .WithNewRmModules(helper => new[] - { - helper.RMProfileModule, - helper.GetRMModulePath("AzureRM.AlertsManagement.psd1") - }) - .WithNewRecordMatcherArguments( - userAgentsToIgnore: new Dictionary - { - {"Microsoft.Azure.Management.Resources.ResourceManagementClient", "2016-02-01"}, - }, - resourceProviders: new Dictionary - { - {"Microsoft.AlertsManagement", null} - } - ).WithManagementClients() - .Build(); - } - - - } -} \ No newline at end of file