Skip to content

Commit 7f530e3

Browse files
authored
[Python] track2 config (#14990)
* authorization * automation * recoveryservices * logic * notificationhubs * search
1 parent 8dff86d commit 7f530e3

File tree

12 files changed

+99
-205
lines changed

12 files changed

+99
-205
lines changed

specification/authorization/resource-manager/readme.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,7 @@ This is not used by Autorest itself.
341341
``` yaml $(swagger-to-sdk)
342342
swagger-to-sdk:
343343
- repo: azure-sdk-for-net
344-
- repo: azure-sdk-for-python
345-
after_scripts:
346-
- python ./scripts/multiapi_init_gen.py azure-mgmt-authorization --default-api-version=2018-09-01-preview
344+
- repo: azure-sdk-for-python-track2
347345
- repo: azure-sdk-for-java
348346
- repo: azure-sdk-for-go
349347
- repo: azure-sdk-for-node
@@ -362,5 +360,9 @@ See configuration in [readme.go.md](./readme.go.md)
362360

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

363+
## Python
364+
365+
See configuration in [readme.python.md](./readme.python.md)
366+
365367

366368

Lines changed: 36 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
11
## Python
22

3-
These settings apply only when `--python` is specified on the command line.
4-
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
5-
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.
6-
7-
``` yaml $(python)
8-
python-mode: create
9-
python:
10-
azure-arm: true
11-
license-header: MICROSOFT_MIT_NO_VERSION
12-
payload-flattening-threshold: 2
13-
package-name: azure-mgmt-authorization
14-
clear-output-folder: true
15-
no-namespace-folders: true
3+
These settings apply only when `--track2` is specified on the command line.
4+
5+
``` yaml $(track2)
6+
azure-arm: true
7+
license-header: MICROSOFT_MIT_NO_VERSION
8+
package-name: azure-mgmt-authorization
9+
no-namespace-folders: true
10+
package-version: 1.0.0b1
1611
```
1712
1813
### Python multi-api
1914
2015
Generate all API versions currently shipped for this package
2116
22-
```yaml $(python) && $(multiapi)
17+
```yaml $(multiapi)
18+
clear-output-folder: true
2319
batch:
2420
- tag: package-2021-03-01-preview-only
2521
- tag: package-2021-01-01-preview-only
@@ -31,103 +27,99 @@ batch:
3127
- tag: package-2018-01-01-preview-only
3228
- tag: package-2015-07-01
3329
- tag: package-2015-06-01-preview
30+
- multiapiscript: true
31+
```
32+
``` yaml $(multiapiscript)
33+
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/
34+
clear-output-folder: false
35+
perform-load: false
3436
```
3537
3638
### Tag: package-2021-03-01-preview-only and python
3739
3840
These settings apply only when `--tag=package-2021-03-01-preview-only --python` is specified on the command line.
3941

4042
``` yaml $(tag) == 'package-2021-03-01-preview-only' && $(python)
41-
python:
42-
namespace: azure.mgmt.authorization.v2021_03_01_preview
43-
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2021_03_01_preview
43+
namespace: azure.mgmt.authorization.v2021_03_01_preview
44+
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2021_03_01_preview
4445
```
4546

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

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

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

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

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

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

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

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

7069
``` yaml $(tag) == 'package-2018-07-01-preview-only' && $(python)
71-
python:
72-
namespace: azure.mgmt.authorization.v2018_07_01_preview
73-
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview
70+
namespace: azure.mgmt.authorization.v2018_07_01_preview
71+
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_07_01_preview
7472
```
7573

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

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

8078
``` yaml $(tag) == 'package-2018-05-01-preview' && $(python)
81-
python:
82-
namespace: azure.mgmt.authorization.v2018_05_01_preview
83-
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_05_01_preview
79+
namespace: azure.mgmt.authorization.v2018_05_01_preview
80+
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_05_01_preview
8481
```
8582

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

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

9087
``` yaml $(tag) == 'package-2018-01-01-preview-only' && $(python)
91-
python:
92-
namespace: azure.mgmt.authorization.v2018_01_01_preview
93-
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview
88+
namespace: azure.mgmt.authorization.v2018_01_01_preview
89+
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2018_01_01_preview
9490
```
9591

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

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

10096
``` yaml $(tag) == 'package-2015-07-01' && $(python)
101-
python:
102-
namespace: azure.mgmt.authorization.v2015_07_01
103-
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01
97+
namespace: azure.mgmt.authorization.v2015_07_01
98+
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_07_01
10499
```
105100

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

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

110105
``` yaml $(tag) == 'package-2015-06-01-preview' && $(python)
111-
python:
112-
namespace: azure.mgmt.authorization.v2015_06_01
113-
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_06_01
106+
namespace: azure.mgmt.authorization.v2015_06_01
107+
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2015_06_01
114108
```
115109

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

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

120114
``` yaml $(tag) == 'package-2021-01-01-preview-only' && $(python)
121-
python:
122-
namespace: azure.mgmt.authorization.v2021_01_01_preview
123-
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2021_01_01_preview
115+
namespace: azure.mgmt.authorization.v2021_01_01_preview
116+
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2021_01_01_preview
124117
```
125118
### Tag: package-2020-10-01-preview and python
126119

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

129122
``` yaml $(tag) == 'package-2020-10-01-preview' && $(python)
130-
python:
131-
namespace: azure.mgmt.authorization.v2020_10_01_preview
132-
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2020_10_01_preview
123+
namespace: azure.mgmt.authorization.v2020_10_01_preview
124+
output-folder: $(python-sdks-folder)/authorization/azure-mgmt-authorization/azure/mgmt/authorization/v2020_10_01_preview
133125
```

specification/automation/resource-manager/readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ This is not used by Autorest itself.
270270
``` yaml $(swagger-to-sdk)
271271
swagger-to-sdk:
272272
- repo: azure-sdk-for-net
273-
- repo: azure-sdk-for-python
274273
- repo: azure-sdk-for-python-track2
275274
- repo: azure-sdk-for-go
276275
- repo: azure-sdk-for-js

specification/automation/resource-manager/readme.python.md

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,28 @@
22

33
These settings apply only when `--python` is specified on the command line.
44
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
5-
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.
65

7-
``` yaml $(python) && !$(track2)
8-
python-mode: create
9-
python:
10-
azure-arm: true
11-
license-header: MICROSOFT_MIT_NO_VERSION
12-
payload-flattening-threshold: 2
13-
namespace: azure.mgmt.automation
14-
package-name: azure-mgmt-automation
15-
package-version: 0.1.1
16-
clear-output-folder: true
17-
```
186
``` yaml $(python) && $(track2)
19-
python-mode: create
207
azure-arm: true
218
license-header: MICROSOFT_MIT_NO_VERSION
229
namespace: azure.mgmt.automation
2310
package-name: azure-mgmt-automation
2411
package-version: 1.0.0b1
2512
clear-output-folder: true
26-
modelerfour:
27-
lenient-model-deduplication: true
28-
```
29-
30-
``` yaml $(python) && $(python-mode) == 'update' && !$(track2)
31-
python:
32-
no-namespace-folders: true
33-
output-folder: $(python-sdks-folder)/automation/azure-mgmt-automation/azure/mgmt/automation
3413
```
3514
3615
``` yaml $(python) && $(python-mode) == 'update' && $(track2)
3716
no-namespace-folders: true
3817
output-folder: $(python-sdks-folder)/automation/azure-mgmt-automation/azure/mgmt/automation
3918
```
4019
41-
``` yaml $(python) && $(python-mode) == 'create' && !$(track2)
42-
python:
43-
basic-setup-py: true
44-
output-folder: $(python-sdks-folder)/automation/azure-mgmt-automation
45-
```
4620
4721
``` yaml $(python) && $(python-mode) == 'create' && $(track2)
4822
basic-setup-py: true
4923
output-folder: $(python-sdks-folder)/automation/azure-mgmt-automation
5024
```
25+
26+
``` yaml $(python) && $(track2)
27+
modelerfour:
28+
lenient-model-deduplication: true
29+
```

specification/logic/resource-manager/readme.md

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ This is not used by Autorest itself.
126126
``` yaml $(swagger-to-sdk)
127127
swagger-to-sdk:
128128
- repo: azure-sdk-for-net
129-
- repo: azure-sdk-for-python
129+
- repo: azure-sdk-for-python-track2
130130
- repo: azure-sdk-for-java
131131
- repo: azure-sdk-for-trenton
132132
- repo: azure-sdk-for-go
@@ -155,32 +155,7 @@ csharp:
155155

156156
## Python
157157

158-
These settings apply only when `--python` is specified on the command line.
159-
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
160-
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.
161-
162-
``` yaml $(python)
163-
python-mode: create
164-
python:
165-
azure-arm: true
166-
license-header: MICROSOFT_MIT_NO_VERSION
167-
payload-flattening-threshold: 2
168-
namespace: azure.mgmt.logic
169-
package-name: azure-mgmt-logic
170-
clear-output-folder: true
171-
```
172-
173-
``` yaml $(python) && $(python-mode) == 'update'
174-
python:
175-
no-namespace-folders: true
176-
output-folder: $(python-sdks-folder)/logic/azure-mgmt-logic/azure/mgmt/logic
177-
```
178-
179-
``` yaml $(python) && $(python-mode) == 'create'
180-
python:
181-
basic-setup-py: true
182-
output-folder: $(python-sdks-folder)/logic/azure-mgmt-logic
183-
```
158+
See configuration in [readme.python.md](./readme.python.md)
184159

185160
## Go
186161

specification/logic/resource-manager/readme.python.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,15 @@
33
These settings apply only when `--python` is specified on the command line.
44
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
55

6-
```yaml $(python) && !$(track2)
7-
python:
8-
azure-arm: true
9-
license-header: MICROSOFT_MIT_NO_VERSION
10-
namespace: azure.mgmt.logic
11-
package-name: azure-mgmt-logic
12-
package-version: 2019-05-01
13-
clear-output-folder: true
14-
```
156
```yaml $(python) && $(track2)
167
azure-arm: true
178
license-header: MICROSOFT_MIT_NO_VERSION
189
namespace: azure.mgmt.logic
1910
package-name: azure-mgmt-logic
20-
package-version: 2019-05-01
11+
package-version: 1.0.0b1
2112
clear-output-folder: true
2213
```
2314
24-
``` yaml $(python) && $(python-mode) == 'update' && !$(track2)
25-
python:
26-
no-namespace-folders: true
27-
output-folder: $(python-sdks-folder)/logic/azure-mgmt-logic/azure/mgmt/logic
28-
```
29-
``` yaml $(python) && $(python-mode) == 'create' && !$(track2)
30-
python:
31-
basic-setup-py: true
32-
output-folder: $(python-sdks-folder)/logic/azure-mgmt-logic
33-
```
3415
``` yaml $(python) && $(python-mode) == 'update' && $(track2)
3516
no-namespace-folders: true
3617
output-folder: $(python-sdks-folder)/logic/azure-mgmt-logic/azure/mgmt/logic

specification/notificationhubs/resource-manager/readme.md

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ This is not used by Autorest itself.
8585
``` yaml $(swagger-to-sdk)
8686
swagger-to-sdk:
8787
- repo: azure-sdk-for-net
88-
- repo: azure-sdk-for-python
88+
- repo: azure-sdk-for-python-track2
8989
- repo: azure-sdk-for-java
9090
- repo: azure-sdk-for-go
9191
- repo: azure-sdk-for-js
@@ -114,45 +114,7 @@ csharp:
114114

115115
## Python
116116

117-
These settings apply only when `--python` is specified on the command line.
118-
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
119-
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.
120-
121-
``` yaml $(python) && !$(track2)
122-
python-mode: create
123-
python:
124-
azure-arm: true
125-
license-header: MICROSOFT_MIT_NO_VERSION
126-
payload-flattening-threshold: 2
127-
namespace: azure.mgmt.notificationhubs
128-
package-name: azure-mgmt-notificationhubs
129-
clear-output-folder: true
130-
```
131-
132-
``` yaml $(python) && $(track2)
133-
python-mode: create
134-
azure-arm: true
135-
license-header: MICROSOFT_MIT_NO_VERSION
136-
namespace: azure.mgmt.notificationhubs
137-
package-name: azure-mgmt-notificationhubs
138-
package-version: 7.0.0b1
139-
clear-output-folder: true
140-
```
141-
142-
``` yaml $(python) && $(python-mode) == 'update'
143-
no-namespace-folders: true
144-
output-folder: $(python-sdks-folder)/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs
145-
python:
146-
no-namespace-folders: true
147-
output-folder: $(python-sdks-folder)/notificationhubs/azure-mgmt-notificationhubs/azure/mgmt/notificationhubs
148-
```
149-
``` yaml $(python) && $(python-mode) == 'create'
150-
basic-setup-py: true
151-
output-folder: $(python-sdks-folder)/notificationhubs/azure-mgmt-notificationhubs
152-
python:
153-
basic-setup-py: true
154-
output-folder: $(python-sdks-folder)/notificationhubs/azure-mgmt-notificationhubs
155-
```
117+
See configuration in [readme.python.md](./readme.python.md)
156118

157119
## Go
158120

0 commit comments

Comments
 (0)