-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Network mgmt track 2 library #23049
Network mgmt track 2 library #23049
Conversation
* initial checkin for core / tests * Add readme.md file * Fix header in readme * remove autorest until we convert off hand written types * update azure.core reference remove sets to tags ignore tests which require credentials for now * Add the proto client which will be used until the autogen work is complete * Add missing readmes for proto client * update to require linq 4.0.0 so that don't have to upgrade bcl * add changlog for CI * change system.linq.async to update * update to use source vs binary for the temporary generation of Azure.ResourceManager.Authorization * Add changelog for azure.resourcemanager.authorization and update version to be beta * update typos in readme * update name of proto client sln * merge in changes from proto repo this week * fixed unit test failures missed a few files from the merge from proto repo updated compute and network sdk version to use latest azure.core with readonly list types * ignore tests which require live azure until 5122 is closed * Update failing scenario test
…nto feature/mgmt-track2
* initial checkin * adding test cases
* add tests for ApiVersionBase * update methods
* add tests for ArmBuilder * Update ArmBuilderTests.cs * Update SubscriptionContainer.cs
* Update test project to consume framework for recorded tests * Changes required to get instrumentation working for the new armClient added support for session recording for onetimesetup and onetimeteardown * move unit test files * update tests to not use username for prefix * update targets to separate existing track 2 libraries from new core until autorest changes are finished * merge in armbuildertest and update to use new framework * remove necessity on session files if no onetimesetup * Address review comments
…nto feature/mgmt-track2
* WIP: tenant resource * WIP: updates * Update ResourceIdentifier.cs * Update ResourceIdentifier.cs * Update ResourceType.cs * WIP update check * WIP * Add readme for billing * Stylecop * WIP * Remove style * wip: update * WIP: updates * WIP * WIP: update * WIP * Updates * WIP: updates * Update * WIP: updates * WIP * Update tests * WIP: updates
* Remove reference for Azure.Identity * fixing ArmClient construction in proto client * resync and fix build error
* Rename TryGetValue to TryGet/TryGetAsync * Update ContainerBase.cs * Update ContainerBase.cs * Update TryGet method and test class * Update CheckResourceExists.cs * Rename TryGetValue to TryGet/TryGetAsync * Update ContainerBase.cs * Update ContainerBase.cs * Update TryGet method and test class * Update CheckResourceExists.cs * Update ContainerBaseTest.cs * Update TryGet Test * Update tests
* Sku Serialization * Divide Sku class * Update Sku
* WIP: updates * WIP: updates * Update test * Update ResourceListOperationsTest.cs * Update CreateSingleVmExample.cs * Update CreateSingleVmExample.cs * Update CreateSingleVmExample.cs * Update CreateSingleVmExample.cs * WIP: Updates * Add extra line * Update * WIP: * WIP: updates * WIp: updates * Remove API version extensions * WIP: updates * Updates * Update test * WIP updates * Updates * WIP * Remove blank lines * Update filtering * Updates * Update * WIP: updates * WIP: updates * Add space * Remove debug * Updates * WIP: updates * WIP * Change the accessbility to virtual for Resource.Id * WIP: updates * WIP Updates * WIP updates * WIP * WIP * WIP: * revert * WIP: updates * WIP: updates * WIP: updated * WIP Co-authored-by: YalinLi0312 <yall@microsoft.com>
* Resource Identifier changes * Adapting Container classes to base class change in Id property * Fixing xml documentation comments for ResourceType * Cleaning up resource id ToStrign() and fixing ListLocations client creation * Adjusting new tenant resource operations for resource id scheme * Responding to review comments * Add test coverage, retain string reresentation of resource id * Fixing additional merge issues * Updating comparison tests to use concrete variable types
* Plan Serialization * Divide Plan class * Update Plan
* Change the accessbility to virtual for Resource.Id * rename ArmClient, ArmClientOptions, Get[Resource]Container * updates after merge * missing one file for rename Co-authored-by: YalinLi0312 <yall@microsoft.com> Co-authored-by: m-nash <prognash@microsoft.com>
* Change the accessbility to virtual for Resource.Id * rename ArmClient, ArmClientOptions, Get[Resource]Container * updates after merge * missing one file for rename * Missed 2 renames Co-authored-by: YalinLi0312 <yall@microsoft.com> Co-authored-by: m-nash <prognash@microsoft.com>
…nto feature/mgmt-track2
* WIP * WIP * Update ResourceOperationsBase.cs * update for tenant extensions * update csproj * Update Azure.ResourceManager.Network.csproj * update csproj * update csproj * WIP * WIP * update csproj * update csproj * update csproj * add tests * update test * update * fix test cases to use the diagnostics case fix a missing mocking constructor * WIP * update framework for tests * Update Azure.Test.Perf.csproj * merge * revert list json files * revert * WIP * fix ci * Update Program.cs * update proto * fix test * Update ClientContextTests.cs * update proto * Update Azure.ResourceManager.Billing.csproj * update version * update ci * Update Azure.ResourceManager.EventHubs.csproj * add packable Co-authored-by: m-nash <prognash@microsoft.com>
* Resource Serialization * Plan Serialization * Divide Plan class * Divide Resource class * Update writer * Update Plan * TrackedResource Serialization * Update GenericResource * Clean Up * Update GenericResource * Remove read only * Update tests
* Resource Serialization * Divide Resource class * Update writer * TrackedResource Serialization * Update Deserialization * Update Test * Update Tests * Update Tracked Resource * Fix PR * Remove readonly
# Conflicts: # eng/Packages.Data.props # sdk/network/Azure.ResourceManager.Network/tests/Helpers/NetworkManagementTestUtilities.cs # sdk/network/Azure.ResourceManager.Network/tests/Helpers/NetworkTestsManagementClientBase.cs # sdk/network/Azure.ResourceManager.Network/tests/Helpers/ResourcesManagementTestUtilities.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/ApplicationGatewayTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/CheckConnectivityTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/ConnectionMonitorTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/ExpandResourceTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/ExpressRouteTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/FlowLogTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/GatewayOperationsTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/LoadBalancerTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/NetworkInterfaceTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/NetworkSecurityGroupTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/NetworkWatcherTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/NextHopTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/PacketCaptureTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/TopologyTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/TroubleshootTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/VerifyIpFlowTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/ViewNsgRuleTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/VmssNetworkInterfaceTests.cs # sdk/network/Azure.ResourceManager.Network/tests/Tests/VmssPublicIpAddressTests.cs
- replace old `NetworkManagementClient` with `ArmClient` - replace old network operations with mgmt track2 preview api - update test recording
- replace old `NetworkManagementClient` and `ResourceManagementClient` with `ArmClient` - replace old network/resource operations with mgmt track2 preview SDK - update test recording
Comment out some test steps due to the following error **in playback mode only**: > Error Message: Expected: not equal to "Sanitized" But was: "Sanitized" Those could be due to the fact that test framework will sanitize some content it thinks senstivie during recording. So in the plyaback mode, the tests will fail.
Assert.NotNull(regenerateConnection_primary); | ||
Assert.AreNotEqual(listKeysResponse.Value.PrimaryConnectionString, regenerateConnection_primary.Value.PrimaryConnectionString); | ||
// Assert.AreNotEqual(listKeysResponse.Value.PrimaryConnectionString, regenerateConnection_primary.Value.PrimaryConnectionString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I comment out this assertion and a few similar ones, due to the following error in playback mode only:
Error Message:
Expected: not equal to "Sanitized"
But was: "Sanitized"
Those could be due to the fact that test framework will sanitize some content it thinks sensitive during recording. So in the playback mode, the tests will fail.
@@ -52,14 +53,14 @@ public async Task EventCreateGetUpdateDelete() | |||
{ | |||
AccessTier = AccessTier.Hot | |||
}; | |||
await WaitForCompletionAsync(await StorageManagementClient.StorageAccounts.StartCreateAsync(resourceGroup, accountName, storageAccountCreateParameters)); | |||
await WaitForCompletionAsync(await StorageManagementClient.StorageAccounts.StartCreateAsync(resourceGroupName, accountName, storageAccountCreateParameters)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test case actually doesn't work (I tried on main
branch). The following error will be thrown.
"System.InvalidOperationException : Expected scope StorageAccountsOperations.StartCreate to be marked as failed > but it succeeded
Exception: System.NotSupportedException: Parent does not have a default constructor. The default constructor must be explicitly defined."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Storage
is involved here, if we can confirm that we can put this test case aside, it will accelerate the publish of Storage
mgmt track2 SDK preview as well.
- pull in `main` branch for resource manager 1.0.0-beta.2 and other changes - re-generate the codes - fix broken test cases due to interface change
update test cases to fix the borken interface
`network` has 50 swagger files which will cause out-of-memory error in autorest. Accoring to [autorest faq], we can enlarge the memory through environment variable. Adding `memory` in autorest config doesn't work, because either release pipeline is not using the latest version of autorest, or the change is not in latest version yet.
@@ -16,6 +16,7 @@ param ( | |||
) | |||
|
|||
$ErrorActionPreference = 'Stop' | |||
$Env:NODE_OPTIONS = "--max-old-space-size=8192" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to fix the out-of-memory error in nodejs vm during autorest execution. There is a similar fix in
$Env:NODE_OPTIONS = "--max-old-space-size=8192" |
…o feature/mgmt-track2-network
Refactor cache swagger to deduplicate SkuName enum definitions. (Azure#23049)
All SDK Contribution checklist:
This checklist is used to make sure that common guidelines for a pull request are followed.
Draft
mode if it is:General Guidelines and Best Practices
Testing Guidelines
SDK Generation Guidelines
*.csproj
andAssemblyInfo.cs
files have been updated with the new version of the SDK. Please double check nuget.org current release version.Additional management plane SDK specific contribution checklist:
Note: Only applies to
Microsoft.Azure.Management.[RP]
orAzure.ResourceManager.[RP]
Management plane SDK Troubleshooting
If this is very first SDK for a services and you are adding new service folders directly under /SDK, please add
new service
label and/or contact assigned reviewer.If the check fails at the
Verify Code Generation
step, please ensure:generate.ps1/cmd
to generate this PR instead of callingautorest
directly.Please pay attention to the @microsoft.csharp version output after running
generate.ps1
. If it is lower than current released version (2.3.82), please run it again as it should pull down the latest version.Note: We have recently updated the PSH module called by
generate.ps1
to emit additional data. This would help reduce/eliminate the Code Verification check error. Please run following command:Old outstanding PR cleanup
Please note:
If PRs (including draft) has been out for more than 60 days and there are no responses from our query or followups, they will be closed to maintain a concise list for our reviewers.