-
Notifications
You must be signed in to change notification settings - Fork 2.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
The Peering Location for an Express Route Cross Connection ... cannot be modified from PL Name to . #18217
Comments
Hi @jbernardini, thank you for opening this issue! We'll investigate ASAP. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub. Issue Details
Describe the bug network_client.express_route_cross_connections.begin_create_or_update() fails with: File "./modify.py", line 38, in main To Reproduce
Expected behavior Screenshots Additional context
|
With the function call below so that no parameter serialization was required, I was able to replace line 283 of _express_route_cross_connections_operations.py as shown here and move past the error. So as noted in the other bug the issue seems to be in the serialization. Specifically what was happing is the peeringLocation key/value pair was being stripped out. You can see this by first printing parameters and then body_content. 283 #body_content = self._serialize.body(parameters, 'ExpressRouteCrossConnection') response = network_client.express_route_cross_connections.begin_create_or_update( |
Did a bit more digging and found what is maybe a more correct fix in the model and reverted _express_route_cross_connections_operations.py to original. The following changes are all in the ExpressRouteCrossConnection class definition in _models_py3.py. For the changes in init I followed the earlier convention from _models.py just because it is simple and required less line edits. in _validation, commented out these lines since we don't want to drop these values in the serializer/validation. 9468 #'peering_location': {'readonly': True}, in init, commented out 9509/10 and inserted replacements with values in 9511/12 since we need to pass values. As noted above there's a clear convention I did not follow but it works for a patch. 9509 #self.peering_location = None If you recall from my first comment I mentioned having to provide these values felt redundant and now having worked through this it's clear the model wasn't written with the intent to provide them. So I'm guessing this all stems from a recentish change where they've become required parameters even though you can't modify them. So if that's true the best solution is to revert the requirement but this should work for a patch in the meantime if someone else needs it. Here's my function call. If anyone grabs this for an example pay attention to where I've used camelCase vs. snake_case. I think it may matter if you look at the attribute map in the model. When I tried all snake_case in my function call it failed and I didn't bother looking any harder since this was working. response = network_client.express_route_cross_connections.begin_create_or_update( |
Hi @jbernardini. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “ |
Hi @jbernardini, since you haven’t asked that we “ |
/unresolve |
Upgraded to azure-mgmt-network 19.3.0 and the issue persists. |
Adding Microsoft.App stable version 2022-03-01 (Azure#18356) * Adds base for updating Microsoft.App from version preview/2022-01-01-preview to version 2022-03-01 * Updates readme * Updates API version in new specs and examples * refactore properties (Azure#18137) * [Non Break Change]Update to use easy auth v2 same as Web App (Azure#18143) (Azure#18217) * Update auth config to use the same auth config in App Service * Update for spell check * Remove TokenStore/ConfigFilePath as not supported for ContainerApp * Copy AuthConfig from previous version (Azure#18221) * Copy updated AuthConfig from previous version * Add suppression * Add API for checkNameAvailability in 2022-03-01 (Azure#18204) * add API * update * fix * update * update * Add label property (Azure#18280) * Add label property * fix prettier Co-authored-by: Juliehzl <[email protected]> * refactor sc properties in 03-01 (Azure#18343) * refactor sc properties in 03-01 * Revert "refactore properties (Azure#18137)" This reverts commit 4fe86bce74ae6a3566388d0a1037cb35be8a23e7. * add odata query (Azure#18364) * Updating patch spec. (Azure#18354) * Updating patch spec. * Fix linter * prettier fix * Adding x-ms-long-running-operation Co-authored-by: Ruslan Yakushev 🚴 <[email protected]> Co-authored-by: Xingjian Wang <[email protected]> Co-authored-by: erich-wang <[email protected]> Co-authored-by: Zunli Hu <[email protected]> Co-authored-by: Michael Dai <[email protected]> Co-authored-by: Vaclav Turecek <[email protected]>
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @exrsuppgithub. Issue Details
Describe the bug network_client.express_route_cross_connections.begin_create_or_update() fails with: File "./modify.py", line 38, in main To Reproduce
Expected behavior Screenshots Additional context
|
@jbernardini Apologies for the late reply. We are looking into this issue. We will provide an update on this once we have more details. @exrsuppgithub Could you please look into this and provide an update once you get a chance ? Awaiting your reply. |
Any updates on this? This is still broken and the work around mentioned by @jbernardini isn't working for me. |
@jonstout we've got an operational patch as part of our container image. can probably help get you working in the meantime. |
Is your operational patch going to be put into a release of this SDK in the future? We have a work-around in place already (querying the API directly) and would like to use the patched API. It might be more work to import your patch than to just continue using our work-around until there's a fix released. |
no we're just an API consumer like you, but we had to have it working in production.Sent from my iPhoneOn Oct 20, 2022, at 12:34 PM, James Harr ***@***.***> wrote:
Is your operational patch going to be put into a release of this SDK soon?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
How simple is your patch? |
Sorry for the delayed response. I saw this, intended to respond the next morning and then spaced it till tonight. Our patch is pretty basic. We build on Ubuntu 20.04 which includes Python 3.8. We just use the patch command. We install the pip library azure-mgmt-network==18.0.0. I see the line numbers have changed in 22.1.0 as follows:
We have a patches/azure.patch file in our project root with the following contents (for 18.0.0).
And finally our Dockerfile includes:
|
issue persists in azure-mgmt-network 25.3.0. The same patch as above works now targeting /usr/local/lib/python3.8/dist-packages/azure/mgmt/network/models/_models.py |
Hi @jbernardini, we deeply appreciate your input into this project. Regrettably, this issue has remained inactive for over 2 years, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support. |
Describe the bug
Appears to be the same behavior as described in: Azure/azure-sdk-for-net#20546. Only I've never had this working and can't find an example anywhere so I can't say for sure I haven't done something wrong. Note too I first worked through errors that seem to require the location and circuit id. These seem redundant to the skey (as does peering location) since you pull these values on a get(skey).
network_client.express_route_cross_connections.begin_create_or_update()
fails with:
File "./modify.py", line 38, in main
response = network_client.express_route_cross_connections.begin_create_or_update(
File "/home/user/.local/lib/python3.8/site-packages/azure/mgmt/network/v2020_11_01/operations/_express_route_cross_connections_operations.py", line 336, in begin_create_or_update
raw_result = self._create_or_update_initial(
File "/home/user/.local/lib/python3.8/site-packages/azure/mgmt/network/v2020_11_01/operations/_express_route_cross_connections_operations.py", line 292, in _create_or_update_initial
raise HttpResponseError(response=response, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: (PeeringLocationCannotBeModifiedForACrossConnection) The Peering Location for an Express Route Cross Connection /subscriptions//resourceGroups//providers/Microsoft.Network/expressRouteCrossConnections/********* cannot be modified from PL Name to .
To Reproduce
Steps to reproduce the behavior:
resgrp,
skey,
{
"location": expsrt['location'],
"service_provider_provisioning_state": "Provisioned",
"express_route_circuit": expsrt['express_route_circuit'],
"peering_location": expsrt['peering_location'] #same error if this is not included.
}
).result()
Expected behavior
Successful update of "service_provider_provisioning_state": "Provisioned",
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
I also added a comment on the other bug in the description.
The text was updated successfully, but these errors were encountered: