Skip to content

Commit 973a37c

Browse files
authored
[NetAppFiles] update to 2025-01-01v2 (#27695)
1 parent 8fa959d commit 973a37c

18 files changed

+335
-76
lines changed

src/NetAppFiles/NetAppFiles/Account/NewNetAppFilesAccount.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ public class NewAzureRmNetAppFilesAccount : AzureNetAppFilesCmdletBase
121121
[ValidateNotNullOrEmpty]
122122
public string FederatedClientId { get; set; }
123123

124+
[Parameter(
125+
ParameterSetName = FieldsParameterSet,
126+
Mandatory = false,
127+
HelpMessage = "Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes.")]
128+
[ValidateNotNullOrEmpty]
129+
public string NfsV4IdDomain { get; set; }
130+
124131
[Parameter(
125132
Mandatory = false,
126133
HelpMessage = "A hashtable which represents resource tags")]
@@ -172,7 +179,8 @@ public override void ExecuteCmdlet()
172179
Location = Location,
173180
ActiveDirectories = ActiveDirectory?.ConvertFromPs(),
174181
Tags = tagPairs,
175-
Encryption = Encryption?.ConvertFromPs()
182+
Encryption = Encryption?.ConvertFromPs(),
183+
NfsV4IdDomain = NfsV4IdDomain
176184
};
177185
if (IdentityType != null && IdentityType.Contains("UserAssigned"))
178186
{

src/NetAppFiles/NetAppFiles/Account/SetNetAppFilesAccount.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ public class SetAzureRmNetAppFilesAccount : AzureNetAppFilesCmdletBase
6868
[ValidateNotNullOrEmpty]
6969
public PSNetAppFilesActiveDirectory[] ActiveDirectory { get; set; }
7070

71+
[Parameter(
72+
ParameterSetName = FieldsParameterSet,
73+
Mandatory = false,
74+
HelpMessage = "Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes.")]
75+
[ValidateNotNullOrEmpty]
76+
public string NfsV4IdDomain { get; set; }
77+
7178
[Parameter(
7279
Mandatory = false,
7380
HelpMessage = "A hashtable which represents resource tags")]
@@ -107,7 +114,8 @@ public override void ExecuteCmdlet()
107114
{
108115
Location = Location,
109116
ActiveDirectories = (ActiveDirectory != null) ? ActiveDirectory.ConvertFromPs() : new List<Management.NetApp.Models.ActiveDirectory>(),
110-
Tags = tagPairs
117+
Tags = tagPairs,
118+
NfsV4IdDomain = NfsV4IdDomain
111119
};
112120

113121
if (ShouldProcess(Name, string.Format(PowerShell.Cmdlets.NetAppFiles.Properties.Resources.CreateResourceMessage, ResourceGroupName)))

src/NetAppFiles/NetAppFiles/Account/UpdateNetAppFilesAccount.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ public class UpdateAzureRmNetAppFilesAccount : AzureNetAppFilesCmdletBase
130130
[ValidateNotNullOrEmpty]
131131
public string FederatedClientId { get; set; }
132132

133+
[Parameter(
134+
ParameterSetName = FieldsParameterSet,
135+
Mandatory = false,
136+
HelpMessage = "Domain for NFSv4 user ID mapping. This property will be set for all NetApp accounts in the subscription and region and only affect non ldap NFSv4 volumes.")]
137+
[ValidateNotNullOrEmpty]
138+
public string NfsV4IdDomain { get; set; }
139+
133140
[Parameter(
134141
ParameterSetName = ObjectParameterSet,
135142
Mandatory = true,
@@ -189,7 +196,8 @@ public override void ExecuteCmdlet()
189196
Location = Location,
190197
ActiveDirectories = (ActiveDirectory != null) ? ActiveDirectory.ConvertFromPs() : null,
191198
Tags = tagPairs,
192-
Encryption = Encryption?.ConvertFromPs()
199+
Encryption = Encryption?.ConvertFromPs(),
200+
NfsV4IdDomain = NfsV4IdDomain
193201
};
194202
if (IdentityType != null && IdentityType.Contains("UserAssigned"))
195203
{

src/NetAppFiles/NetAppFiles/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added `NfsV4IdDomain` to `New-AzNetAppFilesAccount` and `Update-AzNetAppFilesAccount`
2122

2223
## Version 0.22.0
2324
* Added `FederatedClientId` to `New-AzNetAppFilesAccount` and `Update-AzNetAppFilesAccount`

src/NetAppFiles/NetAppFiles/Helpers/BackupExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public static PSNetAppFilesBackup ConvertToPs(this Management.NetApp.Models.Back
3737
VolumeResourceId = backup.VolumeResourceId,
3838
UseExistingSnapshot = backup.UseExistingSnapshot,
3939
SnapshotName = backup.SnapshotName,
40-
CreationDate = backup.CreationDate
40+
CreationDate = backup.CreationDate,
41+
IsLargeVolume = backup.IsLargeVolume,
4142
};
4243
return psBackup;
4344
}

src/NetAppFiles/NetAppFiles/Helpers/ModelExtensions.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static class ModelExtensions
4646
Administrators = psActiveDirectory.Administrators,
4747
EncryptDcConnections = psActiveDirectory.EncryptDCConnections,
4848
PreferredServersForLdapClient = psActiveDirectory.PreferredServersForLdapClient is null ? null: string.Join(",", psActiveDirectory.PreferredServersForLdapClient),
49-
LdapSearchScope = psActiveDirectory.LdapSearchScope?.ConvertFromPs()
49+
LdapSearchScope = psActiveDirectory.LdapSearchScope?.ConvertFromPs()
5050
}).ToList();
5151
}
5252

