Skip to content

Commit bfa9807

Browse files
authored
Merge pull request #4814 from v-Ajnava/NovBrkchngEH
Eventhub: Upcoming Breaking changes - deprecated cmdlets and properties
2 parents 8db3a0c + 0c58d5f commit bfa9807

File tree

47 files changed

+21383
-216032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+21383
-216032
lines changed

src/ResourceManager/EventHub/AzureRM.EventHub.psd1

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,24 +72,11 @@ NestedModules = @('.\Microsoft.Azure.Commands.EventHub.dll')
7272
FunctionsToExport = @()
7373

7474
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
75-
CmdletsToExport = 'New-AzureRmEventHubKey', 'Get-AzureRmEventHubNamespace',
76-
'Get-AzureRmEventHubNamespaceAuthorizationRule',
77-
'Get-AzureRmEventHubNamespaceKey', 'New-AzureRmEventHubNamespace',
78-
'New-AzureRmEventHubNamespaceAuthorizationRule',
79-
'Remove-AzureRmEventHubNamespace',
80-
'Remove-AzureRmEventHubNamespaceAuthorizationRule',
81-
'Set-AzureRmEventHubNamespace',
82-
'Set-AzureRmEventHubNamespaceAuthorizationRule',
83-
'New-AzureRmEventHubNamespaceKey',
84-
'Get-AzureRmEventHubAuthorizationRule', 'Get-AzureRmEventHubKey',
85-
'Get-AzureRmEventHub', 'New-AzureRmEventHub',
86-
'New-AzureRmEventHubAuthorizationRule', 'Remove-AzureRmEventHub',
87-
'Remove-AzureRmEventHubAuthorizationRule', 'Set-AzureRmEventHub',
88-
'Set-AzureRmEventHubAuthorizationRule',
89-
'Get-AzureRmEventHubConsumerGroup',
90-
'New-AzureRmEventHubConsumerGroup',
91-
'Remove-AzureRmEventHubConsumerGroup',
92-
'Set-AzureRmEventHubConsumerGroup'
75+
CmdletsToExport = 'New-AzureRmEventHubNamespace','Get-AzureRmEventHubNamespace','Set-AzureRmEventHubNamespace','Remove-AzureRmEventHubNamespace',
76+
'New-AzureRmEventHubAuthorizationRule','Get-AzureRmEventHubAuthorizationRule','Set-AzureRmEventHubAuthorizationRule','Remove-AzureRmEventHubAuthorizationRule',
77+
'Get-AzureRmEventHubKey','New-AzureRmEventHubKey',
78+
'New-AzureRmEventHub','Get-AzureRmEventHub','Set-AzureRmEventHub','Remove-AzureRmEventHub',
79+
'New-AzureRmEventHubConsumerGroup','Get-AzureRmEventHubConsumerGroup','Set-AzureRmEventHubConsumerGroup','Remove-AzureRmEventHubConsumerGroup'
9380

9481
# Variables to export from this module
9582
# VariablesToExport = @()

src/ResourceManager/EventHub/ChangeLog.md

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,126 @@
1919
-->
2020
## Current Release
2121

