Skip to content

Commit c318261

Browse files
authored
Fixed network rule set typos across module (#17965)
1 parent a238f79 commit c318261

File tree

7 files changed

+44
-43
lines changed

7 files changed

+44
-43
lines changed

src/ServiceBus/ServiceBus.Test/ScenarioTests/NetworkRuleSetTests.ps1

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,27 +57,27 @@ function NetworkRuleSetTests {
5757
$createdNamespace2 = Get-AzServiceBusNamespace -ResourceGroup $resourceGroupName -Name $namespaceName2
5858
Assert-AreEqual $createdNamespace2.Name $namespaceName2 "Namespace created earlier is not found."
5959

60-
Write-Debug "Add a new IPRule to the default NetwrokRuleSet"
60+
Write-Debug "Add a new IPRule to the default NetworkRuleSet"
6161
$result = Add-AzServiceBusIPRule -ResourceGroup $resourceGroupName -Name $namespaceName -IpMask "1.1.1.1" -Action "Allow"
6262

63-
Write-Debug "Add a new IPRule to the default NetwrokRuleSet"
63+
Write-Debug "Add a new IPRule to the default NetworkRuleSet"
6464
$result = Add-AzServiceBusIPRule -ResourceGroup $resourceGroupName -Name $namespaceName -IpMask "2.2.2.2" -Action "Allow"
6565

66-
Write-Debug "Add a new IPRule to the default NetwrokRuleSet"
66+
Write-Debug "Add a new IPRule to the default NetworkRuleSet"
6767
$result = Add-AzServiceBusIPRule -ResourceGroup $resourceGroupName -Name $namespaceName -IpMask "3.3.3.3"
6868

69-
Write-Debug "Add a new VirtualNetworkRule to the default NetwrokRuleSet"
69+
Write-Debug "Add a new VirtualNetworkRule to the default NetworkRuleSet"
7070
$result = Add-AzServiceBusVirtualNetworkRule -ResourceGroup $resourceGroupName -Name $namespaceName -SubnetId "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/v-ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default"
7171
$result = Add-AzServiceBusVirtualNetworkRule -ResourceGroup $resourceGroupName -Name $namespaceName -SubnetId "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/v-ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/sbdefault"
7272
$result = Add-AzServiceBusVirtualNetworkRule -ResourceGroup $resourceGroupName -Name $namespaceName -SubnetId "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/v-ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/sbdefault01"
7373

74-
Write-Debug "Get NetwrokRuleSet"
74+
Write-Debug "Get NetworkRuleSet"
7575
$getResult1 = Get-AzServiceBusNetworkRuleSet -ResourceGroup $resourceGroupName -Name $namespaceName
7676

7777
Assert-AreEqual $getResult1.VirtualNetworkRules.Count 3 "VirtualNetworkRules count did not matched"
7878
Assert-AreEqual $getResult1.IpRules.Count 3 "IPRules count did not matched"
7979

80-
Write-Debug "Remove a new IPRule to the default NetwrokRuleSet"
80+
Write-Debug "Remove a new IPRule to the default NetworkRuleSet"
8181
$result = Remove-AzServiceBusIPRule -ResourceGroup $resourceGroupName -Name $namespaceName -IpMask "3.3.3.3"
8282

8383
$getResult = Get-AzServiceBusNetworkRuleSet -ResourceGroup $resourceGroupName -Name $namespaceName
@@ -106,10 +106,10 @@ function NetworkRuleSetTests {
106106
Assert-AreEqual $setResult1.DefaultAction "Allow"
107107

108108

109-
Write-Debug "Add a new VirtualNetworkRule to the default NetwrokRuleSet"
109+
Write-Debug "Add a new VirtualNetworkRule to the default NetworkRuleSet"
110110
$result = Remove-AzServiceBusVirtualNetworkRule -ResourceGroup $resourceGroupName -Name $namespaceName -SubnetId "/subscriptions/326100e2-f69d-4268-8503-075374f62b6e/resourcegroups/v-ajnavtest/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default"
111111

112-
Write-Debug "Delete NetwrokRuleSet"
112+
Write-Debug "Delete NetworkRuleSet"
113113
$result = Remove-AzServiceBusNetworkRuleSet -ResourceGroup $resourceGroupName -Name $namespaceName
114114

115115
Write-Debug " Delete namespaces"

src/ServiceBus/ServiceBus/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- Additional information about change #1
2020
-->
2121
## Upcoming Release
22+
* Fixed miscellaneous network rule set typos across module.
2223

2324
## Version 1.8.1
2425
* Fixed that `New-AzServiceBusAuthorizationRuleSASToken` returns invalid token. [#12975]

src/ServiceBus/ServiceBus/Cmdlets/AzureServiceBusCmdletBase.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public abstract class AzureServiceBusCmdletBase : AzureRMCmdlet
7676
protected const string AuthoRuleInputObjectParameterSet = "AuthoRuleInputObjectSet";
7777
protected const string GeoDRInputObjectParameterSet = "GeoDRConfigurationInputObjectSet";
7878
protected const string RuleInputObjectParameterSet = "RuleResourceIdSet";
79-
protected const string NetwrokruleSetInputObjectParameterSet = "NetwrokruleSetInputObjectSet";
79+
protected const string NetworkRuleSetInputObjectParameterSet = "NetworkRuleSetInputObjectSet";
8080
protected const string VirtualNetworkRuleInputObjectParameterSet = "VirtualNetworkRuleInputObjectParameterSet";
8181
protected const string IPRuleInputObjectParameterSet = "IPRuleInputObjectParameterSet";
8282

@@ -100,8 +100,8 @@ public abstract class AzureServiceBusCmdletBase : AzureRMCmdlet
100100
protected const string MigrationConfigurationParameterSet = "MigrationConfigurationPropertiesSet";
101101
protected const string RuleResourceParameterSet = "RulePropertiesSet";
102102
protected const string RuleResourceActionParameterSet = "RuleActionPropertiesSet";
103-
protected const string NetwrokruleSetPropertiesParameterSet = "NetworkRuleSetPropertiesSet";
104-
protected const string NetwrokruleSetNamespacePropertiesParameterSet = "NetworkRuleSetNamespacePropertiesSet";
103+
protected const string NetworkRuleSetPropertiesParameterSet = "NetworkRuleSetPropertiesSet";
104+
protected const string NetworkRuleSetNamespacePropertiesParameterSet = "NetworkRuleSetNamespacePropertiesSet";
105105
protected const string VirtualNetworkRulePropertiesParameterSet = "VirtualNetworkRulePropertiesParameterSet";
106106
protected const string IPRulePropertiesParameterSet = "IPRulePropertiesParameterSet";
107107

src/ServiceBus/ServiceBus/Cmdlets/NetworkRuleSet/GetAzureServiceBusNetworkRuleSet.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ namespace Microsoft.Azure.Commands.ServiceBus.Commands.NetworkruleSet
2626
/// <para> If EventHub name provided, a single EventHub detials will be returned</para>
2727
/// <para> If EventHub name not provided, list of EventHub will be returned</para>
2828
/// </summary>
29-
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ServiceBusNetworkRuleSet", DefaultParameterSetName = NetwrokruleSetPropertiesParameterSet), OutputType(typeof(PSNetworkRuleSetAttributes))]
29+
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ServiceBusNetworkRuleSet", DefaultParameterSetName = NetworkRuleSetPropertiesParameterSet), OutputType(typeof(PSNetworkRuleSetAttributes))]
3030
public class GetAzureServiceBusNetworkRuleSet : AzureServiceBusCmdletBase
3131
{
32-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetPropertiesParameterSet, Position = 0, HelpMessage = "Resource Group Name")]
33-
[Parameter(Mandatory = false, ParameterSetName = NetwrokruleSetNamespacePropertiesParameterSet, HelpMessage = "Resource Group Name")]
32+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetPropertiesParameterSet, Position = 0, HelpMessage = "Resource Group Name")]
33+
[Parameter(Mandatory = false, ParameterSetName = NetworkRuleSetNamespacePropertiesParameterSet, HelpMessage = "Resource Group Name")]
3434
public string ResourceGroupName { get; set; }
3535

36-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetPropertiesParameterSet, Position = 1, HelpMessage = "Namespace Name")]
37-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetNamespacePropertiesParameterSet, Position = 0, HelpMessage = "Namespace Name")]
36+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetPropertiesParameterSet, Position = 1, HelpMessage = "Namespace Name")]
37+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetNamespacePropertiesParameterSet, Position = 0, HelpMessage = "Namespace Name")]
3838
[ValidateNotNullOrEmpty]
3939
[Alias(AliasNamespaceName)]
4040
public string Namespace { get; set; }
@@ -57,27 +57,27 @@ public override void ExecuteCmdlet()
5757
ResourceGroupName = identifier.ResourceGroupName;
5858
Namespace = identifier.ResourceName;
5959

