-
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
cache_configuration cannot be set to Null (None in Python) to remove AFD Route Caching once turned on #35801
Comments
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @cdnfdsuppgithub. |
Hi @jartoo, it is by design to filter |
Hi @jartoo. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Hi @jartoo, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you! |
Let me test this, thanks! I missed the NULL type... |
It seems when I call the routes.begin_create() using the AzureCoreNull (NULL type per your example) in the azure-mgmt-cdn==13.1.0 module, the _serialization.py key extractor function attribute_key_case_insensitive_extractor() seems to throw an exception when passing it this type. It appears to have three key extractors when I trace the code. This is the second one that throws the exception. To reproduce: from azure.identity import DefaultAzureCredential
from azure.mgmt.cdn import CdnManagementClient
from azure.mgmt.cdn.models import Route, RouteUpdateParameters, CompressionSettings, ResourceReference, AfdRouteCacheConfiguration
from azure.core.serialization import NULL as AzureCoreNull
client = CdnManagementClient(credential=DefaultAzureCredential(), subscription_id='xxxxxxx')
cache_configuration = AzureCoreNull
parameters = Route(
cache_configuration=cache_configuration
)
client.routes.begin_create(
resource_group_name="myResourceGroup",
profile_name="myFrontDoor",
endpoint_name="myEndPoint",
route_name="myRoute",
route=parameters
) Result: Maybe I am missing something? |
Let me take a look. |
Hi @jartoo Please try again with latest package: https://pypi.org/project/azure-mgmt-cdn/13.1.1/ |
Will work on this early next week and cycle back with feedback, thanks!! |
Hi @jartoo. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue. |
Looks like this issue is resolved in 13.1.1 when testing with the Rules() object. Thanks! I will cycle back if I see this persist in any other objects. Agree we can close this at this time. |
Describe the bug
When using the RouteUpdateParameters class to remove Caching from an existing Route, it requires you to pass null, which in Python uses the None keyword, to the cache_configuration object. It does not remove the caching when trying to update the Route.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The Caching should then be disabled, since there is no explicit variable to toggle the caching on or off, like exists in the Azure Portal.
Screenshots
N/A
Additional context
Tracing the Python SDK seems to remove all the variables set to None as part of the _serialization.py when executing the _routes_operations.py begin_update function. Since the cache_configuration object is set to None I cannot figure out how to get it to pass a Null to the API. Am I missing something here? Thanks.
The text was updated successfully, but these errors were encountered: