Skip to content

Commit d9966c8

Browse files
author
SDKAuto
committed
CodeGen from PR 11639 in Azure/azure-rest-api-specs
Merge b4b64803111a6a3c3e13503104b6c7b35b6f9ec7 into 7c8fd7f
1 parent 1bbc4f0 commit d9966c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+6000
-0
lines changed

src/adp/HISTORY.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. :changelog:
2+
3+
Release History
4+
===============
5+
6+
0.1.0
7+
++++++
8+
* Initial release.

src/adp/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Azure CLI adp Extension #
2+
This is the extension for adp
3+
4+
### How to use ###
5+
Install this extension using the below CLI command
6+
```
7+
az extension add --name adp
8+
```
9+
10+
### Included Features ###
11+
#### adp account ####
12+
##### Create #####
13+
```
14+
az adp account create --name "sampleacct" --location "Global" --resource-group "adpClient"
15+
16+
az adp account wait --created --name "{myAccount}" --resource-group "{rg}"
17+
```
18+
##### Show #####
19+
```
20+
az adp account show --name "sampleacct" --resource-group "adpClient"
21+
```
22+
##### List #####
23+
```
24+
az adp account list --resource-group "adpClient"
25+
```
26+
##### Update #####
27+
```
28+
az adp account update --name "sampleacct" --resource-group "adpClient"
29+
```
30+
##### Delete #####
31+
```
32+
az adp account delete --name "sampleacct" --resource-group "adpClient"
33+
```
34+
#### adp data-pool ####
35+
##### Create #####
36+
```
37+
az adp data-pool create --account-name "sampleacct" --name "sampledp" --locations name="westus" \
38+
--resource-group "adpClient"
39+
40+
az adp data-pool wait --created --name "{myDataPool}" --resource-group "{rg}"
41+
```
42+
##### Show #####
43+
```
44+
az adp data-pool show --account-name "sampleacct" --name "sampledp" --resource-group "adpClient"
45+
```
46+
##### List #####
47+
```
48+
az adp data-pool list --account-name "sampleacct" --resource-group "adpClient"
49+
```
50+
##### Update #####
51+
```
52+
az adp data-pool update --account-name "sampleacct" --name "sampledp" --locations name="westus" \
53+
--resource-group "adpClient"
54+
```
55+
##### Delete #####
56+
```
57+
az adp data-pool delete --account-name "sampleacct" --name "sampledp" --resource-group "adpClient"
58+
```

src/adp/azext_adp/__init__.py

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
from azure.cli.core import AzCommandsLoader
12+
from azext_adp.generated._help import helps # pylint: disable=unused-import
13+
try:
14+
from azext_adp.manual._help import helps # pylint: disable=reimported
15+
except ImportError:
16+
pass
17+
18+
19+
class AdpManagementClientCommandsLoader(AzCommandsLoader):
20+
21+
def __init__(self, cli_ctx=None):
22+
from azure.cli.core.commands import CliCommandType
23+
from azext_adp.generated._client_factory import cf_adp_cl
24+
adp_custom = CliCommandType(
25+
operations_tmpl='azext_adp.custom#{}',
26+
client_factory=cf_adp_cl)
27+
parent = super(AdpManagementClientCommandsLoader, self)
28+
parent.__init__(cli_ctx=cli_ctx, custom_command_type=adp_custom)
29+
30+
def load_command_table(self, args):
31+
from azext_adp.generated.commands import load_command_table
32+
load_command_table(self, args)
33+
try:
34+
from azext_adp.manual.commands import load_command_table as load_command_table_manual
35+
load_command_table_manual(self, args)
36+
except ImportError:
37+
pass
38+
return self.command_table
39+
40+
def load_arguments(self, command):
41+
from azext_adp.generated._params import load_arguments
42+
load_arguments(self, command)
43+
try:
44+
from azext_adp.manual._params import load_arguments as load_arguments_manual
45+
load_arguments_manual(self, command)
46+
except ImportError:
47+
pass
48+
49+
50+
COMMAND_LOADER_CLS = AdpManagementClientCommandsLoader

src/adp/azext_adp/action.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.action import * # noqa: F403
14+
try:
15+
from .manual.action import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"azext.isExperimental": true,
3+
"azext.minCliCoreVersion": "2.11.0"
4+
}

