Skip to content

Commit ff54489

Browse files
authored
Merge pull request #4036 from skomarag/preview
iptag changes for reservedip
2 parents 5165906 + 60a3f2c commit ff54489

File tree

56 files changed

+906
-330
lines changed

Some content is hidden

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

56 files changed

+906
-330
lines changed

src/ServiceManagement/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@
119119
<SpecificVersion>False</SpecificVersion>
120120
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.14.0.0\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
121121
</Reference>
122-
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
123-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.8.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
122+
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=8.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
123+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.8.2.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
124124
<Private>True</Private>
125125
</Reference>
126126
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
@@ -334,6 +334,9 @@
334334
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.ServiceManagementTests\RunStartAndStopMultipleVirtualMachinesTest.json">
335335
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
336336
</None>
337+
<EmbeddedResource Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.ServiceManagementTests\TestAzureReservedIPWithIPTags.json">
338+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
339+
</EmbeddedResource>
337340
<None Include="SessionRecords\Microsoft.WindowsAzure.Commands.ScenarioTest.ServiceManagementTests\TestGetAzureLocation.json">
338341
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
339342
</None>

src/ServiceManagement/Common/Commands.ScenarioTest/Resources/ServiceManagement/ServiceManagementTests.ps1

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,30 @@ function Test-MigrationAzureReservedIP
912912
Assert-AreEqual $removeReservedIP.OperationStatus "Succeeded"
913913
}
914914

915+
<#
916+
.SYNOPSIS
917+
Tests New-AzureReservedIPWithTags
918+
#>
919+
function Test-AzureReservedIPWithIPTags
920+
{
921+
# Setu
922+
$name = getAssetName
923+
$location = "West Central US"
924+
$iptag = New-AzureIPTag -IPTagType "FirstPartyUsage" -Value "/tagTypes/SystemService/operators/Microsoft/platforms/Azure/services/Microsoft.AzureAD"
925+
# Test Create Reserved IP
926+
New-AzureReservedIP -ReservedIPName $name -Location $location -IPTagList $iptag
927+
$reservedIP = Get-AzureReservedIP -ReservedIPName $name
928+
#-IPTags $iptag
929+
# Assert
930+
Assert-NotNull($reservedIP)
931+
Assert-AreEqual $reservedIP.Location $location
932+
Assert-NotNull($reservedIP.IPTags)
933+
934+
#Test Remove reserved IP
935+
$removeReservedIP = Remove-AzureReservedIP -ReservedIPName $name -Force
936+
Assert-AreEqual $removeReservedIP.OperationStatus "Succeeded"
937+
}
938+
915939
function Test-NewAzureVMWithBYOL
916940
{
917941
# Setup

src/ServiceManagement/Common/Commands.ScenarioTest/ServiceManagement/ScenarioTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,13 @@ public void TestMigrationAzureReservedIP()
196196
this.RunPowerShellTest("Test-MigrationAzureReservedIP");
197197
}
198198

199+
[Fact]
200+
[Trait(Category.AcceptanceType, Category.CheckIn)]
201+
public void TestAzureReservedIPWithIPTags()
202+
{
203+
this.RunPowerShellTest("Test-AzureReservedIPWithIPTags");
204+
}
205+
199206
[Fact]
200207
[Trait(Category.Service, Category.ServiceManagement)]
201208
[Trait(Category.AcceptanceType, Category.CheckIn)]

src/ServiceManagement/Common/Commands.ScenarioTest/SessionRecords/Microsoft.WindowsAzure.Commands.ScenarioTest.ServiceManagementTests/RunRedeployVirtualMachineTest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)