Skip to content

Commit 810ae46

Browse files
author
Maddie Clayton
authored
Merge pull request #7225 from jcgknudson/network-september-release
Added initial network profile powershell commands and ServiecAssociationLink to Subnet Model
2 parents c1eb249 + 0880b51 commit 810ae46

File tree

45 files changed

+7720
-7
lines changed

Some content is hidden

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

45 files changed

+7720
-7
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.5.0-preview" />
3333
<PackageReference Include="Microsoft.Azure.Insights" Version="0.15.0-preview" />
3434
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="22.0.0" />
35+
<PackageReference Include="Microsoft.Azure.Management.ContainerInstance" Version="1.1.0" />
3536
<PackageReference Include="Microsoft.Azure.Management.Redis" Version="3.1.1-preview" />
3637
<PackageReference Include="Microsoft.Azure.Management.OperationalInsights" Version="0.18.0-preview" />
3738
</ItemGroup>

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

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@
6262
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Redis.3.1.1-preview\lib\net45\Microsoft.Azure.Management.Redis.dll</HintPath>
6363
<Private>True</Private>
6464
</Reference>
65+
<Reference Include="Microsoft.Azure.Management.ContainerInstance">
66+
<HintPath>..\..\..\packages\Microsoft.Azure.Management.ContainerInstance.1.1.0\lib\net452\Microsoft.Azure.Management.ContainerInstance.dll</HintPath>
67+
</Reference>
6568
<Reference Include="System.Runtime" />
6669
</ItemGroup>
6770
<ItemGroup>
@@ -84,6 +87,7 @@
8487
<Compile Include="ScenarioTests\NetworkInterfaceTests.cs" />
8588
<Compile Include="ScenarioTests\LoadBalancerTests.cs" />
8689
<Compile Include="ScenarioTests\ExpressRouteCircuitTests.cs" />
90+
<Compile Include="ScenarioTests\NetworkProfileTests.cs" />
8791
<Compile Include="ScenarioTests\PublicIpPrefixTests.cs" />
8892
<Compile Include="ScenarioTests\RouteTableTests.cs" />
8993
<Compile Include="ScenarioTests\NetworkSecurityGroupTests.cs" />
@@ -170,6 +174,9 @@
170174
<None Include="ScenarioTests\ExpressRouteCircuitTests.ps1">
171175
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
172176
</None>
177+
<None Include="ScenarioTests\NetworkProfileTests.ps1">
178+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
179+
</None>
173180
<None Include="ScenarioTests\PublicIpPrefixTests.ps1">
174181
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
175182
</None>
@@ -357,6 +364,18 @@
357364
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkCloudExceptionTests\TestNotFound.json">
358365
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
359366
</None>
367+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkProfileTests\TestContainerNetworkInterfaceConfigCRUD.json">
368+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
369+
</None>
370+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkProfileTests\TestContainerNetworkInterfaceConfigCRUDMinimalParameters.json">
371+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
372+
</None>
373+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkProfileTests\TestNetworkProfileCRUDAllParameters.json">
374+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
375+
</None>
376+
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkProfileTests\TestNetworkProfileCRUDMinimalParameters.json">
377+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
378+
</None>
360379
<None Include="SessionRecords\Commands.Network.Test.ScenarioTests.NetworkInterfaceTests\TestNetworkInterfaceTapConfigurationCRUD.json">
361380
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
362381
</None>
@@ -722,9 +741,13 @@
722741
<Project>{98cfd96b-a6bc-4f15-ae2c-603fc2b58981}</Project>
723742
<Name>Commands.Network</Name>
724743
</ProjectReference>
744+
<ProjectReference Include="..\..\ContainerInstance\Commands.ContainerInstance\Commands.ContainerInstance.csproj">
745+
<Project>{0E11B67A-1257-40D0-BD33-8315759FDB01}</Project>
746+
<Name>Commands.ContainerInstance</Name>
747+
</ProjectReference>
725748
</ItemGroup>
726749
<ItemGroup>
727750
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
728751
</ItemGroup>
729752
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
730-
</Project>
753+
</Project>

src/ResourceManager/Network/Commands.Network.Test/NetworkResourcesController.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using Microsoft.Azure.Commands.Common.Authentication;
1616
using Microsoft.Azure.Management.Compute;
17+
using Microsoft.Azure.Management.ContainerInstance;
1718
using Microsoft.Azure.Management.Network;
1819
using Microsoft.Azure.Management.Redis;
1920
using Microsoft.Azure.Management.Storage;
@@ -43,6 +44,8 @@ public sealed class NetworkResourcesController
4344

4445
public ComputeManagementClient ComputeManagementClient { get; private set; }
4546

47+
public ContainerInstanceManagementClient ContainerInstanceManagementClient { get; set; }
48+
4649
public StorageManagementClient StorageManagementClient { get; private set; }
4750