60-
PSNetworkRuleSetAttributes netwrokruleSet = Client.GetNetworkRuleSet(ResourceGroupName, Namespace);
61-
WriteObject(netwrokruleSet);
60+
PSNetworkRuleSetAttributes networkruleSet = Client.GetNetworkRuleSet(ResourceGroupName, Namespace);
61+
WriteObject(networkruleSet);
6262
}
6363

64-
if (ParameterSetName.Equals(NetwrokruleSetPropertiesParameterSet))
64+
if (ParameterSetName.Equals(NetworkRuleSetPropertiesParameterSet))
6565
{
6666
// Get a VNet Rule
67-
PSNetworkRuleSetAttributes netwrokruleSet = Client.GetNetworkRuleSet(ResourceGroupName, Namespace);
68-
WriteObject(netwrokruleSet);
67+
PSNetworkRuleSetAttributes networkruleSet = Client.GetNetworkRuleSet(ResourceGroupName, Namespace);
68+
WriteObject(networkruleSet);
6969
}
7070

7171
// only Namespacename provided
72-
if (ParameterSetName.Equals(NetwrokruleSetNamespacePropertiesParameterSet))
72+
if (ParameterSetName.Equals(NetworkRuleSetNamespacePropertiesParameterSet))
7373
{
7474
var namespaceNames = Client.ListAllNamespaces();
7575
IEnumerable<string> ResourceGrouplst = from nsName in namespaceNames
7676
where nsName.Name == Namespace
7777
select nsName.ResourceGroup;
7878

79-
PSNetworkRuleSetAttributes netwrokruleSet = Client.GetNetworkRuleSet(ResourceGrouplst.FirstOrDefault(), Namespace);
80-
WriteObject(netwrokruleSet);
79+
PSNetworkRuleSetAttributes networkruleSet = Client.GetNetworkRuleSet(ResourceGrouplst.FirstOrDefault(), Namespace);
80+
WriteObject(networkruleSet);
8181
}
8282

