Skip to content

Commit abdff64

Browse files
sambitrathawyunchi-ms
authored andcommitted
[RecoveryServices.Backup] SDK Update (Azure#10528)
[RecoveryServices.Backup] SDK Update
1 parent debc45c commit abdff64

File tree

65 files changed

+3092079
-4918126
lines changed

Some content is hidden

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

65 files changed

+3092079
-4918126
lines changed

src/RecoveryServices/RecoveryServices.Backup.Helpers/RecoveryServices.Backup.Helpers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="3.1.2-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="4.0.0-preview" />
1616
<PackageReference Include="TimeZoneConverter" Version="3.0.0" />
1717
</ItemGroup>
1818

src/RecoveryServices/RecoveryServices.Backup.Models/RecoveryServices.Backup.Models.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="3.1.2-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="4.0.0-preview" />
1616
</ItemGroup>
1717

1818
</Project>

src/RecoveryServices/RecoveryServices.Backup.Providers/RecoveryServices.Backup.Providers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="3.1.2-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="4.0.0-preview" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

src/RecoveryServices/RecoveryServices.Backup.ServiceClientAdapter/RecoveryServices.Backup.ServiceClientAdapter.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
<ItemGroup>
1515
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices" Version="4.2.1-preview" />
16-
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="3.1.2-preview" />
16+
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="4.0.0-preview" />
1717
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.4.1" />
1818
</ItemGroup>
1919

src/RecoveryServices/RecoveryServices.Backup.Test/RecoveryServices.Backup.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="30.1.0" />
1515
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.17.0-preview" />
1616
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices" Version="4.2.1-preview" />
17-
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="3.1.2-preview" />
17+
<PackageReference Include="Microsoft.Azure.Management.RecoveryServices.Backup" Version="4.0.0-preview" />
1818
</ItemGroup>
1919

2020
<ItemGroup>
@@ -25,4 +25,4 @@
2525
<None Update="ScenarioTests\**\*.ps1" CopyToOutputDirectory="PreserveNewest" />
2626
</ItemGroup>
2727

28-
</Project>
28+
</Project>

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/AzureFiles/Common.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
# ----------------------------------------------------------------------------------
1414

1515
$location = "southeastasia"
16-
$resourceGroupName = "pstestFSRG1bca8f8e"
17-
$vaultName = "PSTestFSRSV1bca8f8e"
18-
$fileShareFriendlyName = "pstestfs1bca8f8e"
19-
$fileShareName = "AzureFileShare;pstestfs1bca8f8e"
20-
$saName = "pstestsa1bca8f8e"
16+
$resourceGroupName = "pstestrg8895"
17+
$vaultName = "pstestrsv8895"
18+
$fileShareFriendlyName = "fs1"
19+
$fileShareName = "AzureFileShare;fs1"
20+
$saName = "pstestsa8895"
2121
$skuName="Standard_LRS"
22-
$policyName = "AFSBackupPolicy"
22+
$policyName = "afspolicy1"
2323

2424
# Setup Instructions:
2525
# 1. Create a resource group

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/AzureFiles/ContainerTests.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
# ----------------------------------------------------------------------------------
1414

1515
$location = "southeastasia"
16-
$resourceGroupName = "pstestFSRG1bca8f8e"
17-
$vaultName = "PSTestFSRSV1bca8f8e"
18-
$fileShareFriendlyName = "pstestfs1bca8f8e"
19-
$fileShareName = "AzureFileShare;pstestfs1bca8f8e"
20-
$saName = "pstestsa1bca8f8e"
16+
$resourceGroupName = "pstestrg8895"
17+
$vaultName = "pstestrsv8895"
18+
$fileShareFriendlyName = "fs1"
19+
$fileShareName = "AzureFileShare;fs1"
20+
$saName = "pstestsa8895"
2121
$skuName="Standard_LRS"
22-
$policyName = "AFSBackupPolicy"
22+
$policyName = "afspolicy1"
2323

2424
# Setup Instructions:
2525
# 1. Create a resource group

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/AzureFiles/ItemTests.ps1

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
# ----------------------------------------------------------------------------------
1414

1515
$location = "southeastasia"
16-
$resourceGroupName = "pstestFSRG1bca8f8e"
17-
$vaultName = "PSTestFSRSV1bca8f8e"
18-
$fileShareFriendlyName = "pstestfs1bca8f8e"
19-
$fileShareName = "AzureFileShare;pstestfs1bca8f8e"
20-
$saName = "pstestsa1bca8f8e"
21-
$saRgName = "pstestFSRG1bca8f8e"
22-
$targetSaName = "pstestsa3rty7d7s"
23-
$targetFileShareName = "pstestfs3rty7d7s"
16+
$resourceGroupName = "pstestrg8895"
17+
$vaultName = "pstestrsv8895"
18+
$fileShareFriendlyName = "fs1"
19+
$fileShareName = "AzureFileShare;fs1"
20+
$saName = "pstestsa8895"
21+
$saRgName = "pstestrg8895"
22+
$targetSaName = "pstesttargetsa8896"
23+
$targetFileShareName = "fs1"
2424
$targetFolder = "pstestfolder3rty7d7s"
2525
$folderPath = "pstestfolder1bca8f8e"
2626
$filePath = "pstestfolder1bca8f8e/pstestfile1bca8f8e.txt"
2727
$skuName="Standard_LRS"
28-
$policyName = "AFSBackupPolicy"
28+
$policyName = "afspolicy1"
2929
$newPolicyName = "NewAFSBackupPolicy"
3030

3131
# Setup Instructions:

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/AzureFiles/JobTests.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
# ----------------------------------------------------------------------------------
1414

1515
$location = "southeastasia"
16-
$resourceGroupName = "pstestFSRG1bca8f8e"
17-
$vaultName = "PSTestFSRSV1bca8f8e"
18-
$fileShareFriendlyName = "pstestfs1bca8f8e"
19-
$fileShareName = "AzureFileShare;pstestfs1bca8f8e"
20-
$saName = "pstestsa1bca8f8e"
16+
$resourceGroupName = "pstestrg8895"
17+
$vaultName = "pstestrsv8895"
18+
$fileShareFriendlyName = "fs1"
19+
$fileShareName = "AzureFileShare;fs1"
20+
$saName = "pstestsa8895"
2121
$skuName="Standard_LRS"
22-
$policyName = "AFSBackupPolicy"
22+
$policyName = "afspolicy1"
2323

2424
# Setup Instructions:
2525
# 1. Create a resource group

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/AzureFiles/PolicyTests.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
# ----------------------------------------------------------------------------------
1414

1515
$location = "southeastasia"
16-
$resourceGroupName = "pstestFSRG1bca8f8e"
17-
$vaultName = "PSTestFSRSV1bca8f8e"
18-
$fileShareFriendlyName = "pstestfs1bca8f8e"
19-
$fileShareName = "AzureFileShare;pstestfs1bca8f8e"
20-
$saName = "pstestsa1bca8f8e"
16+
$resourceGroupName = "pstestrg8895"
17+
$vaultName = "pstestrsv8895"
18+
$fileShareFriendlyName = "fs1"
19+
$fileShareName = "AzureFileShare;fs1"
20+
$saName = "pstestsa8895"
2121
$skuName="Standard_LRS"
2222
$newPolicyName = "newFilePolicy"
2323

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/AzureFiles/ProtectionCheckTests.ps1

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313
# ----------------------------------------------------------------------------------
1414

1515
$location = "southeastasia"
16-
$resourceGroupName = "pstestFSRG1bca8f8e"
17-
$vaultName = "PSTestFSRSV1bca8f8e"
18-
$fileShareFriendlyName = "pstestfs1bca8f8e"
19-
$fileShareName = "AzureFileShare;pstestfs1bca8f8e"
20-
$saName = "pstestsa1bca8f8e"
16+
$resourceGroupName = "pstestrg8895"
17+
$vaultName = "pstestrsv8895"
18+
$fileShareFriendlyName = "fs1"
19+
$fileShareName = "AzureFileShare;fs1"
20+
$saName = "pstestsa8895"
2121
$skuName="Standard_LRS"
22-
$policyName = "AFSBackupPolicy"
23-
$storageAccountId = "/subscriptions/da364f0f-307b-41c9-9d47-b7413ec45535/resourceGroups/pstestFSRG1bca8f8e/providers/Microsoft.Storage/storageAccounts/pstestsa1bca8f8e"
22+
$policyName = "afspolicy1"
23+
$storageAccountId = "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/pstestrg8895/providers/Microsoft.Storage/storageAccounts/pstestsa8895"
2424

2525
# Setup Instructions:
2626
# 1. Create a resource group

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/AzureWorkload/Common.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
1414

15-
$containerName = "pstestwlvm1bca8"
15+
$containerName = "psbvtsqlvm"
1616
$resourceGroupName = "pstestwlRG1bca8"
1717
$vaultName = "pstestwlRSV1bca8"
18-
$resourceId = "/subscriptions/da364f0f-307b-41c9-9d47-b7413ec45535/resourceGroups/pstestwlRG1bca8/providers/Microsoft.Compute/virtualMachines/pstestwlvm1bca8"
18+
$resourceId = "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/pscloudtestrg/providers/Microsoft.Compute/virtualMachines/psbvtsqlvm"
1919
$policyName = "HourlyLogBackup"
2020

2121
function Enable-Protection(

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/AzureWorkload/ContainerTests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
1414

15-
$containerName = "pstestwlvm1bca8"
15+
$containerName = "psbvtsqlvm"
1616
$resourceGroupName = "pstestwlRG1bca8"
1717
$vaultName = "pstestwlRSV1bca8"
18-
$resourceId = "/subscriptions/da364f0f-307b-41c9-9d47-b7413ec45535/resourceGroups/pstestwlRG1bca8/providers/Microsoft.Compute/virtualMachines/pstestwlvm1bca8"
18+
$resourceId = "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/pscloudtestrg/providers/Microsoft.Compute/virtualMachines/psbvtsqlvm"
1919

2020
function Get-AzureVmWorkloadContainer
2121
{

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/AzureWorkload/ItemTests.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
1414

15-
$containerName = "pstestwlvm1bca8"
15+
$containerName = "psbvtsqlvm"
1616
$resourceGroupName = "pstestwlRG1bca8"
1717
$vaultName = "pstestwlRSV1bca8"
18-
$resourceId = "/subscriptions/da364f0f-307b-41c9-9d47-b7413ec45535/resourceGroups/pstestwlRG1bca8/providers/Microsoft.Compute/virtualMachines/pstestwlvm1bca8"
18+
$resourceId = "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/pscloudtestrg/providers/Microsoft.Compute/virtualMachines/psbvtsqlvm"
1919
$resourceIdForFileDB = "/subscriptions/f879818f-5b29-4a43-8961-34169783144f/resourceGroups/psbvtrg/providers/Microsoft.Compute/virtualMachines/psbvtsqlvm"
2020
$policyName = "HourlyLogBackup"
2121
$instanceName = "sqlinstance;mssqlserver"
@@ -230,7 +230,7 @@ function Test-AzureVmWorkloadEnableAutoProtectableItem
230230
-Container $container `
231231
-WorkloadType MSSQL;
232232

233-
Assert-True { $items.Count -eq 4 }
233+
Assert-True { $items.Count -eq 1 }
234234

235235
foreach($protectedItem in $items)
236236
{

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/AzureWorkload/JobTests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
# limitations under the License.
1414
# ----------------------------------------------------------------------------------
1515

16-
$containerName = "pstestwlvm1bca8"
16+
$containerName = "psbvtsqlvm"
1717
$resourceGroupName = "pstestwlRG1bca8"
1818
$vaultName = "pstestwlRSV1bca8"
19-
$resourceId = "/subscriptions/da364f0f-307b-41c9-9d47-b7413ec45535/resourceGroups/pstestwlRG1bca8/providers/Microsoft.Compute/virtualMachines/pstestwlvm1bca8"
19+
$resourceId = "/subscriptions/38304e13-357e-405e-9e9a-220351dcce8c/resourceGroups/pscloudtestrg/providers/Microsoft.Compute/virtualMachines/psbvtsqlvm"
2020
$policyName = "HourlyLogBackup"
2121

2222
function Test-AzureVmWorkloadGetJob

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/AzureWorkload/PolicyTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# limitations under the License.
1313
# ----------------------------------------------------------------------------------
1414

15-
$location = "westus"
15+
$location = "southeastasia"
1616
$resourceGroupName = "pstestwlRG1bca8"
1717
$vaultName = "pstestwlRSV1bca8"
1818
$newPolicyName = "testSqlPolicy"

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/Common.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,13 @@
148148
else
149149
{
150150
$queryDateString = [Microsoft.Azure.Test.HttpRecorder.HttpMockServer]::Variables[$variableName]
151-
$queryDate = Get-Date $queryDateString
151+
$month = $queryDateString.Substring(0, 2)
152+
$day = $queryDateString.Substring(3, 2)
153+
$year = $queryDateString.Substring(6, 4)
154+
$hour = $queryDateString.Substring(11, 2)
155+
$minute = $queryDateString.Substring(14, 2)
156+
$second = $queryDateString.Substring(17, 2)
157+
$queryDate = Get-Date -Day $day -Month $month -Year $year -Hour $hour -Minute $minute -Second $second
152158
}
153159
return $queryDate
154160
}

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/IaasVm/Common.ps1

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,18 @@ function Create-VM(
5858
$Password=$PasswordString| ConvertTo-SecureString -Force -AsPlainText
5959
$Credential=New-Object PSCredential($UserName,$Password)
6060

61+
$tags = @{"MabUsed"="Yes"}
62+
$tags += @{"Owner"="sarath"}
63+
$tags += @{"Purpose"="PSTest"}
64+
$tags += @{"AutoShutDown"="No"}
65+
$tags += @{"DeleteBy"="05-2020"}
66+
6167
$vmConfig = New-AzVMConfig -VMName $vmName -VMSize Standard_D1 | `
6268
Set-AzVMOperatingSystem -Windows -ComputerName $vmName -Credential $Credential | `
6369
Set-AzVMSourceImage -PublisherName MicrosoftWindowsServer -Offer WindowsServer `
6470
-Skus 2016-Datacenter -Version latest | Add-AzVMNetworkInterface -Id $nic.Id
6571

66-
New-AzVM -ResourceGroupName $resourceGroupName -Location $location -VM $vmConfig | Out-Null
72+
New-AzVM -ResourceGroupName $resourceGroupName -Location $location -VM $vmConfig -Tag $tags | Out-Null
6773
$vm = Get-AzVM -ResourceGroupName $resourceGroupName -Name $vmName
6874
}
6975

@@ -131,14 +137,19 @@ function Create-UnmanagedVM(
131137
$vm = Set-AzVMSourceImage -VM $vm -PublisherName $pubName -Offer $offerName -Skus $skuName -Version "latest"
132138
$vm = Add-AzVMNetworkInterface -VM $vm -Id $NIC.Id
133139

140+
$tags = @{"MabUsed"="Yes"}
141+
$tags += @{"Owner"="sarath"}
142+
$tags += @{"Purpose"="PSTest"}
143+
$tags += @{"AutoShutDown"="No"}
144+
$tags += @{"DeleteBy"="05-2020"}
134145

135146
$sa = Get-AzStorageAccount -ResourceGroupName $resourceGroupName -Name $saname
136147
$diskName = "mydisk"
137148
$OSDiskUri = $sa.PrimaryEndpoints.Blob.ToString() + "vhds/" + $diskName? + ".vhd"
138149

139150
$vm = Set-AzVMOSDisk -VM $vm -Name $diskName -VhdUri $OSDiskUri -CreateOption fromImage
140151

141-
New-AzVM -ResourceGroupName $resourceGroupName -Location $location -VM $vm | Out-Null
152+
New-AzVM -ResourceGroupName $resourceGroupName -Location $location -VM $vm -Tag $tags | Out-Null
142153
}
143154

144155
return $vm

src/RecoveryServices/RecoveryServices.Backup.Test/ScenarioTests/IaasVm/ContainerTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Test Recovery Services Backup Vault
1919

2020
function Test-AzureVMGetContainers
2121
{
22-
$location = Get-ResourceGroupLocation
22+
$location = "southeastasia"
2323
$resourceGroupName = Create-ResourceGroup $location
2424

2525
try

0 commit comments

Comments
 (0)