@@ -103,7 +103,9 @@ public static PSNetAppFilesAccount ToPsNetAppFilesAccount(this NetAppAccount net
103103
ActiveDirectories = (netAppAccount.ActiveDirectories != null) ? netAppAccount.ActiveDirectories.ConvertToPs(resourceGroupName, netAppAccount.Name) : null,
104104
ProvisioningState = netAppAccount.ProvisioningState,
105105
Identity = netAppAccount.Identity.ConvertToPs(),
106-
SystemData = netAppAccount.SystemData?.ToPsSystemData()
106+
SystemData = netAppAccount.SystemData?.ToPsSystemData(),
107+
MultiAdStatus = netAppAccount.MultiAdStatus,
108+
NfsV4IdDomain= netAppAccount.NfsV4IdDomain
107109
};
108110
}
109111

@@ -233,6 +235,7 @@ public static PSNetAppFilesVolumeDataProtection ConvertDataProtectionToPs(Volume
233235
replication.RemoteVolumeResourceId = DataProtection.Replication.RemoteVolumeResourceId;
234236
replication.RemoteVolumeRegion = DataProtection.Replication.RemoteVolumeRegion;
235237
replication.RemotePath = DataProtection.Replication?.RemotePath?.ConvertToPs();
238+
replication.DestinationReplications = DataProtection.Replication?.DestinationReplications?.ConvertToPs();
236239
psDataProtection.Replication = replication;
237240
}
238241
if (DataProtection.Snapshot != null)
@@ -294,7 +297,7 @@ public static VolumePropertiesDataProtection ConvertDataProtectionFromPs(PSNetAp
294297
replication.ReplicationSchedule = psDataProtection.Replication.ReplicationSchedule;
295298
replication.RemoteVolumeResourceId = psDataProtection.Replication.RemoteVolumeResourceId;
296299
replication.RemoteVolumeRegion = psDataProtection.Replication.RemoteVolumeRegion;
297-
replication.RemotePath = psDataProtection.Replication.RemotePath?.ConvertFromPs();
300+
replication.RemotePath = psDataProtection.Replication.RemotePath?.ConvertFromPs();
298301
dataProtection.Replication = replication;
299302
}
300303