22+
The following cmdlets were affected this release:
23+
24+
**New-AzureRmEventHubNamespaceAuthorizationRule**
25+
- 'New-AzureRmEventHubNamespaceAuthorizationRule' cmdlet removed in this build. Please use the New cmdlet 'New-AzureRmEventHubAuthorizationRule'
26+
27+
**Get-AzureRmEventHubNamespaceAuthorizationRule**
28+
- 'Get-AzureRmEventHubNamespaceAuthorizationRule' cmdlet removed in this build. Please use the New cmdlet 'Get-AzureRmEventHubAuthorizationRule'
29+
30+
**Set-AzureRmEventHubNamespaceAuthorizationRule**
31+
- 'Set-AzureRmEventHubNamespaceAuthorizationRule' cmdlet removed in this build. Please use the New cmdlet 'Set-AzureRmEventHubAuthorizationRule'
32+
33+
**Remove-AzureRmEventHubNamespaceAuthorizationRule**
34+
- 'Remove-AzureRmEventHubNamespaceAuthorizationRule' cmdlet removed in this build. Please use the New cmdlet 'Remove-AzureRmEventHubAuthorizationRule'
35+
36+
**New-AzureRmEventHubNamespaceKey**
37+
- 'New-AzureRmEventHubNamespaceKey' cmdlet removed in this build. Please use the New cmdlet 'New-AzureRmEventHubKey'
38+
39+
**Get-AzureRmEventHubNamespaceKey**
40+
- 'Get-AzureRmEventHubNamespaceKey' cmdlet removed in this build. Please use the New cmdlet 'Get-AzureRmEventHubKey'
41+
42+
**New-AzureRmEventHubNamespace**
43+
44+
- The property 'Status' and 'Enabled' from the NamespceAttributes is removed.
45+
46+
```powershell
47+
# Old
48+
# The $namespace has Status and Enabled property
49+
$namespace = New-AzureRmEventHubNamespace <parameters>
50+
$namespace.Status
51+
$namespace.Enabled
52+
53+
# New
54+
55+
# The call remains the same, but the returned values NameSpace object will not have the Status and Enabled property
56+
$namespace = Get-AzureRmEventHubNamespace <parameters>
57+
58+
```
59+
60+
**Get-AzureRmEventHubNamespace**
61+
- The property 'Status' and 'Enabled' from the NamespceAttributes is removed.
62+
63+
```powershell
64+
# Old
65+
# The $namespace has Status and Enabled property
66+
$namespace = Get-AzureRmEventHubNamespace <parameters>
67+
$namespace.Status
68+
$namespace.Enabled
69+
70+
# New
71+
72+
# The call remains the same, but the returned values NameSpace object will not have the Status and Enabled property
73+
$namespace = Get-AzureRmEventHubNamespace <parameters>
74+
75+
```
76+
77+
**Set-AzureRmEventHubNamespace**
78+
- The property 'Status' and 'Enabled' from the NamespceAttributes is removed.
79+
80+
```powershell
81+
# Old
82+
# The $namespace has Status and Enabled property
83+
$namespace = Set-AzureRmEventHubNamespace <parameters>
84+
$namespace.Status
85+
$namespace.Enabled
86+
87+
# New
88+
89+
# The call remains the same, but the returned values NameSpace object will not have the Status and Enabled property
90+
$namespace = Set-AzureRmEventHubNamespace <parameters>
91+
92+
```
93+
94+
**New-AzureRmEventHubConsumerGroup**
95+
- The property 'EventHubPath' from the ConsumerGroupAttributes is removed.
96+
97+
```powershell
98+
# Old
99+
# The $consumergroup has EventHubPath property
100+
$consumergroup = New-AzureRmEventHubConsumerGroup <parameters>
101+
$consumergroup.EventHubPath
102+
103+
# New
104+
105+
# The call remains the same, but the returned values ConsumerGroup object will not have the EventHubPath property
106+
$consumergroup = New-AzureRmEventHubConsumerGroup <parameters>
107+
108+
```
109+
110+
**Set-AzureRmEventHubConsumerGroup**
111+
- The property 'EventHubPath' from the ConsumerGroupAttributes is removed.
112+
113+
```powershell
114+
# Old
115+
# The $consumergroup has EventHubPath property
116+
$consumergroup = Set-AzureRmEventHubConsumerGroup <parameters>
117+
$consumergroup.EventHubPath
118+
119+
# New
120+
121+
# The call remains the same, but the returned values ConsumerGroup object will not have the EventHubPath property
122+
$consumergroup = Set-AzureRmEventHubConsumerGroup <parameters>
123+
124+
```
125+
126+
**Get-AzureRmEventHubConsumerGroup**
127+
- The property 'EventHubPath' from the ConsumerGroupAttributes is removed.
128+
129+
```powershell
130+
# Old
131+
# The $consumergroup has EventHubPath property
132+
$consumergroup = Get-AzureRmEventHubConsumerGroup <parameters>
133+
$consumergroup.EventHubPath
134+
135+
# New
136+
137+
# The call remains the same, but the returned values ConsumerGroup object will not have the EventHubPath property
138+
$consumergroup = Get-AzureRmEventHubConsumerGroup <parameters>
139+
140+
```
141+
22142
## Version 0.4.7
23143

