Skip to content

Commit 90f6067

Browse files
Remove commands related to decommissioned Microsoft.Maps.Creator subresource.
1 parent fd791f0 commit 90f6067

File tree

7 files changed

+1
-646
lines changed

7 files changed

+1
-646
lines changed

src/azure-cli/azure/cli/command_modules/maps/_client_factory.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,3 @@ def cf_accounts(cli_ctx, *_):
1616

1717
def cf_map(cli_ctx, *_):
1818
return cf_maps(cli_ctx).maps
19-
20-
21-
def cf_creator(cli_ctx, *_):
22-
return cf_maps(cli_ctx).creators

src/azure-cli/azure/cli/command_modules/maps/_help.py

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -171,59 +171,3 @@
171171
text: |-
172172
az maps map list-operation
173173
"""
174-
175-
helps['maps creator'] = """
176-
type: group
177-
short-summary: Manage creator with maps
178-
"""
179-
180-
helps['maps creator list'] = """
181-
type: command
182-
short-summary: "Get all Creator instances for an Azure Maps Account."
183-
examples:
184-
- name: List Creator Resources By Account
185-
text: |-
186-
az maps creator list --account-name "myMapsAccount" --resource-group "myResourceGroup"
187-
"""
188-
189-
helps['maps creator show'] = """
190-
type: command
191-
short-summary: "Get a Maps Creator resource."
192-
examples:
193-
- name: Get Creator Resource
194-
text: |-
195-
az maps creator show --account-name "myMapsAccount" --creator-name "myCreator" --resource-group \
196-
"myResourceGroup"
197-
"""
198-
199-
helps['maps creator create'] = """
200-
type: command
201-
short-summary: "Create a Maps Creator resource. Creator resource will manage Azure resources required to populate \
202-
a custom set of mapping data. It requires an account to exist before it can be created."
203-
examples:
204-
- name: Create Creator Resource
205-
text: |-
206-
az maps creator create --location "eastus2" --storage-units 5 --tags test="true" --account-name \
207-
"myMapsAccount" --creator-name "myCreator" --resource-group "myResourceGroup"
208-
"""
209-
210-
helps['maps creator update'] = """
211-
type: command
212-
short-summary: "Updates the Maps Creator resource. Only a subset of the parameters may be updated after creation, \
213-
such as Tags."
214-
examples:
215-
- name: Update Creator Resource
216-
text: |-
217-
az maps creator update --storage-units 10 --tags specialTag="true" --account-name "myMapsAccount" \
218-
--creator-name "myCreator" --resource-group "myResourceGroup"
219-
"""
220-
221-
helps['maps creator delete'] = """
222-
type: command
223-
short-summary: "Delete a Maps Creator resource."
224-
examples:
225-
- name: Delete Creator Resource
226-
text: |-
227-
az maps creator delete --account-name "myMapsAccount" --creator-name "myCreator" --resource-group \
228-
"myResourceGroup"
229-
"""

src/azure-cli/azure/cli/command_modules/maps/_params.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -98,37 +98,3 @@ def load_arguments(self, _):
9898
options_list=['--key'],
9999
arg_type=get_enum_type(KeyType),
100100
help='Whether the operation refers to the primary or secondary key')
101-
102-
with self.argument_context('maps creator') as c:
103-
c.argument('tags', arg_type=tags_type)
104-
105-
with self.argument_context('maps creator create') as c:
106-
c.argument('creator_name', options_list=['--creator-name'], type=str, help='The name of the '
107-
'Maps Creator instance.')
108-
c.argument('location', options_list=['--location', '-l'], arg_type=get_location_type(self.cli_ctx),
109-
required=False, validator=get_default_location_from_resource_group)
110-
c.argument('storage_units', options_list=['--storage-units'], type=int,
111-
help='The storage units to be allocated. Integer values from 1 to 100, inclusive.')
112-
113-
with self.argument_context('maps creator update') as c:
114-
c.argument('creator_name', options_list=['--creator-name'], type=str, help='The name of the '
115-
'Maps Creator instance.', id_part='child_name_1')
116-
c.argument('storage_units', options_list=['--storage-units'], type=int,
117-
help='The storage units to be allocated. Integer values from 1 to 100, inclusive.')
118-
119-
with self.argument_context('maps creator delete') as c:
120-
c.argument('creator_name', options_list=['--creator-name'], type=str, help='The name of the '
121-
'Maps Creator instance.', id_part='child_name_1')
122-
123-
with self.argument_context('maps creator show') as c:
124-
c.argument('creator_name', options_list=['--creator-name'], type=str, help='The name of the '
125-
'Maps Creator instance.', id_part='child_name_1')
126-
127-
with self.argument_context('maps creator list') as c:
128-
c.argument('resource_group_name',
129-
arg_type=resource_group_name_type,
130-
id_part=None,
131-
help='Resource group name')
132-
c.argument('account_name',
133-
id_part=None,
134-
arg_type=maps_name_type)

src/azure-cli/azure/cli/command_modules/maps/commands.py

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# --------------------------------------------------------------------------------------------
55

66
from azure.cli.core.commands import CliCommandType
7-
from azure.cli.command_modules.maps._client_factory import cf_accounts, cf_map, cf_creator
7+
from azure.cli.command_modules.maps._client_factory import cf_accounts, cf_map
88

99

1010
def load_command_table(self, _):
@@ -29,13 +29,3 @@ def load_command_table(self, _):
2929

3030
with self.command_group('maps map', maps_map, client_factory=cf_map) as g:
3131
g.custom_command('list-operation', 'maps_map_list_operation')
32-
33-
maps_creator = CliCommandType(
34-
operations_tmpl='azure.mgmt.maps.operations._creators_operations#CreatorsOperations.{}',
35-
client_factory=cf_creator)
36-
with self.command_group('maps creator', maps_creator, client_factory=cf_creator) as g:
37-
g.custom_command('list', 'maps_creator_list')
38-
g.custom_show_command('show', 'maps_creator_show')
39-
g.custom_command('create', 'maps_creator_create')
40-
g.custom_command('update', 'maps_creator_update')
41-
g.custom_command('delete', 'maps_creator_delete', confirmation=True)

src/azure-cli/azure/cli/command_modules/maps/custom.py

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -140,64 +140,3 @@ def maps_account_regenerate_key(client,
140140

141141
def maps_map_list_operation(client):
142142
return client.list_operations()
143-
144-
145-
def maps_creator_list(client,
146-
resource_group_name,
147-
account_name):
148-
return client.list_by_account(resource_group_name=resource_group_name,
149-
account_name=account_name)
150-
151-
152-
def maps_creator_show(client,
153-
resource_group_name,
154-
account_name,
155-
creator_name):
156-
return client.get(resource_group_name=resource_group_name,
157-
account_name=account_name,
158-
creator_name=creator_name)
159-
160-
161-
def maps_creator_create(client,
162-
resource_group_name,
163-
account_name,
164-
creator_name,
165-
location,
166-
storage_units,
167-
tags=None):
168-
creator_resource = {}
169-
if tags is not None:
170-
creator_resource['tags'] = tags
171-
creator_resource['location'] = location
172-
creator_resource['properties'] = {}
173-
creator_resource['properties']['storage_units'] = storage_units
174-
return client.create_or_update(resource_group_name=resource_group_name,
175-
account_name=account_name,
176-
creator_name=creator_name,
177-
creator_resource=creator_resource)
178-
179-
180-
def maps_creator_update(client,
181-
resource_group_name,
182-
account_name,
183-
creator_name,
184-
tags=None,
185-
storage_units=None):
186-
creator_update_parameters = {}
187-
if tags is not None:
188-
creator_update_parameters['tags'] = tags
189-
if storage_units is not None:
190-
creator_update_parameters['storage_units'] = storage_units
191-
return client.update(resource_group_name=resource_group_name,
192-
account_name=account_name,
193-
creator_name=creator_name,
194-
creator_update_parameters=creator_update_parameters)
195-
196-
197-
def maps_creator_delete(client,
198-
resource_group_name,
199-
account_name,
200-
creator_name):
201-
return client.delete(resource_group_name=resource_group_name,
202-
account_name=account_name,
203-
creator_name=creator_name)

0 commit comments

Comments
 (0)