{"action":"created","comment":{"url":"https://api.github.com/repos/apache/brooklyn-server/pulls/comments/76399497","id":76399497,"diff_hunk":"@@ -0,0 +1,71 @@\n+/*\n+ * Licensed to the Apache Software Foundation (ASF) under one\n+ * or more contributor license agreements.  See the NOTICE file\n+ * distributed with this work for additional information\n+ * regarding copyright ownership.  The ASF licenses this file\n+ * to you under the Apache License, Version 2.0 (the\n+ * \"License\"); you may not use this file except in compliance\n+ * with the License.  You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing,\n+ * software distributed under the License is distributed on an\n+ * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+ * KIND, either express or implied.  See the License for the\n+ * specific language governing permissions and limitations\n+ * under the License.\n+ */\n+package org.apache.brooklyn.policy;\n+\n+import java.util.Map;\n+\n+import org.apache.brooklyn.api.effector.Effector;\n+import org.apache.brooklyn.api.entity.EntityLocal;\n+import org.apache.brooklyn.api.sensor.Sensor;\n+import org.apache.brooklyn.api.sensor.SensorEvent;\n+import org.apache.brooklyn.api.sensor.SensorEventListener;\n+import org.apache.brooklyn.config.ConfigKey;\n+import org.apache.brooklyn.core.config.ConfigKeys;\n+import org.apache.brooklyn.core.policy.AbstractPolicy;\n+import org.apache.brooklyn.core.sensor.Sensors;\n+import org.apache.brooklyn.util.collections.MutableMap;\n+import org.slf4j.Logger;\n+import org.slf4j.LoggerFactory;\n+\n+import com.google.common.base.Preconditions;\n+\n+/**\n+ * Invokes the given effector when the policy changes.\n+ * \n+ * TODO\n+ * * support parameters\n+ * * support conditions\n+ * * allow to be triggered by sensors on members\n+ */\n+public class InvokeEffectorOnSensorChange extends AbstractPolicy implements SensorEventListener<Object> {","path":"core/src/main/java/org/apache/brooklyn/policy/InvokeEffectorOnSensorChange.java","position":46,"original_position":46,"commit_id":"1a930db915e9bdc6416365fca4eebbe023ce6804","original_commit_id":"1a930db915e9bdc6416365fca4eebbe023ce6804","user":{"login":"grkvlt","id":214870,"avatar_url":"https://avatars.githubusercontent.com/u/214870?v=3","gravatar_id":"","url":"https://api.github.com/users/grkvlt","html_url":"https://github.com/grkvlt","followers_url":"https://api.github.com/users/grkvlt/followers","following_url":"https://api.github.com/users/grkvlt/following{/other_user}","gists_url":"https://api.github.com/users/grkvlt/gists{/gist_id}","starred_url":"https://api.github.com/users/grkvlt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grkvlt/subscriptions","organizations_url":"https://api.github.com/users/grkvlt/orgs","repos_url":"https://api.github.com/users/grkvlt/repos","events_url":"https://api.github.com/users/grkvlt/events{/privacy}","received_events_url":"https://api.github.com/users/grkvlt/received_events","type":"User","site_admin":false},"body":"Needs tests","created_at":"2016-08-26T10:43:01Z","updated_at":"2016-08-26T10:43:01Z","html_url":"https://github.com/apache/brooklyn-server/pull/308#discussion_r76399497","pull_request_url":"https://api.github.com/repos/apache/brooklyn-server/pulls/308","_links":{"self":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/comments/76399497"},"html":{"href":"https://github.com/apache/brooklyn-server/pull/308#discussion_r76399497"},"pull_request":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/308"}}},"pull_request":{"url":"https://api.github.com/repos/apache/brooklyn-server/pulls/308","id":82744288,"html_url":"https://github.com/apache/brooklyn-server/pull/308","diff_url":"https://github.com/apache/brooklyn-server/pull/308.diff","patch_url":"https://github.com/apache/brooklyn-server/pull/308.patch","issue_url":"https://api.github.com/repos/apache/brooklyn-server/issues/308","number":308,"state":"open","locked":false,"title":"Invoke on sensor and ssh to multiple","user":{"login":"ahgittin","id":496540,"avatar_url":"https://avatars.githubusercontent.com/u/496540?v=3","gravatar_id":"","url":"https://api.github.com/users/ahgittin","html_url":"https://github.com/ahgittin","followers_url":"https://api.github.com/users/ahgittin/followers","following_url":"https://api.github.com/users/ahgittin/following{/other_user}","gists_url":"https://api.github.com/users/ahgittin/gists{/gist_id}","starred_url":"https://api.github.com/users/ahgittin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahgittin/subscriptions","organizations_url":"https://api.github.com/users/ahgittin/orgs","repos_url":"https://api.github.com/users/ahgittin/repos","events_url":"https://api.github.com/users/ahgittin/events{/privacy}","received_events_url":"https://api.github.com/users/ahgittin/received_events","type":"User","site_admin":false},"body":"These fixes make https://github.com/brooklyncentral/brooklyn-dns work neatly.","created_at":"2016-08-25T15:43:33Z","updated_at":"2016-08-26T10:43:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c82693cf17f2ded8eb30035b6de5db77a696c2de","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/brooklyn-server/pulls/308/commits","review_comments_url":"https://api.github.com/repos/apache/brooklyn-server/pulls/308/comments","review_comment_url":"https://api.github.com/repos/apache/brooklyn-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/brooklyn-server/issues/308/comments","statuses_url":"https://api.github.com/repos/apache/brooklyn-server/statuses/1a930db915e9bdc6416365fca4eebbe023ce6804","head":{"label":"ahgittin:invoke-on-sensor-and-ssh-to-multiple","ref":"invoke-on-sensor-and-ssh-to-multiple","sha":"1a930db915e9bdc6416365fca4eebbe023ce6804","user":{"login":"ahgittin","id":496540,"avatar_url":"https://avatars.githubusercontent.com/u/496540?v=3","gravatar_id":"","url":"https://api.github.com/users/ahgittin","html_url":"https://github.com/ahgittin","followers_url":"https://api.github.com/users/ahgittin/followers","following_url":"https://api.github.com/users/ahgittin/following{/other_user}","gists_url":"https://api.github.com/users/ahgittin/gists{/gist_id}","starred_url":"https://api.github.com/users/ahgittin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahgittin/subscriptions","organizations_url":"https://api.github.com/users/ahgittin/orgs","repos_url":"https://api.github.com/users/ahgittin/repos","events_url":"https://api.github.com/users/ahgittin/events{/privacy}","received_events_url":"https://api.github.com/users/ahgittin/received_events","type":"User","site_admin":false},"repo":{"id":51005981,"name":"brooklyn-server","full_name":"ahgittin/brooklyn-server","owner":{"login":"ahgittin","id":496540,"avatar_url":"https://avatars.githubusercontent.com/u/496540?v=3","gravatar_id":"","url":"https://api.github.com/users/ahgittin","html_url":"https://github.com/ahgittin","followers_url":"https://api.github.com/users/ahgittin/followers","following_url":"https://api.github.com/users/ahgittin/following{/other_user}","gists_url":"https://api.github.com/users/ahgittin/gists{/gist_id}","starred_url":"https://api.github.com/users/ahgittin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahgittin/subscriptions","organizations_url":"https://api.github.com/users/ahgittin/orgs","repos_url":"https://api.github.com/users/ahgittin/repos","events_url":"https://api.github.com/users/ahgittin/events{/privacy}","received_events_url":"https://api.github.com/users/ahgittin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ahgittin/brooklyn-server","description":"Mirror of Apache Brooklyn server","fork":true,"url":"https://api.github.com/repos/ahgittin/brooklyn-server","forks_url":"https://api.github.com/repos/ahgittin/brooklyn-server/forks","keys_url":"https://api.github.com/repos/ahgittin/brooklyn-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ahgittin/brooklyn-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ahgittin/brooklyn-server/teams","hooks_url":"https://api.github.com/repos/ahgittin/brooklyn-server/hooks","issue_events_url":"https://api.github.com/repos/ahgittin/brooklyn-server/issues/events{/number}","events_url":"https://api.github.com/repos/ahgittin/brooklyn-server/events","assignees_url":"https://api.github.com/repos/ahgittin/brooklyn-server/assignees{/user}","branches_url":"https://api.github.com/repos/ahgittin/brooklyn-server/branches{/branch}","tags_url":"https://api.github.com/repos/ahgittin/brooklyn-server/tags","blobs_url":"https://api.github.com/repos/ahgittin/brooklyn-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ahgittin/brooklyn-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ahgittin/brooklyn-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/ahgittin/brooklyn-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ahgittin/brooklyn-server/statuses/{sha}","languages_url":"https://api.github.com/repos/ahgittin/brooklyn-server/languages","stargazers_url":"https://api.github.com/repos/ahgittin/brooklyn-server/stargazers","contributors_url":"https://api.github.com/repos/ahgittin/brooklyn-server/contributors","subscribers_url":"https://api.github.com/repos/ahgittin/brooklyn-server/subscribers","subscription_url":"https://api.github.com/repos/ahgittin/brooklyn-server/subscription","commits_url":"https://api.github.com/repos/ahgittin/brooklyn-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/ahgittin/brooklyn-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/ahgittin/brooklyn-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/ahgittin/brooklyn-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/ahgittin/brooklyn-server/contents/{+path}","compare_url":"https://api.github.com/repos/ahgittin/brooklyn-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ahgittin/brooklyn-server/merges","archive_url":"https://api.github.com/repos/ahgittin/brooklyn-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ahgittin/brooklyn-server/downloads","issues_url":"https://api.github.com/repos/ahgittin/brooklyn-server/issues{/number}","pulls_url":"https://api.github.com/repos/ahgittin/brooklyn-server/pulls{/number}","milestones_url":"https://api.github.com/repos/ahgittin/brooklyn-server/milestones{/number}","notifications_url":"https://api.github.com/repos/ahgittin/brooklyn-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ahgittin/brooklyn-server/labels{/name}","releases_url":"https://api.github.com/repos/ahgittin/brooklyn-server/releases{/id}","deployments_url":"https://api.github.com/repos/ahgittin/brooklyn-server/deployments","created_at":"2016-02-03T14:45:22Z","updated_at":"2016-02-03T14:45:30Z","pushed_at":"2016-08-25T23:35:36Z","git_url":"git://github.com/ahgittin/brooklyn-server.git","ssh_url":"git@github.com:ahgittin/brooklyn-server.git","clone_url":"https://github.com/ahgittin/brooklyn-server.git","svn_url":"https://github.com/ahgittin/brooklyn-server","homepage":null,"size":30885,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"apache:master","ref":"master","sha":"41f723f86b30df235718ffec519574d807adbfa2","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":47246081,"name":"brooklyn-server","full_name":"apache/brooklyn-server","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/brooklyn-server","description":"Mirror of Apache Brooklyn server","fork":false,"url":"https://api.github.com/repos/apache/brooklyn-server","forks_url":"https://api.github.com/repos/apache/brooklyn-server/forks","keys_url":"https://api.github.com/repos/apache/brooklyn-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/brooklyn-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/brooklyn-server/teams","hooks_url":"https://api.github.com/repos/apache/brooklyn-server/hooks","issue_events_url":"https://api.github.com/repos/apache/brooklyn-server/issues/events{/number}","events_url":"https://api.github.com/repos/apache/brooklyn-server/events","assignees_url":"https://api.github.com/repos/apache/brooklyn-server/assignees{/user}","branches_url":"https://api.github.com/repos/apache/brooklyn-server/branches{/branch}","tags_url":"https://api.github.com/repos/apache/brooklyn-server/tags","blobs_url":"https://api.github.com/repos/apache/brooklyn-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/brooklyn-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/brooklyn-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/brooklyn-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/brooklyn-server/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/brooklyn-server/languages","stargazers_url":"https://api.github.com/repos/apache/brooklyn-server/stargazers","contributors_url":"https://api.github.com/repos/apache/brooklyn-server/contributors","subscribers_url":"https://api.github.com/repos/apache/brooklyn-server/subscribers","subscription_url":"https://api.github.com/repos/apache/brooklyn-server/subscription","commits_url":"https://api.github.com/repos/apache/brooklyn-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/brooklyn-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/brooklyn-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/brooklyn-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/brooklyn-server/contents/{+path}","compare_url":"https://api.github.com/repos/apache/brooklyn-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/brooklyn-server/merges","archive_url":"https://api.github.com/repos/apache/brooklyn-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/brooklyn-server/downloads","issues_url":"https://api.github.com/repos/apache/brooklyn-server/issues{/number}","pulls_url":"https://api.github.com/repos/apache/brooklyn-server/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/brooklyn-server/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/brooklyn-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/brooklyn-server/labels{/name}","releases_url":"https://api.github.com/repos/apache/brooklyn-server/releases{/id}","deployments_url":"https://api.github.com/repos/apache/brooklyn-server/deployments","created_at":"2015-12-02T08:00:06Z","updated_at":"2016-05-30T11:46:29Z","pushed_at":"2016-08-25T22:07:45Z","git_url":"git://github.com/apache/brooklyn-server.git","ssh_url":"git@github.com:apache/brooklyn-server.git","clone_url":"https://github.com/apache/brooklyn-server.git","svn_url":"https://github.com/apache/brooklyn-server","homepage":null,"size":31072,"stargazers_count":10,"watchers_count":10,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":35,"mirror_url":"git://git.apache.org/brooklyn-server.git","open_issues_count":17,"forks":35,"open_issues":17,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/308"},"html":{"href":"https://github.com/apache/brooklyn-server/pull/308"},"issue":{"href":"https://api.github.com/repos/apache/brooklyn-server/issues/308"},"comments":{"href":"https://api.github.com/repos/apache/brooklyn-server/issues/308/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/308/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/brooklyn-server/pulls/308/commits"},"statuses":{"href":"https://api.github.com/repos/apache/brooklyn-server/statuses/1a930db915e9bdc6416365fca4eebbe023ce6804"}}}}
{"actor":{"display_login":"grkvlt"}}