Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NetApp] Update to 2022-09-01 add tests #34629

Merged
Merged
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
9f44957
update to 2022-09-01 add tests
audunn Mar 1, 2023
2814d39
pull from upstream
audunn Mar 2, 2023
21c6d1e
generate
audunn Mar 2, 2023
aec1f86
generate2
audunn Mar 2, 2023
dbc99d0
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn Mar 2, 2023
cb3486f
regenerate
audunn Mar 2, 2023
79e8801
tests run
audunn Mar 7, 2023
5b644e9
base
audunn Mar 8, 2023
fa81150
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn Mar 8, 2023
8d63b15
regenerate
audunn Mar 8, 2023
9eda623
re-run test
audunn Mar 9, 2023
04a30ea
re-run test
audunn Mar 9, 2023
05986d4
re-run test2
audunn Mar 9, 2023
0c7a740
fix type
audunn Mar 9, 2023
c757a1b
Add breakFileLockTest
audunn Mar 9, 2023
1e66daf
Add backupsRestoreFiles
audunn Mar 9, 2023
5645e89
EditorBrowsable, etc
audunn Mar 10, 2023
ab44757
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn Mar 10, 2023
9c24a27
test update2
audunn Mar 10, 2023
b7cf703
test update2
audunn Mar 10, 2023
42ec9d0
test run, custom fix
audunn Mar 10, 2023
6fe6c5a
Rename VolumeRelocationProperties
audunn Mar 10, 2023
54f6fd7
test
audunn Mar 10, 2023
f85f9a4
test2
audunn Mar 10, 2023
91d22cf
Vaults backwards compat
audunn Mar 13, 2023
0157189
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn Mar 13, 2023
e8d61da
Vaults backwards compat2
audunn Mar 13, 2023
0d0cf56
Add vaults test and custom code
audunn Mar 14, 2023
7ebae56
Rename test
audunn Mar 14, 2023
98ceddd
remove Obsolete
audunn Mar 14, 2023
41e8e00
update api file
audunn Mar 14, 2023
8aae275
backupconfig bc
audunn Mar 14, 2023
bbeba72
new recording
audunn Mar 14, 2023
c0e66d6
review fixes
audunn Mar 17, 2023
1e9589b
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn Mar 17, 2023
c96c9f3
mer cl
audunn Mar 17, 2023
92aa79f
Empty-Commit
audunn Mar 17, 2023
85adef9
customization work
audunn Mar 20, 2023
4d3abbd
customization
audunn Mar 20, 2023
b8d645e
Empty-Commit
audunn Mar 21, 2023
494d66d
Customization workaround for NetAppVolumeBackupConfiguration
audunn Mar 22, 2023
972c6f0
Customization workaround for NetAppVolumeBackupConfiguration2
audunn Mar 22, 2023
3a758f5
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn Mar 23, 2023
b81c922
Enable vaultId on older api-versions
audunn Mar 23, 2023
00300b3
Empty-Commit
audunn Mar 24, 2023
bae982d
Test for vaultId in 2022-05-01
audunn Mar 27, 2023
1cb5cdd
upgrade openai typespec (#35120)
chunyu3 Mar 24, 2023
bc6494a
AMS Release for 2023-01 API version (#35042)
giakas Mar 24, 2023
45c23f6
Restore change from FxCopAnalyzers to NetAnalyzers (#35116)
heaths Mar 24, 2023
1b4a13a
Increment package version after release of Azure.ResourceManager.Medi…
azure-sdk Mar 24, 2023
1a4ce38
Communication Identity | Coverage improvement (#34844)
mjafferi-msft Mar 24, 2023
9a1b274
[Storage] [DataMovement] Add BlobType option to `BlobStorageResourceC…
jalauzon-msft Mar 24, 2023
82f8a40
Explicitly set PSNativeCommandArgumentPassing to Legacy for git push …
azure-sdk Mar 24, 2023
a4ff6dd
Add transmit from storage handler (#35017)
vishweshbankwar Mar 24, 2023
f90d645
SDK updates for Communication stable version 2023-03-31 (#35077)
matthohn-msft Mar 24, 2023
f95f71e
[Text Analytics] Mitigate transient test failures due to "InternalSer…
joseharriaga Mar 24, 2023
92bc9f1
[Event Hubs] Tweak processor startup (#35113)
jsquire Mar 24, 2023
fdb90fb
typespec renaming for unified pipeline (#35123)
chunyu3 Mar 27, 2023
20fc341
Remove recording of network for some mgmt SDK (#35091)
dvbb Mar 27, 2023
a29f4db
Update Generator Version 3.0.0-beta.20230326.1 (#35153)
azure-sdk Mar 27, 2023
679e4e8
Revert "Update Generator Version 3.0.0-beta.20230326.1 (#35153)"
audunn Mar 27, 2023
5cba367
Revert "Remove recording of network for some mgmt SDK (#35091)"
audunn Mar 27, 2023
e87ab57
Revert "typespec renaming for unified pipeline (#35123)"
audunn Mar 27, 2023
bfc90dc
Revert "[Event Hubs] Tweak processor startup (#35113)"
audunn Mar 27, 2023
48fb089
Revert "[Text Analytics] Mitigate transient test failures due to "Int…
audunn Mar 27, 2023
5af1b99
Revert "SDK updates for Communication stable version 2023-03-31 (#350…
audunn Mar 27, 2023
ee8389b
Revert "Add transmit from storage handler (#35017)"
audunn Mar 27, 2023
8906a17
Revert "Explicitly set PSNativeCommandArgumentPassing to Legacy for g…
audunn Mar 27, 2023
ce49118
Revert "[Storage] [DataMovement] Add BlobType option to `BlobStorageR…
audunn Mar 27, 2023
ddf5408
Revert "Communication Identity | Coverage improvement (#34844)"
audunn Mar 27, 2023
66f9b05
Revert "Increment package version after release of Azure.ResourceMana…
audunn Mar 27, 2023
0383619
Revert "Restore change from FxCopAnalyzers to NetAnalyzers (#35116)"
audunn Mar 27, 2023
61aeff9
Revert "AMS Release for 2023-01 API version (#35042)"
audunn Mar 27, 2023
992e115
Revert "upgrade openai typespec (#35120)"
audunn Mar 27, 2023
b9ff024
Run missing test
audunn Mar 27, 2023
b0ba0ae
Runsettings back
audunn Mar 27, 2023
db3faf8
Doc update
audunn Mar 27, 2023
4fd6c79
Review fixes
audunn Mar 29, 2023
0e9009b
recordings
audunn Mar 30, 2023
9711cec
recordings2
audunn Mar 30, 2023
ad51782
Fix changelog, return vaultname not name
audunn Mar 31, 2023
dfa1ed2
fix a minor issue
ArcturusZhang Apr 2, 2023
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
12 changes: 11 additions & 1 deletion sdk/netapp/Azure.ResourceManager.NetApp/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,19 @@
## 1.1.0-beta.1 (Unreleased)

### Features Added
- Updated to support ANF api-version 2022-09-01
- Added `BackupRestoreFiles` to `NetAppVolumeResource` to restore the specified files from the specified backup to the active file system
- Added `BreakFileLocks` to `NetAppVolumeResource` to allow clients to break file locks on a volume
- Added `FileAccessLog` to `NetAppVolumeData`, a flag indicating whether file access logs are enabled for the volume, based on active diagnostic settings present on the volume.
- Added propperty `PreferredServersForLdapClient` to `NetAppAccountActiveDirectory`, a comma separated list of IPv4 addresses of preferred servers for LDAP client
- Added `VolumeRelocation` to `NetAppVolumeDataProtection`
- Added `DataStoreResourceId` to `NetAppVolumeGroupVolume`
- Added `Tags` property to NetAppVolumeQuotaRulePatch and `AddTag`, `RemoveTag` and `SetTags` to `NetAppVolumeQuotaResource`
- Added `RestoreFiles` for `NetAppVolumeBackupResource`

### Breaking Changes

- `NetAppVault` is no longer needed scheduled for deprecation
- `VaultId` is not longer needed it has been deprecated from `NetAppVolumeBackupConfiguration` in api-version 2022-09-01, but will continue to be supported in pervious api-verisons, 2022-05-01 and older
### Bugs Fixed

### Other Changes
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.1.0-beta.1</Version>
<!--The ApiCompatVersion is managed automatically and should not generally be modified manually.-->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System.Text.Json;
Expand All @@ -22,7 +20,7 @@ internal static NetAppVault DeserializeNetAppVault(JsonElement element)
ResourceIdentifier id = default;
string name = default;
ResourceType type = default;
Optional<SystemData> systemData = default;
Optional<Azure.ResourceManager.Models.SystemData> systemData = default;
Optional<string> vaultName = default;
foreach (var property in element.EnumerateObject())
{
Expand All @@ -48,7 +46,7 @@ internal static NetAppVault DeserializeNetAppVault(JsonElement element)
property.ThrowNonNullablePropertyIsNull();
continue;
}
systemData = JsonSerializer.Deserialize<SystemData>(property.Value.GetRawText());
systemData = JsonSerializer.Deserialize<Azure.ResourceManager.Models.SystemData>(property.Value.GetRawText());
continue;
}
if (property.NameEquals("properties"u8))
Expand All @@ -69,7 +67,7 @@ internal static NetAppVault DeserializeNetAppVault(JsonElement element)
continue;
}
}
return new NetAppVault(id, name, type, systemData.Value, vaultName.Value);
return new NetAppVault(id, name, type, systemData.Value, vaultName);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System.ComponentModel;
using Azure.Core;
using Azure.ResourceManager.Models;

namespace Azure.ResourceManager.NetApp.Models
{
/// <summary> Vault information. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public partial class NetAppVault : ResourceData
audunn marked this conversation as resolved.
Show resolved Hide resolved
{
/// <summary> Initializes a new instance of NetAppVault. </summary>
Expand All @@ -24,7 +24,7 @@ internal NetAppVault()
/// <param name="resourceType"> The resourceType. </param>
/// <param name="systemData"> The systemData. </param>
/// <param name="vaultName"> Vault Name. </param>
internal NetAppVault(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string vaultName) : base(id, name, resourceType, systemData)
internal NetAppVault(ResourceIdentifier id, string name, ResourceType resourceType, Azure.ResourceManager.Models.SystemData systemData, string vaultName) : base(id, name, resourceType, systemData)
{
VaultName = vaultName;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#nullable disable

using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.NetApp.Models
{
public partial class NetAppVolumeBackupConfiguration : IUtf8JsonSerializable
{
void global::Azure.Core.IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
{
writer.WriteStartObject();
if (Optional.IsDefined(BackupPolicyId))
{
writer.WritePropertyName("backupPolicyId");
writer.WriteStringValue(BackupPolicyId);
}
if (Optional.IsDefined(IsPolicyEnforced))
{
writer.WritePropertyName("policyEnforced");
writer.WriteBooleanValue(IsPolicyEnforced.Value);
}
if (Optional.IsDefined(VaultId))
{
writer.WritePropertyName("vaultId");
writer.WriteStringValue(VaultId);
}
if (Optional.IsDefined(IsBackupEnabled))
{
writer.WritePropertyName("backupEnabled");
writer.WriteBooleanValue(IsBackupEnabled.Value);
}
writer.WriteEndObject();
audunn marked this conversation as resolved.
Show resolved Hide resolved
}

internal static NetAppVolumeBackupConfiguration DeserializeNetAppVolumeBackupConfiguration(JsonElement element)
{
if (element.ValueKind == JsonValueKind.Null)
{
return null;
}
Optional<ResourceIdentifier> backupPolicyId = default;
Optional<bool> policyEnforced = default;
Optional<bool> backupEnabled = default;
Optional<ResourceIdentifier> vaultId = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("backupPolicyId"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
property.ThrowNonNullablePropertyIsNull();
continue;
}
backupPolicyId = new ResourceIdentifier(property.Value.GetString());
continue;
}
if (property.NameEquals("policyEnforced"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
property.ThrowNonNullablePropertyIsNull();
continue;
}
policyEnforced = property.Value.GetBoolean();
continue;
}
if (property.NameEquals("backupEnabled"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
property.ThrowNonNullablePropertyIsNull();
continue;
}
backupEnabled = property.Value.GetBoolean();
continue;
}
if (property.NameEquals("vaultId"u8))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
property.ThrowNonNullablePropertyIsNull();
continue;
}
vaultId = new ResourceIdentifier(property.Value.GetString());
continue;
}
}
return new NetAppVolumeBackupConfiguration(backupPolicyId.Value, Optional.ToNullable(policyEnforced), vaultId.Value, Optional.ToNullable(backupEnabled));
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using Azure.Core;

namespace Azure.ResourceManager.NetApp.Models
{
/// <summary> Volume Backup Properties. </summary>
public partial class NetAppVolumeBackupConfiguration
audunn marked this conversation as resolved.
Show resolved Hide resolved
{
/// <summary> Initializes a new instance of NetAppVolumeBackupConfiguration. </summary>
/// <param name="backupPolicyId"> Backup Policy Resource ID. </param>
/// <param name="isPolicyEnforced"> Policy Enforced. </param>
/// <param name="vaultId"> Vault Resource ID. </param>
/// <param name="isBackupEnabled"> Backup Enabled. </param>
internal NetAppVolumeBackupConfiguration(ResourceIdentifier backupPolicyId, bool? isPolicyEnforced, ResourceIdentifier vaultId, bool? isBackupEnabled)
{
BackupPolicyId = backupPolicyId;
IsPolicyEnforced = isPolicyEnforced;
VaultId = vaultId;
IsBackupEnabled = isBackupEnabled;
}
audunn marked this conversation as resolved.
Show resolved Hide resolved

/// <summary> Vault Resource ID. </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public ResourceIdentifier VaultId { get; set; }
audunn marked this conversation as resolved.
Show resolved Hide resolved
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
ArcturusZhang marked this conversation as resolved.
Show resolved Hide resolved
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
ArcturusZhang marked this conversation as resolved.
Show resolved Hide resolved
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Threading;
using Azure.Core;
using Azure.Core.Pipeline;
using Azure.ResourceManager.NetApp;
using Azure.ResourceManager.NetApp.Models;

namespace Azure.ResourceManager.NetApp
{
public partial class NetAppAccountResource: ArmResource
{
private VaultsRestOperations _vaultsRestClient;
private ClientDiagnostics _vaultsClientDiagnostics;

private ClientDiagnostics VaultsClientDiagnostics => _vaultsClientDiagnostics ??= new ClientDiagnostics("Azure.ResourceManager.NetApp", NetAppAccountResource.ResourceType.Namespace, Diagnostics);
private VaultsRestOperations VaultsRestClient => _vaultsRestClient ??= new VaultsRestOperations(Pipeline, Diagnostics.ApplicationId, Endpoint, GetApiVersionOrNull(NetAppAccountResource.ResourceType));

private string GetApiVersionOrNull(ResourceType resourceType)
{
TryGetApiVersion(resourceType, out string apiVersion);
return apiVersion;
}
audunn marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// List vaults for a Netapp Account
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/vaults</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Vaults_List</description>
/// </item>
/// </list>
/// </summary>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> An async collection of <see cref="NetAppVault" /> that may take multiple service requests to iterate over. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual AsyncPageable<NetAppVault> GetVaultsAsync(CancellationToken cancellationToken = default)
audunn marked this conversation as resolved.
Show resolved Hide resolved
{
HttpMessage FirstPageRequest(int? pageSizeHint) => VaultsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
return PageableHelpers.CreateAsyncPageable(FirstPageRequest, null, NetAppVault.DeserializeNetAppVault, VaultsClientDiagnostics, Pipeline, "NetAppAccountResource.GetVaults", "value", null, cancellationToken);
}

/// <summary>
/// List vaults for a Netapp Account
/// <list type="bullet">
/// <item>
/// <term>Request Path</term>
/// <description>/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/vaults</description>
/// </item>
/// <item>
/// <term>Operation Id</term>
/// <description>Vaults_List</description>
/// </item>
/// </list>
/// </summary>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <returns> A collection of <see cref="NetAppVault" /> that may take multiple service requests to iterate over. </returns>
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual Pageable<NetAppVault> GetVaults(CancellationToken cancellationToken = default)
{
HttpMessage FirstPageRequest(int? pageSizeHint) => VaultsRestClient.CreateListRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Name);
return PageableHelpers.CreatePageable(FirstPageRequest, null, NetAppVault.DeserializeNetAppVault, VaultsClientDiagnostics, Pipeline, "NetAppAccountResource.GetVaults", "value", null, cancellationToken);
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

// <auto-generated/>

#nullable disable

using System;
using System.ComponentModel;
using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
Expand Down
Loading