Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<Reference Include="Microsoft.Azure.Management.Network, Version=19.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Network.19.5.0-preview\lib\net452\Microsoft.Azure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that we should need to change Commands.Network or Commands.Profile . Were these changes intentional?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was auto-generated due to the new package version. reverting now.

</ItemGroup>
<ItemGroup>
<Compile Include="ApplicationGateway\ApplicationGatewayBaseCmdlet.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,18 @@
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ziwa-msft please revert the change made in this file

<Reference Include="Microsoft.Azure.Management.Sql, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.20.1-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.14\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.16\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
</Reference>
<Reference Include="System.Runtime" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="AfterBuild">
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/ResourceManager/Profile/Commands.Profile/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<package id="Microsoft.IdentityModel.Clients.ActiveDirectory" version="2.28.3" targetFramework="net452" />
<package id="Microsoft.Net.Http" version="2.2.28" targetFramework="net452" />
<package id="Microsoft.PowerShell.5.ReferenceAssemblies" version="1.1.0" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.13" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.15" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime" version="2.3.14" targetFramework="net452" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ziwa-msft please revert the change made in this file -- we have a separate PR open to update the version of ClientRuntime used throughout PowerShell

<package id="Microsoft.Rest.ClientRuntime.Azure" version="3.3.16" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="2.3.1" targetFramework="net452" />
<package id="Microsoft.Rest.ClientRuntime.Azure.TestFramework" version="1.7.2" targetFramework="net452" />
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net452" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,18 @@
</Reference>
<Reference Include="Microsoft.Azure.Management.Sql, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.20.0-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Sql.1.20.1-preview\lib\net452\Microsoft.Azure.Management.Sql.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Azure.Management.Storage">
<HintPath>..\..\..\packages\Microsoft.Azure.Management.Storage.2.4.0-preview\lib\net40\Microsoft.Azure.Management.Storage.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ziwa-msft please remove these references to ClientRuntime added in this file

<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.2.3.14\lib\net452\Microsoft.Rest.ClientRuntime.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Rest.ClientRuntime.Azure, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.Rest.ClientRuntime.Azure.3.3.16\lib\net452\Microsoft.Rest.ClientRuntime.Azure.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
Expand All @@ -67,6 +73,7 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="ScenarioTests\ManagedInstanceCrudScenarioTests.cs" />
<Compile Include="ScenarioTests\ManagedInstanceProtectorTests.cs" />
<Compile Include="ScenarioTests\ManagedInstanceKeyVaultKeyTests.cs" />
<Compile Include="ScenarioTests\TDECertificateTests.cs" />
Expand All @@ -89,6 +96,9 @@
<Compile Include="ScenarioTests\DatabaseReplicationTests.cs" />
<Compile Include="ScenarioTests\DatabaseCrudTests.cs" />
<Compile Include="ScenarioTests\DataMaskingTests.cs" />
<None Include="ScenarioTests\ManagedInstanceCrudScenarioTests.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="ScenarioTests\ManagedInstanceProtectorTests.ps1">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,31 @@ function Test-CreateManagedInstance
{
# Setup
$rg = Create-ResourceGroupForTest

$rgName = "mi-wcus-demo-rg"
$managedInstanceName = Get-ManagedInstanceName
$version = "12.0"
$managedInstanceLogin = "dummylogin"
$managedInstancePassword = "Un53cuRE!"
$subnetId = "/subscriptions/ee5ea899-0791-418f-9270-77cd8273794b/resourceGroups/cl_one/providers/Microsoft.Network/virtualNetworks/cl_initial/subnets/CooL"
$subnetId = "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/mi-wcus-demo-rg/providers/Microsoft.Network/virtualNetworks/mi-wcus-vnet/subnets/mi-subnet-managed-instances"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since MI is in GA now, can you please change this test to be fully automated? This includes creating the virtual network. Check out SQL virtual network firewall rules for an example.

$licenseType = "BasePrice"
$storageSizeInGB = 32
$vCore = 16
$skuName = "GP_Gen4"
$credentials = new-object System.Management.Automation.PSCredential($managedInstanceLogin, ($managedInstancePassword | ConvertTo-SecureString -asPlainText -Force))
$dnsZonePartner = "/subscriptions/a8c9a924-06c0-4bde-9788-e7b1370969e1/resourceGroups/mi-wcus-demo-rg/providers/Microsoft.Sql/managedInstances/milevamaric-pilot-gp-00"

try
{
# With SKU name specified
$job = New-AzureRmSqlManagedInstance -ResourceGroupName $rg.ResourceGroupName -Name $managedInstanceName `
$job = New-AzureRmSqlManagedInstance -ResourceGroupName $rgName -Name $managedInstanceName `
-Location $rg.Location -AdministratorCredential $credentials -SubnetId $subnetId `
-LicenseType $licenseType -StorageSizeInGB $storageSizeInGB -Vcore $vCore -SkuName $skuName -AsJob
-LicenseType $licenseType -StorageSizeInGB $storageSizeInGB -Vcore $vCore -SkuName $skuName -DnsZonePartner $dnsZonePartner -AsJob
$job | Wait-Job
$managedInstance1 = $job.Output

Assert-AreEqual $managedInstance1.ManagedInstanceName $managedInstanceName
Assert-AreEqual $managedInstance1.Location $rg.Location
Assert-AreEqual $managedInstance1.ResourceGroupName $rg.ResourceGroupName
Assert-AreEqual $managedInstance1.ResourceGroupName $rgName
Assert-AreEqual $managedInstance1.Sku.Name $skuName
Assert-AreEqual $managedInstance1.AdministratorLogin $managedInstanceLogin
Assert-AreEqual $managedInstance1.SubnetId $subnetId
Expand All @@ -59,15 +60,15 @@ function Test-CreateManagedInstance
$managedInstanceName = Get-ManagedInstanceName

# With edition and computeGeneration specified
$job = New-AzureRmSqlManagedInstance -ResourceGroupName $rg.ResourceGroupName -Name $managedInstanceName `
$job = New-AzureRmSqlManagedInstance -ResourceGroupName $rgName -Name $managedInstanceName `
-Location $rg.Location -AdministratorCredential $credentials -SubnetId $subnetId `
-LicenseType $licenseType -StorageSizeInGB $storageSizeInGB -Vcore $vCore -Edition $edition -ComputeGeneration $computeGeneration -AsJob
$job | Wait-Job
$managedInstance1 = $job.Output

Assert-AreEqual $managedInstance1.ManagedInstanceName $managedInstanceName
Assert-AreEqual $managedInstance1.Location $rg.Location
Assert-AreEqual $managedInstance1.ResourceGroupName $rg.ResourceGroupName
Assert-AreEqual $managedInstance1.ResourceGroupName $rgName
Assert-AreEqual $managedInstance1.Sku.Name $skuName
Assert-AreEqual $managedInstance1.AdministratorLogin $managedInstanceLogin
Assert-AreEqual $managedInstance1.SubnetId $subnetId
Expand Down
Loading