Azure: azure.mgmt.monitor python SDK, generates inconsistent OpreationName localized_value
preetesh33 opened this issue · comments
preetesh33 commented
Issue: Python SDK "azure.mgmt.monitor" generates inconsistant opreationName localizedValue.
Expection: Python SDK "azure.mgmt.monitor" should generate consistent localized_value
Steps to reproduce the issue:
- Scenario A: Activity log of unattached disk deleted on - 2022-05-03
old_90 = today - datetime.timedelta(days=int(90))
id = rsourceid
fl = ("eventTimestamp ge '{}' and eventTimestamp le '{}' and resourceGroupName eq '{}' and resourceId eq '{}' and resourceType eq 'Microsoft.Compute/disks' and status eq 'Accepted'".format(old_90,today,resource_grp_name,id))
activities = client.activity_logs.list(filter=fl, select=None)
for lg in activities:
print(lg.operation_name)
Output:
{'additional_properties': {}, 'value': 'Microsoft.Compute/disks/delete', 'localized_value': 'Microsoft.Compute/disks/delete'}
- Scenario B: Activity log of unattached disk deleted on - 2022-05-13
Same code used as above.
Output:
{'additional_properties': {}, 'value': 'Microsoft.Compute/disks/delete', 'localized_value': 'Delete Disk'}
Scenario A provides an incorrect 'localized_value', and in scenario B we got the correct localized_value.
preetesh33 commented
Kindly refer - Azure/azure-sdk-for-python#24538
navba-MSFT commented
Adding Service team to take a look into this.