{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/201159340","pull_request_review_id":135607104,"id":201159340,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTE1OTM0MA==","diff_hunk":"@@ -173,6 +174,43 @@ def hostname_format_valid?\n \n   default_value_for :enabled, true\n \n+  after_save :change_maintenance_for_child_managers, :if => proc { |ems| ems.changed_attributes.include?('enabled') }\n+\n+  def disable!\n+    _log.info(\"Disabling EMS [#{name}] id [#{id}].\")\n+    update!(:enabled => false)\n+    _log.info(\"Disabling EMS [#{name}] id [#{id}] successful.\")\n+  end\n+\n+  def enable!\n+    _log.info(\"Enabling EMS [#{name}] id [#{id}].\")\n+    update!(:enabled => true)\n+    _log.info(\"Enabling EMS [#{name}] id [#{id}] successful.\")\n+  end\n+\n+  # Move ems to maintenance zone and backup current one\n+  # @param orig_zone [Zone] children original zones can be replaced in provider-specific callbacks\n+  def pause!(orig_zone = nil)","path":"app/models/ext_management_system.rb","position":28,"original_position":28,"commit_id":"f171eca6ad8381baf242b2bbe6c35e2013887398","original_commit_id":"f171eca6ad8381baf242b2bbe6c35e2013887398","user":{"login":"Fryguy","id":52120,"node_id":"MDQ6VXNlcjUyMTIw","avatar_url":"https://avatars3.githubusercontent.com/u/52120?v=4","gravatar_id":"","url":"https://api.github.com/users/Fryguy","html_url":"https://github.com/Fryguy","followers_url":"https://api.github.com/users/Fryguy/followers","following_url":"https://api.github.com/users/Fryguy/following{/other_user}","gists_url":"https://api.github.com/users/Fryguy/gists{/gist_id}","starred_url":"https://api.github.com/users/Fryguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fryguy/subscriptions","organizations_url":"https://api.github.com/users/Fryguy/orgs","repos_url":"https://api.github.com/users/Fryguy/repos","events_url":"https://api.github.com/users/Fryguy/events{/privacy}","received_events_url":"https://api.github.com/users/Fryguy/received_events","type":"User","site_admin":false},"body":"Agreed...this also simplifies my suggestion [here](https://github.com/ManageIQ/manageiq/pull/17452#pullrequestreview-135606810)","created_at":"2018-07-09T21:54:05Z","updated_at":"2018-07-09T21:54:06Z","html_url":"https://github.com/ManageIQ/manageiq/pull/17452#discussion_r201159340","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17452","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments/201159340"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/17452#discussion_r201159340"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17452"}},"in_reply_to_id":201108646},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17452","id":189388477,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg5Mzg4NDc3","html_url":"https://github.com/ManageIQ/manageiq/pull/17452","diff_url":"https://github.com/ManageIQ/manageiq/pull/17452.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/17452.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/17452","number":17452,"state":"open","locked":false,"title":"Suspend providers","user":{"login":"slemrmartin","id":1814995,"node_id":"MDQ6VXNlcjE4MTQ5OTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1814995?v=4","gravatar_id":"","url":"https://api.github.com/users/slemrmartin","html_url":"https://github.com/slemrmartin","followers_url":"https://api.github.com/users/slemrmartin/followers","following_url":"https://api.github.com/users/slemrmartin/following{/other_user}","gists_url":"https://api.github.com/users/slemrmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/slemrmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slemrmartin/subscriptions","organizations_url":"https://api.github.com/users/slemrmartin/orgs","repos_url":"https://api.github.com/users/slemrmartin/repos","events_url":"https://api.github.com/users/slemrmartin/events{/privacy}","received_events_url":"https://api.github.com/users/slemrmartin/received_events","type":"User","site_admin":false},"body":"Adds ability to suspend provider due to maintenance\r\n\r\n- **Issue**: https://github.com/ManageIQ/manageiq/issues/17489\r\n- [ ] **depends on**: https://github.com/ManageIQ/manageiq-schema/pull/222\r\n\r\n- [ ] **dependent**: https://github.com/ManageIQ/manageiq-ui-classic/pull/4012\r\n- Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1455145\r\n\r\nIt moves EMS and child managers to Maintenance zone, also sets EMS.enabled to false, which causes stopping provider-specific workers\r\n\r\nCc @Ladas, @agrare, @jerryk55, @romanblanco \r\n\r\n","created_at":"2018-05-21T14:04:18Z","updated_at":"2018-07-09T21:54:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"105243d51e0abcbe254be04451b24d23b777462b","assignee":{"login":"jrafanie","id":19339,"node_id":"MDQ6VXNlcjE5MzM5","avatar_url":"https://avatars0.githubusercontent.com/u/19339?v=4","gravatar_id":"","url":"https://api.github.com/users/jrafanie","html_url":"https://github.com/jrafanie","followers_url":"https://api.github.com/users/jrafanie/followers","following_url":"https://api.github.com/users/jrafanie/following{/other_user}","gists_url":"https://api.github.com/users/jrafanie/gists{/gist_id}","starred_url":"https://api.github.com/users/jrafanie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrafanie/subscriptions","organizations_url":"https://api.github.com/users/jrafanie/orgs","repos_url":"https://api.github.com/users/jrafanie/repos","events_url":"https://api.github.com/users/jrafanie/events{/privacy}","received_events_url":"https://api.github.com/users/jrafanie/received_events","type":"User","site_admin":false},"assignees":[{"login":"jrafanie","id":19339,"node_id":"MDQ6VXNlcjE5MzM5","avatar_url":"https://avatars0.githubusercontent.com/u/19339?v=4","gravatar_id":"","url":"https://api.github.com/users/jrafanie","html_url":"https://github.com/jrafanie","followers_url":"https://api.github.com/users/jrafanie/followers","following_url":"https://api.github.com/users/jrafanie/following{/other_user}","gists_url":"https://api.github.com/users/jrafanie/gists{/gist_id}","starred_url":"https://api.github.com/users/jrafanie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrafanie/subscriptions","organizations_url":"https://api.github.com/users/jrafanie/orgs","repos_url":"https://api.github.com/users/jrafanie/repos","events_url":"https://api.github.com/users/jrafanie/events{/privacy}","received_events_url":"https://api.github.com/users/jrafanie/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17452/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17452/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/17452/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/f171eca6ad8381baf242b2bbe6c35e2013887398","head":{"label":"slemrmartin:suspend-workers","ref":"suspend-workers","sha":"f171eca6ad8381baf242b2bbe6c35e2013887398","user":{"login":"slemrmartin","id":1814995,"node_id":"MDQ6VXNlcjE4MTQ5OTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1814995?v=4","gravatar_id":"","url":"https://api.github.com/users/slemrmartin","html_url":"https://github.com/slemrmartin","followers_url":"https://api.github.com/users/slemrmartin/followers","following_url":"https://api.github.com/users/slemrmartin/following{/other_user}","gists_url":"https://api.github.com/users/slemrmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/slemrmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slemrmartin/subscriptions","organizations_url":"https://api.github.com/users/slemrmartin/orgs","repos_url":"https://api.github.com/users/slemrmartin/repos","events_url":"https://api.github.com/users/slemrmartin/events{/privacy}","received_events_url":"https://api.github.com/users/slemrmartin/received_events","type":"User","site_admin":false},"repo":{"id":123601697,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM2MDE2OTc=","name":"manageiq","full_name":"slemrmartin/manageiq","owner":{"login":"slemrmartin","id":1814995,"node_id":"MDQ6VXNlcjE4MTQ5OTU=","avatar_url":"https://avatars1.githubusercontent.com/u/1814995?v=4","gravatar_id":"","url":"https://api.github.com/users/slemrmartin","html_url":"https://github.com/slemrmartin","followers_url":"https://api.github.com/users/slemrmartin/followers","following_url":"https://api.github.com/users/slemrmartin/following{/other_user}","gists_url":"https://api.github.com/users/slemrmartin/gists{/gist_id}","starred_url":"https://api.github.com/users/slemrmartin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slemrmartin/subscriptions","organizations_url":"https://api.github.com/users/slemrmartin/orgs","repos_url":"https://api.github.com/users/slemrmartin/repos","events_url":"https://api.github.com/users/slemrmartin/events{/privacy}","received_events_url":"https://api.github.com/users/slemrmartin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/slemrmartin/manageiq","description":"ManageIQ Open-Source Management Platform","fork":true,"url":"https://api.github.com/repos/slemrmartin/manageiq","forks_url":"https://api.github.com/repos/slemrmartin/manageiq/forks","keys_url":"https://api.github.com/repos/slemrmartin/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/slemrmartin/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/slemrmartin/manageiq/teams","hooks_url":"https://api.github.com/repos/slemrmartin/manageiq/hooks","issue_events_url":"https://api.github.com/repos/slemrmartin/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/slemrmartin/manageiq/events","assignees_url":"https://api.github.com/repos/slemrmartin/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/slemrmartin/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/slemrmartin/manageiq/tags","blobs_url":"https://api.github.com/repos/slemrmartin/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/slemrmartin/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/slemrmartin/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/slemrmartin/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/slemrmartin/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/slemrmartin/manageiq/languages","stargazers_url":"https://api.github.com/repos/slemrmartin/manageiq/stargazers","contributors_url":"https://api.github.com/repos/slemrmartin/manageiq/contributors","subscribers_url":"https://api.github.com/repos/slemrmartin/manageiq/subscribers","subscription_url":"https://api.github.com/repos/slemrmartin/manageiq/subscription","commits_url":"https://api.github.com/repos/slemrmartin/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/slemrmartin/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/slemrmartin/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/slemrmartin/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/slemrmartin/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/slemrmartin/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/slemrmartin/manageiq/merges","archive_url":"https://api.github.com/repos/slemrmartin/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/slemrmartin/manageiq/downloads","issues_url":"https://api.github.com/repos/slemrmartin/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/slemrmartin/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/slemrmartin/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/slemrmartin/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/slemrmartin/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/slemrmartin/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/slemrmartin/manageiq/deployments","created_at":"2018-03-02T16:16:29Z","updated_at":"2018-06-20T13:09:38Z","pushed_at":"2018-07-09T16:29:43Z","git_url":"git://github.com/slemrmartin/manageiq.git","ssh_url":"git@github.com:slemrmartin/manageiq.git","clone_url":"https://github.com/slemrmartin/manageiq.git","svn_url":"https://github.com/slemrmartin/manageiq","homepage":"manageiq.org","size":242895,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ManageIQ:master","ref":"master","sha":"d35b0519071607d1d4258c4428fae766c40c31e1","user":{"login":"ManageIQ","id":1125575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjU1NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":20789757,"node_id":"MDEwOlJlcG9zaXRvcnkyMDc4OTc1Nw==","name":"manageiq","full_name":"ManageIQ/manageiq","owner":{"login":"ManageIQ","id":1125575,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMjU1NzU=","avatar_url":"https://avatars0.githubusercontent.com/u/1125575?v=4","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq","description":"ManageIQ Open-Source Management Platform","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq","forks_url":"https://api.github.com/repos/ManageIQ/manageiq/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq/deployments","created_at":"2014-06-13T02:31:26Z","updated_at":"2018-07-09T21:03:21Z","pushed_at":"2018-07-09T21:03:04Z","git_url":"git://github.com/ManageIQ/manageiq.git","ssh_url":"git@github.com:ManageIQ/manageiq.git","clone_url":"https://github.com/ManageIQ/manageiq.git","svn_url":"https://github.com/ManageIQ/manageiq","homepage":"manageiq.org","size":254572,"stargazers_count":676,"watchers_count":676,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":648,"mirror_url":null,"archived":false,"open_issues_count":600,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":648,"open_issues":600,"watchers":676,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17452"},"html":{"href":"https://github.com/ManageIQ/manageiq/pull/17452"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/17452"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/issues/17452/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17452/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq/pulls/17452/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq/statuses/f171eca6ad8381baf242b2bbe6c35e2013887398"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Fryguy"}}