8383
}

src/ServiceBus/ServiceBus/Cmdlets/NetworkRuleSet/RemoveAzureServiceBusNetworkRuleSet.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ namespace Microsoft.Azure.Commands.ServiceBus.Commands.NetworkruleSet
2121
/// <summary>
2222
/// 'Remove-AzureRmEventHub' Cmdlet removes the specified EventHub
2323
/// </summary>
24-
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ServiceBusNetworkRuleSet", DefaultParameterSetName = NetwrokruleSetPropertiesParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))]
24+
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ServiceBusNetworkRuleSet", DefaultParameterSetName = NetworkRuleSetPropertiesParameterSet, SupportsShouldProcess = true), OutputType(typeof(bool))]
2525
public class RemoveAzureServiceBusNetworkRuleSet : AzureServiceBusCmdletBase
2626
{
27-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetPropertiesParameterSet, Position = 0, HelpMessage = "Resource Group Name")]
27+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetPropertiesParameterSet, Position = 0, HelpMessage = "Resource Group Name")]
2828
[ResourceGroupCompleter]
2929
[ValidateNotNullOrEmpty]
3030
public string ResourceGroupName { get; set; }
3131

32-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetPropertiesParameterSet, Position = 1, HelpMessage = "Namespace Name")]
32+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetPropertiesParameterSet, Position = 1, HelpMessage = "Namespace Name")]
3333
[ValidateNotNullOrEmpty]
3434
[Alias(AliasNamespaceName)]
3535
public string Name { get; set; }

