Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Azure: azure.mgmt.monitor python SDK, generates inconsistent OpreationName localized_value

preetesh33 opened this issue · comments

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:

  1. 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'}
  1. 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.

Adding Service team to take a look into this.