|
1 | | -# -------------------------------------------------------------------------------------------- |
| 1 | +# -------------------------------------------------------------------------- |
2 | 2 | # Copyright (c) Microsoft Corporation. All rights reserved. |
3 | | -# Licensed under the MIT License. See License.txt in the project root for license information. |
4 | | -# -------------------------------------------------------------------------------------------- |
5 | | -# pylint: disable=line-too-long |
| 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 | +# -------------------------------------------------------------------------- |
6 | 10 | # pylint: disable=too-many-lines |
7 | 11 | # pylint: disable=too-many-statements |
8 | 12 |
|
9 | | -from argcomplete.completers import FilesCompleter |
10 | 13 | from azure.cli.core.commands.parameters import ( |
11 | 14 | tags_type, |
| 15 | + get_three_state_flag, |
12 | 16 | resource_group_name_type, |
13 | | - get_location_type, |
14 | | - file_type |
| 17 | + get_location_type |
| 18 | +) |
| 19 | +from azure.cli.core.commands.validators import ( |
| 20 | + get_default_location_from_resource_group, |
| 21 | + validate_file_or_dict |
15 | 22 | ) |
16 | | -from azure.cli.core.commands.validators import get_default_location_from_resource_group |
17 | 23 |
|
18 | 24 |
|
19 | 25 | def load_arguments(self, _): |
20 | 26 |
|
21 | 27 | with self.argument_context('portal dashboard list') as c: |
22 | | - c.argument('resource_group_name', resource_group_name_type, |
23 | | - help='The name of the resource group.') |
| 28 | + c.argument('resource_group_name', resource_group_name_type) |
24 | 29 |
|
25 | 30 | with self.argument_context('portal dashboard show') as c: |
26 | 31 | c.argument('resource_group_name', resource_group_name_type) |
27 | | - c.argument('name', options_list=[ |
28 | | - '--name', '-n'], help='The name of the dashboard.') |
| 32 | + c.argument('dashboard_name', options_list=['--name', '-n', '--dashboard-name'], type=str, help='The name of ' |
| 33 | + 'the dashboard.', id_part='name') |
29 | 34 |
|
30 | 35 | with self.argument_context('portal dashboard create') as c: |
31 | | - c.argument('resource_group_name', resource_group_name_type, |
32 | | - help='The name of the resource group.') |
33 | | - c.argument('name', options_list=[ |
34 | | - '--name', '-n'], help='The name of the dashboard.') |
| 36 | + c.argument('resource_group_name', resource_group_name_type) |
| 37 | + c.argument('dashboard_name', options_list=['--name', '-n', '--dashboard-name'], type=str, help='The name of ' |
| 38 | + 'the dashboard.') |
35 | 39 | c.argument('location', arg_type=get_location_type(self.cli_ctx), |
36 | 40 | validator=get_default_location_from_resource_group) |
37 | 41 | c.argument('tags', tags_type) |
38 | | - c.argument('input_path', type=file_type, |
39 | | - help='The path to the dashboard properties JSON file.', completer=FilesCompleter()) |
| 42 | + c.argument('lenses', type=validate_file_or_dict, help='The dashboard lenses. Expected value: ' |
| 43 | + 'json-string/@json-file.') |
| 44 | + c.argument('metadata', type=validate_file_or_dict, help='The dashboard metadata. Expected value: ' |
| 45 | + 'json-string/@json-file.') |
40 | 46 |
|
41 | 47 | with self.argument_context('portal dashboard update') as c: |
42 | | - c.argument('resource_group_name', resource_group_name_type, |
43 | | - help='The name of the resource group.') |
44 | | - c.argument('name', options_list=[ |
45 | | - '--name', '-n'], help='The name of the dashboard.') |
46 | | - c.argument('input_path', type=file_type, |
47 | | - help='The path to the dashboard properties JSON file.', completer=FilesCompleter()) |
| 48 | + c.argument('resource_group_name', resource_group_name_type) |
| 49 | + c.argument('dashboard_name', options_list=['--name', '-n', '--dashboard-name'], type=str, help='The name of ' |
| 50 | + 'the dashboard.', id_part='name') |
| 51 | + c.argument('tags', tags_type) |
| 52 | + c.argument('lenses', type=validate_file_or_dict, help='The dashboard lenses. Expected value: ' |
| 53 | + 'json-string/@json-file.') |
| 54 | + c.argument('metadata', type=validate_file_or_dict, help='The dashboard metadata. Expected value: ' |
| 55 | + 'json-string/@json-file.') |
48 | 56 |
|
49 | 57 | with self.argument_context('portal dashboard delete') as c: |
50 | | - c.argument('resource_group_name', resource_group_name_type, |
51 | | - help='The name of the resource group.') |
52 | | - c.argument('name', options_list=[ |
53 | | - '--name', '-n'], help='The name of the dashboard.') |
54 | | - |
55 | | - with self.argument_context('portal dashboard import') as c: |
56 | | - c.argument('resource_group_name', resource_group_name_type, |
57 | | - help='The name of the resource group.') |
58 | | - c.argument('name', options_list=[ |
59 | | - '--name', '-n'], help='The name of the dashboard.') |
60 | | - c.argument('input_path', type=file_type, |
61 | | - help='The path to the dashboard json file.', completer=FilesCompleter()) |
| 58 | + c.argument('resource_group_name', resource_group_name_type) |
| 59 | + c.argument('dashboard_name', options_list=['--name', '-n', '--dashboard-name'], type=str, help='The name of ' |
| 60 | + 'the dashboard.', id_part='name') |
| 61 | + |
| 62 | + with self.argument_context('portal tenant-configuration create') as c: |
| 63 | + c.argument('enforce_private_markdown_storage', arg_type=get_three_state_flag(), help='When flag is set to true ' |
| 64 | + 'Markdown tile will require external storage configuration (URI). The inline content configuration ' |
| 65 | + 'will be prohibited.') |
0 commit comments