-
Notifications
You must be signed in to change notification settings - Fork 5.1k
[NetApp] Update to 2022-09-01 add tests #34629
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
Merged
ArcturusZhang
merged 82 commits into
Azure:main
from
audunn:ANF-25489-NetAppFiles-ApiVersion-2022-09-01
Apr 2, 2023
Merged
Changes from all 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 2814d39
pull from upstream
audunn 21c6d1e
generate
audunn aec1f86
generate2
audunn dbc99d0
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn cb3486f
regenerate
audunn 79e8801
tests run
audunn 5b644e9
base
audunn fa81150
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn 8d63b15
regenerate
audunn 9eda623
re-run test
audunn 04a30ea
re-run test
audunn 05986d4
re-run test2
audunn 0c7a740
fix type
audunn c757a1b
Add breakFileLockTest
audunn 1e66daf
Add backupsRestoreFiles
audunn 5645e89
EditorBrowsable, etc
audunn ab44757
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn 9c24a27
test update2
audunn b7cf703
test update2
audunn 42ec9d0
test run, custom fix
audunn 6fe6c5a
Rename VolumeRelocationProperties
audunn 54f6fd7
test
audunn f85f9a4
test2
audunn 91d22cf
Vaults backwards compat
audunn 0157189
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn e8d61da
Vaults backwards compat2
audunn 0d0cf56
Add vaults test and custom code
audunn 7ebae56
Rename test
audunn 98ceddd
remove Obsolete
audunn 41e8e00
update api file
audunn 8aae275
backupconfig bc
audunn bbeba72
new recording
audunn c0e66d6
review fixes
audunn 1e9589b
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn c96c9f3
mer cl
audunn 92aa79f
Empty-Commit
audunn 85adef9
customization work
audunn 4d3abbd
customization
audunn b8d645e
Empty-Commit
audunn 494d66d
Customization workaround for NetAppVolumeBackupConfiguration
audunn 972c6f0
Customization workaround for NetAppVolumeBackupConfiguration2
audunn 3a758f5
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
audunn b81c922
Enable vaultId on older api-versions
audunn 00300b3
Empty-Commit
audunn bae982d
Test for vaultId in 2022-05-01
audunn 1cb5cdd
upgrade openai typespec (#35120)
chunyu3 bc6494a
AMS Release for 2023-01 API version (#35042)
giakas 45c23f6
Restore change from FxCopAnalyzers to NetAnalyzers (#35116)
heaths 1b4a13a
Increment package version after release of Azure.ResourceManager.Medi…
azure-sdk 1a4ce38
Communication Identity | Coverage improvement (#34844)
mjafferi-msft 9a1b274
[Storage] [DataMovement] Add BlobType option to `BlobStorageResourceC…
jalauzon-msft 82f8a40
Explicitly set PSNativeCommandArgumentPassing to Legacy for git push …
azure-sdk a4ff6dd
Add transmit from storage handler (#35017)
vishweshbankwar f90d645
SDK updates for Communication stable version 2023-03-31 (#35077)
matthohn-msft f95f71e
[Text Analytics] Mitigate transient test failures due to "InternalSer…
joseharriaga 92bc9f1
[Event Hubs] Tweak processor startup (#35113)
jsquire fdb90fb
typespec renaming for unified pipeline (#35123)
chunyu3 20fc341
Remove recording of network for some mgmt SDK (#35091)
dvbb a29f4db
Update Generator Version 3.0.0-beta.20230326.1 (#35153)
azure-sdk 679e4e8
Revert "Update Generator Version 3.0.0-beta.20230326.1 (#35153)"
audunn 5cba367
Revert "Remove recording of network for some mgmt SDK (#35091)"
audunn e87ab57
Revert "typespec renaming for unified pipeline (#35123)"
audunn bfc90dc
Revert "[Event Hubs] Tweak processor startup (#35113)"
audunn 48fb089
Revert "[Text Analytics] Mitigate transient test failures due to "Int…
audunn 5af1b99
Revert "SDK updates for Communication stable version 2023-03-31 (#350…
audunn ee8389b
Revert "Add transmit from storage handler (#35017)"
audunn 8906a17
Revert "Explicitly set PSNativeCommandArgumentPassing to Legacy for g…
audunn ce49118
Revert "[Storage] [DataMovement] Add BlobType option to `BlobStorageR…
audunn ddf5408
Revert "Communication Identity | Coverage improvement (#34844)"
audunn 66f9b05
Revert "Increment package version after release of Azure.ResourceMana…
audunn 0383619
Revert "Restore change from FxCopAnalyzers to NetAnalyzers (#35116)"
audunn 61aeff9
Revert "AMS Release for 2023-01 API version (#35042)"
audunn 992e115
Revert "upgrade openai typespec (#35120)"
audunn b9ff024
Run missing test
audunn b0ba0ae
Runsettings back
audunn db3faf8
Doc update
audunn 4fd6c79
Review fixes
audunn 0e9009b
recordings
audunn 9711cec
recordings2
audunn ad51782
Fix changelog, return vaultname not name
audunn dfa1ed2
fix a minor issue
ArcturusZhang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
62 changes: 62 additions & 0 deletions
62
sdk/netapp/Azure.ResourceManager.NetApp/api/Azure.ResourceManager.NetApp.netstandard2.0.cs
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
sdk/netapp/Azure.ResourceManager.NetApp/src/Azure.ResourceManager.NetApp.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
...ResourceManager.NetApp/src/Custom/Models/NetAppVolumeBackupConfiguration.Serialization.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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)); | ||
| } | ||
| } | ||
| } | ||
32 changes: 32 additions & 0 deletions
32
sdk/netapp/Azure.ResourceManager.NetApp/src/Custom/Models/NetAppVolumeBackupConfiguration.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
|
||
| } | ||
| } | ||
4 changes: 1 addition & 3 deletions
4
...nerated/Models/VaultList.Serialization.cs → .../Custom/Models/VaultList.Serialization.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
....NetApp/src/Generated/Models/VaultList.cs → ...ger.NetApp/src/Custom/Models/VaultList.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
sdk/netapp/Azure.ResourceManager.NetApp/src/Custom/NetAppAccountResource.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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); | ||
| } | ||
| } | ||
| } | ||
5 changes: 2 additions & 3 deletions
5
...ed/RestOperations/VaultsRestOperations.cs → ...om/RestOperations/VaultsRestOperations.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.