24144
## Version 0.4.6

src/ResourceManager/EventHub/Commands.EventHub.Test/Commands.EventHubs.Test.csproj

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,16 @@
5151
<Reference Include="Microsoft.Azure.Common.NetFramework">
5252
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
5353
</Reference>
54-
<Reference Include="Microsoft.Azure.Management.Authorization, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
55-
<SpecificVersion>False</SpecificVersion>
56-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
57-
<Private>True</Private>
54+
<Reference Include="Microsoft.Azure.Management.Authorization">
55+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.1.0.2\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
5856
</Reference>
5957
<Reference Include="Microsoft.Azure.Management.EventHub, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6058
<HintPath>..\..\..\packages\Microsoft.Azure.Management.EventHub.2.0.0\lib\net452\Microsoft.Azure.Management.EventHub.dll</HintPath>
6159
<Private>True</Private>
6260
</Reference>
61+
<Reference Include="Microsoft.Azure.Test.HttpRecorder">
62+
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.7.0\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
63+
</Reference>
6364
<Reference Include="Microsoft.IdentityModel.Clients.ActiveDirectory, Version=2.28.3.860, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6465
<HintPath>..\..\..\packages\Microsoft.IdentityModel.Clients.ActiveDirectory.2.28.3\lib\net45\Microsoft.IdentityModel.Clients.ActiveDirectory.dll</HintPath>
6566
</Reference>
@@ -92,10 +93,6 @@
9293
<Reference Include="Microsoft.Azure.Test.Framework">
9394
<HintPath>..\..\..\packages\Microsoft.Azure.Test.Framework.1.0.6179.26854-prerelease\lib\net45\Microsoft.Azure.Test.Framework.dll</HintPath>
9495
</Reference>
95-
<Reference Include="Microsoft.Azure.Test.HttpRecorder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
96-
<HintPath>..\..\..\packages\Microsoft.Azure.Test.HttpRecorder.1.6.7-preview\lib\net45\Microsoft.Azure.Test.HttpRecorder.dll</HintPath>
97-
<Private>True</Private>
98-
</Reference>
9996
<Reference Include="Moq">
10097
<HintPath>..\..\..\packages\Moq.4.2.1510.2205\lib\net40\Moq.dll</HintPath>
10198
</Reference>
@@ -179,36 +176,18 @@
179176
<None Include="SessionRecords\Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.ConsumerGroupsTests\ConsumerGroupsCRUD.json">
180177
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
181178
</None>
182-
<None Include="SessionRecords\Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.ConsumerGroupsTests\ConsumerGroupsCRUD_New.json">
183-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
184-
</None>
185179
<None Include="SessionRecords\Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.EventHubsTests\EventHubsAuthorizationRulesCRUD.json">
186180
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
187181
</None>
188-
<None Include="SessionRecords\Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.EventHubsTests\EventHubsAuthorizationRulesCRUD_New.json">
189-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
190-
</None>
191-
<None Include="SessionRecords\Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.EventHubsTests\EventHubsAuthorizationRules_NewCRUD.json">
192-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
193-
</None>
194182
<None Include="SessionRecords\Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.EventHubsTests\EventHubsCRUD.json">
195183
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
196184
</None>
197-
<None Include="SessionRecords\Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.EventHubsTests\EventHubsCRUD_New.json">
198-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
199-
</None>
200185
<None Include="SessionRecords\Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.NamespaceTests\NamespaceAuthorizationRulesCRUD.json">
201186
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
202187
</None>
203-
<None Include="SessionRecords\Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.NamespaceTests\NamespaceAuthorizationRulesCRUD_New.json">
204-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
205-
</None>
206188
<None Include="SessionRecords\Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.NamespaceTests\NamespaceCRUD.json">
207189
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
208190
</None>
209-
<None Include="SessionRecords\Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.NamespaceTests\NamespaceCRUD_New.json">
210-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
211-
</None>
212191
</ItemGroup>
213192
<ItemGroup>
214193
<ProjectReference Include="..\..\..\Common\Commands.Common.Authentication.Abstractions\Commands.Common.Authentication.Abstractions.csproj">

