{"action":"created","comment":{"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/comments/30984233","id":30984233,"diff_hunk":"@@ -260,6 +268,53 @@ def test_illegal_delta(self):\n                                                   'delta': -1})\n \n \n+class TestSubgraphWorkflowLogic(testtools.TestCase):\n+\n+    def setUp(self):\n+        super(TestSubgraphWorkflowLogic, self).setUp()\n+        blueprint_path = os.path.join(\n+            os.path.dirname(os.path.realpath(__file__)),\n+            \"resources/blueprints/test-subgraph-blueprint.yaml\")\n+        self.env = local.init_env(\n+            blueprint_path,\n+            ignored_modules=IGNORED_LOCAL_WORKFLOW_MODULES)\n+\n+    def test_heal_connected_to_relationship_operations_on_on_affected(self):\n+        # Tests CFY-2788 fix\n+        # We run heal on node2 instance. node1 is connected to node2 and node3\n+        # we expect that the establish/unlink operations will only be called\n+        # for node1->node2\n+        node2_instance_id = [i for i in self.env.storage.get_node_instances()\n+                             if i.node_id == 'node2'][0].id\n+        self.env.execute('heal', parameters={\n+            'node_instance_id': node2_instance_id})\n+        node1_instance = [i for i in self.env.storage.get_node_instances()\n+                          if i.node_id == 'node1'][0]\n+        invocations = node1_instance.runtime_properties['invocations']\n+        self.assertEqual(4, len(invocations))\n+        expected_unlink = invocations[:2]\n+        expected_establish = invocations[2:]\n+\n+        def assertion(actual_invocations, expected_op):\n+            has_source_op = False\n+            has_target_op = False\n+            for invocation in actual_invocations:\n+                if invocation['runs_on'] == 'source':\n+                    has_source_op = True\n+                elif invocation['runs_on'] == 'target':\n+                    has_target_op = True\n+                else:\n+                    self.fail('???')","path":"cloudify/tests/test_builtin_workflows.py","position":55,"original_position":55,"commit_id":"a5b9e56da90a8a36fe3f2bb0744cf328814e1f0c","original_commit_id":"a5b9e56da90a8a36fe3f2bb0744cf328814e1f0c","user":{"login":"dankilman","id":1008577,"avatar_url":"https://avatars.githubusercontent.com/u/1008577?v=3","gravatar_id":"","url":"https://api.github.com/users/dankilman","html_url":"https://github.com/dankilman","followers_url":"https://api.github.com/users/dankilman/followers","following_url":"https://api.github.com/users/dankilman/following{/other_user}","gists_url":"https://api.github.com/users/dankilman/gists{/gist_id}","starred_url":"https://api.github.com/users/dankilman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dankilman/subscriptions","organizations_url":"https://api.github.com/users/dankilman/orgs","repos_url":"https://api.github.com/users/dankilman/repos","events_url":"https://api.github.com/users/dankilman/events{/privacy}","received_events_url":"https://api.github.com/users/dankilman/received_events","type":"User","site_admin":false},"body":"I'm not sure what to make of your comment","created_at":"2015-05-25T15:09:44Z","updated_at":"2015-05-25T15:09:44Z","html_url":"https://github.com/cloudify-cosmo/cloudify-plugins-common/pull/115#discussion_r30984233","pull_request_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/115","_links":{"self":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/comments/30984233"},"html":{"href":"https://github.com/cloudify-cosmo/cloudify-plugins-common/pull/115#discussion_r30984233"},"pull_request":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/115"}}},"pull_request":{"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/115","id":36140589,"html_url":"https://github.com/cloudify-cosmo/cloudify-plugins-common/pull/115","diff_url":"https://github.com/cloudify-cosmo/cloudify-plugins-common/pull/115.diff","patch_url":"https://github.com/cloudify-cosmo/cloudify-plugins-common/pull/115.patch","issue_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/issues/115","number":115,"state":"open","locked":false,"title":"CFY-2788 only run operation matching target","user":{"login":"dankilman","id":1008577,"avatar_url":"https://avatars.githubusercontent.com/u/1008577?v=3","gravatar_id":"","url":"https://api.github.com/users/dankilman","html_url":"https://github.com/dankilman","followers_url":"https://api.github.com/users/dankilman/followers","following_url":"https://api.github.com/users/dankilman/following{/other_user}","gists_url":"https://api.github.com/users/dankilman/gists{/gist_id}","starred_url":"https://api.github.com/users/dankilman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dankilman/subscriptions","organizations_url":"https://api.github.com/users/dankilman/orgs","repos_url":"https://api.github.com/users/dankilman/repos","events_url":"https://api.github.com/users/dankilman/events{/privacy}","received_events_url":"https://api.github.com/users/dankilman/received_events","type":"User","site_admin":false},"body":null,"created_at":"2015-05-25T13:45:51Z","updated_at":"2015-05-25T15:09:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"88d9d0c69b5f8dae23083ac443509ffd21096888","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/115/commits","review_comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/115/comments","review_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/issues/115/comments","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/statuses/a5b9e56da90a8a36fe3f2bb0744cf328814e1f0c","head":{"label":"cloudify-cosmo:CFY-2788-relationship-op-fix","ref":"CFY-2788-relationship-op-fix","sha":"a5b9e56da90a8a36fe3f2bb0744cf328814e1f0c","user":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"repo":{"id":18327646,"name":"cloudify-plugins-common","full_name":"cloudify-cosmo/cloudify-plugins-common","owner":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudify-cosmo/cloudify-plugins-common","description":"Cloudify Resources for Cloudify Plugins","fork":false,"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common","forks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/forks","keys_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/teams","hooks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/hooks","issue_events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/issues/events{/number}","events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/events","assignees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/assignees{/user}","branches_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/branches{/branch}","tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/tags","blobs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/languages","stargazers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/stargazers","contributors_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/contributors","subscribers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/subscribers","subscription_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/subscription","commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/contents/{+path}","compare_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/merges","archive_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/downloads","issues_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/issues{/number}","pulls_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/labels{/name}","releases_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/releases{/id}","created_at":"2014-04-01T11:49:16Z","updated_at":"2015-05-06T18:35:05Z","pushed_at":"2015-05-25T14:18:01Z","git_url":"git://github.com/cloudify-cosmo/cloudify-plugins-common.git","ssh_url":"git@github.com:cloudify-cosmo/cloudify-plugins-common.git","clone_url":"https://github.com/cloudify-cosmo/cloudify-plugins-common.git","svn_url":"https://github.com/cloudify-cosmo/cloudify-plugins-common","homepage":null,"size":6724,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":1,"forks":9,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"cloudify-cosmo:master","ref":"master","sha":"755a224c1b51737c0d9bd1520a0df371637c1d51","user":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"repo":{"id":18327646,"name":"cloudify-plugins-common","full_name":"cloudify-cosmo/cloudify-plugins-common","owner":{"login":"cloudify-cosmo","id":6260555,"avatar_url":"https://avatars.githubusercontent.com/u/6260555?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudify-cosmo","html_url":"https://github.com/cloudify-cosmo","followers_url":"https://api.github.com/users/cloudify-cosmo/followers","following_url":"https://api.github.com/users/cloudify-cosmo/following{/other_user}","gists_url":"https://api.github.com/users/cloudify-cosmo/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudify-cosmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudify-cosmo/subscriptions","organizations_url":"https://api.github.com/users/cloudify-cosmo/orgs","repos_url":"https://api.github.com/users/cloudify-cosmo/repos","events_url":"https://api.github.com/users/cloudify-cosmo/events{/privacy}","received_events_url":"https://api.github.com/users/cloudify-cosmo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cloudify-cosmo/cloudify-plugins-common","description":"Cloudify Resources for Cloudify Plugins","fork":false,"url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common","forks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/forks","keys_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/teams","hooks_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/hooks","issue_events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/issues/events{/number}","events_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/events","assignees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/assignees{/user}","branches_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/branches{/branch}","tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/tags","blobs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/statuses/{sha}","languages_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/languages","stargazers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/stargazers","contributors_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/contributors","subscribers_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/subscribers","subscription_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/subscription","commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/contents/{+path}","compare_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/merges","archive_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/downloads","issues_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/issues{/number}","pulls_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls{/number}","milestones_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/milestones{/number}","notifications_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/labels{/name}","releases_url":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/releases{/id}","created_at":"2014-04-01T11:49:16Z","updated_at":"2015-05-06T18:35:05Z","pushed_at":"2015-05-25T14:18:01Z","git_url":"git://github.com/cloudify-cosmo/cloudify-plugins-common.git","ssh_url":"git@github.com:cloudify-cosmo/cloudify-plugins-common.git","clone_url":"https://github.com/cloudify-cosmo/cloudify-plugins-common.git","svn_url":"https://github.com/cloudify-cosmo/cloudify-plugins-common","homepage":null,"size":6724,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":1,"forks":9,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/115"},"html":{"href":"https://github.com/cloudify-cosmo/cloudify-plugins-common/pull/115"},"issue":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/issues/115"},"comments":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/cloudify-cosmo/cloudify-plugins-common/statuses/a5b9e56da90a8a36fe3f2bb0744cf328814e1f0c"}}}}