Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Azure CLI build configuration for Quota APIs #13202

Merged
merged 53 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
3a31345
1.Breaking Change - Removing duplicate autoQuotaIncreaseState from su…
rahuls-microsoft Jun 4, 2020
2d30c2d
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
rahuls-microsoft Jun 25, 2020
d6599d1
Updating Provider name in example.
rahuls-microsoft Jun 25, 2020
4b1565d
Merge branch 'master' of https://github.com/Azure/azure-rest-api-spec…
rahuls-microsoft Jul 29, 2020
15e533d
Capacity RP Quota APIs for GA
rahuls-microsoft Dec 3, 2020
8f96e78
Adding preview version to stable dir as base files.
rahuls-microsoft Dec 10, 2020
8beb75c
Files from preview version, which will be removed.
rahuls-microsoft Dec 10, 2020
b034d7f
Updating to GA Version.
rahuls-microsoft Dec 10, 2020
cd7674b
Merge branch 'master' of https://github.com/rahuls-microsoft/azure-re…
rahuls-microsoft Dec 28, 2020
6311684
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
rahuls-microsoft Dec 28, 2020
14c272b
1. Updated reservation version tag to - Microsoft.Capacity/preview/20…
rahuls-microsoft Jan 5, 2021
436af3a
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
rahuls-microsoft Jan 5, 2021
d77efa6
Documentation updates for put and patch request, which includes only …
rahuls-microsoft Jan 5, 2021
265aa4e
Merge branch 'master' of https://github.com/rahuls-microsoft/azure-re…
rahuls-microsoft Jan 5, 2021
8fcb79f
Update documenation for put.
rahuls-microsoft Jan 5, 2021
add00fa
Doc update.
rahuls-microsoft Jan 5, 2021
53031a3
Adding -preview tag for GO sdk.
rahuls-microsoft Jan 11, 2021
a7963c7
Updating Go settings for output folder to be -preview.
rahuls-microsoft Jan 11, 2021
8ea3dc3
Adding preview subdir for GO package.
rahuls-microsoft Jan 11, 2021
69ffa31
Adding preview subdir to Go sdk path.
rahuls-microsoft Jan 11, 2021
3cd5abd
Removing tag - tag: package-2020-10-25-preview
rahuls-microsoft Jan 11, 2021
8f58d34
introduce a new tag to keep the go sdk package unchanged
ArcturusZhang Jan 13, 2021
ba279fb
Revert "introduce a new tag to keep the go sdk package unchanged"
ArcturusZhang Jan 13, 2021
ab2682f
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
rahuls-microsoft Feb 24, 2021
a0c7ca6
Adding Azure CLI readme configuration.
rahuls-microsoft Feb 24, 2021
e9d42c5
Updating the ReadMe configurations.
rahuls-microsoft Feb 24, 2021
a6dfdee
Updating readme.md
rahuls-microsoft Feb 24, 2021
903c03f
Removing duplicate cli: tag.
rahuls-microsoft Feb 24, 2021
6c5235b
Fixing build issues.
rahuls-microsoft Feb 24, 2021
bbf7bea
Removing Parameter alias.
rahuls-microsoft Feb 24, 2021
c6932ae
cli config changes.
rahuls-microsoft Feb 24, 2021
cd9c3f0
Updating the package name to reservation.
rahuls-microsoft Feb 24, 2021
5ddb176
Updates - removin .az.md.
rahuls-microsoft Feb 24, 2021
8d9ab59
Updating Example names to be unique for Get PUT
rahuls-microsoft Feb 24, 2021
6e9e11b
Adding operations and python-sdk-output-folder.
rahuls-microsoft Feb 25, 2021
bb11c65
Updates.
rahuls-microsoft Feb 25, 2021
4f763bd
Removing unused file.
rahuls-microsoft Feb 25, 2021
60c520e
Revert "Removing unused file."
rahuls-microsoft Feb 26, 2021
312e0bc
Revert "Revert "Removing unused file.""
rahuls-microsoft Feb 26, 2021
6142b0c
Add reference to python readme.md file.
rahuls-microsoft Feb 26, 2021
01d34bd
Merge branch 'master' into cli
rahuls-microsoft Feb 26, 2021
4efa54e
Adding python readme file.
rahuls-microsoft Feb 26, 2021
461f3f4
Adding Operations for test-scenario
rahuls-microsoft Feb 26, 2021
d3fd8b8
Adding split
rahuls-microsoft Feb 26, 2021
be8d817
Disabling few operation, which is not needed.
rahuls-microsoft Feb 26, 2021
f4f56d3
Removing split for Operation
rahuls-microsoft Feb 26, 2021
5bb57ba
Disabling the reservation Operations.
rahuls-microsoft Mar 1, 2021
d98cbcb
Disable reservation operations.
rahuls-microsoft Mar 1, 2021
dd5fef9
Revert "Disable reservation operations."
rahuls-microsoft Mar 1, 2021
0bb090c
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
rahuls-microsoft Mar 1, 2021
f08558b
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
rahuls-microsoft Mar 5, 2021
f525855
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs
rahuls-microsoft Mar 5, 2021
fb18c89
Adding client-subscription-bound: false
rahuls-microsoft Mar 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
```
Copy link
Member

Choose a reason for hiding this comment

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

based on the scenario that quota and reservation is functionally independent, I would suggest you to use multi-package https://github.com/Azure/azure-rest-api-specs/blob/master/documentation/code-gen/configure-cli.md#multi-packages

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)
Copy link
Member

Choose a reason for hiding this comment

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

actually readme.az.md is for azure-cli readme.cli,md is meant to for all command line tools


``` 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
```