Skip to content

Commit

Permalink
[Python] track2 config (Azure#14990)
Browse files Browse the repository at this point in the history
* authorization

* automation

* recoveryservices

* logic

* notificationhubs

* search
  • Loading branch information
msyyc authored and mkarmark committed Jul 20, 2021
1 parent e9946e4 commit 279268e
Show file tree
Hide file tree
Showing 12 changed files with 99 additions and 205 deletions.
8 changes: 5 additions & 3 deletions specification/authorization/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,7 @@ This is not used by Autorest itself.
``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
after_scripts:
- python ./scripts/multiapi_init_gen.py azure-mgmt-authorization --default-api-version=2018-09-01-preview
- repo: azure-sdk-for-python-track2
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
- repo: azure-sdk-for-node
Expand All @@ -362,5 +360,9 @@ See configuration in [readme.go.md](./readme.go.md)

See configuration in [readme.java.md](./readme.java.md)

## Python

See configuration in [readme.python.md](./readme.python.md)



80 changes: 36 additions & 44 deletions specification/authorization/resource-manager/readme.python.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
## 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)
python-mode: create
python:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 2
package-name: azure-mgmt-authorization
clear-output-folder: true
no-namespace-folders: true
These settings apply only when `--track2` is specified on the command line.

``` yaml $(track2)
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
package-name: azure-mgmt-authorization
no-namespace-folders: true
package-version: 1.0.0b1
```
### Python multi-api
Generate all API versions currently shipped for this package
```yaml $(python) && $(multiapi)
```yaml $(multiapi)
clear-output-folder: true
batch:
- tag: package-2021-03-01-preview-only
- tag: package-2021-01-01-preview-only
Expand All @@ -31,103 +27,99 @@ batch:
- tag: package-2018-01-01-preview-only
- tag: package-2015-07-01
- tag: package-2015-06-01-preview
- multiapiscript: true
```
``` yaml $(multiapiscript)
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/
clear-output-folder: false
perform-load: false
```
### Tag: package-2021-03-01-preview-only and python
These settings apply only when `--tag=package-2021-03-01-preview-only --python` is specified on the command line.

``` yaml $(tag) == 'package-2021-03-01-preview-only' && $(python)
python:
namespace: azure.mgmt.authorization.v2021_03_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2021_03_01_preview
namespace: azure.mgmt.authorization.v2021_03_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2021_03_01_preview
```

### Tag: package-2020-04-01-preview-only and python

These settings apply only when `--tag=package-2020-04-01-preview-only --python` is specified on the command line.

``` yaml $(tag) == 'package-2020-04-01-preview-only' && $(python)
python:
namespace: azure.mgmt.authorization.v2020_04_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2020_04_01_preview
namespace: azure.mgmt.authorization.v2020_04_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2020_04_01_preview
```

### Tag: package-2018-09-01-preview-only and python

These settings apply only when `--tag=package-2018-09-01-preview-only --python` is specified on the command line.

``` yaml $(tag) == 'package-2018-09-01-preview-only' && $(python)
python:
namespace: azure.mgmt.authorization.v2018_09_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview
namespace: azure.mgmt.authorization.v2018_09_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_09_01_preview
```

### Tag: package-2018-07-01-preview-only and python

These settings apply only when `--tag=package-2018-07-01-preview-only --python` is specified on the command line.

``` yaml $(tag) == 'package-2018-07-01-preview-only' && $(python)
python:
namespace: azure.mgmt.authorization.v2018_07_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview
namespace: azure.mgmt.authorization.v2018_07_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview
```

### Tag: package-2018-05-01-preview and python

These settings apply only when `--tag=package-2018-05-01-preview --python` is specified on the command line.

``` yaml $(tag) == 'package-2018-05-01-preview' && $(python)
python:
namespace: azure.mgmt.authorization.v2018_05_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_05_01_preview
namespace: azure.mgmt.authorization.v2018_05_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_05_01_preview
```

### Tag: package-2018-01-01-preview-only and python

These settings apply only when `--tag=package-2018-01-01-preview-only --python` is specified on the command line.

``` yaml $(tag) == 'package-2018-01-01-preview-only' && $(python)
python:
namespace: azure.mgmt.authorization.v2018_01_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview
namespace: azure.mgmt.authorization.v2018_01_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview
```

### Tag: package-2015-07-01 and python

These settings apply only when `--tag=package-2015-07-01 --python` is specified on the command line.

``` yaml $(tag) == 'package-2015-07-01' && $(python)
python:
namespace: azure.mgmt.authorization.v2015_07_01
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01
namespace: azure.mgmt.authorization.v2015_07_01
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01
```

### Tag: 2015-06-01-preview and python

These settings apply only when `--tag=2015-06-01-preview --python` is specified on the command line.

``` yaml $(tag) == 'package-2015-06-01-preview' && $(python)
python:
namespace: azure.mgmt.authorization.v2015_06_01
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_06_01
namespace: azure.mgmt.authorization.v2015_06_01
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_06_01
```

### Tag: package-2021-01-01-preview-only and python

These settings apply only when `--tag=package-2021-01-01-preview-only --python` is specified on the command line.

``` yaml $(tag) == 'package-2021-01-01-preview-only' && $(python)
python:
namespace: azure.mgmt.authorization.v2021_01_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2021_01_01_preview
namespace: azure.mgmt.authorization.v2021_01_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2021_01_01_preview
```
### Tag: package-2020-10-01-preview and python

These settings apply only when `--tag=package-2020-10-01-preview --python` is specified on the command line.

``` yaml $(tag) == 'package-2020-10-01-preview' && $(python)
python:
namespace: azure.mgmt.authorization.v2020_10_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2020_10_01_preview
namespace: azure.mgmt.authorization.v2020_10_01_preview
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2020_10_01_preview
```
1 change: 0 additions & 1 deletion specification/automation/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ This is not used by Autorest itself.
``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-python-track2
- repo: azure-sdk-for-go
- repo: azure-sdk-for-js
Expand Down
31 changes: 5 additions & 26 deletions specification/automation/resource-manager/readme.python.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,28 @@

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.automation
package-name: azure-mgmt-automation
package-version: 0.1.1
clear-output-folder: true
```
``` yaml $(python) && $(track2)
python-mode: create
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
namespace: azure.mgmt.automation
package-name: azure-mgmt-automation
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)/automation/azure-mgmt-automation/azure/mgmt/automation
```
``` yaml $(python) && $(python-mode) == 'update' && $(track2)
no-namespace-folders: true
output-folder: $(python-sdks-folder)/automation/azure-mgmt-automation/azure/mgmt/automation
```
``` yaml $(python) && $(python-mode) == 'create' && !$(track2)
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/automation/azure-mgmt-automation
```
``` yaml $(python) && $(python-mode) == 'create' && $(track2)
basic-setup-py: true
output-folder: $(python-sdks-folder)/automation/azure-mgmt-automation
```
``` yaml $(python) && $(track2)
modelerfour:
lenient-model-deduplication: true
```
29 changes: 2 additions & 27 deletions specification/logic/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ This is not used by Autorest itself.
``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-python-track2
- repo: azure-sdk-for-java
- repo: azure-sdk-for-trenton
- repo: azure-sdk-for-go
Expand Down Expand Up @@ -155,32 +155,7 @@ 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.

``` yaml $(python)
python-mode: create
python:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 2
namespace: azure.mgmt.logic
package-name: azure-mgmt-logic
clear-output-folder: true
```

``` yaml $(python) && $(python-mode) == 'update'
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/logic/azure-mgmt-logic/azure/mgmt/logic
```

``` yaml $(python) && $(python-mode) == 'create'
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/logic/azure-mgmt-logic
```
See configuration in [readme.python.md](./readme.python.md)

## Go

Expand Down
21 changes: 1 addition & 20 deletions specification/logic/resource-manager/readme.python.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,15 @@
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>`.

```yaml $(python) && !$(track2)
python:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
namespace: azure.mgmt.logic
package-name: azure-mgmt-logic
package-version: 2019-05-01
clear-output-folder: true
```
```yaml $(python) && $(track2)
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
namespace: azure.mgmt.logic
package-name: azure-mgmt-logic
package-version: 2019-05-01
package-version: 1.0.0b1
clear-output-folder: true
```
``` yaml $(python) && $(python-mode) == 'update' && !$(track2)
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/logic/azure-mgmt-logic/azure/mgmt/logic
```
``` yaml $(python) && $(python-mode) == 'create' && !$(track2)
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/logic/azure-mgmt-logic
```
``` yaml $(python) && $(python-mode) == 'update' && $(track2)
no-namespace-folders: true
output-folder: $(python-sdks-folder)/logic/azure-mgmt-logic/azure/mgmt/logic
Expand Down
42 changes: 2 additions & 40 deletions specification/notificationhubs/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ This is not used by Autorest itself.
``` yaml $(swagger-to-sdk)
swagger-to-sdk:
- repo: azure-sdk-for-net
- repo: azure-sdk-for-python
- repo: azure-sdk-for-python-track2
- repo: azure-sdk-for-java
- repo: azure-sdk-for-go
- repo: azure-sdk-for-js
Expand Down Expand Up @@ -114,45 +114,7 @@ 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.

``` yaml $(python) && !$(track2)
python-mode: create
python:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
payload-flattening-threshold: 2
namespace: azure.mgmt.notificationhubs
package-name: azure-mgmt-notificationhubs
clear-output-folder: true
```

``` yaml $(python) && $(track2)
python-mode: create
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
namespace: azure.mgmt.notificationhubs
package-name: azure-mgmt-notificationhubs
package-version: 7.0.0b1
clear-output-folder: true
```

``` yaml $(python) && $(python-mode) == 'update'
no-namespace-folders: true
output-folder: $(python-sdks-folder)/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs
```
``` yaml $(python) && $(python-mode) == 'create'
basic-setup-py: true
output-folder: $(python-sdks-folder)/notificationhubs/azure-mgmt-notificationhubs
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/notificationhubs/azure-mgmt-notificationhubs
```
See configuration in [readme.python.md](./readme.python.md)

## Go

Expand Down
Loading

0 comments on commit 279268e

Please sign in to comment.