src/ResourceManager/EventHub/Commands.EventHub.Test/ScenarioTests/ConsumerGroups.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,13 @@ public ConsumerGroupsTests(ITestOutputHelper output)
2727
XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
2828
TestExecutionHelpers.SetUpSessionAndProfile();
2929
}
30-
30+
3131
[Fact]
3232
[Trait(Category.AcceptanceType, Category.CheckIn)]
3333
public void ConsumerGroupsCRUD()
3434
{
3535
EventHubsController.NewInstance.RunPsTest("ConsumerGroupsTests");
3636
}
37-
38-
39-
[Fact]
40-
[Trait(Category.AcceptanceType, Category.CheckIn)]
41-
public void ConsumerGroupsCRUD_New()
42-
{
43-
EventHubsController.NewInstance.RunPsTest("ConsumerGroupsTests_New");
44-
}
4537

4638
}
4739
}

src/ResourceManager/EventHub/Commands.EventHub.Test/ScenarioTests/ConsumerGroupsTests.ps1

Lines changed: 2 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -48,73 +48,11 @@ function Get-NamespaceName
4848
return "Namespace-" + (getAssetName)
4949
}
5050

51-
<#
52-
.SYNOPSIS
53-
Tests ConsumerGroup Create List Remove operations.
54-
#>
55-
function ConsumerGroupsTests
56-
{ # Setup
57-
58-
59-
$location = Get-Location
60-
$resourceGroupName = Get-ResourceGroupName
61-
$namespaceName = Get-NamespaceName
62-
$eventHubName = Get-EventHubName
63-
$consumerGroupName = Get-ConsumerGroupName
64-
65-
Write-Debug " Create resource group"
66-
Write-Debug " Resource Group Name : $resourceGroupName"
67-
$Result11 = New-AzureRmResourceGroup -Name $resourceGroupName -Location $location -Force
68-
69-
Write-Debug " Create new Evnethub namespace"
70-
Write-Debug " Namespace name : $namespaceName"
71-
$result = New-AzureRmEventHubNamespace -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -Location $location
72-
73-
Write-Debug " Get the created namespace within the resource group"
74-
$createdNamespace = Get-AzureRmEventHubNamespace -ResourceGroup $resourceGroupName -NamespaceName $namespaceName
75-
76-
Assert-True {$createdNamespace.Name -eq $namespaceName} "Namespace created earlier is not found."
77-
78-
Write-Debug " Create new eventHub "
79-
$msgRetentionInDays = 3
80-
$partionCount = 2
81-
$result = New-AzureRmEventHub -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -Location $location -EventHubName $eventHubName -MessageRetentionInDays $msgRetentionInDays -PartitionCount $partionCount
82-
83-
Write-Debug " Get the created eventHub "
84-
$createdEventHub = Get-AzureRmEventHub -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -EventHubName $result.Name
85-
86-
$createdEventHub = Get-AzureRmEventHub -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -EventHubName $eventHubName
87-
Assert-True {$createdEventHub.Name -eq $eventHubName} "Namespace created earlier is not found."
88-
89-
Write-Debug " Create a new ConsumerGroup "
90-
$result_ConsumerGroup = New-AzureRmEventHubConsumerGroup -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -EventHubName $eventHubName -ConsumerGroupName $consumerGroupName
91-
92-
Write-Debug " Get created ConsumerGroup "
93-
$CreatedConsumerGroup = Get-AzureRmEventHubConsumerGroup -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -EventHubName $eventHubName -ConsumerGroupName $result_ConsumerGroup.Name
94-
95-
Write-Debug " Get all created ConsumerGroup "
96-
$CreatedConsumerGroups = Get-AzureRmEventHubConsumerGroup -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -EventHubName $eventHubName
97-
98-
# Cleanup
99-
Write-Debug " Delete created ConsumerGroup "
100-
Remove-AzureRmEventHubConsumerGroup -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -EventHubName $result.Name -ConsumerGroupName $CreatedConsumerGroup.Name
101-
102-
Write-Debug " Delete the EventHub"
103-
$delete1 = Remove-AzureRmEventHub -ResourceGroup $resourceGroupName -NamespaceName $namespaceName -EventHubName $result.Name
104-
105-
Write-Debug " Delete namespaces"
106-
Remove-AzureRmEventHubNamespace -ResourceGroup $resourceGroupName -NamespaceName $namespaceName
107-
108-
Write-Debug " Delete resourcegroup"
109-
Remove-AzureRmResourceGroup -Name $resourceGroupName -Force
110-
}
111-
112-
11351
<#
11452
.SYNOPSIS
11553
Tests New Parameter for ConsumerGroup Create List Remove operations.
11654
#>
117-
function ConsumerGroupsTests_New
55+
function ConsumerGroupsTests
11856
{ # Setup
11957

12058

@@ -140,7 +78,7 @@ function ConsumerGroupsTests_New
14078
Write-Debug " Create new eventHub "
14179
$msgRetentionInDays = 3
14280
$partionCount = 2
143-
$result = New-AzureRmEventHub -ResourceGroup $resourceGroupName -Namespace $namespaceName -Location $location -Name $eventHubName -MessageRetentionInDays $msgRetentionInDays -PartitionCount $partionCount
81+
$result = New-AzureRmEventHub -ResourceGroup $resourceGroupName -Namespace $namespaceName -Name $eventHubName -MessageRetentionInDays $msgRetentionInDays -PartitionCount $partionCount
14482

14583
Write-Debug " Get the created eventHub "
14684
$createdEventHub = Get-AzureRmEventHub -ResourceGroup $resourceGroupName -Namespace $namespaceName -Name $result.Name

src/ResourceManager/EventHub/Commands.EventHub.Test/ScenarioTests/EventHubs.cs

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,19 @@ public EventHubsTests(ITestOutputHelper output)
2626
XunitTracingInterceptor.AddToContext(new XunitTracingInterceptor(output));
2727
}
2828

29+
2930
[Fact]
3031
[Trait(Category.AcceptanceType, Category.CheckIn)]
3132
public void EventHubsCRUD()
3233
{
3334
EventHubsController.NewInstance.RunPsTest("EventHubsTests");
3435
}
35-
36-
[Fact]
37-
[Trait(Category.AcceptanceType, Category.CheckIn)]
38-
public void EventHubsCRUD_New()
39-
{
40-
EventHubsController.NewInstance.RunPsTest("EventHubsTests_New");
41-
}
42-
36+
4337
[Fact]
4438
[Trait(Category.AcceptanceType, Category.CheckIn)]
4539
public void EventHubsAuthorizationRulesCRUD()
4640
{
4741
EventHubsController.NewInstance.RunPsTest("EventHubsAuthTests");
4842
}
49-
50-
[Fact]
51-
[Trait(Category.AcceptanceType, Category.CheckIn)]
52-
public void EventHubsAuthorizationRulesCRUD_New()
53-
{
54-
EventHubsController.NewInstance.RunPsTest("EventHubsAuth_NewTests");
55-
}
5643
}
5744
}

0 commit comments

Comments
 (0)