src/adp/azext_adp/custom.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=wildcard-import
11+
# pylint: disable=unused-wildcard-import
12+
13+
from .generated.custom import * # noqa: F403
14+
try:
15+
from .manual.custom import * # noqa: F403
16+
except ImportError:
17+
pass
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# coding=utf-8
2+
# --------------------------------------------------------------------------
3+
# Copyright (c) Microsoft Corporation. All rights reserved.
4+
# Licensed under the MIT License. See License.txt in the project root for
5+
# license information.
6+
#
7+
# Code generated by Microsoft (R) AutoRest Code Generator.
8+
# Changes may cause incorrect behavior and will be lost if the code is
9+
# regenerated.
10+
# --------------------------------------------------------------------------
11+
12+
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
11+
12+
def cf_adp_cl(cli_ctx, *_):
13+
from azure.cli.core.commands.client_factory import get_mgmt_service_client
14+
from ..vendored_sdks.adp import AdpManagementClient
15+
return get_mgmt_service_client(cli_ctx,
16+
AdpManagementClient)
17+
18+
19+
def cf_account(cli_ctx, *_):
20+
return cf_adp_cl(cli_ctx).account
21+
22+
23+
def cf_data_pool(cli_ctx, *_):
24+
return cf_adp_cl(cli_ctx).data_pool
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
# --------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for
4+
# license information.
5+
#
6+
# Code generated by Microsoft (R) AutoRest Code Generator.
7+
# Changes may cause incorrect behavior and will be lost if the code is
8+
# regenerated.
9+
# --------------------------------------------------------------------------
10+
# pylint: disable=too-many-lines
11+
12+
from knack.help_files import helps
13+
14+
15+
helps['adp account'] = """
16+
type: group
17+
short-summary: adp account
18+
"""
19+
20+
helps['adp account list'] = """
21+
type: command
22+
short-summary: "List all ADP accounts available under the resource group And List all ADP accounts available under \
23+
the subscription."
24+
examples:
25+
- name: List accounts by resource group
26+
text: |-
27+
az adp account list --resource-group "adpClient"
28+
- name: List accounts
29+
text: |-
30+
az adp account list
31+
"""
32+
33+
helps['adp account show'] = """
34+
type: command
35+
short-summary: "Gets the properties of an ADP account."
36+
examples:
37+
- name: Get account
38+
text: |-
39+
az adp account show --name "sampleacct" --resource-group "adpClient"
40+
"""
41+
42+
helps['adp account create'] = """
43+
type: command
44+
short-summary: "Create an ADP account."
45+
examples:
46+
- name: Put account
47+
text: |-
48+
az adp account create --name "sampleacct" --location "Global" --resource-group "adpClient"
49+
"""
50+
51+
helps['adp account update'] = """
52+
type: command
53+
short-summary: "Updates the properties of an existing ADP account."
54+
examples:
55+
- name: Patch account
56+
text: |-
57+
az adp account update --name "sampleacct" --resource-group "adpClient"
58+
"""
59+
60+
helps['adp account delete'] = """
61+
type: command
62+
short-summary: "Deletes an ADP account."
63+
examples:
64+
- name: Delete account
65+
text: |-
66+
az adp account delete --name "sampleacct" --resource-group "adpClient"
67+
"""
68+
69+
helps['adp account wait'] = """
70+
type: command
71+
short-summary: Place the CLI in a waiting state until a condition of the adp account is met.
72+
examples:
73+
- name: Pause executing next line of CLI script until the adp account is successfully created.
74+
text: |-
75+
az adp account wait --name "sampleacct" --resource-group "adpClient" --created
76+
- name: Pause executing next line of CLI script until the adp account is successfully updated.
77+
text: |-
78+
az adp account wait --name "sampleacct" --resource-group "adpClient" --updated
79+
- name: Pause executing next line of CLI script until the adp account is successfully deleted.
80+
text: |-
81+
az adp account wait --name "sampleacct" --resource-group "adpClient" --deleted
82+
"""
83+
84+
helps['adp data-pool'] = """
85+
type: group
86+
short-summary: adp data-pool
87+
"""
88+
89+
helps['adp data-pool list'] = """
90+
type: command
91+
short-summary: "Lists the data pools under the ADP account."
92+
examples:
93+
- name: List Data Pools
94+
text: |-
95+
az adp data-pool list --account-name "sampleacct" --resource-group "adpClient"
96+
"""
97+
98+
helps['adp data-pool show'] = """
99+
type: command
100+
short-summary: "Gets the properties of a Data Pool."
101+
examples:
102+
- name: Get Data Pool
103+
text: |-
104+
az adp data-pool show --account-name "sampleacct" --name "sampledp" --resource-group "adpClient"
105+
"""
106+
107+
helps['adp data-pool create'] = """
108+
type: command
109+
short-summary: "Create a Data Pool."
110+
parameters:
111+
- name: --locations
112+
short-summary: "Gets or sets the collection of locations where Data Pool resources should be created."
113+
long-summary: |
114+
Usage: --locations name=XX
115+
116+
name: Required. The location name
117+
118+
Multiple actions can be specified by using more than one --locations argument.
119+
examples:
120+
- name: Put Data Pool
121+
text: |-
122+
az adp data-pool create --account-name "sampleacct" --name "sampledp" --locations name="westus" \
123+
--resource-group "adpClient"
124+
"""
125+
126+
helps['adp data-pool update'] = """
127+
type: command
128+
short-summary: "Updates the properties of an existing Data Pool."
129+
parameters:
130+
- name: --locations
131+
short-summary: "Gets or sets the collection of locations where Data Pool resources should be created."
132+
long-summary: |
133+
Usage: --locations name=XX
134+
135+
name: Required. The location name
136+
137+
Multiple actions can be specified by using more than one --locations argument.
138+
examples:
139+
- name: Patch Data Pool
140+
text: |-
141+
az adp data-pool update --account-name "sampleacct" --name "sampledp" --locations name="westus" \
142+
--resource-group "adpClient"
143+
"""
144+
145+
helps['adp data-pool delete'] = """
146+
type: command
147+
short-summary: "Deletes a Data Pool."
148+
examples:
149+
- name: Delete Data Pool
150+
text: |-
151+
az adp data-pool delete --account-name "sampleacct" --name "sampledp" --resource-group "adpClient"
152+
"""
153+
154+
helps['adp data-pool wait'] = """
155+
type: command
156+
short-summary: Place the CLI in a waiting state until a condition of the adp data-pool is met.
157+
examples:
158+
- name: Pause executing next line of CLI script until the adp data-pool is successfully created.
159+
text: |-
160+
az adp data-pool wait --account-name "sampleacct" --name "sampledp" --resource-group "adpClient" \
161+
--created
162+
- name: Pause executing next line of CLI script until the adp data-pool is successfully updated.
163+
text: |-
164+
az adp data-pool wait --account-name "sampleacct" --name "sampledp" --resource-group "adpClient" \
165+
--updated
166+
- name: Pause executing next line of CLI script until the adp data-pool is successfully deleted.
167+
text: |-
168+
az adp data-pool wait --account-name "sampleacct" --name "sampledp" --resource-group "adpClient" \
169+
--deleted
170+
"""

0 commit comments

Comments
 (0)