Skip to content

Commit 5daa0db

Browse files
committed
Added cmdlets and tests for NetworkWatcher APIs
1 parent 7c7ae6a commit 5daa0db

File tree

99 files changed

+638288
-51900
lines changed

Some content is hidden

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

99 files changed

+638288
-51900
lines changed

setup/azurecmdfiles.wxi

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,9 +2017,6 @@
20172017
<Component Id="cmp4665FDA09AEBB2263079C77AD5FAE614" Guid="*">
20182018
<File Id="fil67E80D69FD7CFFD1BDC41F143BB1B9E4" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.WindowsAzure.Commands.Common.dll" />
20192019
</Component>
2020-
<Component Id="cmpD9E00CF36A1BF106BD49E9368F96A1EE" Guid="*">
2021-
<File Id="fil20EB538DE607DDE13AB3D2D42016F54D" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Network\Microsoft.WindowsAzure.Storage.dll" />
2022-
</Component>
20232020
<Component Id="cmpA96B1B72C5D8449B6A78CEE7B3D8003A" Guid="*">
20242021
<File Id="filEF8564B0A72776B7B7DF45B770E1BA9B" KeyPath="yes" Source="$(var.sourceDir)\ResourceManager\AzureResourceManager\AzureRM.Network\Newtonsoft.Json.dll" />
20252022
</Component>
@@ -6373,7 +6370,6 @@
63736370
<ComponentRef Id="cmpB1CC3831A4FB6A26C143DA8B6606425B" />
63746371
<ComponentRef Id="cmp915E6351383D1760B6CB025667A99E49" />
63756372
<ComponentRef Id="cmp4665FDA09AEBB2263079C77AD5FAE614" />
6376-
<ComponentRef Id="cmpD9E00CF36A1BF106BD49E9368F96A1EE" />
63776373
<ComponentRef Id="cmpA96B1B72C5D8449B6A78CEE7B3D8003A" />
63786374
<ComponentRef Id="cmp1DE03E3ABD3F489833110639A13322DB" />
63796375
<ComponentRef Id="cmp22A4A30D24CDED6264D46F12597014F5" />

src/ResourceManager/Common/Commands.ResourceManager.Common/Commands.ResourceManager.Common.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@
6565
<SpecificVersion>False</SpecificVersion>
6666
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
6767
</Reference>
68+
<Reference Include="Microsoft.Azure.Management.Network, Version=8.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
69+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.3.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
70+
<Private>True</Private>
71+
</Reference>
6872
<Reference Include="Microsoft.Azure.ResourceManager, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6973
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Resources.2.20.0-preview\lib\net40\Microsoft.Azure.ResourceManager.dll</HintPath>
7074
<Private>True</Private>

src/ResourceManager/Common/Commands.ResourceManager.Common/packages.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.2" targetFramework="net45" />
66
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
77
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
8+
<package id="Microsoft.Azure.Management.Network" version="8.3.0-preview" targetFramework="net45" />
89
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
910
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
1011
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
@@ -16,4 +17,4 @@
1617
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.2.9-preview" targetFramework="net45" />
1718
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
1819
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
19-
</packages>
20+
</packages>

src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@
6767
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.14.0.0-prerelease\lib\net45\Microsoft.Azure.Management.Compute.dll</HintPath>
6868
<Private>True</Private>
6969
</Reference>
70-
<Reference Include="Microsoft.Azure.Management.Network, Version=8.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.1.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
70+
<Reference Include="Microsoft.Azure.Management.Network, Version=8.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.3.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
7272
<Private>True</Private>
7373
</Reference>
7474
<Reference Include="Microsoft.Azure.Management.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

src/ResourceManager/Compute/Commands.Compute.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<package id="Microsoft.Azure.Graph.RBAC" version="3.2.0-preview" targetFramework="net45" />
88
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
99
<package id="Microsoft.Azure.Management.Compute" version="14.0.0-prerelease" targetFramework="net45" />
10-
<package id="Microsoft.Azure.Management.Network" version="8.1.0-preview" targetFramework="net45" />
10+
<package id="Microsoft.Azure.Management.Network" version="8.3.0-preview" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Management.Storage" version="4.1.0-preview" targetFramework="net45" />
1212
<package id="Microsoft.Azure.Test.Framework" version="1.0.6179.26854-prerelease" targetFramework="net45" />
1313
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.6.7-preview" targetFramework="net45" />

