)]}'
{"nova/scheduler/filters/affinity_filter.py":[{"author":{"_account_id":1030,"name":"Chris Behrens","email":"cbehrens@codestud.com","username":"cbehrens"},"change_message_id":"79852812352d1476c5d0bfbdb5bd7d564a157ee1","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def _affinity_host(self, context, instance_id):"},{"line_number":30,"context_line":"        return self.compute_api.get(context, instance_id)[\u0027host\u0027]"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class DifferentHostFilter(AffinityFilter):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FVM%3D","line":30,"updated":"2012-01-24 03:11:54.000000000","message":"I wonder if it would be better to have the API use \u0027avoid_hosts\u0027 and \u0027force_hosts\u0027.  That 1) avoids this instance lookup in the filters, and 2) takes advantage of current functionality in the host_manager (\u0027avoid_hosts\u0027 and \u0027force_hosts\u0027 already works).\n\nYou could have the API lookup the instance[\u0027host\u0027] if you really want to be able to have the caller pass in instance uuids.  OR... you could have the API accept the \u0027hostId\u0027 that we return in a \u0027show\u0027 and decrypt it back to a hostname.\n\nThe downside is it makes the \u0027scheduler_hints\u0027 extension less generic.","commit_id":"f391e2772066e81ba2c918eb801226447fc31453"},{"author":{"_account_id":693,"name":"Christopher MacGown","email":"chris@pistoncloud.com","username":"0x44"},"change_message_id":"0af373cf81285ebb3cde4c1b704099f8d3397efe","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    def _affinity_host(self, context, instance_id):"},{"line_number":30,"context_line":"        return self.compute_api.get(context, instance_id)[\u0027host\u0027]"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class DifferentHostFilter(AffinityFilter):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAEH%2F%2F%2FJ8%3D","line":30,"in_reply_to":"AAAAEH%2F%2F%2FVM%3D","updated":"2012-01-24 06:31:53.000000000","message":"I think it\u0027s better to have it entirely self-contained in the affinity filters, this way the scheduler_hint isn\u0027t being leaked out of here.","commit_id":"f391e2772066e81ba2c918eb801226447fc31453"}]}