src/ServiceBus/ServiceBus/Cmdlets/NetworkRuleSet/SetAzureServiceBusNetworkrule.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,43 +22,43 @@ namespace Microsoft.Azure.Commands.ServiceBus.Commands.NetworkruleSet
2222
/// <summary>
2323
/// 'Set-AzEventHubNamespace' Cmdlet updates the specified Eventhub Namespace
2424
/// </summary>
25-
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ServiceBusNetworkRuleSet", SupportsShouldProcess = true, DefaultParameterSetName = NetwrokruleSetPropertiesParameterSet), OutputType(typeof(PSNetworkRuleSetAttributes))]
25+
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ServiceBusNetworkRuleSet", SupportsShouldProcess = true, DefaultParameterSetName = NetworkRuleSetPropertiesParameterSet), OutputType(typeof(PSNetworkRuleSetAttributes))]
2626
public class SetAzureServiceBusNetworkrule : AzureServiceBusCmdletBase
2727
{
28-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetInputObjectParameterSet, Position = 0, HelpMessage = "Resource Group Name.")]
29-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetPropertiesParameterSet, Position = 0, HelpMessage = "Resource Group Name.")]
28+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetInputObjectParameterSet, Position = 0, HelpMessage = "Resource Group Name.")]
29+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetPropertiesParameterSet, Position = 0, HelpMessage = "Resource Group Name.")]
3030
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetResourceIdParameterSet, Position = 0, HelpMessage = "Resource Group Name.")]
3131
[ResourceGroupCompleter]
3232
[ValidateNotNullOrEmpty]
3333
public string ResourceGroupName { get; set; }
3434

35-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetInputObjectParameterSet, Position = 1, HelpMessage = "ServiceBus Namespace Name.")]
36-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetPropertiesParameterSet, Position = 1, HelpMessage = "ServiceBus Namespace Name.")]
35+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetInputObjectParameterSet, Position = 1, HelpMessage = "ServiceBus Namespace Name.")]
36+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetPropertiesParameterSet, Position = 1, HelpMessage = "ServiceBus Namespace Name.")]
3737
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetResourceIdParameterSet, Position = 1, HelpMessage = "ServiceBus Namespace Name.")]
3838
[ValidateNotNullOrEmpty]
3939
[Alias(AliasNamespaceName)]
4040
public string Name { get; set; }
4141

42-
[Parameter(Mandatory = false, ParameterSetName = NetwrokruleSetPropertiesParameterSet, HelpMessage = "Default Action for NetwrokeuleSet")]
42+
[Parameter(Mandatory = false, ParameterSetName = NetworkRuleSetPropertiesParameterSet, HelpMessage = "Default Action for NetwrokeuleSet")]
4343
[PSArgumentCompleter("Allow", "Deny")]
4444
[PSDefaultValue(Value ="Deny")]
4545
public string DefaultAction { get; set; }
4646

47-
[Parameter(Mandatory = false, ParameterSetName = NetwrokruleSetPropertiesParameterSet, HelpMessage = "Public Network Access for NetwrokeuleSet")]
47+
[Parameter(Mandatory = false, ParameterSetName = NetworkRuleSetPropertiesParameterSet, HelpMessage = "Public Network Access for NetwrokeuleSet")]
4848
[PSArgumentCompleter("Enabled", "Disabled")]
4949
[PSDefaultValue(Value = "Enabled")]
5050
public string PublicNetworkAccess { get; set; }
5151

52-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetPropertiesParameterSet, Position = 2, HelpMessage = "List of IPRuleSet")]
52+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetPropertiesParameterSet, Position = 2, HelpMessage = "List of IPRuleSet")]
5353
[ValidateNotNullOrEmpty]
5454
public PSNWRuleSetIpRulesAttributes[] IPRule { get; set; }
5555