src/ResourceManager/Compute/Commands.Compute/Commands.Compute.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@
8080
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.14.0.0-prerelease\lib\net45\Microsoft.Azure.Management.Compute.dll</HintPath>
8181
<Private>True</Private>
8282
</Reference>
83-
<Reference Include="Microsoft.Azure.Management.Network, Version=8.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
84-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.1.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
83+
<Reference Include="Microsoft.Azure.Management.Network, Version=8.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
84+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.3.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
8585
<Private>True</Private>
8686
</Reference>
8787
<Reference Include="Microsoft.Azure.Management.Storage">

src/ResourceManager/Compute/Commands.Compute/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" />
1010
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />
1111
<package id="Microsoft.Azure.Management.Compute" version="14.0.0-prerelease" targetFramework="net45" />
12-
<package id="Microsoft.Azure.Management.Network" version="8.1.0-preview" targetFramework="net45" />
12+
<package id="Microsoft.Azure.Management.Network" version="8.3.0-preview" targetFramework="net45" />
1313
<package id="Microsoft.Azure.Management.Storage" version="4.1.0-preview" targetFramework="net45" />
1414
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
1515
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />

src/ResourceManager/Network/AzureRM.Network.psd1

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,24 @@ CmdletsToExport = 'Add-AzureRmApplicationGatewayAuthenticationCertificate',
171171
'Get-AzureRmNetworkInterfaceIpConfig',
172172
'New-AzureRmNetworkInterfaceIpConfig',
173173
'Remove-AzureRmNetworkInterfaceIpConfig',
174-
'Set-AzureRmNetworkInterfaceIpConfig',
174+
'Set-AzureRmNetworkInterfaceIpConfig',
175+
'New-AzureRmNetworkWatcher',
176+
'Get-AzureRmNetworkWatcher',
177+
'Set-AzureRmNetworkWatcher',
178+
'Remove-AzureRmNetworkWatcher',
179+
'New-AzureRmNetworkWatcherPacketCapture',
180+
'Get-AzureRmNetworkWatcherPacketCapture',
181+
'Stop-AzureRmNetworkWatcherPacketCapture',
182+
'Remove-AzureRmNetworkWatcherPacketCapture',
183+
'New-AzureRmPacketCaptureFilterConfig',
184+
'Get-AzureRmNetworkWatcherTopology',
185+
'Get-AzureRmNetworkWatcherSecurityGroupView',
186+
'Test-AzureRmNetworkWatcherIPFlow',
187+
'Get-AzureRmNetworkWatcherNextHop',
188+
'Start-AzureRmNetworkWatcherResourceTroubleshooting',
189+
'Get-AzureRmNetworkWatcherTroubleshootingResult',
190+
'Get-AzureRmNetworkWatcherFlowLogStatus',
191+
'Set-AzureRmNetworkWatcherConfigFlowLog',
175192
'Get-AzureRmExpressRouteServiceProvider',
176193
'Test-AzureRmPrivateIPAddressAvailability',
177194
'Get-AzureRmPublicIpAddress', 'New-AzureRmPublicIpAddress',

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

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,24 @@
6363
<Reference Include="Microsoft.Azure.Management.Authorization">
6464
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Authorization.2.0.0\lib\net40\Microsoft.Azure.Management.Authorization.dll</HintPath>
6565
</Reference>
66+
<Reference Include="Microsoft.Azure.Management.ResourceManager">
67+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ResourceManager.1.2.0-preview\lib\net45\Microsoft.Azure.Management.ResourceManager.dll</HintPath>
68+
</Reference>
6669
<Reference Include="Microsoft.Azure.Insights">
6770
<HintPath>..\..\..\packages\Microsoft.Azure.Insights.0.13.1-preview\lib\net45\Microsoft.Azure.Insights.dll</HintPath>
6871
<Private>True</Private>
6972
</Reference>
70-
<Reference Include="Microsoft.Azure.Management.Network, Version=8.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
71-
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.1.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
73+
<Reference Include="Microsoft.Azure.Management.Storage, Version=6.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
74+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.6.1.0-preview\lib\net45\Microsoft.Azure.Management.Storage.dll</HintPath>
75+
<SpecificVersion>False</SpecificVersion>
76+
<Private>True</Private>
77+
</Reference>
78+
<Reference Include="Microsoft.Azure.Management.Compute">
79+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Compute.14.0.0-prerelease\lib\net45\Microsoft.Azure.Management.Compute.dll</HintPath>
80+
<Private>True</Private>
81+
</Reference>
82+
<Reference Include="Microsoft.Azure.Management.Network, Version=8.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
83+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.8.3.0-preview\lib\net45\Microsoft.Azure.Management.Network.dll</HintPath>
7284
<Private>True</Private>
7385
</Reference>
7486
<Reference Include="Microsoft.Azure.Management.Redis">
@@ -179,6 +191,8 @@
179191
<Compile Include="ScenarioTests\VirtualNetworkGatewayTests.cs" />
180192
<Compile Include="ScenarioTests\LocalNetworkGatewayTests.cs" />
181193
<Compile Include="ScenarioTests\VirtualNetworkGatewayConnectionTests.cs" />
194+
<Compile Include="ScenarioTests\NetworkWatcherTests.cs" />
195+
<Compile Include="ScenarioTests\NetworkWatcherAPITests.cs" />
182196
</ItemGroup>
183197
<ItemGroup>
184198
<None Include="..\..\Common\Commands.ScenarioTests.ResourceManager.Common\AzureRM.Resources.ps1">
@@ -233,9 +247,25 @@
233247
<None Include="ScenarioTests\VirtualNetworkGatewayConnectionTests.ps1">
234248
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
235249
</None>
250+
<None Include="ScenarioTests\NetworkWatcherTests.ps1">
251+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
252+
</None>
253+
<None Include="ScenarioTests\NetworkWatcherAPITests.ps1">
254+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
255+
</None>
236256
<None Include="ScenarioTests\PublicIpAddressTests.ps1">
237257
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
238258
</None>
259+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkWatcherAPITests\TestFlowLog.json" />
260+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkWatcherAPITests\TestGetNextHop.json">
261+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
262+
</None>
263+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkWatcherAPITests\TestGetSecurityGroupView.json">
264+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
265+
</None>
266+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkWatcherAPITests\TestGetTopology.json">
267+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
268+
</None>
239269
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.ApplicationGatewayTests\TestApplicationGatewayCRUD.json">
240270
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
241271
</None>
@@ -320,12 +350,18 @@
320350
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkInterfaceTests\TestNetworkInterfaceSet.json">
321351
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
322352
</None>
323-
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkInterfaceTests\TestNetworkInterfaceWithAcceleratedNetworking.json" >
353+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkInterfaceTests\TestNetworkInterfaceWithAcceleratedNetworking.json">
324354
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
325355
</None>
326356
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkInterfaceTests\TestNetworkInterfaceWithIpConfiguration.json">
327357
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
328358
</None>
359+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkWatcherAPITests\TestPacketCapture.json" />
360+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkWatcherAPITests\TestTroubleshoot.json" />
361+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkWatcherAPITests\TestVerifyIPFlow.json">
362+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
363+
</None>
364+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkWatcherTests\TestNetworkWatcherCRUD.json" />
329365
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.PublicIpAddressTests\TestPublicIpAddressCRUD.json">
330366
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
331367
</None>
@@ -412,17 +448,17 @@
412448
</None>
413449
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkGatewayConnectionTests\TestVirtualNetworkGatewayConnectionWithActiveAcitveGateway.json">
414450
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
415-
</None>
416-
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestResourceNavigationLinksOnSubnetCRUD.json" >
451+
</None>
452+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestResourceNavigationLinksOnSubnetCRUD.json">
417453
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
418454
</None>
419-
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestVirtualNetworkCRUD.json" >
455+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestVirtualNetworkCRUD.json">
420456
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
421457
</None>
422-
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestVirtualNetworkPeeringCRUD.json" >
458+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestVirtualNetworkPeeringCRUD.json">
423459
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
424460
</None>
425-
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestVirtualNetworkSubnetCRUD.json" >
461+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\TestVirtualNetworkSubnetCRUD.json">
426462
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
427463
</None>
428464
</ItemGroup>
@@ -451,12 +487,14 @@
451487
<Project>{e1f5201d-6067-430e-b303-4e367652991b}</Project>
452488
<Name>Commands.Resources</Name>
453489
</ProjectReference>
490+
<ProjectReference Include="..\..\Storage\Commands.Management.Storage\Commands.Management.Storage.csproj">
491+
<Project>{a50ab133-5c04-4a17-9054-f8343683ec23}</Project>
492+
<Name>Commands.Management.Storage</Name>
493+
</ProjectReference>
454494
</ItemGroup>
455495
<ItemGroup>
456496
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
457497
</ItemGroup>
458-
<ItemGroup>
459-
<Folder Include="SessionRecords\Commands.Network.Test.ScenarioTests.VirtualNetworkTests\" />
460-
</ItemGroup>
498+
<ItemGroup />
461499
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
462500
</Project>

0 commit comments

Comments
 (0)