{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/azure-cli/pulls/comments/86671269","pull_request_review_id":7319894,"id":86671269,"diff_hunk":"@@ -40,22 +43,27 @@ def wrapped(namespace):\n     else:\n         validator = fold_validator\n \n-    quotes = '\"\"' if platform.system() == 'Windows' else \"''\"\n-    quote_text = '  Use {} for none.'.format(quotes) if none_flag_value else ''\n-    flag_texts = {\n-        new_flag_value: '  Creates new by default.{}'.format(quote_text),\n-        existing_id_flag_value: '  Uses existing resource.{}'\n-                                .format(quote_text),\n-        none_flag_value: '  None by default.'\n-    }\n-    help_text = 'Name or ID of the resource.' + flag_texts[default_value_flag]\n+    if not custom_help:\n+        quotes = '\"\"' if platform.system() == 'Windows' else \"''\"\n+        quote_text = ' Use {} for none.'.format(quotes) if none_flag_value else ''\n+        parent_text = ' If name specified, must also specify {}.'.format(\n+            parent_option_flag or parent_name) if parent_name else ''\n+        flag_texts = {\n+            new_flag_value: '  Creates new by default.{}'.format(quote_text),\n+            existing_id_flag_value: '  Uses existing resource.{}{}'\n+                                    .format(quote_text, parent_text),\n+            none_flag_value: '  None by default.'\n+        }\n+        help_text = 'Name or ID of the resource.' + flag_texts[default_value_flag]\n+    else:\n+        help_text = custom_help\n \n     register_cli_argument(scope, base_name, validator=validator, help=help_text, **kwargs)\n     register_cli_argument(scope, type_field_name, help=argparse.SUPPRESS, default=None)\n \n def _name_id_fold(base_name, resource_type, type_field, #pylint: disable=too-many-arguments\n                   existing_id_flag_value, new_flag_value, none_flag_value,\n-                  parent_name=None, parent_type=None):\n+                  parent_name=None, parent_option_flag=None, parent_type=None, base_required=True):","path":"src/azure-cli-core/azure/cli/core/commands/template_create.py","position":60,"original_position":60,"commit_id":"66a1e72f5b1efdadc330793ba5050338cfbe752e","original_commit_id":"66a1e72f5b1efdadc330793ba5050338cfbe752e","user":{"login":"tjprescott","id":5723682,"avatar_url":"https://avatars.githubusercontent.com/u/5723682?v=3","gravatar_id":"","url":"https://api.github.com/users/tjprescott","html_url":"https://github.com/tjprescott","followers_url":"https://api.github.com/users/tjprescott/followers","following_url":"https://api.github.com/users/tjprescott/following{/other_user}","gists_url":"https://api.github.com/users/tjprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/tjprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjprescott/subscriptions","organizations_url":"https://api.github.com/users/tjprescott/orgs","repos_url":"https://api.github.com/users/tjprescott/repos","events_url":"https://api.github.com/users/tjprescott/events{/privacy}","received_events_url":"https://api.github.com/users/tjprescott/received_events","type":"User","site_admin":false},"body":"Which argument? Parent option flag lets you specify the option name so the error message will display it correctly. Otherwise you'd get 'virutal_network_name' is required instead of '--vnet-name' is required.\r\n\r\nIf you are referring to `base_required` that refers to the base property (not the parent). Since the default is true, it would only need to be specified if the base property (for example subnet) were optional.","created_at":"2016-11-05T18:55:22Z","updated_at":"2016-11-05T18:55:22Z","html_url":"https://github.com/Azure/azure-cli/pull/1248#discussion_r86671269","pull_request_url":"https://api.github.com/repos/Azure/azure-cli/pulls/1248","_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/comments/86671269"},"html":{"href":"https://github.com/Azure/azure-cli/pull/1248#discussion_r86671269"},"pull_request":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/1248"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/azure-cli/pulls/1248","id":92420049,"html_url":"https://github.com/Azure/azure-cli/pull/1248","diff_url":"https://github.com/Azure/azure-cli/pull/1248.diff","patch_url":"https://github.com/Azure/azure-cli/pull/1248.patch","issue_url":"https://api.github.com/repos/Azure/azure-cli/issues/1248","number":1248,"state":"open","locked":false,"title":"[Network] Fix issues with NIC Create","user":{"login":"tjprescott","id":5723682,"avatar_url":"https://avatars.githubusercontent.com/u/5723682?v=3","gravatar_id":"","url":"https://api.github.com/users/tjprescott","html_url":"https://github.com/tjprescott","followers_url":"https://api.github.com/users/tjprescott/followers","following_url":"https://api.github.com/users/tjprescott/following{/other_user}","gists_url":"https://api.github.com/users/tjprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/tjprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjprescott/subscriptions","organizations_url":"https://api.github.com/users/tjprescott/orgs","repos_url":"https://api.github.com/users/tjprescott/repos","events_url":"https://api.github.com/users/tjprescott/events{/privacy}","received_events_url":"https://api.github.com/users/tjprescott/received_events","type":"User","site_admin":false},"body":"Fixes #1237, fixes #920.\r\n\r\nEnhances the functionality of 'register_cli_folded_argument' to give better help text and error messages.","created_at":"2016-11-04T21:38:43Z","updated_at":"2016-11-05T18:55:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cc28e77562e32c9032faa51734f16b6c0aed1753","assignee":{"login":"yugangw-msft","id":6014209,"avatar_url":"https://avatars.githubusercontent.com/u/6014209?v=3","gravatar_id":"","url":"https://api.github.com/users/yugangw-msft","html_url":"https://github.com/yugangw-msft","followers_url":"https://api.github.com/users/yugangw-msft/followers","following_url":"https://api.github.com/users/yugangw-msft/following{/other_user}","gists_url":"https://api.github.com/users/yugangw-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/yugangw-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugangw-msft/subscriptions","organizations_url":"https://api.github.com/users/yugangw-msft/orgs","repos_url":"https://api.github.com/users/yugangw-msft/repos","events_url":"https://api.github.com/users/yugangw-msft/events{/privacy}","received_events_url":"https://api.github.com/users/yugangw-msft/received_events","type":"User","site_admin":false},"assignees":[{"login":"yugangw-msft","id":6014209,"avatar_url":"https://avatars.githubusercontent.com/u/6014209?v=3","gravatar_id":"","url":"https://api.github.com/users/yugangw-msft","html_url":"https://github.com/yugangw-msft","followers_url":"https://api.github.com/users/yugangw-msft/followers","following_url":"https://api.github.com/users/yugangw-msft/following{/other_user}","gists_url":"https://api.github.com/users/yugangw-msft/gists{/gist_id}","starred_url":"https://api.github.com/users/yugangw-msft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yugangw-msft/subscriptions","organizations_url":"https://api.github.com/users/yugangw-msft/orgs","repos_url":"https://api.github.com/users/yugangw-msft/repos","events_url":"https://api.github.com/users/yugangw-msft/events{/privacy}","received_events_url":"https://api.github.com/users/yugangw-msft/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/Azure/azure-cli/pulls/1248/commits","review_comments_url":"https://api.github.com/repos/Azure/azure-cli/pulls/1248/comments","review_comment_url":"https://api.github.com/repos/Azure/azure-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/azure-cli/issues/1248/comments","statuses_url":"https://api.github.com/repos/Azure/azure-cli/statuses/66a1e72f5b1efdadc330793ba5050338cfbe752e","head":{"label":"tjprescott:FixNicCreate","ref":"FixNicCreate","sha":"66a1e72f5b1efdadc330793ba5050338cfbe752e","user":{"login":"tjprescott","id":5723682,"avatar_url":"https://avatars.githubusercontent.com/u/5723682?v=3","gravatar_id":"","url":"https://api.github.com/users/tjprescott","html_url":"https://github.com/tjprescott","followers_url":"https://api.github.com/users/tjprescott/followers","following_url":"https://api.github.com/users/tjprescott/following{/other_user}","gists_url":"https://api.github.com/users/tjprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/tjprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjprescott/subscriptions","organizations_url":"https://api.github.com/users/tjprescott/orgs","repos_url":"https://api.github.com/users/tjprescott/repos","events_url":"https://api.github.com/users/tjprescott/events{/privacy}","received_events_url":"https://api.github.com/users/tjprescott/received_events","type":"User","site_admin":false},"repo":{"id":64678451,"name":"azure-cli","full_name":"tjprescott/azure-cli","owner":{"login":"tjprescott","id":5723682,"avatar_url":"https://avatars.githubusercontent.com/u/5723682?v=3","gravatar_id":"","url":"https://api.github.com/users/tjprescott","html_url":"https://github.com/tjprescott","followers_url":"https://api.github.com/users/tjprescott/followers","following_url":"https://api.github.com/users/tjprescott/following{/other_user}","gists_url":"https://api.github.com/users/tjprescott/gists{/gist_id}","starred_url":"https://api.github.com/users/tjprescott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjprescott/subscriptions","organizations_url":"https://api.github.com/users/tjprescott/orgs","repos_url":"https://api.github.com/users/tjprescott/repos","events_url":"https://api.github.com/users/tjprescott/events{/privacy}","received_events_url":"https://api.github.com/users/tjprescott/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tjprescott/azure-cli","description":"Command-line tools for Azure.","fork":true,"url":"https://api.github.com/repos/tjprescott/azure-cli","forks_url":"https://api.github.com/repos/tjprescott/azure-cli/forks","keys_url":"https://api.github.com/repos/tjprescott/azure-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tjprescott/azure-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tjprescott/azure-cli/teams","hooks_url":"https://api.github.com/repos/tjprescott/azure-cli/hooks","issue_events_url":"https://api.github.com/repos/tjprescott/azure-cli/issues/events{/number}","events_url":"https://api.github.com/repos/tjprescott/azure-cli/events","assignees_url":"https://api.github.com/repos/tjprescott/azure-cli/assignees{/user}","branches_url":"https://api.github.com/repos/tjprescott/azure-cli/branches{/branch}","tags_url":"https://api.github.com/repos/tjprescott/azure-cli/tags","blobs_url":"https://api.github.com/repos/tjprescott/azure-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tjprescott/azure-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tjprescott/azure-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/tjprescott/azure-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tjprescott/azure-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/tjprescott/azure-cli/languages","stargazers_url":"https://api.github.com/repos/tjprescott/azure-cli/stargazers","contributors_url":"https://api.github.com/repos/tjprescott/azure-cli/contributors","subscribers_url":"https://api.github.com/repos/tjprescott/azure-cli/subscribers","subscription_url":"https://api.github.com/repos/tjprescott/azure-cli/subscription","commits_url":"https://api.github.com/repos/tjprescott/azure-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/tjprescott/azure-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/tjprescott/azure-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/tjprescott/azure-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/tjprescott/azure-cli/contents/{+path}","compare_url":"https://api.github.com/repos/tjprescott/azure-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tjprescott/azure-cli/merges","archive_url":"https://api.github.com/repos/tjprescott/azure-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tjprescott/azure-cli/downloads","issues_url":"https://api.github.com/repos/tjprescott/azure-cli/issues{/number}","pulls_url":"https://api.github.com/repos/tjprescott/azure-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/tjprescott/azure-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/tjprescott/azure-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tjprescott/azure-cli/labels{/name}","releases_url":"https://api.github.com/repos/tjprescott/azure-cli/releases{/id}","deployments_url":"https://api.github.com/repos/tjprescott/azure-cli/deployments","created_at":"2016-08-01T15:24:25Z","updated_at":"2016-08-01T15:24:28Z","pushed_at":"2016-11-04T22:43:29Z","git_url":"git://github.com/tjprescott/azure-cli.git","ssh_url":"git@github.com:tjprescott/azure-cli.git","clone_url":"https://github.com/tjprescott/azure-cli.git","svn_url":"https://github.com/tjprescott/azure-cli","homepage":null,"size":11781,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Azure:master","ref":"master","sha":"f219fa5971dff554cd5a2b8371859f49442ac4d4","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":51040886,"name":"azure-cli","full_name":"Azure/azure-cli","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/azure-cli","description":"Command-line tools for Azure.","fork":false,"url":"https://api.github.com/repos/Azure/azure-cli","forks_url":"https://api.github.com/repos/Azure/azure-cli/forks","keys_url":"https://api.github.com/repos/Azure/azure-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/azure-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/azure-cli/teams","hooks_url":"https://api.github.com/repos/Azure/azure-cli/hooks","issue_events_url":"https://api.github.com/repos/Azure/azure-cli/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/azure-cli/events","assignees_url":"https://api.github.com/repos/Azure/azure-cli/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/azure-cli/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/azure-cli/tags","blobs_url":"https://api.github.com/repos/Azure/azure-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/azure-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/azure-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/azure-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/azure-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/azure-cli/languages","stargazers_url":"https://api.github.com/repos/Azure/azure-cli/stargazers","contributors_url":"https://api.github.com/repos/Azure/azure-cli/contributors","subscribers_url":"https://api.github.com/repos/Azure/azure-cli/subscribers","subscription_url":"https://api.github.com/repos/Azure/azure-cli/subscription","commits_url":"https://api.github.com/repos/Azure/azure-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/azure-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/azure-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/azure-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/azure-cli/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/azure-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/azure-cli/merges","archive_url":"https://api.github.com/repos/Azure/azure-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/azure-cli/downloads","issues_url":"https://api.github.com/repos/Azure/azure-cli/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/azure-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/azure-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/azure-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/azure-cli/labels{/name}","releases_url":"https://api.github.com/repos/Azure/azure-cli/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/azure-cli/deployments","created_at":"2016-02-04T00:21:51Z","updated_at":"2016-11-04T19:17:54Z","pushed_at":"2016-11-05T03:48:51Z","git_url":"git://github.com/Azure/azure-cli.git","ssh_url":"git@github.com:Azure/azure-cli.git","clone_url":"https://github.com/Azure/azure-cli.git","svn_url":"https://github.com/Azure/azure-cli","homepage":null,"size":15339,"stargazers_count":182,"watchers_count":182,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":234,"forks":47,"open_issues":234,"watchers":182,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/1248"},"html":{"href":"https://github.com/Azure/azure-cli/pull/1248"},"issue":{"href":"https://api.github.com/repos/Azure/azure-cli/issues/1248"},"comments":{"href":"https://api.github.com/repos/Azure/azure-cli/issues/1248/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/1248/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/azure-cli/pulls/1248/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/azure-cli/statuses/66a1e72f5b1efdadc330793ba5050338cfbe752e"}}}}
{"actor":{"display_login":"tjprescott"}}