{"action":"created","issue":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9813","repository_url":"https://api.github.com/repos/ManageIQ/manageiq","labels_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9813/labels{/name}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9813/comments","events_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9813/events","html_url":"https://github.com/ManageIQ/manageiq/pull/9813","id":165572146,"number":9813,"title":"Policy support for replicators, pods, nodes","user":{"login":"cben","id":273688,"avatar_url":"https://avatars.githubusercontent.com/u/273688?v=3","gravatar_id":"","url":"https://api.github.com/users/cben","html_url":"https://github.com/cben","followers_url":"https://api.github.com/users/cben/followers","following_url":"https://api.github.com/users/cben/following{/other_user}","gists_url":"https://api.github.com/users/cben/gists{/gist_id}","starred_url":"https://api.github.com/users/cben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cben/subscriptions","organizations_url":"https://api.github.com/users/cben/orgs","repos_url":"https://api.github.com/users/cben/repos","events_url":"https://api.github.com/users/cben/events{/privacy}","received_events_url":"https://api.github.com/users/cben/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/control","name":"control","color":"5319e7"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/darga/yes","name":"darga/yes","color":"000000"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/providers/containers","name":"providers/containers","color":"5319e7"},{"url":"https://api.github.com/repos/ManageIQ/manageiq/labels/ui","name":"ui","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"dclarizio","id":3433754,"avatar_url":"https://avatars.githubusercontent.com/u/3433754?v=3","gravatar_id":"","url":"https://api.github.com/users/dclarizio","html_url":"https://github.com/dclarizio","followers_url":"https://api.github.com/users/dclarizio/followers","following_url":"https://api.github.com/users/dclarizio/following{/other_user}","gists_url":"https://api.github.com/users/dclarizio/gists{/gist_id}","starred_url":"https://api.github.com/users/dclarizio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dclarizio/subscriptions","organizations_url":"https://api.github.com/users/dclarizio/orgs","repos_url":"https://api.github.com/users/dclarizio/repos","events_url":"https://api.github.com/users/dclarizio/events{/privacy}","received_events_url":"https://api.github.com/users/dclarizio/received_events","type":"User","site_admin":false},"assignees":[{"login":"dclarizio","id":3433754,"avatar_url":"https://avatars.githubusercontent.com/u/3433754?v=3","gravatar_id":"","url":"https://api.github.com/users/dclarizio","html_url":"https://github.com/dclarizio","followers_url":"https://api.github.com/users/dclarizio/followers","following_url":"https://api.github.com/users/dclarizio/following{/other_user}","gists_url":"https://api.github.com/users/dclarizio/gists{/gist_id}","starred_url":"https://api.github.com/users/dclarizio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dclarizio/subscriptions","organizations_url":"https://api.github.com/users/dclarizio/orgs","repos_url":"https://api.github.com/users/dclarizio/repos","events_url":"https://api.github.com/users/dclarizio/events{/privacy}","received_events_url":"https://api.github.com/users/dclarizio/received_events","type":"User","site_admin":false}],"milestone":null,"comments":19,"created_at":"2016-07-14T14:14:32Z","updated_at":"2016-07-24T08:21:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq/pulls/9813","html_url":"https://github.com/ManageIQ/manageiq/pull/9813","diff_url":"https://github.com/ManageIQ/manageiq/pull/9813.diff","patch_url":"https://github.com/ManageIQ/manageiq/pull/9813.patch"},"body":"Completes usable subset of #8654.\r\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1341253 (master)\r\nhttps://bugzilla.redhat.com/show_bug.cgi?id=1346057 (darga)\r\n[This PR replaces #9538, #8815.]\r\n\r\n- Doesn't show compliance status/history on these entities.  (will come in separate PR)\r\n- Didn't touch alerts, simulation.\r\n\r\nDepends on #9601 for the events to arrive, ~~but split for independent review~~ now rebased after #9601 got merged.\r\nWould benefit from #9347 (to say \"Pod\" instead of \"Container Group\" in a few places) but not functionally depends on it.\r\n\r\nHeavy cargo-cult of Mooli's #7132 and other PRs (thanks!).\r\n\r\n- [x] Policies UI:\r\n  - [x] Can create & edit Control & Compliance policies.\r\n  - [x] Can add replicator/pod/node events.\r\n  - [x] Can add conditions, and actions.\r\n- [x] Can add the new policies to a Policy Profile and have them run.\r\n  - [x] Assigning the profile to the EMS works.\r\n  - [x] Assigning to specific replicator/pod/node works.\r\n- [x] Event propogation works end-to-end.\r\n  - [x] Incoming POD_FAILEDSYNC events trigger a policy triggering a \"Generate log\" action.\r\n  - [x] Incoming NODE_REBOOTED event triggers a policy triggering a \"Generate log\" action.\r\n  - [x] Incoming REPLICATOR_SUCCESSFULCREATE event triggers a policy triggering \"Generate log\" action.\r\n- [x] Compliance:\r\n  - [x] \"Check Compliance\" buttons in UI runs compliance policies.\r\n  - [x] \"Mark as non-compliant\" action work from a compliance policy.\r\n  - [ ] \"Mark as non-compliant\" action from *control* policy: executed according to policy.log, however `Compliance` table doesn't reflect that.  Not sure it's supported in Control Policies?  Shouldn't block this PR.\r\n\r\n### policy.log showing it all works (with #9601)\r\n\r\nhttps://gist.github.com/cben/870d6fab478963ab9e78cbfa776d3194\r\n\r\n### screenshots \r\n(See also #9601 for Events list and policy event assignment screenshots.  The screenshots here were made with #9601.)\r\n\r\n![screenshot-localhost 3000 2016-07-17 14-17-41 policies](https://cloud.githubusercontent.com/assets/273688/16900749/131fe482-4c37-11e6-88d9-52f44aba4db7.png)\r\n![screenshot-localhost 3000 2016-07-17 14-19-18 policy profile](https://cloud.githubusercontent.com/assets/273688/16900759/4ce2d86e-4c37-11e6-9bd5-f3c86bea7194.png)\r\n![screenshot-localhost 3000 2016-07-17 13-20-02 replicant compliance condition](https://cloud.githubusercontent.com/assets/273688/16900761/525e852c-4c37-11e6-95c4-61d6fd6ea0f0.png)\r\n![multi pod assign](https://cloud.githubusercontent.com/assets/273688/16900766/73fc9c14-4c37-11e6-994f-90d720f37e33.png)\r\n\r\nmiq-bot add-labels control, ui, providers/containers, enhancement, darga/yes, ~~wip~~\r\n"},"comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq/issues/comments/234764586","html_url":"https://github.com/ManageIQ/manageiq/pull/9813#issuecomment-234764586","issue_url":"https://api.github.com/repos/ManageIQ/manageiq/issues/9813","id":234764586,"user":{"login":"miq-bot","id":7806257,"avatar_url":"https://avatars.githubusercontent.com/u/7806257?v=3","gravatar_id":"","url":"https://api.github.com/users/miq-bot","html_url":"https://github.com/miq-bot","followers_url":"https://api.github.com/users/miq-bot/followers","following_url":"https://api.github.com/users/miq-bot/following{/other_user}","gists_url":"https://api.github.com/users/miq-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/miq-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/miq-bot/subscriptions","organizations_url":"https://api.github.com/users/miq-bot/orgs","repos_url":"https://api.github.com/users/miq-bot/repos","events_url":"https://api.github.com/users/miq-bot/events{/privacy}","received_events_url":"https://api.github.com/users/miq-bot/received_events","type":"User","site_admin":false},"created_at":"2016-07-24T08:21:51Z","updated_at":"2016-07-24T08:21:51Z","body":"<rubocop />Checked commits https://github.com/cben/manageiq/compare/1efa258543eef606694dbbbe46b45c4513d6dbbc~...f1d46a5b09cd5ee3ffe0cfc15f9d27d2aadeb193 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1\n19 files checked, 4 offenses detected\n\n**app/controllers/mixins/containers_common_mixin.rb**\n- [ ] :grey_exclamation: - [Line 179](https://github.com/cben/manageiq/blob/f1d46a5b09cd5ee3ffe0cfc15f9d27d2aadeb193/app/controllers/mixins/containers_common_mixin.rb#L179), Col 3 - [Metrics/AbcSize](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/AbcSize) - Assignment Branch Condition size for check_compliance is too high. [15.43/15]\n- [ ] :grey_exclamation: - [Line 195](https://github.com/cben/manageiq/blob/f1d46a5b09cd5ee3ffe0cfc15f9d27d2aadeb193/app/controllers/mixins/containers_common_mixin.rb#L195), Col 3 - [Metrics/AbcSize](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/AbcSize) - Assignment Branch Condition size for find_current_item is too high. [15.13/15]\n- [ ] :grey_exclamation: - [Line 221](https://github.com/cben/manageiq/blob/f1d46a5b09cd5ee3ffe0cfc15f9d27d2aadeb193/app/controllers/mixins/containers_common_mixin.rb#L221), Col 3 - [Metrics/AbcSize](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/AbcSize) - Assignment Branch Condition size for process_check_compliance is too high. [15.07/15]\n\n**app/presenters/tree_builder_policy.rb**\n- [ ] :grey_exclamation: - [Line 19](https://github.com/cben/manageiq/blob/f1d46a5b09cd5ee3ffe0cfc15f9d27d2aadeb193/app/presenters/tree_builder_policy.rb#L19), Col 3 - [Metrics/AbcSize](http://rubydoc.info/gems/rubocop/0.37.2/RuboCop/Cop/Metrics/AbcSize) - Assignment Branch Condition size for compliance_control_kids is too high. [22.09/15]\n"}}
{"actor":{"display_login":"miq-bot"}}