4851
public RedisManagementClient RedisManagementClient { get; private set; }
@@ -126,6 +129,7 @@ public void RunPsTestWorkflow(
126129
_helper.GetRMModulePath("AzureRM.Insights.psd1"),
127130
_helper.GetRMModulePath("AzureRM.Network.psd1"),
128131
_helper.GetRMModulePath("AzureRM.Compute.psd1"),
132+
_helper.GetRMModulePath("AzureRM.ContainerInstance.psd1"),
129133
_helper.GetRMModulePath("AzureRM.OperationalInsights.psd1"),
130134
#if !NETSTANDARD
131135
_helper.RMStorageDataPlaneModule,
@@ -164,6 +168,7 @@ private void SetupManagementClients(RestTestFramework.MockContext context)
164168
var resourceManagerResourceManagementClient = GetResourceManagerResourceManagementClient(context);
165169
NetworkManagementClient = GetNetworkManagementClient(context);
166170
ComputeManagementClient = GetComputeManagementClient(context);
171+
ContainerInstanceManagementClient = GetContainerInstanceManagementClient(context);
167172
StorageManagementClient = GetStorageManagementClient(context);
168173
RedisManagementClient = GetRedisManagementClient(context);
169174
SubscriptionClient = GetSubscriptionClient(context);
@@ -173,6 +178,7 @@ private void SetupManagementClients(RestTestFramework.MockContext context)
173178
resourceManagerResourceManagementClient,
174179
NetworkManagementClient,
175180
ComputeManagementClient,
181+
ContainerInstanceManagementClient,
176182
StorageManagementClient,
177183
RedisManagementClient,
178184
SubscriptionClient,
@@ -208,5 +214,10 @@ private static OperationalInsightsManagementClient GetOperationalInsightsManagem
208214
{
209215
return context.GetServiceClient<OperationalInsightsManagementClient>(RestTestFramework.TestEnvironmentFactory.GetTestEnvironment());
210216
}
217+
218+
private static ContainerInstanceManagementClient GetContainerInstanceManagementClient(RestTestFramework.MockContext context)
219+
{
220+
return context.GetServiceClient<ContainerInstanceManagementClient>(RestTestFramework.TestEnvironmentFactory.GetTestEnvironment());
221+
}
211222
}
212223
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// <auto-generated>
2+
// Copyright (c) Microsoft and contributors. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
//
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
//
17+
// Warning: This code was generated by a tool.
18+
//
19+
// Changes to this file may cause incorrect behavior and will be lost if the
20+
// code is regenerated.
21+
//
22+
// For documentation on code generator please visit
23+
// https://aka.ms/nrp-code-generation
24+
// Please contact [email protected] if you need to make changes to this file.
25+
// </auto-generated>
26+
27+
using System;
28+
using Microsoft.Azure.ServiceManagemenet.Common.Models;
29+
using Microsoft.WindowsAzure.Commands.ScenarioTest;
30+
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
31+
using Xunit;
32+
using Xunit.Abstractions;
33+
34+
namespace Commands.Network.Test.ScenarioTests
35+
{
36+
public class NetworkProfileTests : RMTestBase
37+
{
38+
public XunitTracingInterceptor _logger;
39+
40+
public NetworkProfileTests(Xunit.Abstractions.ITestOutputHelper output)
41+
{
42+
_logger = new XunitTracingInterceptor(output);
43+
XunitTracingInterceptor.AddToContext(_logger);
44+
}
45+
46+
[Fact]
47+
[Trait(Category.AcceptanceType, Category.CheckIn)]
48+
[Trait(Category.Owner, Category.sdnnrp)]
49+
public void TestNetworkProfileCRUDMinimalParameters()
50+
{
51+
NetworkResourcesController.NewInstance.RunPsTest(_logger, string.Format("Test-NetworkProfileCRUDMinimalParameters"));
52+
}
53+
54+
[Fact]
55+
[Trait(Category.AcceptanceType, Category.CheckIn)]
56+
[Trait(Category.Owner, Category.sdnnrp)]
57+
public void TestNetworkProfileCRUDAllParameters()
58+
{
59+
NetworkResourcesController.NewInstance.RunPsTest(_logger, string.Format("Test-NetworkProfileCRUDAllParameters"));
60+
}
61+
62+
[Fact]
63+
[Trait(Category.AcceptanceType, Category.CheckIn)]
64+
[Trait(Category.Owner, Category.sdnnrp)]
65+
public void TestContainerNetworkInterfaceConfigCRUDMinimalParameters()
66+
{
67+
NetworkResourcesController.NewInstance.RunPsTest(_logger, string.Format("Test-ContainerNetworkInterfaceConfigCRUDMinimalParameters"));
68+
}
69+
70+
[Fact]
71+
[Trait(Category.AcceptanceType, Category.CheckIn)]
72+
[Trait(Category.Owner, Category.sdnnrp)]
73+
public void TestContainerNetworkInterfaceConfigCRUD()
74+
{
75+
NetworkResourcesController.NewInstance.RunPsTest(_logger, string.Format("Test-ContainerNetworkInterfaceConfigCRUD"));
76+
}
77+
}
78+
}

0 commit comments

Comments
 (0)