Skip to content

{Security} Update security module to track 2 sdk#18837

Merged
jsntcy merged 8 commits intoAzure:devfrom
a7mad-3bbas:ahabas/update_security_to_track_2_sdk
Aug 13, 2021
Merged

{Security} Update security module to track 2 sdk#18837
jsntcy merged 8 commits intoAzure:devfrom
a7mad-3bbas:ahabas/update_security_to_track_2_sdk

Conversation

@a7mad-3bbas
Copy link
Copy Markdown
Contributor

@a7mad-3bbas a7mad-3bbas commented Jul 13, 2021

Description
This PR is to update the security module to track 2 sdk

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.

@yonzhan yonzhan requested review from jsntcy and kairu-ms July 13, 2021 13:18
@yonzhan yonzhan added this to the Jul 2021 (2021-08-03) milestone Jul 13, 2021
@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Jul 13, 2021

security

@jsntcy jsntcy changed the title Update security module to track 2 sdk {Security} Update security module to track 2 sdk Jul 16, 2021
@jsntcy
Copy link
Copy Markdown
Member

jsntcy commented Jul 16, 2021

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 2 pipeline(s).

@jsntcy jsntcy requested a review from evelyn-ys July 21, 2021 10:41
@jsntcy jsntcy closed this Jul 26, 2021
@jsntcy jsntcy reopened this Jul 26, 2021
@jsntcy jsntcy linked an issue Aug 2, 2021 that may be closed by this pull request

for loc in client.locations.list():
client.config.asc_location = loc.name
client._config.asc_location = loc.name
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
client._config.asc_location = loc.name
client._config.asc_location = loc.name # pylint: disable=protected-access


if assessed_resource_id is None:
assessed_resource_id = '/subscriptions/' + client.config.subscription_id
assessed_resource_id = '/subscriptions/' + client._config.subscription_id # pylint: disable=protected-access
Copy link
Copy Markdown
Member

@jsntcy jsntcy Aug 12, 2021

Choose a reason for hiding this comment

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

Use

from azure.cli.core.commands.client_factory import get_subscription_id
subscription_id = get_subscription_id(cmd.cli_ctx)

to replace client._config.subscription_id
and remove # pylint: disable=protected-access

Also remember add cmd parameter in def list_security_sub_assessments


if assessed_resource_id is None:
assessed_resource_id = '/subscriptions/' + client.config.subscription_id
assessed_resource_id = '/subscriptions/' + client._config.subscription_id # pylint: disable=protected-access
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

same issue as above



def _get_va_sql_api_version():
# def _get_va_sql_api_version():
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove this function if no use

@jsntcy jsntcy merged commit 0ccafa1 into Azure:dev Aug 13, 2021
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.

[Track 2 migration] Migrate Security

4 participants