Skip to content

Commit 0abc049

Browse files
authored
[python]track2 config for some services (Azure#15007)
* consumption * delete track1 config
1 parent 4bab0bf commit 0abc049

File tree

8 files changed

+84
-132
lines changed

8 files changed

+84
-132
lines changed

specification/advisor/resource-manager/readme.md

Lines changed: 5 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -85,62 +85,22 @@ 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
9292
- repo: azure-sdk-for-node
9393
- repo: azure-resource-manager-schemas
9494
```
9595

96-
## Python
97-
98-
These settings apply only when `--python` is specified on the command line.
99-
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
100-
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.
101-
102-
``` yaml $(python) && !$(track2)
103-
python-mode: create
104-
python:
105-
azure-arm: true
106-
license-header: MICROSOFT_MIT_NO_VERSION
107-
payload-flattening-threshold: 2
108-
namespace: azure.mgmt.advisor
109-
package-name: azure-mgmt-advisor
110-
package-version: 1.0.1
111-
clear-output-folder: true
112-
```
113-
114-
``` yaml $(python) && $(track2)
115-
python-mode: create
116-
azure-arm: true
117-
license-header: MICROSOFT_MIT_NO_VERSION
118-
namespace: azure.mgmt.advisor
119-
package-name: azure-mgmt-advisor
120-
package-version: 9.0.0b1
121-
clear-output-folder: true
122-
```
123-
124-
``` yaml $(python) && $(python-mode) == 'update'
125-
no-namespace-folders: true
126-
output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor/azure/mgmt/advisor
127-
python:
128-
no-namespace-folders: true
129-
output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor/azure/mgmt/advisor
130-
```
131-
132-
``` yaml $(python) && $(python-mode) == 'create'
133-
basic-setup-py: true
134-
output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor
135-
python:
136-
basic-setup-py: true
137-
output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor
138-
```
139-
14096
## Go
14197

14298
See configuration in [readme.go.md](./readme.go.md)
14399

100+
## Python
101+
102+
See configuration in [readme.python.md](./readme.python.md)
103+
144104
## C#
145105

146106
These settings apply only when `--csharp` is specified on the command line.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Python
2+
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) && $(track2)
8+
azure-arm: true
9+
license-header: MICROSOFT_MIT_NO_VERSION
10+
namespace: azure.mgmt.advisor
11+
package-name: azure-mgmt-advisor
12+
package-version: 9.0.0b1
13+
clear-output-folder: true
14+
```
15+
16+
``` yaml $(python) && $(python-mode) == 'update' && $(track2)
17+
no-namespace-folders: true
18+
output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor/azure/mgmt/advisor
19+
```
20+
21+
``` yaml $(python) && $(python-mode) == 'create' && $(track2)
22+
basic-setup-py: true
23+
output-folder: $(python-sdks-folder)/advisor/azure-mgmt-advisor
24+
```

specification/commerce/resource-manager/readme.md

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,7 @@ This is not used by Autorest itself.
5959

6060
``` yaml $(swagger-to-sdk)
6161
swagger-to-sdk:
62-
- repo: azure-sdk-for-python
63-
after_scripts:
64-
- python ./scripts/multiapi_init_gen.py azure-mgmt-commerce
62+
- repo: azure-sdk-for-python-track2
6563
- repo: azure-sdk-for-java
6664
- repo: azure-sdk-for-go
6765
- repo: azure-sdk-for-js
@@ -75,43 +73,7 @@ swagger-to-sdk:
7573

7674
## Python
7775

78-
These settings apply only when `--python` is specified on the command line.
79-
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
80-
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.
81-
82-
``` yaml $(python)
83-
python-mode: create
84-
python:
85-
azure-arm: true
86-
license-header: MICROSOFT_MIT_NO_VERSION
87-
payload-flattening-threshold: 2
88-
namespace: azure.mgmt.commerce
89-
package-name: azure-mgmt-commerce
90-
clear-output-folder: true
91-
no-namespace-folders: true
92-
```
93-
94-
### Python multi-api
95-
96-
Generate all API versions currently shipped for this package
97-
98-
```yaml $(python) && $(multiapi)
99-
batch:
100-
- tag: package-2015-06-preview
101-
```
102-
103-
### Tag: package-2015-06-preview and python
104-
105-
These settings apply only when `--tag=package-2015-06-preview --python` is specified on the command line.
106-
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
107-
108-
``` yaml $(tag) == 'package-2015-06-preview' && $(python)
109-
namespace: azure.mgmt.commerce.v2015_06_01_preview
110-
output-folder: $(python-sdks-folder)/commerce/azure-mgmt-commerce/azure/mgmt/commerce/v2015_06_01_preview
111-
python:
112-
namespace: azure.mgmt.commerce.v2015_06_01_preview
113-
output-folder: $(python-sdks-folder)/commerce/azure-mgmt-commerce/azure/mgmt/commerce/v2015_06_01_preview
114-
```
76+
See configuration in [readme.python.md](./readme.python.md)
11577

11678
## Go
11779

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## Python
2+
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-commerce
9+
package-version: 1.0.0b1
10+
no-namespace-folders: true
11+
```
12+
13+
### Python multi-api
14+
15+
Generate all API versions currently shipped for this package
16+
17+
```yaml $(multiapi)
18+
clear-output-folder: true
19+
batch:
20+
- tag: package-2015-06-preview
21+
- multiapiscript: true
22+
```
23+
24+
``` yaml $(multiapiscript)
25+
output-folder: $(python-sdks-folder)/commerce/azure-mgmt-commerce/azure/mgmt/commerce/
26+
clear-output-folder: false
27+
perform-load: false
28+
```
29+
30+
### Tag: package-2015-06-preview and python
31+
32+
These settings apply only when `--tag=package-2015-06-preview --python` is specified on the command line.
33+
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
34+
35+
``` yaml $(tag) == 'package-2015-06-preview'
36+
namespace: azure.mgmt.commerce.v2015_06_01_preview
37+
output-folder: $(python-sdks-folder)/commerce/azure-mgmt-commerce/azure/mgmt/commerce/v2015_06_01_preview
38+
```
39+
40+
``` yaml $(python) && $(track2)
41+
modelerfour:
42+
lenient-model-deduplication: true
43+
directive:
44+
- from: swagger-document
45+
where: $.definitions.OfferTermInfo.properties.Name
46+
transform: >
47+
$['x-ms-enum']['name'] = 'OfferTermInfoEnum';
48+
```

specification/consumption/resource-manager/readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ This is not used by Autorest itself.
230230
swagger-to-sdk:
231231
- repo: azure-sdk-for-net
232232
- repo: azure-sdk-for-go
233-
- repo: azure-sdk-for-python
234233
- repo: azure-sdk-for-python-track2
235234
- repo: azure-sdk-for-java
236235
- repo: azure-sdk-for-js

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

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,23 @@ 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
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.
66

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.consumption
14-
package-name: azure-mgmt-consumption
15-
package-version: 2.0.0
16-
clear-output-folder: true
17-
```
7+
188
``` yaml $(python) && $(track2)
19-
python-mode: create
209
azure-arm: true
2110
license-header: MICROSOFT_MIT_NO_VERSION
2211
payload-flattening-threshold: 2
2312
namespace: azure.mgmt.consumption
2413
package-name: azure-mgmt-consumption
25-
package-version: 2.0.0
14+
package-version: 1.0.0b1
2615
clear-output-folder: true
2716
```
2817
29-
``` yaml $(python) && $(python-mode) == 'update'
30-
python:
31-
no-namespace-folders: true
32-
output-folder: $(python-sdks-folder)/consumption/azure-mgmt-consumption/azure/mgmt/consumption
18+
``` yaml $(python) && $(python-mode) == 'update' && $(track2)
3319
no-namespace-folders: true
3420
output-folder: $(python-sdks-folder)/consumption/azure-mgmt-consumption/azure/mgmt/consumption
3521
```
3622
37-
``` yaml $(python) && $(python-mode) == 'create'
38-
python:
39-
basic-setup-py: true
40-
output-folder: $(python-sdks-folder)/consumption/azure-mgmt-consumption
23+
``` yaml $(python) && $(python-mode) == 'create' && $(track2)
4124
basic-setup-py: true
4225
output-folder: $(python-sdks-folder)/consumption/azure-mgmt-consumption
4326
```

specification/reservations/resource-manager/readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ This is not used by Autorest itself.
109109
``` yaml $(swagger-to-sdk)
110110
swagger-to-sdk:
111111
- repo: azure-sdk-for-net
112-
- repo: azure-sdk-for-python
113112
- repo: azure-sdk-for-python-track2
114113
- repo: azure-sdk-for-go
115114
- repo: azure-sdk-for-js

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

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,15 @@ 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
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.
66

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.reservations
14-
package-name: azure-mgmt-reservations
15-
package-version: 0.3.2
16-
clear-output-folder: true
17-
```
187
``` yaml $(python) && $(track2)
19-
python-mode: create
208
azure-arm: true
219
license-header: MICROSOFT_MIT_NO_VERSION
2210
namespace: azure.mgmt.reservations
2311
package-name: azure-mgmt-reservations
24-
package-version: 0.3.2
12+
package-version: 1.0.0b1
2513
clear-output-folder: true
2614
```
2715
28-
``` yaml $(python) && $(python-mode) == 'update' && !$(track2)
29-
python:
30-
no-namespace-folders: true
31-
output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations/azure/mgmt/reservations
32-
```
33-
``` yaml $(python) && $(python-mode) == 'create' && !$(track2)
34-
python:
35-
basic-setup-py: true
36-
output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations
37-
```
38-
3916
``` yaml $(python) && $(python-mode) == 'update' && $(track2)
4017
no-namespace-folders: true
4118
output-folder: $(python-sdks-folder)/reservations/azure-mgmt-reservations/azure/mgmt/reservations

0 commit comments

Comments
 (0)