Skip to content

Commit c064af9

Browse files
authored
codegen onboard df for cli (Azure#8531)
1 parent 81e598c commit c064af9

File tree

4 files changed

+173
-108
lines changed

4 files changed

+173
-108
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
## AZ
2+
3+
These settings apply only when `--az` is specified on the command line.
4+
5+
``` yaml $(az)
6+
az:
7+
extensions: datafactory
8+
namespace: azure.mgmt.datafactory
9+
package-name: azure-mgmt-datafactory
10+
disable-checks: true
11+
randomize-names: true
12+
az-output-folder: $(azure-cli-extension-folder)/src/datafactory
13+
python-sdk-output-folder: "$(az-output-folder)/azext_datafactory/vendored_sdks/datafactory"
14+
15+
input-file:
16+
- Microsoft.DataFactory/stable/2018-06-01/entityTypes/DataFlow.json
17+
- Microsoft.DataFactory/stable/2018-06-01/entityTypes/Dataset.json
18+
- Microsoft.DataFactory/stable/2018-06-01/entityTypes/IntegrationRuntime.json
19+
- Microsoft.DataFactory/stable/2018-06-01/entityTypes/LinkedService.json
20+
- Microsoft.DataFactory/stable/2018-06-01/entityTypes/Pipeline.json
21+
- Microsoft.DataFactory/stable/2018-06-01/entityTypes/Trigger.json
22+
23+
directive:
24+
- from: swagger-document
25+
where: $.definitions.JsonFormatFilePattern
26+
transform: >
27+
$['type'] = 'string';
28+
- from: swagger-document
29+
where: $.definitions.CompressionLevel
30+
transform: >
31+
$['type'] = 'string';
32+
- from: swagger-document
33+
where: $.definitions.DynamicsLinkedServiceTypeProperties.properties.servicePrincipalCredentialType
34+
transform: >
35+
$['type'] = 'string';
36+
- from: swagger-document
37+
where: $.definitions.ScriptAction.properties.roles
38+
transform: >
39+
$['type'] = 'string';
40+
- where:
41+
command: datafactory integration-runtime create-linked-integration-runtime
42+
set:
43+
command: datafactory integration-runtime linked-integration-runtime create
44+
45+
cli:
46+
cli-directive:
47+
# directive on operationGroup
48+
- where:
49+
group: Pipelines
50+
op: CreateOrUpdate$|CreateOrUpdate#Create
51+
parameter: pipeline
52+
json: true
53+
- where:
54+
group: IntegrationRuntimes
55+
op: CreateOrUpdate
56+
param: properties
57+
poly-resource: true
58+
- where:
59+
group: IntegrationRuntimes
60+
op: CreateOrUpdate#*
61+
param: properties
62+
poly-resource: true
63+
- where:
64+
group: ExposureControl|IntegrationRuntimeObjectMetadata|DataFlows|DataFlowDebugSession|ManagedVirtualNetworks|ManagedPrivateEndpoints
65+
hidden: true
66+
- where:
67+
group: Factories
68+
op: ConfigureFactoryRepo
69+
param: locationId
70+
name: location
71+
- where:
72+
group: IntegrationRuntimes
73+
op: CreateLinkedIntegrationRuntime
74+
param: dataFactoryLocation
75+
name: location
76+
- where:
77+
group: Triggers|LinkedServices|Datasets
78+
op: CreateOrUpdate#Update
79+
param: properties
80+
cli-flatten: true
81+
- where:
82+
group: Pipelines
83+
op: CreateOrUpdate#Update
84+
param: pipeline
85+
cli-flatten: true
86+
```

specification/datafactory/resource-manager/readme.cli.md

Lines changed: 60 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -5,87 +5,66 @@ These settings apply only when `--cli` is specified on the command line.
55
``` yaml $(cli)
66
cli:
77
namespace: azure.mgmt.datafactory
8-
flatten-all: true
98
test-scenario:
109
- name: Factories_CreateOrUpdate
11-
#- name: Datasets_Create
12-
#- name: Datasets_Update
13-
#- name: Triggers_Update
14-
#- name: Triggers_Create
15-
#- name: DataFlows_Update
16-
#- name: Pipelines_Create
17-
#- name: DataFlows_Create
18-
#- name: Pipelines_Update
19-
#- name: LinkedServices_Create
20-
#- name: LinkedServices_Update
21-
#- name: IntegrationRuntimes_Create
22-
#- name: RerunTriggers_Create
23-
#- name: IntegrationRuntimeNodes_Get
24-
#- name: IntegrationRuntimes_Get
25-
#- name: RerunTriggers_ListByTrigger
26-
#- name: LinkedServices_Get
27-
#- name: PipelineRuns_Get
28-
#- name: Pipelines_Get
29-
#- name: DataFlows_Get
30-
#- name: Datasets_Get
31-
#- name: Triggers_Get
32-
#- name: IntegrationRuntimes_ListByFactory
33-
#- name: LinkedServices_ListByFactory
34-
#- name: DataFlows_ListByFactory
35-
#- name: Pipelines_ListByFactory
36-
#- name: Triggers_ListByFactory
37-
#- name: Datasets_ListByFactory
38-
#- name: Factories_Get
39-
#- name: Factories_ListByResourceGroup
40-
#- name: Factories_List
41-
#- name: Operations_List
42-
#- name: IntegrationRuntimeNodes_GetIpAddress
43-
#- name: IntegrationRuntimes_CreateLinkedIntegrationRuntime
44-
#- name: RerunTriggers_Cancel
45-
#- name: RerunTriggers_Start
46-
#- name: IntegrationRuntimeNodes_Update
47-
#- name: IntegrationRuntimeObjectMetadata_Refresh
48-
#- name: RerunTriggers_Stop
49-
#- name: IntegrationRuntimes_RegenerateAuthKey
50-
#- name: Triggers_Rerun
51-
#- name: IntegrationRuntimeObjectMetadata_Get
52-
#- name: IntegrationRuntimes_GetConnectionInfo
53-
#- name: IntegrationRuntimes_SyncCredentials
54-
#- name: IntegrationRuntimes_GetMonitoringData
55-
#- name: IntegrationRuntimes_ListAuthKeys
56-
#- name: IntegrationRuntimes_Upgrade
57-
#- name: IntegrationRuntimes_GetStatus
58-
#- name: IntegrationRuntimes_Upgrade
59-
#- name: IntegrationRuntimes_Start
60-
#- name: IntegrationRuntimes_Stop
61-
#- name: Triggers_GetEventSubscriptionStatus
62-
#- name: ActivityRuns_QueryByPipelineRun
63-
#- name: IntegrationRuntimes_Update
64-
#- name: Triggers_UnsubscribeFromEvents
65-
#- name: Triggers_SubscribeToEvents
66-
#- name: PipelineRuns_Cancel
67-
#- name: Pipelines_CreateRun
68-
#- name: Triggers_Start
69-
#- name: Triggers_Stop
70-
#- name: DataFlowDebugSession_ExecuteCommand
71-
#- name: DataFlowDebugSession_Delete
72-
#- name: DataFlowDebugSession_Create
73-
#- name: DataFlowDebugSession_QueryByFactory
74-
#- name: DataFlowDebugSession_AddDataFlow
75-
#- name: Factories_GetGitHubAccessToken
76-
#- name: Factories_GetDataPlaneAccess
77-
#- name: PipelineRuns_QueryByFactory
78-
#- name: TriggerRuns_QueryByFactory
79-
#- name: ExposureControl_GetFeatureValueByFactory
80-
#- name: Factories_Update
81-
#- name: Factories_ConfigureFactoryRepo
82-
#- name: ExposureControl_GetFeatureValue
83-
#- name: IntegrationRuntimesNodes_Delete
84-
#- name: IntegrationRuntimes_Delete
85-
#- name: LinkedServices_Delete
86-
#- name: Pipelines_Delete
87-
#- name: DataFlows_Delete
88-
#- name: Datasets_Delete
89-
#- name: Triggers_Delete
90-
#- name: Factories_Delete
10+
- name: Factories_Update
11+
- name: LinkedServices_Create
12+
- name: LinkedServices_Update
13+
- name: Datasets_Create
14+
- name: Datasets_Update
15+
- name: Pipelines_Create
16+
- name: Pipelines_Update
17+
- name: Triggers_Create
18+
- name: Triggers_Update
19+
- name: IntegrationRuntimes_Create
20+
- name: IntegrationRuntimes_Update
21+
- name: IntegrationRuntimes_CreateLinkedIntegrationRuntime
22+
- name: Pipelines_CreateRun
23+
- name: IntegrationRuntimes_Get
24+
- name: RerunTriggers_ListByTrigger
25+
- name: LinkedServices_Get
26+
- name: PipelineRuns_Get
27+
- name: Pipelines_Get
28+
- name: Datasets_Get
29+
- name: Triggers_Get
30+
- name: IntegrationRuntimes_ListByFactory
31+
- name: LinkedServices_ListByFactory
32+
- name: Pipelines_ListByFactory
33+
- name: Triggers_ListByFactory
34+
- name: Datasets_ListByFactory
35+
- name: Factories_Get
36+
- name: Factories_ListByResourceGroup
37+
- name: Factories_List
38+
- name: Operations_List
39+
- name: RerunTriggers_Cancel
40+
- name: RerunTriggers_Start
41+
- name: RerunTriggers_Stop
42+
- name: IntegrationRuntimes_RegenerateAuthKey
43+
- name: TriggerRuns_Rerun
44+
- name: IntegrationRuntimes_GetConnectionInfo
45+
- name: IntegrationRuntimes_SyncCredentials
46+
- name: IntegrationRuntimes_GetMonitoringData
47+
- name: IntegrationRuntimes_ListAuthKeys
48+
- name: IntegrationRuntimes_Upgrade
49+
- name: IntegrationRuntimes_GetStatus
50+
- name: IntegrationRuntimes_Start
51+
- name: IntegrationRuntimes_Stop
52+
- name: Triggers_GetEventSubscriptionStatus
53+
- name: ActivityRuns_QueryByPipelineRun
54+
- name: Triggers_UnsubscribeFromEvents
55+
- name: Triggers_SubscribeToEvents
56+
- name: Triggers_Start
57+
- name: Triggers_Stop
58+
- name: Factories_GetGitHubAccessToken
59+
- name: Factories_GetDataPlaneAccess
60+
- name: PipelineRuns_QueryByFactory
61+
- name: PipelineRuns_Cancel
62+
- name: TriggerRuns_QueryByFactory
63+
- name: Factories_ConfigureFactoryRepo
64+
- name: IntegrationRuntimes_Delete
65+
- name: Triggers_Delete
66+
- name: Pipelines_Delete
67+
- name: Datasets_Delete
68+
- name: LinkedServices_Delete
69+
- name: Factories_Delete
9170
```

specification/datafactory/resource-manager/readme.md

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ swagger-to-sdk:
6565
- repo: azure-sdk-for-go
6666
- repo: azure-sdk-for-js
6767
- repo: azure-sdk-for-node
68+
- repo: azure-cli-extensions
6869
- repo: azure-resource-manager-schemas
6970
after_scripts:
7071
- node sdkauto_afterscript.js datafactory/resource-manager
@@ -85,33 +86,6 @@ csharp:
8586
clear-output-folder: true
8687
```
8788

88-
## Python
89-
90-
These settings apply only when `--python` is specified on the command line.
91-
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
92-
Use `--python-mode=update` if you already have a setup.py and just want to update the code itself.
93-
94-
``` yaml $(python)
95-
python-mode: create
96-
python:
97-
azure-arm: true
98-
license-header: MICROSOFT_MIT_NO_VERSION
99-
payload-flattening-threshold: 2
100-
namespace: azure.mgmt.datafactory
101-
package-name: azure-mgmt-datafactory
102-
package-version: 1.0.0
103-
clear-output-folder: true
104-
```
105-
``` yaml $(python) && $(python-mode) == 'update'
106-
python:
107-
no-namespace-folders: true
108-
output-folder: $(python-sdks-folder)/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory
109-
```
110-
``` yaml $(python) && $(python-mode) == 'create'
111-
python:
112-
basic-setup-py: true
113-
output-folder: $(python-sdks-folder)/datafactory/azure-mgmt-datafactory
114-
```
11589

11690
## Go
11791

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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)
8+
python-mode: create
9+
python:
10+
azure-arm: true
11+
license-header: MICROSOFT_MIT_NO_VERSION
12+
namespace: azure.mgmt.datafactory
13+
package-name: azure-mgmt-datafactory
14+
package-version: 1.0.0
15+
clear-output-folder: true
16+
```
17+
``` yaml $(python) && $(python-mode) == 'update'
18+
python:
19+
no-namespace-folders: true
20+
output-folder: $(python-sdks-folder)/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory
21+
```
22+
``` yaml $(python) && $(python-mode) == 'create'
23+
python:
24+
basic-setup-py: true
25+
output-folder: $(python-sdks-folder)/datafactory/azure-mgmt-datafactory
26+
```

0 commit comments

Comments
 (0)