Skip to content

Commit

Permalink
[NetAppFiles] Anf 7405 update for api version 2020 07 01 (#13576)
Browse files Browse the repository at this point in the history
* bump to API version 2020-07-01

* Update link to ANF docs site

* Update ChangeLog.md

Co-authored-by: Audunn Baldvinsson <[email protected]>
Co-authored-by: Jin Lei <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2020
1 parent 354dc14 commit 58b9c12
Show file tree
Hide file tree
Showing 35 changed files with 12,025 additions and 23,735 deletions.
2 changes: 1 addition & 1 deletion src/NetAppFiles/NetAppFiles.Test/NetAppFiles.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.NetApp" Version="1.7.0" />
<PackageReference Include="Microsoft.Azure.Management.NetApp" Version="1.8.0" />
<PackageReference Include="Microsoft.Azure.Management.Network" Version="20.2.0" />
</ItemGroup>

Expand Down
10 changes: 7 additions & 3 deletions src/NetAppFiles/NetAppFiles.Test/ScenarioTests/SnapshotTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function Test-SnapshotCrud
$gibibyte = 1024 * 1024 * 1024
$usageThreshold = 100 * $gibibyte
$doubleUsage = 2 * $usageThreshold
$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
#$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus2euap" -UseCanonical
$resourceLocation = "eastus2euap"
$subnetName = "default"
$standardPoolSize = 4398046511104
$serviceLevel = "Premium"
Expand Down Expand Up @@ -117,7 +118,8 @@ function Test-SnapshotPipelines
$gibibyte = 1024 * 1024 * 1024
$usageThreshold = 100 * $gibibyte
$doubleUsage = 2 * $usageThreshold
$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
#$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
$resourceLocation = "eastus2euap"
$subnetName = "default"
$poolSize = 4398046511104
$serviceLevel = "Premium"
Expand Down Expand Up @@ -179,6 +181,7 @@ function Test-CreateVolumeFromSnapshot
$usageThreshold = 100 * $gibibyte
$doubleUsage = 2 * $usageThreshold
$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
$resourceLocation = "eastus2euap"
$subnetName = "default"
$standardPoolSize = 4398046511104
$serviceLevel = "Premium"
Expand Down Expand Up @@ -251,7 +254,8 @@ function Test-RestoreVolumeFromSnapshot
$gibibyte = 1024 * 1024 * 1024
$usageThreshold = 100 * $gibibyte
$doubleUsage = 2 * $usageThreshold
$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
#$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
$resourceLocation = "eastus2euap"
$subnetName = "default"
$standardPoolSize = 4398046511104
$serviceLevel = "Premium"
Expand Down
10 changes: 7 additions & 3 deletions src/NetAppFiles/NetAppFiles.Test/ScenarioTests/VolumeTests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ function Test-VolumeCrud
$gibibyte = 1024 * 1024 * 1024
$usageThreshold = 100 * $gibibyte
$doubleUsage = 2 * $usageThreshold
$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
#$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
$resourceLocation = "eastus2euap"
$subnetName = "default"
$poolSize = 4398046511104
$serviceLevel = "Premium"
Expand Down Expand Up @@ -411,7 +412,8 @@ function Test-SetVolumePool
$volName1 = Get-ResourceName
$gibibyte = 1024 * 1024 * 1024
$usageThreshold = 100 * $gibibyte
$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
#$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
$resourceLocation = "westus2"
$subnetName = "default"
$poolSize = 4398046511104
$serviceLevel = "Premium"
Expand Down Expand Up @@ -518,7 +520,9 @@ function Test-VolumePipelines
$gibibyte = 1024 * 1024 * 1024
$usageThreshold = 100 * $gibibyte
$doubleUsage = 2 * $usageThreshold
$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
#$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "eastus" -UseCanonical
#$resourceLocation = Get-ProviderLocation "Microsoft.NetApp" "westcentralus" -UseCanonical
$resourceLocation = "westus2"
$subnetName = "default"
$poolSize = 4398046511104
$serviceLevel = "Premium"
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/NetAppFiles/NetAppFiles.sln
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30413.136
Expand Down Expand Up @@ -41,6 +40,10 @@ Global
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{142D7B0B-388A-4CEB-A228-7F6D423C5C2E}.Release|Any CPU.Build.0 = Release|Any CPU
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6BD6B80A-06AF-4B5B-9230-69CCFC6C8D64}.Release|Any CPU.Build.0 = Release|Any CPU
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF81DC73-B8EC-4082-8841-4FBF2B16E7CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion src/NetAppFiles/NetAppFiles/Az.NetAppFiles.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Copyright = 'Microsoft Corporation. All rights reserved.'
# Description of the functionality provided by this module
Description = 'Microsoft Azure PowerShell - Azure NetApp Files (ANF) service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.
For more information on Azure NetApp Files (ANF), please visit the following: https://docs.microsoft.com/azure/NetAppFiles/'
For more information on Azure NetApp Files (ANF), please visit the following: https://docs.microsoft.com/azure/azure-netapp-files/'

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '5.1'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using System.Globalization;
using Microsoft.Azure.Commands.NetAppFiles.Helpers;
using Microsoft.Azure.Management.Monitor.Version2018_09_01.Models;
using System.Collections.Generic;

namespace Microsoft.Azure.Commands.NetAppFiles.BackupPolicy
{
Expand Down Expand Up @@ -124,11 +125,23 @@ public override void ExecuteCmdlet()
var NameParts = AccountObject.Name.Split('/');
AccountName = NameParts[0];
}
IDictionary<string, string> tagPairs = null;

