{"action":"created","comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/comments/209470070","pull_request_review_id":145489091,"id":209470070,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTQ3MDA3MA==","diff_hunk":"@@ -0,0 +1,62 @@\n+package openstack\n+\n+import (\n+\t\"fmt\"\n+\t\"testing\"\n+\n+\t\"github.com/hashicorp/terraform/helper/resource\"\n+\t\"github.com/hashicorp/terraform/terraform\"\n+)\n+\n+func TestAccOpenStackNetworkingRouterV2DataSource_name(t *testing.T) {\n+\tresource.Test(t, resource.TestCase{\n+\t\tPreCheck:  func() { testAccPreCheck(t) },\n+\t\tProviders: testAccProviders,\n+\t\tSteps: []resource.TestStep{\n+\t\t\tresource.TestStep{\n+\t\t\t\tConfig: testAccOpenStackNetworkingRouterV2DataSource_router,\n+\t\t\t},\n+\t\t\tresource.TestStep{\n+\t\t\t\tConfig: testAccOpenStackNetworkingRouterV2DataSource_name,\n+\t\t\t\tCheck: resource.ComposeTestCheckFunc(\n+\t\t\t\t\ttestAccCheckNetworkingRouterV2DataSourceID(\"data.openstack_networking_router_v2.router\"),\n+\t\t\t\t\tresource.TestCheckResourceAttrSet(\n+\t\t\t\t\t\t\"data.openstack_networking_router_v2.router\", \"name\"),\n+\t\t\t\t\tresource.TestCheckResourceAttrSet(\n+\t\t\t\t\t\t\"data.openstack_networking_router_v2.router\", \"admin_state_up\"),\n+\t\t\t\t\tresource.TestCheckResourceAttrSet(\n+\t\t\t\t\t\t\"data.openstack_networking_router_v2.router\", \"status\"),\n+\t\t\t\t),\n+\t\t\t},\n+\t\t},\n+\t})\n+}\n+\n+func testAccCheckNetworkingRouterV2DataSourceID(n string) resource.TestCheckFunc {\n+\treturn func(s *terraform.State) error {\n+\t\trs, ok := s.RootModule().Resources[n]\n+\t\tif !ok {\n+\t\t\treturn fmt.Errorf(\"Can't find router data source: %s\", n)\n+\t\t}\n+\n+\t\tif rs.Primary.ID == \"\" {\n+\t\t\treturn fmt.Errorf(\"Router data source ID not set\")\n+\t\t}\n+\n+\t\treturn nil\n+\t}\n+}\n+\n+const testAccOpenStackNetworkingRouterV2DataSource_router = `\n+resource \"openstack_networking_router_v2\" \"router\" {\n+  name = \"router_tf\"\n+}\n+`\n+\n+var testAccOpenStackNetworkingRouterV2DataSource_name = fmt.Sprintf(`\n+%s\n+\n+data \"openstack_networking_router_v2\" \"router\" {\n+   name = \"${openstack_networking_router_v2.router.name}\"","path":"openstack/data_source_openstack_networking_router_v2_test.go","position":60,"original_position":60,"commit_id":"0f0d032867bc4553235199b0231f1c8c61cfd886","original_commit_id":"0f0d032867bc4553235199b0231f1c8c61cfd886","user":{"login":"jtopjian","id":46959,"node_id":"MDQ6VXNlcjQ2OTU5","avatar_url":"https://avatars0.githubusercontent.com/u/46959?v=4","gravatar_id":"","url":"https://api.github.com/users/jtopjian","html_url":"https://github.com/jtopjian","followers_url":"https://api.github.com/users/jtopjian/followers","following_url":"https://api.github.com/users/jtopjian/following{/other_user}","gists_url":"https://api.github.com/users/jtopjian/gists{/gist_id}","starred_url":"https://api.github.com/users/jtopjian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jtopjian/subscriptions","organizations_url":"https://api.github.com/users/jtopjian/orgs","repos_url":"https://api.github.com/users/jtopjian/repos","events_url":"https://api.github.com/users/jtopjian/events{/privacy}","received_events_url":"https://api.github.com/users/jtopjian/received_events","type":"User","site_admin":false},"body":"Let's add:\r\n\r\n```\r\nadmin_state_up = true\r\ndistributed = false\r\n```\r\n\r\nhere to ensure the test does not crash.","created_at":"2018-08-12T22:40:25Z","updated_at":"2018-08-12T22:42:20Z","html_url":"https://github.com/terraform-providers/terraform-provider-openstack/pull/401#discussion_r209470070","pull_request_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/401","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/comments/209470070"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-openstack/pull/401#discussion_r209470070"},"pull_request":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/401"}}},"pull_request":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/401","id":207636284,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA3NjM2Mjg0","html_url":"https://github.com/terraform-providers/terraform-provider-openstack/pull/401","diff_url":"https://github.com/terraform-providers/terraform-provider-openstack/pull/401.diff","patch_url":"https://github.com/terraform-providers/terraform-provider-openstack/pull/401.patch","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/401","number":401,"state":"open","locked":false,"title":"Add networking router v2 data source","user":{"login":"rasta-rocket","id":7874912,"node_id":"MDQ6VXNlcjc4NzQ5MTI=","avatar_url":"https://avatars1.githubusercontent.com/u/7874912?v=4","gravatar_id":"","url":"https://api.github.com/users/rasta-rocket","html_url":"https://github.com/rasta-rocket","followers_url":"https://api.github.com/users/rasta-rocket/followers","following_url":"https://api.github.com/users/rasta-rocket/following{/other_user}","gists_url":"https://api.github.com/users/rasta-rocket/gists{/gist_id}","starred_url":"https://api.github.com/users/rasta-rocket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasta-rocket/subscriptions","organizations_url":"https://api.github.com/users/rasta-rocket/orgs","repos_url":"https://api.github.com/users/rasta-rocket/repos","events_url":"https://api.github.com/users/rasta-rocket/events{/privacy}","received_events_url":"https://api.github.com/users/rasta-rocket/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-10T14:52:00Z","updated_at":"2018-08-12T22:42:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4ac3aa7685b71462482a64900eb9472a9888a1d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/401/commits","review_comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/401/comments","review_comment_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/401/comments","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/statuses/0f0d032867bc4553235199b0231f1c8c61cfd886","head":{"label":"rasta-rocket:dev/data_source_router","ref":"dev/data_source_router","sha":"0f0d032867bc4553235199b0231f1c8c61cfd886","user":{"login":"rasta-rocket","id":7874912,"node_id":"MDQ6VXNlcjc4NzQ5MTI=","avatar_url":"https://avatars1.githubusercontent.com/u/7874912?v=4","gravatar_id":"","url":"https://api.github.com/users/rasta-rocket","html_url":"https://github.com/rasta-rocket","followers_url":"https://api.github.com/users/rasta-rocket/followers","following_url":"https://api.github.com/users/rasta-rocket/following{/other_user}","gists_url":"https://api.github.com/users/rasta-rocket/gists{/gist_id}","starred_url":"https://api.github.com/users/rasta-rocket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasta-rocket/subscriptions","organizations_url":"https://api.github.com/users/rasta-rocket/orgs","repos_url":"https://api.github.com/users/rasta-rocket/repos","events_url":"https://api.github.com/users/rasta-rocket/events{/privacy}","received_events_url":"https://api.github.com/users/rasta-rocket/received_events","type":"User","site_admin":false},"repo":{"id":117968381,"node_id":"MDEwOlJlcG9zaXRvcnkxMTc5NjgzODE=","name":"terraform-provider-openstack","full_name":"rasta-rocket/terraform-provider-openstack","owner":{"login":"rasta-rocket","id":7874912,"node_id":"MDQ6VXNlcjc4NzQ5MTI=","avatar_url":"https://avatars1.githubusercontent.com/u/7874912?v=4","gravatar_id":"","url":"https://api.github.com/users/rasta-rocket","html_url":"https://github.com/rasta-rocket","followers_url":"https://api.github.com/users/rasta-rocket/followers","following_url":"https://api.github.com/users/rasta-rocket/following{/other_user}","gists_url":"https://api.github.com/users/rasta-rocket/gists{/gist_id}","starred_url":"https://api.github.com/users/rasta-rocket/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasta-rocket/subscriptions","organizations_url":"https://api.github.com/users/rasta-rocket/orgs","repos_url":"https://api.github.com/users/rasta-rocket/repos","events_url":"https://api.github.com/users/rasta-rocket/events{/privacy}","received_events_url":"https://api.github.com/users/rasta-rocket/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rasta-rocket/terraform-provider-openstack","description":"Terraform OpenStack provider","fork":true,"url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack","forks_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/forks","keys_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/teams","hooks_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/hooks","issue_events_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/issues/events{/number}","events_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/events","assignees_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/assignees{/user}","branches_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/branches{/branch}","tags_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/tags","blobs_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/statuses/{sha}","languages_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/languages","stargazers_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/stargazers","contributors_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/contributors","subscribers_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/subscribers","subscription_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/subscription","commits_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/contents/{+path}","compare_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/merges","archive_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/downloads","issues_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/issues{/number}","pulls_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/pulls{/number}","milestones_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/milestones{/number}","notifications_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/labels{/name}","releases_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/releases{/id}","deployments_url":"https://api.github.com/repos/rasta-rocket/terraform-provider-openstack/deployments","created_at":"2018-01-18T10:31:21Z","updated_at":"2018-08-02T15:20:36Z","pushed_at":"2018-08-10T14:50:15Z","git_url":"git://github.com/rasta-rocket/terraform-provider-openstack.git","ssh_url":"git@github.com:rasta-rocket/terraform-provider-openstack.git","clone_url":"https://github.com/rasta-rocket/terraform-provider-openstack.git","svn_url":"https://github.com/rasta-rocket/terraform-provider-openstack","homepage":"https://www.terraform.io/docs/providers/openstack/","size":6055,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"terraform-providers:master","ref":"master","sha":"0d70be929364ada30054e5ac481ca6ddc5cdfd09","user":{"login":"terraform-providers","id":29154831,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTU0ODMx","avatar_url":"https://avatars0.githubusercontent.com/u/29154831?v=4","gravatar_id":"","url":"https://api.github.com/users/terraform-providers","html_url":"https://github.com/terraform-providers","followers_url":"https://api.github.com/users/terraform-providers/followers","following_url":"https://api.github.com/users/terraform-providers/following{/other_user}","gists_url":"https://api.github.com/users/terraform-providers/gists{/gist_id}","starred_url":"https://api.github.com/users/terraform-providers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terraform-providers/subscriptions","organizations_url":"https://api.github.com/users/terraform-providers/orgs","repos_url":"https://api.github.com/users/terraform-providers/repos","events_url":"https://api.github.com/users/terraform-providers/events{/privacy}","received_events_url":"https://api.github.com/users/terraform-providers/received_events","type":"Organization","site_admin":false},"repo":{"id":93446101,"node_id":"MDEwOlJlcG9zaXRvcnk5MzQ0NjEwMQ==","name":"terraform-provider-openstack","full_name":"terraform-providers/terraform-provider-openstack","owner":{"login":"terraform-providers","id":29154831,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5MTU0ODMx","avatar_url":"https://avatars0.githubusercontent.com/u/29154831?v=4","gravatar_id":"","url":"https://api.github.com/users/terraform-providers","html_url":"https://github.com/terraform-providers","followers_url":"https://api.github.com/users/terraform-providers/followers","following_url":"https://api.github.com/users/terraform-providers/following{/other_user}","gists_url":"https://api.github.com/users/terraform-providers/gists{/gist_id}","starred_url":"https://api.github.com/users/terraform-providers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/terraform-providers/subscriptions","organizations_url":"https://api.github.com/users/terraform-providers/orgs","repos_url":"https://api.github.com/users/terraform-providers/repos","events_url":"https://api.github.com/users/terraform-providers/events{/privacy}","received_events_url":"https://api.github.com/users/terraform-providers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/terraform-providers/terraform-provider-openstack","description":"Terraform OpenStack provider","fork":false,"url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack","forks_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/forks","keys_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/teams","hooks_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/hooks","issue_events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/events{/number}","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/events","assignees_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/assignees{/user}","branches_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/branches{/branch}","tags_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/tags","blobs_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/statuses/{sha}","languages_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/languages","stargazers_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/stargazers","contributors_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/contributors","subscribers_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/subscribers","subscription_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/subscription","commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/contents/{+path}","compare_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/merges","archive_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/downloads","issues_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues{/number}","pulls_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls{/number}","milestones_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/milestones{/number}","notifications_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/labels{/name}","releases_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/releases{/id}","deployments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/deployments","created_at":"2017-06-05T20:54:08Z","updated_at":"2018-08-11T22:13:31Z","pushed_at":"2018-08-12T16:16:27Z","git_url":"git://github.com/terraform-providers/terraform-provider-openstack.git","ssh_url":"git@github.com:terraform-providers/terraform-provider-openstack.git","clone_url":"https://github.com/terraform-providers/terraform-provider-openstack.git","svn_url":"https://github.com/terraform-providers/terraform-provider-openstack","homepage":"https://www.terraform.io/docs/providers/openstack/","size":6109,"stargazers_count":72,"watchers_count":72,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":108,"mirror_url":null,"archived":false,"open_issues_count":65,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":108,"open_issues":65,"watchers":72,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/401"},"html":{"href":"https://github.com/terraform-providers/terraform-provider-openstack/pull/401"},"issue":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/401"},"comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/issues/401/comments"},"review_comments":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/401/comments"},"review_comment":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/pulls/401/commits"},"statuses":{"href":"https://api.github.com/repos/terraform-providers/terraform-provider-openstack/statuses/0f0d032867bc4553235199b0231f1c8c61cfd886"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"jtopjian"}}