Make the parent of a Tenant Resource to be OperationsBase#1392
Closed
fengzhou-msft wants to merge 5 commits intoAzure:feature/v3from
Closed
Make the parent of a Tenant Resource to be OperationsBase#1392fengzhou-msft wants to merge 5 commits intoAzure:feature/v3from
fengzhou-msft wants to merge 5 commits intoAzure:feature/v3from
Conversation
|
|
||
| var originalResponse = _restClient.CreateOrUpdate(Id.ResourceGroupName, availabilitySetName, parameters, cancellationToken: cancellationToken); | ||
| return new AvailabilitySetsCreateOrUpdateOperation(Parent, originalResponse); | ||
| return new AvailabilitySetsCreateOrUpdateOperation(this, originalResponse); |
Member
There was a problem hiding this comment.
Why is this needed? This looks like quite a big difference
Member
Author
There was a problem hiding this comment.
Originally, I wanted to avoid using the Parent as much as possible as ResourceContainerBase has a constructor that does not set Parent, so Parent could be null. But it will cause other issues to use this here. I reverted the change.
Co-authored-by: Arcturus <ufo54153@gmail.com>
fengzhou-msft
commented
Jul 13, 2021
Comment on lines
+14
to
+15
| <!-- <PackageReference Include="Azure.ResourceManager.Core" Version="1.0.0-alpha.20210706.2" /> --> | ||
| <ProjectReference Include="../../../../azure-sdk-for-net/sdk/resourcemanager/Azure.ResourceManager.Core/src/Azure.ResourceManager.Core.csproj" /> |
Member
Author
There was a problem hiding this comment.
After Azure/azure-sdk-for-net#22589 is merged and published, use the new version of core.
Member
|
/check-enforcer evaluate |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
A container of tenant resource whose direct parent is tenant (for instance, the billing account resource in
TenantOnlytests) should be able to get created withTenantOperationswhich is of typeOperationsBaseinstead ofResourceOperationsBase.This PR makes corresponding changes to support that and relies on core changes Azure/azure-sdk-for-net#22589
Todo:
TenantOperationsExtensionWriter.ListAsGenericResourceAsync(),Parentis cast asResourceGroupOperations. This does not apply for resources whose ancestor is subscription or tenant (here a subscription ancestor means subscription has a direct child resource that is not a resource group, that child resource and the children of that child resource, their ancestor is subscription. A tenant ancestor is similar. Each resource's ancestor is either a resource group, a subscription or a tenant).Checklist
To ensure a quick review and merge, please ensure:
Ready to Land?