From 0f2dd574996fe19654ff5bda901a16aeeab6d870 Mon Sep 17 00:00:00 2001 From: Zed Lei <59104634+RAY-316@users.noreply.github.com> Date: Tue, 15 Jun 2021 13:55:51 +0800 Subject: [PATCH] Security t2 (#14676) * sql t2 readme config * readme config * Update readme.python.md * conflient resolve * security t2 config * modelerfour config * Delete duplicate JSON files * del test * Update readme.md * directive x-ms-enum * delete redundant definition Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com> --- .../2020-01-01/applicationWhitelistings.json | 8 ---- .../security/resource-manager/readme.md | 5 +- .../resource-manager/readme.python.md | 46 +++++++++++++++++-- 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/applicationWhitelistings.json b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/applicationWhitelistings.json index 4bfa1d9d474d..4c449c09d25e 100644 --- a/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/applicationWhitelistings.json +++ b/specification/security/resource-manager/Microsoft.Security/stable/2020-01-01/applicationWhitelistings.json @@ -553,10 +553,6 @@ "description": "Include the policy rules", "type": "boolean", "required": false, - "enum": [ - false, - true - ], "x-ms-parameter-location": "method" }, "Summary": { @@ -565,10 +561,6 @@ "description": "Return output in a summarized form", "type": "boolean", "required": false, - "enum": [ - false, - true - ], "x-ms-parameter-location": "method" }, "AdaptiveApplicationControlGroup": { diff --git a/specification/security/resource-manager/readme.md b/specification/security/resource-manager/readme.md index 23c851a84205..f18212ae14e3 100644 --- a/specification/security/resource-manager/readme.md +++ b/specification/security/resource-manager/readme.md @@ -187,10 +187,6 @@ input-file: - Microsoft.Security/stable/2019-08-01/deviceSecurityGroups.json - Microsoft.Security/stable/2019-08-01/iotSecuritySolutions.json - Microsoft.Security/stable/2019-08-01/iotSecuritySolutionAnalytics.json -- Microsoft.Security/stable/2019-08-01/iotAlertTypes.json -- Microsoft.Security/stable/2019-08-01/iotAlerts.json -- Microsoft.Security/stable/2019-08-01/iotRecommendationTypes.json -- Microsoft.Security/stable/2019-08-01/iotRecommendations.json - Microsoft.Security/preview/2015-06-01-preview/locations.json - Microsoft.Security/preview/2015-06-01-preview/operations.json - Microsoft.Security/preview/2015-06-01-preview/tasks.json @@ -486,6 +482,7 @@ swagger-to-sdk: - repo: azure-sdk-for-net - repo: azure-sdk-for-go - repo: azure-sdk-for-python + - repo: azure-sdk-for-python-track2 - repo: azure-sdk-for-js - repo: azure-sdk-for-node - repo: azure-resource-manager-schemas diff --git a/specification/security/resource-manager/readme.python.md b/specification/security/resource-manager/readme.python.md index 46bfb3c58b8f..448922f953a8 100644 --- a/specification/security/resource-manager/readme.python.md +++ b/specification/security/resource-manager/readme.python.md @@ -4,7 +4,7 @@ These settings apply only when `--python` is specified on the command line. Please also specify `--python-sdks-folder=`. Use `--python-mode=update` if you already have a setup.py and just want to update the code itself. -``` yaml $(python) +``` yaml $(python) && !$(track2) python-mode: create python: azure-arm: true @@ -15,13 +15,53 @@ python: package-version: 0.1.0 clear-output-folder: true ``` -``` yaml $(python) && $(python-mode) == 'update' +``` yaml $(python) && $(track2) +python-mode: create +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +namespace: azure.mgmt.security +package-name: azure-mgmt-security +package-version: 1.0.0b1 +clear-output-folder: true +modelerfour: + lenient-model-deduplication: true +``` + +``` yaml $(python) && $(python-mode) == 'update' && !$(track2) python: no-namespace-folders: true output-folder: $(python-sdks-folder)/security/azure-mgmt-security/azure/mgmt/security ``` -``` yaml $(python) && $(python-mode) == 'create' +``` yaml $(python) && $(python-mode) == 'create' && !$(track2) python: basic-setup-py: true output-folder: $(python-sdks-folder)/security/azure-mgmt-security ``` +``` yaml $(python) && $(python-mode) == 'update' && $(track2) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/security/azure-mgmt-security/azure/mgmt/security +``` +``` yaml $(python) && $(python-mode) == 'create' && $(track2) +basic-setup-py: true +output-folder: $(python-sdks-folder)/security/azure-mgmt-security +``` + +```yaml $(python) && $(track2) +directive: + - from: swagger-document + where: $.definitions.AadConnectivityState.properties.connectivityState + transform: > + $['x-ms-enum']['name'] = 'AadConnectivityStateEnum'; + - from: swagger-document + where: $.definitions.ExternalSecuritySolutionKind.properties.kind + transform: > + $['x-ms-enum']['name'] = 'ExternalSecuritySolutionKindEnum'; + - from: jitNetworkAccessPolicies.json + where: $.definitions.JitNetworkAccessPortRule.properties.protocol + transform: > + $['x-ms-enum']['name'] = 'protocolEnum'; + - from: alerts.json + where: $.definitions.AlertSimulatorRequestProperties.properties.kind + transform: > + $['x-ms-enum']['name'] = 'kindEnum'; +``` \ No newline at end of file