{"action":"created","comment":{"url":"https://api.github.com/repos/kubic-project/velum/pulls/comments/197686258","pull_request_review_id":131474504,"id":197686258,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NzY4NjI1OA==","diff_hunk":"@@ -166,5 +170,60 @@ def kubelet_contents\n       }\n     }\n   end\n+\n+  def generate_user_block(con)\n+    user = {}\n+    user[:base_dn] = con.user_base_dn\n+    user[:filter]  = con.user_filter\n+    user_attr_map = user[:attr_map] = {}\n+    user_attr_map[:username] = con.user_attr_username\n+    user_attr_map[:id]       = con.user_attr_id\n+    user_attr_map[:email]    = con.user_attr_email\n+    user_attr_map[:name]     = con.user_attr_name\n+    user\n+  end\n+\n+  def generate_bind_block(con)\n+    bind = {}\n+    if con.bind_anon\n+      bind[:anonymous] = true\n+    else\n+      bind[:anonymous] = false\n+      bind[:dn] = con.bind_dn\n+      bind[:pw] = con.bind_pw\n+    end\n+    bind\n+  end\n+\n+  def generate_group_block(con)","path":"app/controllers/internal_api/v1/pillars_controller.rb","position":44,"original_position":44,"commit_id":"46b3ce07799bb05d77a37439cb64dd69f6f4900b","original_commit_id":"46b3ce07799bb05d77a37439cb64dd69f6f4900b","user":{"login":"MaximilianMeister","id":5364817,"node_id":"MDQ6VXNlcjUzNjQ4MTc=","avatar_url":"https://avatars0.githubusercontent.com/u/5364817?v=4","gravatar_id":"","url":"https://api.github.com/users/MaximilianMeister","html_url":"https://github.com/MaximilianMeister","followers_url":"https://api.github.com/users/MaximilianMeister/followers","following_url":"https://api.github.com/users/MaximilianMeister/following{/other_user}","gists_url":"https://api.github.com/users/MaximilianMeister/gists{/gist_id}","starred_url":"https://api.github.com/users/MaximilianMeister/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaximilianMeister/subscriptions","organizations_url":"https://api.github.com/users/MaximilianMeister/orgs","repos_url":"https://api.github.com/users/MaximilianMeister/repos","events_url":"https://api.github.com/users/MaximilianMeister/events{/privacy}","received_events_url":"https://api.github.com/users/MaximilianMeister/received_events","type":"User","site_admin":false},"body":"can we put `generate_group_block`, `generate_bind_block`, `generate_user_block` into a library e.g. under either `lib/velum/dex/ldap.rb`, `lib/velum/dex_connectors.rb` or even to https://github.com/kubic-project/velum/blob/master/lib/velum/ldap.rb ?\r\n\r\ni think we can expect more connectors to be added soon (SAML e.g.), therefore we could put the dex connector business logic already in a good place for not having to move it again later, what do you think?","created_at":"2018-06-25T06:03:55Z","updated_at":"2018-06-25T06:07:11Z","html_url":"https://github.com/kubic-project/velum/pull/585#discussion_r197686258","pull_request_url":"https://api.github.com/repos/kubic-project/velum/pulls/585","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/kubic-project/velum/pulls/comments/197686258"},"html":{"href":"https://github.com/kubic-project/velum/pull/585#discussion_r197686258"},"pull_request":{"href":"https://api.github.com/repos/kubic-project/velum/pulls/585"}}},"pull_request":{"url":"https://api.github.com/repos/kubic-project/velum/pulls/585","id":194721111,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NzIxMTEx","html_url":"https://github.com/kubic-project/velum/pull/585","diff_url":"https://github.com/kubic-project/velum/pull/585.diff","patch_url":"https://github.com/kubic-project/velum/pull/585.patch","issue_url":"https://api.github.com/repos/kubic-project/velum/issues/585","number":585,"state":"open","locked":false,"title":"Add dex connector ldap table, models, and pillar output","user":{"login":"nanoscopic","id":905365,"node_id":"MDQ6VXNlcjkwNTM2NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/905365?v=4","gravatar_id":"","url":"https://api.github.com/users/nanoscopic","html_url":"https://github.com/nanoscopic","followers_url":"https://api.github.com/users/nanoscopic/followers","following_url":"https://api.github.com/users/nanoscopic/following{/other_user}","gists_url":"https://api.github.com/users/nanoscopic/gists{/gist_id}","starred_url":"https://api.github.com/users/nanoscopic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nanoscopic/subscriptions","organizations_url":"https://api.github.com/users/nanoscopic/orgs","repos_url":"https://api.github.com/users/nanoscopic/repos","events_url":"https://api.github.com/users/nanoscopic/events{/privacy}","received_events_url":"https://api.github.com/users/nanoscopic/received_events","type":"User","site_admin":false},"body":"Added a new table \"dex_connectors_ldap\" and migration file to the db schema and migrate files.\r\nAltered pillar controller to output this new data.\r\nAdded a basic/empty app model for the new table so that the data can be fetched through it.\r\nUpdated pillar rspec to test newly output connectors as well as to allow the empty connectors in the other pillar tests.","created_at":"2018-06-13T21:31:09Z","updated_at":"2018-06-25T06:07:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4961db1a13ba871fe6c836e04f7963d16ed3fcaf","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kubic-project/velum/pulls/585/commits","review_comments_url":"https://api.github.com/repos/kubic-project/velum/pulls/585/comments","review_comment_url":"https://api.github.com/repos/kubic-project/velum/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubic-project/velum/issues/585/comments","statuses_url":"https://api.github.com/repos/kubic-project/velum/statuses/46b3ce07799bb05d77a37439cb64dd69f6f4900b","head":{"label":"nanoscopic:dex_connectors","ref":"dex_connectors","sha":"46b3ce07799bb05d77a37439cb64dd69f6f4900b","user":{"login":"nanoscopic","id":905365,"node_id":"MDQ6VXNlcjkwNTM2NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/905365?v=4","gravatar_id":"","url":"https://api.github.com/users/nanoscopic","html_url":"https://github.com/nanoscopic","followers_url":"https://api.github.com/users/nanoscopic/followers","following_url":"https://api.github.com/users/nanoscopic/following{/other_user}","gists_url":"https://api.github.com/users/nanoscopic/gists{/gist_id}","starred_url":"https://api.github.com/users/nanoscopic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nanoscopic/subscriptions","organizations_url":"https://api.github.com/users/nanoscopic/orgs","repos_url":"https://api.github.com/users/nanoscopic/repos","events_url":"https://api.github.com/users/nanoscopic/events{/privacy}","received_events_url":"https://api.github.com/users/nanoscopic/received_events","type":"User","site_admin":false},"repo":{"id":135747551,"node_id":"MDEwOlJlcG9zaXRvcnkxMzU3NDc1NTE=","name":"velum","full_name":"nanoscopic/velum","owner":{"login":"nanoscopic","id":905365,"node_id":"MDQ6VXNlcjkwNTM2NQ==","avatar_url":"https://avatars1.githubusercontent.com/u/905365?v=4","gravatar_id":"","url":"https://api.github.com/users/nanoscopic","html_url":"https://github.com/nanoscopic","followers_url":"https://api.github.com/users/nanoscopic/followers","following_url":"https://api.github.com/users/nanoscopic/following{/other_user}","gists_url":"https://api.github.com/users/nanoscopic/gists{/gist_id}","starred_url":"https://api.github.com/users/nanoscopic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nanoscopic/subscriptions","organizations_url":"https://api.github.com/users/nanoscopic/orgs","repos_url":"https://api.github.com/users/nanoscopic/repos","events_url":"https://api.github.com/users/nanoscopic/events{/privacy}","received_events_url":"https://api.github.com/users/nanoscopic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nanoscopic/velum","description":"Dashboard for CaaSP clusters","fork":true,"url":"https://api.github.com/repos/nanoscopic/velum","forks_url":"https://api.github.com/repos/nanoscopic/velum/forks","keys_url":"https://api.github.com/repos/nanoscopic/velum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nanoscopic/velum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nanoscopic/velum/teams","hooks_url":"https://api.github.com/repos/nanoscopic/velum/hooks","issue_events_url":"https://api.github.com/repos/nanoscopic/velum/issues/events{/number}","events_url":"https://api.github.com/repos/nanoscopic/velum/events","assignees_url":"https://api.github.com/repos/nanoscopic/velum/assignees{/user}","branches_url":"https://api.github.com/repos/nanoscopic/velum/branches{/branch}","tags_url":"https://api.github.com/repos/nanoscopic/velum/tags","blobs_url":"https://api.github.com/repos/nanoscopic/velum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nanoscopic/velum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nanoscopic/velum/git/refs{/sha}","trees_url":"https://api.github.com/repos/nanoscopic/velum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nanoscopic/velum/statuses/{sha}","languages_url":"https://api.github.com/repos/nanoscopic/velum/languages","stargazers_url":"https://api.github.com/repos/nanoscopic/velum/stargazers","contributors_url":"https://api.github.com/repos/nanoscopic/velum/contributors","subscribers_url":"https://api.github.com/repos/nanoscopic/velum/subscribers","subscription_url":"https://api.github.com/repos/nanoscopic/velum/subscription","commits_url":"https://api.github.com/repos/nanoscopic/velum/commits{/sha}","git_commits_url":"https://api.github.com/repos/nanoscopic/velum/git/commits{/sha}","comments_url":"https://api.github.com/repos/nanoscopic/velum/comments{/number}","issue_comment_url":"https://api.github.com/repos/nanoscopic/velum/issues/comments{/number}","contents_url":"https://api.github.com/repos/nanoscopic/velum/contents/{+path}","compare_url":"https://api.github.com/repos/nanoscopic/velum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nanoscopic/velum/merges","archive_url":"https://api.github.com/repos/nanoscopic/velum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nanoscopic/velum/downloads","issues_url":"https://api.github.com/repos/nanoscopic/velum/issues{/number}","pulls_url":"https://api.github.com/repos/nanoscopic/velum/pulls{/number}","milestones_url":"https://api.github.com/repos/nanoscopic/velum/milestones{/number}","notifications_url":"https://api.github.com/repos/nanoscopic/velum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nanoscopic/velum/labels{/name}","releases_url":"https://api.github.com/repos/nanoscopic/velum/releases{/id}","deployments_url":"https://api.github.com/repos/nanoscopic/velum/deployments","created_at":"2018-06-01T17:48:56Z","updated_at":"2018-06-13T23:09:32Z","pushed_at":"2018-06-22T23:56:09Z","git_url":"git://github.com/nanoscopic/velum.git","ssh_url":"git@github.com:nanoscopic/velum.git","clone_url":"https://github.com/nanoscopic/velum.git","svn_url":"https://github.com/nanoscopic/velum","homepage":"https://www.suse.com/","size":1977,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kubic-project:master","ref":"master","sha":"80000d63fed98ba9f7c2320f8180856e0d756e64","user":{"login":"kubic-project","id":25507587,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTA3NTg3","avatar_url":"https://avatars2.githubusercontent.com/u/25507587?v=4","gravatar_id":"","url":"https://api.github.com/users/kubic-project","html_url":"https://github.com/kubic-project","followers_url":"https://api.github.com/users/kubic-project/followers","following_url":"https://api.github.com/users/kubic-project/following{/other_user}","gists_url":"https://api.github.com/users/kubic-project/gists{/gist_id}","starred_url":"https://api.github.com/users/kubic-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubic-project/subscriptions","organizations_url":"https://api.github.com/users/kubic-project/orgs","repos_url":"https://api.github.com/users/kubic-project/repos","events_url":"https://api.github.com/users/kubic-project/events{/privacy}","received_events_url":"https://api.github.com/users/kubic-project/received_events","type":"Organization","site_admin":false},"repo":{"id":78631630,"node_id":"MDEwOlJlcG9zaXRvcnk3ODYzMTYzMA==","name":"velum","full_name":"kubic-project/velum","owner":{"login":"kubic-project","id":25507587,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1NTA3NTg3","avatar_url":"https://avatars2.githubusercontent.com/u/25507587?v=4","gravatar_id":"","url":"https://api.github.com/users/kubic-project","html_url":"https://github.com/kubic-project","followers_url":"https://api.github.com/users/kubic-project/followers","following_url":"https://api.github.com/users/kubic-project/following{/other_user}","gists_url":"https://api.github.com/users/kubic-project/gists{/gist_id}","starred_url":"https://api.github.com/users/kubic-project/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubic-project/subscriptions","organizations_url":"https://api.github.com/users/kubic-project/orgs","repos_url":"https://api.github.com/users/kubic-project/repos","events_url":"https://api.github.com/users/kubic-project/events{/privacy}","received_events_url":"https://api.github.com/users/kubic-project/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubic-project/velum","description":"Dashboard for CaaSP clusters","fork":false,"url":"https://api.github.com/repos/kubic-project/velum","forks_url":"https://api.github.com/repos/kubic-project/velum/forks","keys_url":"https://api.github.com/repos/kubic-project/velum/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubic-project/velum/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubic-project/velum/teams","hooks_url":"https://api.github.com/repos/kubic-project/velum/hooks","issue_events_url":"https://api.github.com/repos/kubic-project/velum/issues/events{/number}","events_url":"https://api.github.com/repos/kubic-project/velum/events","assignees_url":"https://api.github.com/repos/kubic-project/velum/assignees{/user}","branches_url":"https://api.github.com/repos/kubic-project/velum/branches{/branch}","tags_url":"https://api.github.com/repos/kubic-project/velum/tags","blobs_url":"https://api.github.com/repos/kubic-project/velum/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubic-project/velum/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubic-project/velum/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubic-project/velum/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubic-project/velum/statuses/{sha}","languages_url":"https://api.github.com/repos/kubic-project/velum/languages","stargazers_url":"https://api.github.com/repos/kubic-project/velum/stargazers","contributors_url":"https://api.github.com/repos/kubic-project/velum/contributors","subscribers_url":"https://api.github.com/repos/kubic-project/velum/subscribers","subscription_url":"https://api.github.com/repos/kubic-project/velum/subscription","commits_url":"https://api.github.com/repos/kubic-project/velum/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubic-project/velum/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubic-project/velum/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubic-project/velum/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubic-project/velum/contents/{+path}","compare_url":"https://api.github.com/repos/kubic-project/velum/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubic-project/velum/merges","archive_url":"https://api.github.com/repos/kubic-project/velum/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubic-project/velum/downloads","issues_url":"https://api.github.com/repos/kubic-project/velum/issues{/number}","pulls_url":"https://api.github.com/repos/kubic-project/velum/pulls{/number}","milestones_url":"https://api.github.com/repos/kubic-project/velum/milestones{/number}","notifications_url":"https://api.github.com/repos/kubic-project/velum/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubic-project/velum/labels{/name}","releases_url":"https://api.github.com/repos/kubic-project/velum/releases{/id}","deployments_url":"https://api.github.com/repos/kubic-project/velum/deployments","created_at":"2017-01-11T11:14:34Z","updated_at":"2018-06-22T14:09:14Z","pushed_at":"2018-06-22T23:56:11Z","git_url":"git://github.com/kubic-project/velum.git","ssh_url":"git@github.com:kubic-project/velum.git","clone_url":"https://github.com/kubic-project/velum.git","svn_url":"https://github.com/kubic-project/velum","homepage":"https://www.suse.com/","size":2006,"stargazers_count":45,"watchers_count":45,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":20,"open_issues":18,"watchers":45,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubic-project/velum/pulls/585"},"html":{"href":"https://github.com/kubic-project/velum/pull/585"},"issue":{"href":"https://api.github.com/repos/kubic-project/velum/issues/585"},"comments":{"href":"https://api.github.com/repos/kubic-project/velum/issues/585/comments"},"review_comments":{"href":"https://api.github.com/repos/kubic-project/velum/pulls/585/comments"},"review_comment":{"href":"https://api.github.com/repos/kubic-project/velum/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubic-project/velum/pulls/585/commits"},"statuses":{"href":"https://api.github.com/repos/kubic-project/velum/statuses/46b3ce07799bb05d77a37439cb64dd69f6f4900b"}},"author_association":"NONE"}}
{"actor":{"display_login":"MaximilianMeister"}}