{"action":"created","comment":{"url":"https://api.github.com/repos/fog/fog-openstack/pulls/comments/73170882","id":73170882,"diff_hunk":"@@ -0,0 +1,108 @@\n+require 'fog/openstack/models/model'\n+\n+module Fog\n+  module Identity\n+    class OpenStack\n+      class V3\n+        class Project < Fog::OpenStack::Model\n+          identity :id\n+\n+          attribute :domain_id\n+          attribute :description\n+          attribute :enabled\n+          attribute :name\n+          attribute :links\n+          attribute :parent_id\n+          attribute :subtree\n+          attribute :parents\n+\n+          def to_s\n+            name\n+          end\n+\n+          def destroy\n+            @@cache.clear if @@cache\n+            requires :id\n+            service.delete_project(id)\n+            true\n+          end\n+\n+          def update(attr = nil)\n+            @@cache.clear if @@cache\n+            requires :id\n+            merge_attributes(\n+              service.update_project(id, attr || attributes).body['project']\n+            )\n+            self\n+          end\n+\n+          def create\n+            @@cache.clear if @@cache\n+            merge_attributes(\n+              service.create_project(attributes).body['project']\n+            )\n+            self\n+          end\n+\n+          def user_roles(user_id)\n+            requires :id\n+            service.list_project_user_roles(id, user_id).body['roles']\n+          end\n+\n+          def grant_role_to_user(role_id, user_id)\n+            @@cache.clear if @@cache\n+            requires :id\n+            service.grant_project_user_role(id, user_id, role_id)\n+          end\n+\n+          def check_user_role(user_id, role_id)\n+            requires :id\n+            begin\n+              service.check_project_user_role(id, user_id, role_id)\n+            rescue Fog::Identity::OpenStack::NotFound\n+              return false\n+            end\n+            true\n+          end\n+\n+          def revoke_role_from_user(role_id, user_id)\n+            @@cache.clear if @@cache\n+            requires :id\n+            service.revoke_project_user_role(id, user_id, role_id)\n+          end\n+\n+          def group_roles(group_id)\n+            requires :id\n+            service.list_project_group_roles(id, group_id).body['roles']\n+          end\n+\n+          def grant_role_to_group(role_id, group_id)\n+            @@cache.clear if @@cache\n+            requires :id\n+            service.grant_project_group_role(id, group_id, role_id)\n+          end\n+\n+          def check_group_role(group_id, role_id)\n+            requires :id\n+            begin\n+              service.check_project_group_role(id, group_id, role_id)\n+            rescue Fog::Identity::OpenStack::NotFound\n+              return false\n+            end\n+            true\n+          end\n+\n+          def revoke_role_from_group(role_id, group_id)\n+            @@cache.clear if @@cache\n+            requires :id\n+            service.revoke_project_group_role(id, group_id, role_id)\n+          end\n+\n+          def self.use_cache(cache)\n+            @@cache = cache","path":"lib/fog/identity/openstack/v3/models/project.rb","position":102,"original_position":102,"commit_id":"241d50c6de4a1a047b56cb5d120c6a446d8876fa","original_commit_id":"ce80ed0cc5544425a8a7cddc375cbe57bc6cc4c0","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Replace class var @@cache with a class instance var.","created_at":"2016-08-02T14:55:38Z","updated_at":"2016-08-02T14:55:38Z","html_url":"https://github.com/fog/fog-openstack/pull/168#discussion_r73170882","pull_request_url":"https://api.github.com/repos/fog/fog-openstack/pulls/168","_links":{"self":{"href":"https://api.github.com/repos/fog/fog-openstack/pulls/comments/73170882"},"html":{"href":"https://github.com/fog/fog-openstack/pull/168#discussion_r73170882"},"pull_request":{"href":"https://api.github.com/repos/fog/fog-openstack/pulls/168"}}},"pull_request":{"url":"https://api.github.com/repos/fog/fog-openstack/pulls/168","id":79718926,"html_url":"https://github.com/fog/fog-openstack/pull/168","diff_url":"https://github.com/fog/fog-openstack/pull/168.diff","patch_url":"https://github.com/fog/fog-openstack/pull/168.patch","issue_url":"https://api.github.com/repos/fog/fog-openstack/issues/168","number":168,"state":"open","locked":false,"title":"Initial DNS Designate implementation","user":{"login":"Carthaca","id":8159679,"avatar_url":"https://avatars.githubusercontent.com/u/8159679?v=3","gravatar_id":"","url":"https://api.github.com/users/Carthaca","html_url":"https://github.com/Carthaca","followers_url":"https://api.github.com/users/Carthaca/followers","following_url":"https://api.github.com/users/Carthaca/following{/other_user}","gists_url":"https://api.github.com/users/Carthaca/gists{/gist_id}","starred_url":"https://api.github.com/users/Carthaca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carthaca/subscriptions","organizations_url":"https://api.github.com/users/Carthaca/orgs","repos_url":"https://api.github.com/users/Carthaca/repos","events_url":"https://api.github.com/users/Carthaca/events{/privacy}","received_events_url":"https://api.github.com/users/Carthaca/received_events","type":"User","site_admin":false},"body":"This implements basic v1 + v2 list domains/zones and quota get + update\r\n\r\nThere will come more :)","created_at":"2016-08-02T11:29:21Z","updated_at":"2016-08-02T14:55:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7791e47645077fbcac93b42fb79144a437a04f1e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fog/fog-openstack/pulls/168/commits","review_comments_url":"https://api.github.com/repos/fog/fog-openstack/pulls/168/comments","review_comment_url":"https://api.github.com/repos/fog/fog-openstack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fog/fog-openstack/issues/168/comments","statuses_url":"https://api.github.com/repos/fog/fog-openstack/statuses/241d50c6de4a1a047b56cb5d120c6a446d8876fa","head":{"label":"sapcc:designate_quota","ref":"designate_quota","sha":"241d50c6de4a1a047b56cb5d120c6a446d8876fa","user":{"login":"sapcc","id":4242847,"avatar_url":"https://avatars.githubusercontent.com/u/4242847?v=3","gravatar_id":"","url":"https://api.github.com/users/sapcc","html_url":"https://github.com/sapcc","followers_url":"https://api.github.com/users/sapcc/followers","following_url":"https://api.github.com/users/sapcc/following{/other_user}","gists_url":"https://api.github.com/users/sapcc/gists{/gist_id}","starred_url":"https://api.github.com/users/sapcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapcc/subscriptions","organizations_url":"https://api.github.com/users/sapcc/orgs","repos_url":"https://api.github.com/users/sapcc/repos","events_url":"https://api.github.com/users/sapcc/events{/privacy}","received_events_url":"https://api.github.com/users/sapcc/received_events","type":"Organization","site_admin":false},"repo":{"id":57223327,"name":"fog-openstack","full_name":"sapcc/fog-openstack","owner":{"login":"sapcc","id":4242847,"avatar_url":"https://avatars.githubusercontent.com/u/4242847?v=3","gravatar_id":"","url":"https://api.github.com/users/sapcc","html_url":"https://github.com/sapcc","followers_url":"https://api.github.com/users/sapcc/followers","following_url":"https://api.github.com/users/sapcc/following{/other_user}","gists_url":"https://api.github.com/users/sapcc/gists{/gist_id}","starred_url":"https://api.github.com/users/sapcc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sapcc/subscriptions","organizations_url":"https://api.github.com/users/sapcc/orgs","repos_url":"https://api.github.com/users/sapcc/repos","events_url":"https://api.github.com/users/sapcc/events{/privacy}","received_events_url":"https://api.github.com/users/sapcc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sapcc/fog-openstack","description":"Fog for OpenStack Platform","fork":true,"url":"https://api.github.com/repos/sapcc/fog-openstack","forks_url":"https://api.github.com/repos/sapcc/fog-openstack/forks","keys_url":"https://api.github.com/repos/sapcc/fog-openstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sapcc/fog-openstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sapcc/fog-openstack/teams","hooks_url":"https://api.github.com/repos/sapcc/fog-openstack/hooks","issue_events_url":"https://api.github.com/repos/sapcc/fog-openstack/issues/events{/number}","events_url":"https://api.github.com/repos/sapcc/fog-openstack/events","assignees_url":"https://api.github.com/repos/sapcc/fog-openstack/assignees{/user}","branches_url":"https://api.github.com/repos/sapcc/fog-openstack/branches{/branch}","tags_url":"https://api.github.com/repos/sapcc/fog-openstack/tags","blobs_url":"https://api.github.com/repos/sapcc/fog-openstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sapcc/fog-openstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sapcc/fog-openstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/sapcc/fog-openstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sapcc/fog-openstack/statuses/{sha}","languages_url":"https://api.github.com/repos/sapcc/fog-openstack/languages","stargazers_url":"https://api.github.com/repos/sapcc/fog-openstack/stargazers","contributors_url":"https://api.github.com/repos/sapcc/fog-openstack/contributors","subscribers_url":"https://api.github.com/repos/sapcc/fog-openstack/subscribers","subscription_url":"https://api.github.com/repos/sapcc/fog-openstack/subscription","commits_url":"https://api.github.com/repos/sapcc/fog-openstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/sapcc/fog-openstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/sapcc/fog-openstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/sapcc/fog-openstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/sapcc/fog-openstack/contents/{+path}","compare_url":"https://api.github.com/repos/sapcc/fog-openstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sapcc/fog-openstack/merges","archive_url":"https://api.github.com/repos/sapcc/fog-openstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sapcc/fog-openstack/downloads","issues_url":"https://api.github.com/repos/sapcc/fog-openstack/issues{/number}","pulls_url":"https://api.github.com/repos/sapcc/fog-openstack/pulls{/number}","milestones_url":"https://api.github.com/repos/sapcc/fog-openstack/milestones{/number}","notifications_url":"https://api.github.com/repos/sapcc/fog-openstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sapcc/fog-openstack/labels{/name}","releases_url":"https://api.github.com/repos/sapcc/fog-openstack/releases{/id}","deployments_url":"https://api.github.com/repos/sapcc/fog-openstack/deployments","created_at":"2016-04-27T15:13:08Z","updated_at":"2016-04-27T15:13:10Z","pushed_at":"2016-08-02T14:52:11Z","git_url":"git://github.com/sapcc/fog-openstack.git","ssh_url":"git@github.com:sapcc/fog-openstack.git","clone_url":"https://github.com/sapcc/fog-openstack.git","svn_url":"https://github.com/sapcc/fog-openstack","homepage":"","size":1120,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"fog:master","ref":"master","sha":"c686ea443e6dc92e948e6180c2ca887690a1d465","user":{"login":"fog","id":991149,"avatar_url":"https://avatars.githubusercontent.com/u/991149?v=3","gravatar_id":"","url":"https://api.github.com/users/fog","html_url":"https://github.com/fog","followers_url":"https://api.github.com/users/fog/followers","following_url":"https://api.github.com/users/fog/following{/other_user}","gists_url":"https://api.github.com/users/fog/gists{/gist_id}","starred_url":"https://api.github.com/users/fog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fog/subscriptions","organizations_url":"https://api.github.com/users/fog/orgs","repos_url":"https://api.github.com/users/fog/repos","events_url":"https://api.github.com/users/fog/events{/privacy}","received_events_url":"https://api.github.com/users/fog/received_events","type":"Organization","site_admin":false},"repo":{"id":52039406,"name":"fog-openstack","full_name":"fog/fog-openstack","owner":{"login":"fog","id":991149,"avatar_url":"https://avatars.githubusercontent.com/u/991149?v=3","gravatar_id":"","url":"https://api.github.com/users/fog","html_url":"https://github.com/fog","followers_url":"https://api.github.com/users/fog/followers","following_url":"https://api.github.com/users/fog/following{/other_user}","gists_url":"https://api.github.com/users/fog/gists{/gist_id}","starred_url":"https://api.github.com/users/fog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fog/subscriptions","organizations_url":"https://api.github.com/users/fog/orgs","repos_url":"https://api.github.com/users/fog/repos","events_url":"https://api.github.com/users/fog/events{/privacy}","received_events_url":"https://api.github.com/users/fog/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fog/fog-openstack","description":"Fog for OpenStack Platform","fork":false,"url":"https://api.github.com/repos/fog/fog-openstack","forks_url":"https://api.github.com/repos/fog/fog-openstack/forks","keys_url":"https://api.github.com/repos/fog/fog-openstack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fog/fog-openstack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fog/fog-openstack/teams","hooks_url":"https://api.github.com/repos/fog/fog-openstack/hooks","issue_events_url":"https://api.github.com/repos/fog/fog-openstack/issues/events{/number}","events_url":"https://api.github.com/repos/fog/fog-openstack/events","assignees_url":"https://api.github.com/repos/fog/fog-openstack/assignees{/user}","branches_url":"https://api.github.com/repos/fog/fog-openstack/branches{/branch}","tags_url":"https://api.github.com/repos/fog/fog-openstack/tags","blobs_url":"https://api.github.com/repos/fog/fog-openstack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fog/fog-openstack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fog/fog-openstack/git/refs{/sha}","trees_url":"https://api.github.com/repos/fog/fog-openstack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fog/fog-openstack/statuses/{sha}","languages_url":"https://api.github.com/repos/fog/fog-openstack/languages","stargazers_url":"https://api.github.com/repos/fog/fog-openstack/stargazers","contributors_url":"https://api.github.com/repos/fog/fog-openstack/contributors","subscribers_url":"https://api.github.com/repos/fog/fog-openstack/subscribers","subscription_url":"https://api.github.com/repos/fog/fog-openstack/subscription","commits_url":"https://api.github.com/repos/fog/fog-openstack/commits{/sha}","git_commits_url":"https://api.github.com/repos/fog/fog-openstack/git/commits{/sha}","comments_url":"https://api.github.com/repos/fog/fog-openstack/comments{/number}","issue_comment_url":"https://api.github.com/repos/fog/fog-openstack/issues/comments{/number}","contents_url":"https://api.github.com/repos/fog/fog-openstack/contents/{+path}","compare_url":"https://api.github.com/repos/fog/fog-openstack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fog/fog-openstack/merges","archive_url":"https://api.github.com/repos/fog/fog-openstack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fog/fog-openstack/downloads","issues_url":"https://api.github.com/repos/fog/fog-openstack/issues{/number}","pulls_url":"https://api.github.com/repos/fog/fog-openstack/pulls{/number}","milestones_url":"https://api.github.com/repos/fog/fog-openstack/milestones{/number}","notifications_url":"https://api.github.com/repos/fog/fog-openstack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fog/fog-openstack/labels{/name}","releases_url":"https://api.github.com/repos/fog/fog-openstack/releases{/id}","deployments_url":"https://api.github.com/repos/fog/fog-openstack/deployments","created_at":"2016-02-18T21:16:52Z","updated_at":"2016-07-20T19:42:16Z","pushed_at":"2016-08-02T14:52:12Z","git_url":"git://github.com/fog/fog-openstack.git","ssh_url":"git@github.com:fog/fog-openstack.git","clone_url":"https://github.com/fog/fog-openstack.git","svn_url":"https://github.com/fog/fog-openstack","homepage":"","size":1127,"stargazers_count":10,"watchers_count":10,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":29,"mirror_url":null,"open_issues_count":45,"forks":29,"open_issues":45,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fog/fog-openstack/pulls/168"},"html":{"href":"https://github.com/fog/fog-openstack/pull/168"},"issue":{"href":"https://api.github.com/repos/fog/fog-openstack/issues/168"},"comments":{"href":"https://api.github.com/repos/fog/fog-openstack/issues/168/comments"},"review_comments":{"href":"https://api.github.com/repos/fog/fog-openstack/pulls/168/comments"},"review_comment":{"href":"https://api.github.com/repos/fog/fog-openstack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fog/fog-openstack/pulls/168/commits"},"statuses":{"href":"https://api.github.com/repos/fog/fog-openstack/statuses/241d50c6de4a1a047b56cb5d120c6a446d8876fa"}}}}
{"actor":{"display_login":"houndci-bot"}}