if (Tag != null)
{
tagPairs = new Dictionary<string, string>();

foreach (string key in Tag.Keys)
{
tagPairs.Add(key, Tag[key].ToString());
}
}

var backupPolicyBody = new Management.NetApp.Models.BackupPolicy()
{
Location = Location,
Enabled = Enabled,
Tags = tagPairs,
DailyBackupsToKeep = DailyBackupsToKeep,
WeeklyBackupsToKeep = WeeklyBackupsToKeep,
MonthlyBackupsToKeep = MonthlyBackupsToKeep,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using System.Globalization;
using Microsoft.Azure.Commands.NetAppFiles.Helpers;
using Microsoft.Azure.Management.Internal.Resources.Utilities.Models;
using System.Collections.Generic;

namespace Microsoft.Azure.Commands.NetAppFiles.BackupPolicy
{
Expand Down Expand Up @@ -133,6 +134,17 @@ public class UpdateAzureRmNetAppFilesBackupPolicy : AzureNetAppFilesCmdletBase

public override void ExecuteCmdlet()
{
IDictionary<string, string> tagPairs = null;

if (Tag != null)
{
tagPairs = new Dictionary<string, string>();

foreach (string key in Tag.Keys)
{
tagPairs.Add(key, Tag[key].ToString());
}
}
if (ParameterSetName == ResourceIdParameterSet)
{
var resourceIdentifier = new ResourceIdentifier(this.ResourceId);
Expand All @@ -159,6 +171,7 @@ public override void ExecuteCmdlet()
var backupPolicyPatch = new Management.NetApp.Models.BackupPolicyPatch()
{
Location = Location,
Tags = tagPairs,
DailyBackupsToKeep = DailyBackupsToKeep,
WeeklyBackupsToKeep = WeeklyBackupsToKeep,
MonthlyBackupsToKeep = MonthlyBackupsToKeep,
Expand Down
3 changes: 3 additions & 0 deletions src/NetAppFiles/NetAppFiles/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
- Additional information about change #1
-->
## Upcoming Release
* Added aesEncryption, ldapSigning properties to ActiveDirectory
* Fixed Tags in UpdateAzNetAppFilesBackupPolicy
* Return backupId in Backup and BackupPatch models

## Version 0.2.0

Expand Down
2 changes: 1 addition & 1 deletion src/NetAppFiles/NetAppFiles/Helpers/BackupExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static PSNetAppFilesBackup ConvertToPs(this Management.NetApp.Models.Back
Location = backup.Location,
Id = backup.Id,
Name = backup.Name,
//not in yet was missing from swagger BackupId = backup.BackupId,
BackupId = backup.BackupId,
Type = backup.Type,
BackupType = backup.Type,
Label = backup.Label,
Expand Down
13 changes: 13 additions & 0 deletions src/NetAppFiles/NetAppFiles/Models/PSNetAppFilesActiveDirectory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,5 +126,18 @@ public class PSNetAppFilesActiveDirectory
/// </value>
public string ServerRootCACertificate { get; set; }

/// <summary>
/// Gets or sets AesEncryption
/// </summary>
/// <value>If enabled, AES encryption will be enabled for SMB communication
/// </value>
public bool? AesEncryption { get; set; }

/// <summary>
/// Gets or sets LdapSigning
/// </summary>
/// <value>Specifies whether or not the LDAP traffic needs to be signed
/// </value>
public bool? LdapSigning { get; set; }
}
}
2 changes: 1 addition & 1 deletion src/NetAppFiles/NetAppFiles/NetAppFiles.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Management.NetApp" Version="1.7.0" />
<PackageReference Include="Microsoft.Azure.Management.NetApp" Version="1.8.0" />
</ItemGroup>

<ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/NetAppFiles/NetAppFiles/help/Az.NetAppFiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ Resume/Resync the connection on the destination volume. If the operation is ran
### [Set-AzNetAppFilesAccount](Set-AzNetAppFilesAccount.md)
Updates an Azure NetApp Files (ANF) account with the new data set. Useful for deletion of associated active directories.

### [Set-AzNetAppFilesVolumePool](Set-AzNetAppFilesVolumePool.md)
Change pool for an Azure NetApp Files (ANF) volume.

### [Suspend-AzNetAppFilesReplication](Suspend-AzNetAppFilesReplication.md)
Suspend/break the replication connection on the destination volume

### [Switch-AzNetAppFilesVolumePool](Switch-AzNetAppFilesVolumePool.md)
Change pool for an Azure NetApp Files (ANF) volume.

### [Update-AzNetAppFilesAccount](Update-AzNetAppFilesAccount.md)
Updates an Azure NetApp Files (ANF) account according to the optional modifiers provided.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Change pool for an Azure NetApp Files (ANF) volume.

### ByFieldsParameterSet (Default)
```
Set-AzNetAppFilesVolumePool -ResourceGroupName <String> -AccountName <String> -PoolName <String>
-Name <String> [-NewPoolResourceId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
Set-AzNetAppFilesVolumePool -ResourceGroupName <String> -AccountName <String> -PoolName <String> -Name <String>
[-NewPoolResourceId <String>] [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
[<CommonParameters>]
```

Expand Down Expand Up @@ -191,7 +191,7 @@ Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
```yaml
Type: System.Management.Automation.SetParameter
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: cf

Expand All @@ -207,7 +207,7 @@ Shows what would happen if the cmdlet runs.
The cmdlet is not run.
```yaml
Type: System.Management.Automation.SetParameter
Type: System.Management.Automation.SwitchParameter
Parameter Sets: (All)
Aliases: wi

Expand Down

0 comments on commit 58b9c12

Please sign in to comment.