Skip to content

[Monitor] az monitor log-analytics workspace linked-storage: supports BYOS features#13187

Merged
mmyyrroonn merged 5 commits intoAzure:devfrom
mmyyrroonn:LA-CMK-JEDI
Apr 27, 2020
Merged

[Monitor] az monitor log-analytics workspace linked-storage: supports BYOS features#13187
mmyyrroonn merged 5 commits intoAzure:devfrom
mmyyrroonn:LA-CMK-JEDI

Conversation

@mmyyrroonn
Copy link
Contributor

Description

Testing Guide

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change.
[Component Name 2] az command b: Add some customer-facing feature.


This checklist is used to make sure that common guidelines for a pull request are followed.

MyronFanQiu added 2 commits April 26, 2020 16:51
@mmyyrroonn mmyyrroonn requested a review from jsntcy April 26, 2020 09:34
type: command
short-summary: Create linked storages for log analytics workspace.
examples:
- name: Create a linked storage for a log analytics workspace
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a [](start = 17, length = 1)

two

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer using a instead of two. linked-storage-account is a resource which has several linked storage accounts. Two is quite strange.

linked_storage_accounts = client.get(resource_group_name=resource_group_name,
workspace_name=workspace_name,
data_source_type=data_source_type)
existed_storage_account_ids_set = set(linked_storage_accounts.storage_account_ids)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about write code as follows,

    if storage_account_id.lower() in [existing_storage_acocunt_id.lower() for existing_storage_acocunt_id in linked_storage_accounts.storage_account_ids]:
        linked_storage_accounts.storage_account_ids.remove(storage_account_id)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

each iteration we need a list generation, which is quite resource consuming. But I change the logic to generate set.


helps['monitor log-analytics workspace linked-storage create'] = """
type: command
short-summary: Create linked storages for log analytics workspace.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

storage accounts. also update other places

@yonzhan yonzhan added this to the S169 - For Build milestone Apr 26, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Apr 26, 2020

add to S169

Copy link
Member

@jsntcy jsntcy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@mmyyrroonn mmyyrroonn merged commit 79964fb into Azure:dev Apr 27, 2020
@mmyyrroonn mmyyrroonn deleted the LA-CMK-JEDI branch April 27, 2020 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants