GitHub PullRequestReviewCommentEvent at 2014-04-23 20:49:05
Repository: openshift-extras
Actor: nhr
Payload: {"comment":{"url":"https://api.github.com/repos/openshift/openshift-extras/pulls/comments/11922968","id":11922968,"diff_hunk":"@@ -163,6 +166,86 @@ def get_role_list role\n       hosts.select{ |h| h.roles.include?(role) }\n     end\n \n+    def get_node_profiles\n+      valid_gear_sizes = Set.new\n+\n+      nodes.each do |node|\n+        valid_gear_sizes << node.node_profile\n+      end\n+\n+      brokers.each do |broker|\n+        valid_gear_sizes.merge(broker.valid_gear_sizes.split(',')) unless broker.valid_gear_sizes.nil?\n+      end\n+      return valid_gear_sizes.to_a\n+    end\n+\n+    def get_valid_gear_sizes\n+      return get_node_profiles.join(',')\n+    end\n+\n+    def update_valid_gear_sizes\n+      valid_gear_sizes = get_valid_gear_sizes\n+      brokers.each do |broker|\n+        broker.valid_gear_sizes=valid_gear_sizes\n+      end\n+    end\n+\n+    def get_districts\n+      districts = Set.new\n+      nodes.each do |node|\n+        districts << node.district unless node.district.nil? or node.district.empty?\n+      end\n+      brokers.each do |broker|\n+        unless broker.district_mappings.nil? or broker.district_mappings.empty?\n+          broker.district_mappings.each do |district,nodes|\n+            districts << district\n+          end\n+        end\n+      end\n+      return districts.to_a\n+    end\n+\n+    def get_profile_for_district district\n+      brokers.each do |broker|\n+        unless broker.district_mappings.nil? or broker.district_mappings.empty?\n+          broker.district_mappings.each do |d,n|\n+            if d == district\n+              nodes.each do |node|\n+                return node.node_profile if node.host == n[0]\n+              end\n+            end\n+          end\n+        end\n+      end\n+      return nil\n+    end\n+\n+    def update_district_mappings","path":"oo-install/lib/installer/deployment.rb","position":75,"original_position":75,"commit_id":"1c5247b48752afda185d3a9ef5210d1c9a35007b","original_commit_id":"1c5247b48752afda185d3a9ef5210d1c9a35007b","user":{"login":"nhr","id":1874097,"avatar_url":"https://avatars.githubusercontent.com/u/1874097?","gravatar_id":"0ccabe4d053700513ddc3bb66901d620","url":"https://api.github.com/users/nhr","html_url":"https://github.com/nhr","followers_url":"https://api.github.com/users/nhr/followers","following_url":"https://api.github.com/users/nhr/following{/other_user}","gists_url":"https://api.github.com/users/nhr/gists{/gist_id}","starred_url":"https://api.github.com/users/nhr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhr/subscriptions","organizations_url":"https://api.github.com/users/nhr/orgs","repos_url":"https://api.github.com/users/nhr/repos","events_url":"https://api.github.com/users/nhr/events{/privacy}","received_events_url":"https://api.github.com/users/nhr/received_events","type":"User","site_admin":false},"body":"Same comment as with `update_valid_gear_sizes()` above.","created_at":"2014-04-23T20:49:05Z","updated_at":"2014-04-23T20:49:05Z","html_url":"https://github.com/openshift/openshift-extras/pull/333#discussion_r11922968","pull_request_url":"https://api.github.com/repos/openshift/openshift-extras/pulls/333","_links":{"self":{"href":"https://api.github.com/repos/openshift/openshift-extras/pulls/comments/11922968"},"html":{"href":"https://github.com/openshift/openshift-extras/pull/333#discussion_r11922968"},"pull_request":{"href":"https://api.github.com/repos/openshift/openshift-extras/pulls/333"}}}}