From 00495bdfcca069abddfd21eeb2c7dab72221188e Mon Sep 17 00:00:00 2001 From: Rahul Singh <53578268+rahuls-microsoft@users.noreply.github.com> Date: Thu, 18 Mar 2021 18:43:04 -0700 Subject: [PATCH] Adding Azure CLI build configuration for Quota APIs (#13202) * 1.Breaking Change - Removing duplicate autoQuotaIncreaseState from supportTicketAction. 2. Removing state=enabledForPreview. 3. Updating Example. * Updating Provider name in example. * Capacity RP Quota APIs for GA * Adding preview version to stable dir as base files. * Files from preview version, which will be removed. * Updating to GA Version. * 1. Updated reservation version tag to - Microsoft.Capacity/preview/2020-10-01-preview/reservations.json, which matches the previous SDK release. 2. Documentation changes. * Documentation updates for put and patch request, which includes only ONE quota request, so changing quotas to quota. * Update documenation for put. * Doc update. * Adding -preview tag for GO sdk. * Updating Go settings for output folder to be -preview. * Adding preview subdir for GO package. * Adding preview subdir to Go sdk path. * Removing tag - tag: package-2020-10-25-preview * introduce a new tag to keep the go sdk package unchanged * Revert "introduce a new tag to keep the go sdk package unchanged" This reverts commit 8f58d3451e9ae5a4746d2a5883911f14ca261f1b. * Adding Azure CLI readme configuration. * Updating the ReadMe configurations. * Updating readme.md * Removing duplicate cli: tag. * Fixing build issues. * Removing Parameter alias. * cli config changes. * Updating the package name to reservation. * Updates - removin .az.md. * Updating Example names to be unique for Get PUT * Adding operations and python-sdk-output-folder. * Updates. * Removing unused file. * Revert "Removing unused file." This reverts commit 4f763bdb14240a3f1ba8e1dce6c7f0b643ee6a9e. * Revert "Revert "Removing unused file."" This reverts commit 60c520e5b50bc13c42d8227624f32031c7ca7694. * Add reference to python readme.md file. * Adding python readme file. * Adding Operations for test-scenario * Adding split * Disabling few operation, which is not needed. * Removing split for Operation * Disabling the reservation Operations. * Disable reservation operations. * Revert "Disable reservation operations." This reverts commit d98cbcbafeb855395f9de45292dfc9db2f5aea9d. * Adding client-subscription-bound: false Co-authored-by: Arcturus Zhang --- .../stable/2020-10-25/quota.json | 6 +- .../resource-manager/readme.az.md | 13 ++++ .../resource-manager/readme.cli.md | 61 +++++++++++++++++++ .../reservations/resource-manager/readme.md | 49 +++------------ .../resource-manager/readme.python.md | 46 ++++++++++++++ 5 files changed, 131 insertions(+), 44 deletions(-) create mode 100644 specification/reservations/resource-manager/readme.az.md create mode 100644 specification/reservations/resource-manager/readme.cli.md create mode 100644 specification/reservations/resource-manager/readme.python.md diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2020-10-25/quota.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2020-10-25/quota.json index c64e3adbdf2c..e48df2780c05 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2020-10-25/quota.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2020-10-25/quota.json @@ -91,13 +91,13 @@ "description": "Create or update the quota (service limits) of a resource to the requested value.\n Steps:\n\r 1. Make the Get request to get the quota information for specific resource.\n\r 2. To increase the quota, update the limit field in the response from Get request to new value.\n\r 3. Submit the JSON to the quota request API to update the quota.\r\n The Create quota request may be constructed as follows. The PUT operation can be used to update the quota.", "operationId": "Quota_CreateOrUpdate", "x-ms-examples": { - "Quotas_Request_ForCompute": { + "Quotas_Request_PutForCompute": { "$ref": "./examples/putComputeOneSkuQuotaRequest.json" }, - "Quotas_Request_ForMachineLearningServices_DedicatedResource": { + "Quotas_Request_PutForMachineLearningServices_DedicatedResource": { "$ref": "./examples/putMachineLearningServicesQuotaRequestDedicated.json" }, - "Quotas_Request_ForMachineLearningServices_LowPriorityResource": { + "Quotas_Request_PutForMachineLearningServices_LowPriorityResource": { "$ref": "./examples/putMachineLearningServicesQuotaRequestLowPriority.json" } }, diff --git a/specification/reservations/resource-manager/readme.az.md b/specification/reservations/resource-manager/readme.az.md new file mode 100644 index 000000000000..699a4d721147 --- /dev/null +++ b/specification/reservations/resource-manager/readme.az.md @@ -0,0 +1,13 @@ +# AZ reservations + +These settings apply only when `--az` is specified on the command line. + +``` yaml $(az) +az: + extensions: quota + namespace: azure.mgmt.reservations + package-name: azure-mgmt-reservations + client-subscription-bound: false +az-output-folder: $(azure-cli-extension-folder)/src/reservations +python-sdk-output-folder: "$(az-output-folder)/azext_reservations/vendored_sdks/quota" +``` diff --git a/specification/reservations/resource-manager/readme.cli.md b/specification/reservations/resource-manager/readme.cli.md new file mode 100644 index 000000000000..06a2c6ed6baf --- /dev/null +++ b/specification/reservations/resource-manager/readme.cli.md @@ -0,0 +1,61 @@ +## CLI + +These settings apply only when `--cli` is specified on the command line. + +``` yaml $(cli) +cli: + cli-name: reservations + package-name: azure-mgmt-reservations + namespace: azure.mgmt.reservations + flatten-all: true + test-scenario: + - name: /Operation/get/GetOperations + disabled: true + - split: quota + - name: /Quota/put/Quotas_Request_PutForCompute + - name: /Quota/put/Quotas_Request_PutForMachineLearningServices_DedicatedResource + - name: /Quota/put/Quotas_Request_PutForMachineLearningServices_LowPriorityResource + - name: /Quota/get/Quotas_listUsagesForCompute + - name: /Quota/get/Quotas_listUsagesMachineLearningServices + - name: /Quota/get/Quotas_Request_ForCompute + - name: /Quota/patch/Quotas_Request_PatchForCompute + - split: quotaRequests + - name: /QuotaRequestStatus/get/QuotaRequestFailed + disabled: true + - name: /QuotaRequestStatus/get/QuotaRequestHistory + - name: /QuotaRequestStatus/get/QuotaRequestInProgress + disabled: true + - name: /QuotaRequestStatus/get/QuotaRequestStatus + - split: exchange + - name: /CalculateExchange/post/CalculateExchange + disabled: true + - name: /Exchange/post/Exchange + disabled: true + - name: /quota/get/AppliedReservationList + - name: /quota/get/Catalog + - split: reservations + - name: /Reservation/get/GetReservation + disabled: true + - name: /Reservation/get/ReservationList + disabled: true + - name: /Reservation/get/ReservationRevisions + disabled: true + - name: /Reservation/patch/PatchReservation + disabled: true + - name: /Reservation/post/AvailableScopes + disabled: true + - name: /Reservation/post/Merge + disabled: true + - name: /Reservation/post/Split + disabled: true + - name: /ReservationOrder/put/Purchase + disabled: true + - name: /ReservationOrder/get/GetReservation + disabled: true + - name: /ReservationOrder/get/GetReservationWithExpandPayments + disabled: true + - name: /ReservationOrder/get/ReservationOrderList + disabled: true + - name: /ReservationOrder/post/Purchase + disabled: true +``` diff --git a/specification/reservations/resource-manager/readme.md b/specification/reservations/resource-manager/readme.md index c2bcacb475d7..69852b041a4f 100644 --- a/specification/reservations/resource-manager/readme.md +++ b/specification/reservations/resource-manager/readme.md @@ -78,6 +78,7 @@ These settings apply only when `--tag=package-preview-2019-04` is specified on t input-file: - Microsoft.Capacity/preview/2019-04-01/reservations.json ``` + ### Tag: package-2018-06 These settings apply only when `--tag=package-2018-06` is specified on the command line. @@ -112,6 +113,7 @@ swagger-to-sdk: - repo: azure-sdk-for-go - repo: azure-sdk-for-js - repo: azure-sdk-for-node + - repo: azure-cli-extensions - repo: azure-resource-manager-schemas after_scripts: - node sdkauto_afterscript.js reservations/resource-manager @@ -133,50 +135,15 @@ csharp: ## Python -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. +See configuration in [readme.python.md](./readme.python.md) -``` yaml $(python) && !$(track2) -python-mode: create -python: - azure-arm: true - license-header: MICROSOFT_MIT_NO_VERSION - payload-flattening-threshold: 2 - namespace: azure.mgmt.reservations - package-name: azure-mgmt-reservations - package-version: 0.3.2 - clear-output-folder: true -``` -``` yaml $(python) && $(track2) -python-mode: create -azure-arm: true -license-header: MICROSOFT_MIT_NO_VERSION -namespace: azure.mgmt.reservations -package-name: azure-mgmt-reservations -package-version: 0.3.2 -clear-output-folder: true -``` +## CLI -``` yaml $(python) && $(python-mode) == 'update' && !$(track2) -python: - no-namespace-folders: true - output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations/azure/mgmt/reservations -``` -``` yaml $(python) && $(python-mode) == 'create' && !$(track2) -python: - basic-setup-py: true - output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations -``` +See configuration in [readme.cli.md](./readme.cli.md) -``` yaml $(python) && $(python-mode) == 'update' && $(track2) -no-namespace-folders: true -output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations/azure/mgmt/reservations -``` -``` yaml $(python) && $(python-mode) == 'create' && $(track2) -basic-setup-py: true -output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations -``` +## AZ + + See configuration in [readme.az.md](./readme.az.md) ## Go diff --git a/specification/reservations/resource-manager/readme.python.md b/specification/reservations/resource-manager/readme.python.md new file mode 100644 index 000000000000..c2d23b97bf67 --- /dev/null +++ b/specification/reservations/resource-manager/readme.python.md @@ -0,0 +1,46 @@ +## Python + +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) && !$(track2) +python-mode: create +python: + azure-arm: true + license-header: MICROSOFT_MIT_NO_VERSION + payload-flattening-threshold: 2 + namespace: azure.mgmt.reservations + package-name: azure-mgmt-reservations + package-version: 0.3.2 + clear-output-folder: true +``` +``` yaml $(python) && $(track2) +python-mode: create +azure-arm: true +license-header: MICROSOFT_MIT_NO_VERSION +namespace: azure.mgmt.reservations +package-name: azure-mgmt-reservations +package-version: 0.3.2 +clear-output-folder: true +``` + +``` yaml $(python) && $(python-mode) == 'update' && !$(track2) +python: + no-namespace-folders: true + output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations/azure/mgmt/reservations +``` +``` yaml $(python) && $(python-mode) == 'create' && !$(track2) +python: + basic-setup-py: true + output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations +``` + +``` yaml $(python) && $(python-mode) == 'update' && $(track2) +no-namespace-folders: true +output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations/azure/mgmt/reservations +``` +``` yaml $(python) && $(python-mode) == 'create' && $(track2) +basic-setup-py: true +output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations +``` \ No newline at end of file