-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Maps} Support managed maps creator operations #18450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
6d2e9fb
track 2
Jing-song a714654
uodate
Jing-song 8599a33
update
Jing-song bbf238a
update
Jing-song 883c7a7
update
Jing-song 58d6041
update
Jing-song 4ca23bb
Compatible with old commands
Jing-song 48974cc
update
Jing-song c7ee3f8
creator
Jing-song 138559b
Update _params.py
Jing-song bd88011
Update _params.py
Jing-song 8526c9f
Linter
Jing-song 54f3a43
Update _help.py
Jing-song 340a80e
linter
Jing-song 659ebcb
Update _params.py
Jing-song 3a1e82b
update
Jing-song d34c8ad
Update custom.py
Jing-song 4ae0a28
Merge branch 'Azure:dev' into maps
Jing-song 6e66a08
Merge branch 'Azure:dev' into maps
Jing-song 1724b7b
Update custom.py
Jing-song ab48c7d
Merge branch 'Azure:dev' into maps
Jing-song File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # -------------------------------------------------------------------------- | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. See License.txt in the project root for | ||
| # license information. | ||
| # | ||
| # Code generated by Microsoft (R) AutoRest Code Generator. | ||
| # Changes may cause incorrect behavior and will be lost if the code is | ||
| # regenerated. | ||
| # -------------------------------------------------------------------------- | ||
| # pylint: disable=protected-access | ||
|
|
||
| import argparse | ||
| from collections import defaultdict | ||
| from knack.util import CLIError | ||
|
|
||
|
|
||
| class AddLinkedResources(argparse._AppendAction): | ||
| def __call__(self, parser, namespace, values, option_string=None): | ||
| action = self.get_action(values, option_string) | ||
| super(AddLinkedResources, self).__call__(parser, namespace, action, option_string) | ||
|
|
||
| def get_action(self, values, option_string): # pylint: disable=no-self-use | ||
| try: | ||
| properties = defaultdict(list) | ||
| for (k, v) in (x.split('=', 1) for x in values): | ||
| properties[k].append(v) | ||
| properties = dict(properties) | ||
| except ValueError: | ||
| raise CLIError('usage error: {} [KEY=VALUE ...]'.format(option_string)) | ||
| d = {} | ||
| for k in properties: | ||
| kl = k.lower() | ||
| v = properties[k] | ||
| if kl == 'unique-name': | ||
| d['unique_name'] = v[0] | ||
| elif kl == 'id': | ||
| d['id'] = v[0] | ||
| else: | ||
| raise CLIError('Unsupported Key {} is provided for parameter linked_resources. All possible keys are: ' | ||
| 'unique-name, id'.format(k)) | ||
| return d |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.