{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments/48629728","id":48629728,"diff_hunk":"@@ -62,8 +62,8 @@ def maybe_modify_resource(name)\n   Chef::Log.info \"Checking existing #{@current_cib_object} for modifications\"\n \n   desired_colocation = cib_object_class.from_chef_resource(new_resource)\n-  if desired_colocation.definition_string != @current_cib_object.definition_string\n-    Chef::Log.debug \"changed from [#{@current_cib_object.definition_string}] to [#{desired_colocation.definition_string}]\"\n+  if desired_colocation.definition != @current_cib_object.definition\n+    Chef::Log.debug \"changed from [#{@current_cib_object.definition}] to [#{desired_colocation.definition}]\"","path":"chef/cookbooks/pacemaker/providers/colocation.rb","position":7,"original_position":7,"commit_id":"07b751d43ac883bd7be55fd9575bd99da4d3da61","original_commit_id":"07b751d43ac883bd7be55fd9575bd99da4d3da61","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Metrics/LineLength: Line is too long. [108/100] (https://github.com/bbatsov/ruby-style-guide#80-character-limits)","created_at":"2015-12-30T20:39:08Z","updated_at":"2015-12-30T20:39:08Z","html_url":"https://github.com/crowbar/crowbar-ha/pull/54#discussion_r48629728","pull_request_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/54","_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments/48629728"},"html":{"href":"https://github.com/crowbar/crowbar-ha/pull/54#discussion_r48629728"},"pull_request":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/54"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/54","id":54827934,"html_url":"https://github.com/crowbar/crowbar-ha/pull/54","diff_url":"https://github.com/crowbar/crowbar-ha/pull/54.diff","patch_url":"https://github.com/crowbar/crowbar-ha/pull/54.patch","issue_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/54","number":54,"state":"open","locked":false,"title":"allow CIB objects with arbitrary unparsed definition strings","user":{"login":"aspiers","id":100738,"avatar_url":"https://avatars.githubusercontent.com/u/100738?v=3","gravatar_id":"","url":"https://api.github.com/users/aspiers","html_url":"https://github.com/aspiers","followers_url":"https://api.github.com/users/aspiers/followers","following_url":"https://api.github.com/users/aspiers/following{/other_user}","gists_url":"https://api.github.com/users/aspiers/gists{/gist_id}","starred_url":"https://api.github.com/users/aspiers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspiers/subscriptions","organizations_url":"https://api.github.com/users/aspiers/orgs","repos_url":"https://api.github.com/users/aspiers/repos","events_url":"https://api.github.com/users/aspiers/events{/privacy}","received_events_url":"https://api.github.com/users/aspiers/received_events","type":"User","site_admin":false},"body":"Until now, CIB objects were only instantiated by supplying individual fine-grained attributes, e.g. in the case of `location` constraints, the attributes are `name`, `rsc`, `score`, and `node`.\r\n\r\nHowever CIB objects can actually have more complicated structures, and we need to support some of them, such as rule-based constraints like:\r\n\r\n    location rulelocation1 primitive1 resource-discovery=exclusive \\\r\n        rule 0: OpenStack-role eq controller\r\n\r\nIn fact `crmsh` even supports `location` constraints with far more complicated syntax than this.  So rather than attempting to reimplement the entire `crmsh` parser, we just add support for objects which are defined by arbitrary definition strings.  The only bit we actually need to parse is the first two words, i.e. the object's type and name respectively.\r\n\r\nTo maintain backwards compatibility with callers which still want to construct objects in the fine-grained manner, we add an internal `@authority` instance variable which determines whether the source of authority for the object's definition is the fine-grained attributes or the arbitrary unparsed string.  When a subclass's `#parse_definition` method succeeds in parsing the definition string into fine-grained attribute values, it must invoke a `#attrs_authoritative` method newly defined in the base class which sets `@authority` to `:attributes`. Otherwise the definition will be retrieved directly from the raw definition string.  This new mechanism replaces `#definition_string`, which was a semantic duplication of `#definition`.\r\n\r\nWe also remove `#load_definition`, which was a hack only used by tests, and instead do tests using the more real-world `.from_name` API.","created_at":"2015-12-30T20:39:00Z","updated_at":"2015-12-30T20:39:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01a3f39b14815066bfbd3f1fb6b9606c62541a5c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/54/commits","review_comments_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/54/comments","review_comment_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/54/comments","statuses_url":"https://api.github.com/repos/crowbar/crowbar-ha/statuses/07b751d43ac883bd7be55fd9575bd99da4d3da61","head":{"label":"aspiers:location-rules","ref":"location-rules","sha":"07b751d43ac883bd7be55fd9575bd99da4d3da61","user":{"login":"aspiers","id":100738,"avatar_url":"https://avatars.githubusercontent.com/u/100738?v=3","gravatar_id":"","url":"https://api.github.com/users/aspiers","html_url":"https://github.com/aspiers","followers_url":"https://api.github.com/users/aspiers/followers","following_url":"https://api.github.com/users/aspiers/following{/other_user}","gists_url":"https://api.github.com/users/aspiers/gists{/gist_id}","starred_url":"https://api.github.com/users/aspiers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspiers/subscriptions","organizations_url":"https://api.github.com/users/aspiers/orgs","repos_url":"https://api.github.com/users/aspiers/repos","events_url":"https://api.github.com/users/aspiers/events{/privacy}","received_events_url":"https://api.github.com/users/aspiers/received_events","type":"User","site_admin":false},"repo":{"id":41430282,"name":"crowbar-ha","full_name":"aspiers/crowbar-ha","owner":{"login":"aspiers","id":100738,"avatar_url":"https://avatars.githubusercontent.com/u/100738?v=3","gravatar_id":"","url":"https://api.github.com/users/aspiers","html_url":"https://github.com/aspiers","followers_url":"https://api.github.com/users/aspiers/followers","following_url":"https://api.github.com/users/aspiers/following{/other_user}","gists_url":"https://api.github.com/users/aspiers/gists{/gist_id}","starred_url":"https://api.github.com/users/aspiers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aspiers/subscriptions","organizations_url":"https://api.github.com/users/aspiers/orgs","repos_url":"https://api.github.com/users/aspiers/repos","events_url":"https://api.github.com/users/aspiers/events{/privacy}","received_events_url":"https://api.github.com/users/aspiers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aspiers/crowbar-ha","description":"HA deployment for Crowbar","fork":true,"url":"https://api.github.com/repos/aspiers/crowbar-ha","forks_url":"https://api.github.com/repos/aspiers/crowbar-ha/forks","keys_url":"https://api.github.com/repos/aspiers/crowbar-ha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aspiers/crowbar-ha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aspiers/crowbar-ha/teams","hooks_url":"https://api.github.com/repos/aspiers/crowbar-ha/hooks","issue_events_url":"https://api.github.com/repos/aspiers/crowbar-ha/issues/events{/number}","events_url":"https://api.github.com/repos/aspiers/crowbar-ha/events","assignees_url":"https://api.github.com/repos/aspiers/crowbar-ha/assignees{/user}","branches_url":"https://api.github.com/repos/aspiers/crowbar-ha/branches{/branch}","tags_url":"https://api.github.com/repos/aspiers/crowbar-ha/tags","blobs_url":"https://api.github.com/repos/aspiers/crowbar-ha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aspiers/crowbar-ha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aspiers/crowbar-ha/git/refs{/sha}","trees_url":"https://api.github.com/repos/aspiers/crowbar-ha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aspiers/crowbar-ha/statuses/{sha}","languages_url":"https://api.github.com/repos/aspiers/crowbar-ha/languages","stargazers_url":"https://api.github.com/repos/aspiers/crowbar-ha/stargazers","contributors_url":"https://api.github.com/repos/aspiers/crowbar-ha/contributors","subscribers_url":"https://api.github.com/repos/aspiers/crowbar-ha/subscribers","subscription_url":"https://api.github.com/repos/aspiers/crowbar-ha/subscription","commits_url":"https://api.github.com/repos/aspiers/crowbar-ha/commits{/sha}","git_commits_url":"https://api.github.com/repos/aspiers/crowbar-ha/git/commits{/sha}","comments_url":"https://api.github.com/repos/aspiers/crowbar-ha/comments{/number}","issue_comment_url":"https://api.github.com/repos/aspiers/crowbar-ha/issues/comments{/number}","contents_url":"https://api.github.com/repos/aspiers/crowbar-ha/contents/{+path}","compare_url":"https://api.github.com/repos/aspiers/crowbar-ha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aspiers/crowbar-ha/merges","archive_url":"https://api.github.com/repos/aspiers/crowbar-ha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aspiers/crowbar-ha/downloads","issues_url":"https://api.github.com/repos/aspiers/crowbar-ha/issues{/number}","pulls_url":"https://api.github.com/repos/aspiers/crowbar-ha/pulls{/number}","milestones_url":"https://api.github.com/repos/aspiers/crowbar-ha/milestones{/number}","notifications_url":"https://api.github.com/repos/aspiers/crowbar-ha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aspiers/crowbar-ha/labels{/name}","releases_url":"https://api.github.com/repos/aspiers/crowbar-ha/releases{/id}","created_at":"2015-08-26T14:26:14Z","updated_at":"2015-08-26T14:26:15Z","pushed_at":"2015-12-30T20:34:40Z","git_url":"git://github.com/aspiers/crowbar-ha.git","ssh_url":"git@github.com:aspiers/crowbar-ha.git","clone_url":"https://github.com/aspiers/crowbar-ha.git","svn_url":"https://github.com/aspiers/crowbar-ha","homepage":"","size":1174,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"crowbar:master","ref":"master","sha":"991456e5338b883595efc7249ca00cfe18e6120e","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":39006836,"name":"crowbar-ha","full_name":"crowbar/crowbar-ha","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/crowbar-ha","description":"HA deployment for Crowbar","fork":false,"url":"https://api.github.com/repos/crowbar/crowbar-ha","forks_url":"https://api.github.com/repos/crowbar/crowbar-ha/forks","keys_url":"https://api.github.com/repos/crowbar/crowbar-ha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/crowbar-ha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/crowbar-ha/teams","hooks_url":"https://api.github.com/repos/crowbar/crowbar-ha/hooks","issue_events_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/crowbar-ha/events","assignees_url":"https://api.github.com/repos/crowbar/crowbar-ha/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/crowbar-ha/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/crowbar-ha/tags","blobs_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/crowbar-ha/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/crowbar-ha/languages","stargazers_url":"https://api.github.com/repos/crowbar/crowbar-ha/stargazers","contributors_url":"https://api.github.com/repos/crowbar/crowbar-ha/contributors","subscribers_url":"https://api.github.com/repos/crowbar/crowbar-ha/subscribers","subscription_url":"https://api.github.com/repos/crowbar/crowbar-ha/subscription","commits_url":"https://api.github.com/repos/crowbar/crowbar-ha/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/crowbar-ha/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/crowbar-ha/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/crowbar-ha/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/crowbar-ha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/crowbar-ha/merges","archive_url":"https://api.github.com/repos/crowbar/crowbar-ha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/crowbar-ha/downloads","issues_url":"https://api.github.com/repos/crowbar/crowbar-ha/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/crowbar-ha/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/crowbar-ha/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/crowbar-ha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/crowbar-ha/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/crowbar-ha/releases{/id}","created_at":"2015-07-13T10:53:43Z","updated_at":"2015-08-26T19:58:29Z","pushed_at":"2015-12-30T20:39:00Z","git_url":"git://github.com/crowbar/crowbar-ha.git","ssh_url":"git@github.com:crowbar/crowbar-ha.git","clone_url":"https://github.com/crowbar/crowbar-ha.git","svn_url":"https://github.com/crowbar/crowbar-ha","homepage":"","size":1184,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":14,"forks":16,"open_issues":14,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/54"},"html":{"href":"https://github.com/crowbar/crowbar-ha/pull/54"},"issue":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/issues/54"},"comments":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/issues/54/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/54/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/pulls/54/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/crowbar-ha/statuses/07b751d43ac883bd7be55fd9575bd99da4d3da61"}}}}