-
Notifications
You must be signed in to change notification settings - Fork 332
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
Add Managed Identity support to CdnProfile module #1621
Conversation
There is still an issue with using |
0ff730c
to
13f7d10
Compare
Hi @Fred-sun, Can you please advise on an issue I'm encountering in this PR? When I update the Identity with "append=false", I expect the user identity to be replaced with the new one, not appended. However, the new task I added to the integration test in this PR (task name: "Update the CDN profile - replace user identity") doesn't return the expected result. While debugging this, I couldn't find anything suspicious that could be causing this issue. I would appreciate any help you can provide. Thank you! |
curr_identity = response["identity"] if response else None | ||
update_identity = False | ||
if self.identity: | ||
update_identity, self.identity = self.update_managed_identity(curr_identity=curr_identity, new_identity=self.identity) |
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.
@nirarg How did you set 'append=False'? The 'allow_identities_append=True' parameter of the function self.update_managed_identity has a default value, so it is added. If you want to override, you need to pass the function when 'allow_identities_append=False'. So you should pass it to the function according to the arguments of 'append'. Thank you!
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.
Hi @Fred-sun,
Yes, I used append=false
. The allow_identities_append
variable is used for cases where the append
attribute is not available. This is not the case here, append
is being used. Therefore, the default value in the function is allow_identities_append=True
.
I debugged the code and saw that the identity
is returned as expected from this function and the result is sent to the API. Therefore, I suspect there is something I miss in the API call or in the SDK code.
I have this passing with the included integration tests when using the fixes I pushed in #1635 . You just need to update this pr with the following:
The reason seems to be that some of the API calls (update) use the PATCH method. The backend logic will append to the list unless you pass keys with a value of NONE, then they will be removed. |
Changed module: azure_rm_cdnprofile
13f7d10
to
693c0bf
Compare
The verification CI test was started here: |
Changed module: azure_rm_cdnprofile
SUMMARY
Add Managed Identity support to CdnProfile module
ISSUE TYPE
COMPONENT NAME
azure_rm_cdnprofile