Skip to content

Commit 6641975

Browse files
author
SDKAuto
committed
CodeGen from PR 13166 in Azure/azure-rest-api-specs
Merge b353336f78b47a9a9d83765d68a6b9b87ea76f95 into 89f00c2
1 parent 0d16cef commit 6641975

File tree

6 files changed

+30
-27
lines changed

6 files changed

+30
-27
lines changed

src/healthbot/azext_healthbot/generated/_help.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
examples:
4646
- name: BotCreate
4747
text: |-
48-
az healthbot create --name "samplebotname" --location "East US" --sku "F0" --resource-group \
48+
az healthbot create --bot-name "samplebotname" --location "East US" --name "F0" --resource-group \
4949
"healthbotClient"
5050
"""
5151

src/healthbot/azext_healthbot/generated/_params.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ def load_arguments(self, _):
3131

3232
with self.argument_context('healthbot create') as c:
3333
c.argument('resource_group_name', resource_group_name_type)
34-
c.argument('bot_name', options_list=['--name', '-n', '--bot-name'], type=str, help='The name of the Bot resource.')
34+
c.argument('bot_name', type=str, help='The name of the Bot resource.')
3535
c.argument('tags', tags_type)
3636
c.argument('location', arg_type=get_location_type(self.cli_ctx), required=False,
3737
validator=get_default_location_from_resource_group)
38-
c.argument('sku', arg_type=get_enum_type(['F0', 'S1', 'C0']), help='The name of the HealthBot SKU',
38+
c.argument('name', arg_type=get_enum_type(['F0', 'S1', 'C0']), help='The name of the HealthBot SKU',
3939
arg_group='Sku')
4040

4141
with self.argument_context('healthbot update') as c:
4242
c.argument('resource_group_name', resource_group_name_type)
43-
c.argument('bot_name', options_list=['--name', '-n', '--bot-name'], type=str, help='The name of the Bot resource.', id_part='name')
43+
c.argument('bot_name', type=str, help='The name of the Bot resource.', id_part='name')
4444
c.argument('tags', tags_type)
45-
c.argument('sku', arg_type=get_enum_type(['F0', 'S1', 'C0']), help='The name of the HealthBot SKU',
45+
c.argument('name', arg_type=get_enum_type(['F0', 'S1', 'C0']), help='The name of the HealthBot SKU',
4646
arg_group='Sku')
4747

4848
with self.argument_context('healthbot delete') as c:

src/healthbot/azext_healthbot/generated/custom.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ def healthbot_create(client,
3030
resource_group_name,
3131
bot_name,
3232
location,
33-
sku,
33+
name,
3434
tags=None,
3535
no_wait=False):
3636
parameters = {}
3737
parameters['tags'] = tags
3838
parameters['location'] = location
3939
parameters['sku'] = {}
40-
parameters['sku']['name'] = sku
40+
parameters['sku']['name'] = name
4141
return sdk_no_wait(no_wait,
4242
client.begin_create,
4343
resource_group_name=resource_group_name,
@@ -49,11 +49,11 @@ def healthbot_update(client,
4949
resource_group_name,
5050
bot_name,
5151
tags=None,
52-
sku=None):
52+
name=None):
5353
parameters = {}
5454
parameters['tags'] = tags
5555
parameters['sku'] = {}
56-
parameters['sku']['name'] = sku
56+
parameters['sku']['name'] = name
5757
return client.update(resource_group_name=resource_group_name,
5858
bot_name=bot_name,
5959
parameters=parameters)

src/healthbot/azext_healthbot/tests/latest/example_steps.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ def step_create(test, rg, rg_2, checks=None):
1818
if checks is None:
1919
checks = []
2020
test.cmd('az healthbot create '
21-
'--name "{myBot}" '
22-
'--location "eastus" '
23-
'--sku "F0" '
24-
'--resource-group "{rg}"',
21+
'--bot-name "{myBot}" '
22+
'--location "East US" '
23+
'--name "F0" '
24+
'--resource-group "{rg_2}"',
2525
checks=checks)
2626

2727

@@ -52,7 +52,7 @@ def step_show(test, rg, rg_2, checks=None):
5252
checks = []
5353
test.cmd('az healthbot show '
5454
'--name "{myBot}" '
55-
'--resource-group "{rg}"',
55+
'--resource-group "{rg_2}"',
5656
checks=checks)
5757

5858

@@ -62,9 +62,9 @@ def step_update(test, rg, rg_2, checks=None):
6262
if checks is None:
6363
checks = []
6464
test.cmd('az healthbot update '
65-
'--name "{myBot}" '
66-
'--sku "F0" '
67-
'--resource-group "{rg}"',
65+
'--bot-name "{myBot}" '
66+
'--name "F0" '
67+
'--resource-group "{rg_2}"',
6868
checks=checks)
6969

7070

@@ -75,5 +75,6 @@ def step_delete(test, rg, rg_2, checks=None):
7575
checks = []
7676
test.cmd('az healthbot delete -y '
7777
'--name "{myBot}" '
78-
'--resource-group "{rg}"',
78+
'--resource-group "{rg_2}"',
7979
checks=checks)
80+

src/healthbot/azext_healthbot/tests/latest/test_healthbot_scenario.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def call_scenario(test, rg, rg_2):
4545
setup_scenario(test, rg, rg_2)
4646
step_create(test, rg, rg_2, checks=[
4747
test.check("name", "{myBot}", case_sensitive=False),
48-
test.check("location", "eastus", case_sensitive=False),
48+
test.check("location", "East US", case_sensitive=False),
4949
test.check("sku.name", "F0", case_sensitive=False),
5050
])
5151
step_list(test, rg, rg_2, checks=[])
@@ -54,12 +54,12 @@ def call_scenario(test, rg, rg_2):
5454
])
5555
step_show(test, rg, rg_2, checks=[
5656
test.check("name", "{myBot}", case_sensitive=False),
57-
test.check("location", "eastus", case_sensitive=False),
57+
test.check("location", "East US", case_sensitive=False),
5858
test.check("sku.name", "F0", case_sensitive=False),
5959
])
6060
step_update(test, rg, rg_2, checks=[
6161
test.check("name", "{myBot}", case_sensitive=False),
62-
test.check("location", "eastus", case_sensitive=False),
62+
test.check("location", "East US", case_sensitive=False),
6363
test.check("sku.name", "F0", case_sensitive=False),
6464
])
6565
step_delete(test, rg, rg_2, checks=[])
@@ -76,9 +76,11 @@ def __init__(self, *args, **kwargs):
7676
'myBot': 'samplebotname',
7777
})
7878

79-
@ResourceGroupPreparer(name_prefix='clitest', random_name_length=20, key='rg', parameter_name='rg')
80-
@ResourceGroupPreparer(name_prefix='clitest', random_name_length=20, key='rg_2', parameter_name='rg_2')
79+
80+
@ResourceGroupPreparer(name_prefix='clitesthealthbot_OneResourceGroupName'[:7], key='rg', parameter_name='rg')
81+
@ResourceGroupPreparer(name_prefix='clitesthealthbot_healthbotClient'[:7], key='rg_2', parameter_name='rg_2')
8182
def test_healthbot_Scenario(self, rg, rg_2):
8283
call_scenario(self, rg, rg_2)
8384
calc_coverage(__file__)
8485
raise_if()
86+

src/healthbot/report.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,30 +62,30 @@ az healthbot show --name "samplebotname" --resource-group "healthbotClient"
6262

6363
##### <a name="ExamplesBotsCreate">Example</a>
6464
```
65-
az healthbot create --name "samplebotname" --location "East US" --sku "F0" --resource-group "healthbotClient"
65+
az healthbot create --bot-name "samplebotname" --location "East US" --name "F0" --resource-group "healthbotClient"
6666
```
6767
##### <a name="ParametersBotsCreate">Parameters</a>
6868
|Option|Type|Description|Path (SDK)|Swagger name|
6969
|------|----|-----------|----------|------------|
7070
|**--resource-group-name**|string|The name of the Bot resource group in the user subscription.|resource_group_name|resourceGroupName|
7171
|**--bot-name**|string|The name of the Bot resource.|bot_name|botName|
7272
|**--location**|string|The geo-location where the resource lives|location|location|
73-
|**--sku**|sealed-choice|The name of the HealthBot SKU|
73+
|**--name**|sealed-choice|The name of the HealthBot SKU|name|name|
7474
|**--tags**|dictionary|Resource tags.|tags|tags|
7575

7676
#### <a name="BotsUpdate">Command `az healthbot update`</a>
7777

7878
##### <a name="ExamplesBotsUpdate">Example</a>
7979
```
80-
az healthbot update --name "samplebotname" --sku "F0" --resource-group "healthbotClient"
80+
az healthbot update --bot-name "samplebotname" --name "F0" --resource-group "healthbotClient"
8181
```
8282
##### <a name="ParametersBotsUpdate">Parameters</a>
8383
|Option|Type|Description|Path (SDK)|Swagger name|
8484
|------|----|-----------|----------|------------|
8585
|**--resource-group-name**|string|The name of the Bot resource group in the user subscription.|resource_group_name|resourceGroupName|
8686
|**--bot-name**|string|The name of the Bot resource.|bot_name|botName|
8787
|**--tags**|dictionary|Tags for a HealthBot.|tags|tags|
88-
|**--sku**|sealed-choice|The name of the HealthBot SKU|
88+
|**--name**|sealed-choice|The name of the HealthBot SKU|name|name|
8989

9090
#### <a name="BotsDelete">Command `az healthbot delete`</a>
9191

0 commit comments

Comments
 (0)