56-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetPropertiesParameterSet, Position = 3, HelpMessage = "List of VirtualNetworkRules")]
56+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetPropertiesParameterSet, Position = 3, HelpMessage = "List of VirtualNetworkRules")]
5757
[ValidateNotNullOrEmpty]
5858
[Alias(AliasVirtualNetworkRule)]
5959
public PSNWRuleSetVirtualNetworkRulesAttributes[] VirtualNetworkRule { get; set; }
6060

61-
[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetInputObjectParameterSet, ValueFromPipeline = true, Position = 2, HelpMessage = "NetworkruleSet Configuration Object")]
61+
[Parameter(Mandatory = true, ParameterSetName = NetworkRuleSetInputObjectParameterSet, ValueFromPipeline = true, Position = 2, HelpMessage = "NetworkruleSet Configuration Object")]
6262
[ValidateNotNullOrEmpty]
6363
public PSNetworkRuleSetAttributes InputObject { get; set; }
6464

@@ -76,7 +76,7 @@ public override void ExecuteCmdlet()
7676
try
7777
{
7878

79-
if (ParameterSetName.Equals(NetwrokruleSetPropertiesParameterSet))
79+
if (ParameterSetName.Equals(NetworkRuleSetPropertiesParameterSet))
8080
{
8181
PSNetworkRuleSetAttributes networkRuleSetAttributes = new PSNetworkRuleSetAttributes()
8282
{
@@ -89,7 +89,7 @@ public override void ExecuteCmdlet()
8989
WriteObject(Client.CreateOrUpdateNetworkRuleSet(ResourceGroupName, Name, networkRuleSetAttributes));
9090
}
9191

92-
if (ParameterSetName.Equals(NetwrokruleSetInputObjectParameterSet))
92+
if (ParameterSetName.Equals(NetworkRuleSetInputObjectParameterSet))
9393
{
9494
WriteObject(Client.CreateOrUpdateNetworkRuleSet(ResourceGroupName, Name, InputObject));
9595
}
@@ -102,7 +102,7 @@ public override void ExecuteCmdlet()
102102

103103
if (ResourceGroupName != null && getParamGeoDR.ResourceName != null)
104104
{
105-
if (ShouldProcess(target: Name, action: string.Format("updating NetwrokruleSet", Name, ResourceGroupName)))
105+
if (ShouldProcess(target: Name, action: string.Format("updating NetworkRuleSet", Name, ResourceGroupName)))
106106
{
107107
WriteObject(Client.CreateOrUpdateNetworkRuleSet(ResourceGroupName, Name, getNWRuleSet));
108108
}

src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Set-AzServiceBusNetworkRuleSet [-ResourceGroupName] <String> [-Name] <String> [-
1919
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
2020
```
2121

22-
### NetwrokruleSetInputObjectSet
22+
### NetworkRuleSetInputObjectSet
2323
```
2424
Set-AzServiceBusNetworkRuleSet [-ResourceGroupName] <String> [-Name] <String>
2525
[-InputObject] <PSNetworkRuleSetAttributes> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
@@ -33,7 +33,7 @@ Set-AzServiceBusNetworkRuleSet [-ResourceGroupName] <String> [-Name] <String> [-
3333
```
3434

3535
## DESCRIPTION
36-
Update the NetwrokruleSet of the given Namespace in the current Azure subscription.
36+
Update the NetworkRuleSet of the given Namespace in the current Azure subscription.
3737

3838
## EXAMPLES
3939

@@ -124,7 +124,7 @@ NetworkruleSet Configuration Object
124124
125125
```yaml
126126
Type: Microsoft.Azure.Commands.ServiceBus.Models.PSNetworkRuleSetAttributes
127-
Parameter Sets: NetwrokruleSetInputObjectSet
127+
Parameter Sets: NetworkRuleSetInputObjectSet
128128
Aliases:
129129

130130
Required: True

0 commit comments

Comments
 (0)