src/NetAppFiles/NetAppFiles/Helpers/NetAppAccountExtensions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public static PSNetAppFilesAccount ConvertToPs(this NetAppAccount netAppAccount)
4141
Identity = netAppAccount.Identity?.ConvertToPs(),
4242
DisableShowmount = netAppAccount.DisableShowmount,
4343
Encryption = netAppAccount.Encryption?.ConvertToPs(),
44-
SystemData = netAppAccount.SystemData?.ToPsSystemData()
44+
SystemData = netAppAccount.SystemData?.ToPsSystemData(),
45+
MultiAdStatus = netAppAccount.MultiAdStatus
4546
};
4647
}
4748

src/NetAppFiles/NetAppFiles/Helpers/ReplicationExtensions.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
using Microsoft.Azure.Commands.NetAppFiles.Models;
1818
using System.Collections.Generic;
1919
using System.Linq;
20+
using Microsoft.Azure.PowerShell.Cmdlets.NetAppFiles.Models;
2021

2122
namespace Microsoft.Azure.Commands.NetAppFiles.Helpers
2223
{
@@ -29,7 +30,7 @@ public static PSNetAppFilesReplication ConvertToPs(this Management.NetApp.Models
2930
ReplicationId = replication.ReplicationId,
3031
EndpointType = replication.EndpointType,
3132
RemoteVolumeRegion = replication.RemoteVolumeRegion,
32-
RemoteVolumeResourceId = replication.RemoteVolumeResourceId,
33+
RemoteVolumeResourceId = replication.RemoteVolumeResourceId
3334
};
3435
return psReplicaitonObject;
3536
}
@@ -49,5 +50,21 @@ public static PSSvmPeerCommandResponse ConvertToPs(this Management.NetApp.Models
4950
return psSvmPeerCommandResponse;
5051
}
5152

53+
public static PSNetAppFilesDestinationReplication ConvertToPs(this Management.NetApp.Models.DestinationReplication destinationReplication)
54+
{
55+
PSNetAppFilesDestinationReplication pSNetAppFilesDestinationReplication = new PSNetAppFilesDestinationReplication
56+
{
57+
Region = destinationReplication.Region,
58+
ReplicationType = destinationReplication.ReplicationType,
59+
ResourceId = destinationReplication.ResourceId,
60+
Zone = destinationReplication.Zone
61+
};
62+
return pSNetAppFilesDestinationReplication;
63+
}
64+
65+
public static List<PSNetAppFilesDestinationReplication> ConvertToPs(this IEnumerable<Management.NetApp.Models.DestinationReplication> destinationReplications)
66+
{
67+
return destinationReplications.Select(e => e.ConvertToPs()).ToList();
68+
}
5269
}
5370
}

src/NetAppFiles/NetAppFiles/Models/PSNetAppFilesAccount.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,17 @@ public class PSNetAppFilesAccount
8787
/// for all volumes under the subscription, null equals false
8888
/// </summary>
8989
public bool? DisableShowmount {get; set;}
90+
91+
/// <summary>
92+
/// Gets or sets NfsV4IdDomain
93+
/// Shows the status of NfsV4IdDomain
94+
/// </summary>
95+
public string NfsV4IdDomain { get; set; }
96+
97+
/// <summary>
98+
/// Gets or sets MultiAdStatus
99+
/// Shows the status of MultiAdStatus
100+
/// </summary>
101+
public string MultiAdStatus { get; set; }
90102
}
91103
}

src/NetAppFiles/NetAppFiles/Models/PSNetAppFilesBackup.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class PSNetAppFilesBackup
3030
/// Gets or sets Resource location
3131
/// </summary>
3232
public string Location { get; set; }
33-
33+
3434
/// <summary>
3535
/// Gets resource Id
3636
/// </summary>
@@ -113,5 +113,13 @@ public class PSNetAppFilesBackup
113113
/// The name of the snapshot
114114
/// </remarks>
115115
public string SnapshotName { get; set; }
116+
117+
/// <summary>
118+
/// Gets IsLargeVolume
119+
/// </summary>
120+
/// <remarks>
121+
/// Specifies if the backup is for a large volume
122+
/// </remarks>
123+
public bool? IsLargeVolume { get; set; }
116124
}
117125
}

0 commit comments

Comments
 (0)