Skip to content

Commit

Permalink
Adding Azure CLI build configuration for Quota APIs (Azure#13202)
Browse files Browse the repository at this point in the history
* 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 8f58d34.

* 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 4f763bd.

* Revert "Revert "Removing unused file.""

This reverts commit 60c520e.

* 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 d98cbcb.

* Adding client-subscription-bound: false

Co-authored-by: Arcturus Zhang <dapzhang@microsoft.com>
  • Loading branch information
2 people authored and mkarmark committed Jul 20, 2021
1 parent 7f8e3c9 commit 00495bd
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
Expand Down
13 changes: 13 additions & 0 deletions specification/reservations/resource-manager/readme.az.md
Original file line number Diff line number Diff line change
@@ -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"
```
61 changes: 61 additions & 0 deletions specification/reservations/resource-manager/readme.cli.md
Original file line number Diff line number Diff line change
@@ -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
```
49 changes: 8 additions & 41 deletions specification/reservations/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -133,50 +135,15 @@ csharp:

## Python

These settings apply only when `--python` is specified on the command line.
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
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

Expand Down
46 changes: 46 additions & 0 deletions specification/reservations/resource-manager/readme.python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## Python

These settings apply only when `--python` is specified on the command line.
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
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
```

0 comments on commit 00495bd

Please sign in to comment.