)]}'
{"doc/source/dev/plugin/selector-plugin.rst":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"846da9c5423cfe3079fc0f85641bc2a93ec6c2f8","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        def __init__(self, name\u003dDEFAULT_NAME, description\u003dDEFAULT_DESCRIPTION,"},{"line_number":140,"context_line":"                     osc\u003dNone):"},{"line_number":141,"context_line":"            super(ExampleStrategy, self).__init__(name, description, osc)"},{"line_number":142,"context_line":"            self.selectorloader \u003d load.DefaultSelectorLoader()"},{"line_number":143,"context_line":"            self.selector \u003d self.selectorloader.load(\u0027yourselector\u0027)"}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_68f4635a","line":142,"range":{"start_line":142,"start_character":12,"end_line":142,"end_character":62},"updated":"2016-05-11 07:30:41.000000000","message":"IMHO, you should put this into the BaseStrategy class so that you can say that it is already available.","commit_id":"f3478c6effd4e2a623a7045f319e72d4e381bf6f"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"f6b6a81a618a1421d64828d7b0f2bf8eb46dfafe","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        def __init__(self, name\u003dDEFAULT_NAME, description\u003dDEFAULT_DESCRIPTION,"},{"line_number":140,"context_line":"                     osc\u003dNone):"},{"line_number":141,"context_line":"            super(ExampleStrategy, self).__init__(name, description, osc)"},{"line_number":142,"context_line":"            self.selectorloader \u003d load.DefaultSelectorLoader()"},{"line_number":143,"context_line":"            self.selector \u003d self.selectorloader.load(\u0027yourselector\u0027)"}],"source_content_type":"text/x-rst","patch_set":7,"id":"dab17558_45f7c558","line":142,"range":{"start_line":142,"start_character":12,"end_line":142,"end_character":62},"in_reply_to":"dab17558_68f4635a","updated":"2016-05-11 09:27:37.000000000","message":"here has a write mistake. it\u0027s implement in BaseStrategy already. I will delete it from here.","commit_id":"f3478c6effd4e2a623a7045f319e72d4e381bf6f"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":25,"context_line":"- Extend :py:class:`~.BaseSelector`"},{"line_number":26,"context_line":"- Implement its :py:meth:`~.BaseSelector.select_destinations` method"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Here is an example showing how you write a plugin called ``SimpleSelector``:"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":".. code-block:: python"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    import copy"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    class SimpleSelector(base.BaseSelector):"},{"line_number":35,"context_line":"        \"\"\"Select available destinations which has enough core, mem disk \"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        DEFAULT_NAME \u003d \"simple\""},{"line_number":38,"context_line":"        DEFAULT_DESCRIPTION \u003d \"the simple selector\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        def __init__(self, name\u003dDEFAULT_NAME, description\u003dDEFAULT_DESCRIPTION):"},{"line_number":41,"context_line":"            super(SimpleSelector, self).__init__(name, description)"},{"line_number":42,"context_line":"            # TODO(jinquan) make it configurable"},{"line_number":43,"context_line":"            self.threshold_mem \u003d 1"},{"line_number":44,"context_line":"            self.threshold_disk \u003d 1"},{"line_number":45,"context_line":"            self.threshold_cores \u003d 1"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        def select_destinations(self, cluster_data_model, spec):"},{"line_number":48,"context_line":"            \"\"\"Select destinations form hypervisors in spec or cluster"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"            :param cluster_data_model: the current state of the cluster"},{"line_number":51,"context_line":"            :param spec: the spec for select destination"},{"line_number":52,"context_line":"            :return: available destinations"},{"line_number":53,"context_line":"            \"\"\""},{"line_number":54,"context_line":"            selected_hosts \u003d {}"},{"line_number":55,"context_line":"            vm_to_mig \u003d spec[\u0027vm_to_mig\u0027]"},{"line_number":56,"context_line":"            hypervisors \u003d spec.get(\u0027hypervisors\u0027, {})"},{"line_number":57,"context_line":"            hypervisors \u003d hypervisors if hypervisors else \\"},{"line_number":58,"context_line":"                cluster_data_model.get_all_hypervisors()"},{"line_number":59,"context_line":"            ignore_hosts \u003d spec.get(\u0027ignore_hosts\u0027, {})"},{"line_number":60,"context_line":"            tmp_hypervisors \u003d copy.deepcopy(hypervisors)"},{"line_number":61,"context_line":"            if ignore_hosts:"},{"line_number":62,"context_line":"                for hypervisor_id in ignore_hosts:"},{"line_number":63,"context_line":"                    tmp_hypervisors.pop(hypervisor_id)"},{"line_number":64,"context_line":"            else:"},{"line_number":65,"context_line":"                LOG.error(_LE(\u0027Need ignore src hypervisor of %s at least.\u0027),"},{"line_number":66,"context_line":"                          vm_to_mig)"},{"line_number":67,"context_line":"                return {}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"            for hypervisor_id in tmp_hypervisors:"},{"line_number":70,"context_line":"                hypervisor \u003d cluster_data_model.get_hypervisor_from_id("},{"line_number":71,"context_line":"                    hypervisor_id)"},{"line_number":72,"context_line":"                result \u003d self.check_destination(cluster_data_model,"},{"line_number":73,"context_line":"                                                hypervisor, vm_to_mig)"},{"line_number":74,"context_line":"                if result:"},{"line_number":75,"context_line":"                    selected_hosts[hypervisor_id] \u003d hypervisor"},{"line_number":76,"context_line":"            return selected_hosts"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In the above example, the :py:meth:`~.BaseSelector.select_destinations` method"},{"line_number":79,"context_line":"will select the available destination hosts which has enough core, mem and disk"}],"source_content_type":"text/x-rst","patch_set":11,"id":"dab17558_cafbb9bf","line":76,"range":{"start_line":28,"start_character":0,"end_line":76,"end_character":33},"updated":"2016-05-17 10:12:03.000000000","message":"Can you give a simpler example than this? IMHO, we should keep the example here to the strict minimum.\n\nBTW, can you put the doc into a separate changeset please?","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":25,"context_line":"- Extend :py:class:`~.BaseSelector`"},{"line_number":26,"context_line":"- Implement its :py:meth:`~.BaseSelector.select_destinations` method"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"Here is an example showing how you write a plugin called ``SimpleSelector``:"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":".. code-block:: python"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    import copy"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    class SimpleSelector(base.BaseSelector):"},{"line_number":35,"context_line":"        \"\"\"Select available destinations which has enough core, mem disk \"\"\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"        DEFAULT_NAME \u003d \"simple\""},{"line_number":38,"context_line":"        DEFAULT_DESCRIPTION \u003d \"the simple selector\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        def __init__(self, name\u003dDEFAULT_NAME, description\u003dDEFAULT_DESCRIPTION):"},{"line_number":41,"context_line":"            super(SimpleSelector, self).__init__(name, description)"},{"line_number":42,"context_line":"            # TODO(jinquan) make it configurable"},{"line_number":43,"context_line":"            self.threshold_mem \u003d 1"},{"line_number":44,"context_line":"            self.threshold_disk \u003d 1"},{"line_number":45,"context_line":"            self.threshold_cores \u003d 1"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        def select_destinations(self, cluster_data_model, spec):"},{"line_number":48,"context_line":"            \"\"\"Select destinations form hypervisors in spec or cluster"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"            :param cluster_data_model: the current state of the cluster"},{"line_number":51,"context_line":"            :param spec: the spec for select destination"},{"line_number":52,"context_line":"            :return: available destinations"},{"line_number":53,"context_line":"            \"\"\""},{"line_number":54,"context_line":"            selected_hosts \u003d {}"},{"line_number":55,"context_line":"            vm_to_mig \u003d spec[\u0027vm_to_mig\u0027]"},{"line_number":56,"context_line":"            hypervisors \u003d spec.get(\u0027hypervisors\u0027, {})"},{"line_number":57,"context_line":"            hypervisors \u003d hypervisors if hypervisors else \\"},{"line_number":58,"context_line":"                cluster_data_model.get_all_hypervisors()"},{"line_number":59,"context_line":"            ignore_hosts \u003d spec.get(\u0027ignore_hosts\u0027, {})"},{"line_number":60,"context_line":"            tmp_hypervisors \u003d copy.deepcopy(hypervisors)"},{"line_number":61,"context_line":"            if ignore_hosts:"},{"line_number":62,"context_line":"                for hypervisor_id in ignore_hosts:"},{"line_number":63,"context_line":"                    tmp_hypervisors.pop(hypervisor_id)"},{"line_number":64,"context_line":"            else:"},{"line_number":65,"context_line":"                LOG.error(_LE(\u0027Need ignore src hypervisor of %s at least.\u0027),"},{"line_number":66,"context_line":"                          vm_to_mig)"},{"line_number":67,"context_line":"                return {}"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"            for hypervisor_id in tmp_hypervisors:"},{"line_number":70,"context_line":"                hypervisor \u003d cluster_data_model.get_hypervisor_from_id("},{"line_number":71,"context_line":"                    hypervisor_id)"},{"line_number":72,"context_line":"                result \u003d self.check_destination(cluster_data_model,"},{"line_number":73,"context_line":"                                                hypervisor, vm_to_mig)"},{"line_number":74,"context_line":"                if result:"},{"line_number":75,"context_line":"                    selected_hosts[hypervisor_id] \u003d hypervisor"},{"line_number":76,"context_line":"            return selected_hosts"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"In the above example, the :py:meth:`~.BaseSelector.select_destinations` method"},{"line_number":79,"context_line":"will select the available destination hosts which has enough core, mem and disk"}],"source_content_type":"text/x-rst","patch_set":11,"id":"bab6814e_b4ee1db2","line":76,"range":{"start_line":28,"start_character":0,"end_line":76,"end_character":33},"in_reply_to":"dab17558_cafbb9bf","updated":"2016-05-20 09:02:24.000000000","message":"Ok, i will push this rst file in another pacthset.","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"}],"setup.cfg":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"48259aa60b0f59caa83bb8901535bf7919f03414","unresolved":false,"context_lines":[{"line_number":60,"context_line":"watcher_workflow_engines \u003d"},{"line_number":61,"context_line":"    taskflow \u003d watcher.applier.workflow_engine.default:DefaultWorkFlowEngine"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"watcher_select_destinations \u003d"},{"line_number":64,"context_line":"    filter \u003d watcher.decision_engine.strategy.strategies.select_destinations:FilterHosts"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"watcher_planners \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":2,"id":"1a122d0e_9a0cdb3c","line":63,"range":{"start_line":63,"start_character":0,"end_line":63,"end_character":27},"updated":"2016-04-25 13:01:56.000000000","message":"nit: IMHO, namespaces shouldn\u0027t contain a verb inside them unless you want to load a bare function. In your case, you are loading a class which will then execute a select() method. So I would suggest to either rename it to \u0027watcher_destination_selectors\u0027 or to reference the filter entry point with a function that is instantiating + calling the select_destinations() method.","commit_id":"d6740e198a30ef172958107b58d566139f987c48"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"4f6d2b9abbfbf3da4dfce6032dd5c4464232acc2","unresolved":false,"context_lines":[{"line_number":60,"context_line":"watcher_workflow_engines \u003d"},{"line_number":61,"context_line":"    taskflow \u003d watcher.applier.workflow_engine.default:DefaultWorkFlowEngine"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"watcher_select_destinations \u003d"},{"line_number":64,"context_line":"    filter \u003d watcher.decision_engine.strategy.strategies.select_destinations:FilterHosts"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"watcher_planners \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":2,"id":"dab17558_f9d15058","line":63,"range":{"start_line":63,"start_character":0,"end_line":63,"end_character":27},"in_reply_to":"1a122d0e_9a0cdb3c","updated":"2016-05-11 02:44:11.000000000","message":"Done， thank you！ ：）","commit_id":"d6740e198a30ef172958107b58d566139f987c48"}],"watcher/decision_engine/manager.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":67,"context_line":"               help\u003d\u0027The maximum number of threads that can be used to \u0027"},{"line_number":68,"context_line":"                    \u0027execute strategies\u0027,"},{"line_number":69,"context_line":"               ),"},{"line_number":70,"context_line":"    cfg.StrOpt(\u0027default_selector\u0027,"},{"line_number":71,"context_line":"               default\u003d\u0027simple\u0027,"},{"line_number":72,"context_line":"               help\u003d\u0027The default destination selector load in BaseSelector\u0027),"},{"line_number":73,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_e758798c","line":70,"range":{"start_line":70,"start_character":16,"end_line":70,"end_character":32},"updated":"2016-05-17 10:12:03.000000000","message":"s/default_selector/destination_selector","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":67,"context_line":"               help\u003d\u0027The maximum number of threads that can be used to \u0027"},{"line_number":68,"context_line":"                    \u0027execute strategies\u0027,"},{"line_number":69,"context_line":"               ),"},{"line_number":70,"context_line":"    cfg.StrOpt(\u0027default_selector\u0027,"},{"line_number":71,"context_line":"               default\u003d\u0027simple\u0027,"},{"line_number":72,"context_line":"               help\u003d\u0027The default destination selector load in BaseSelector\u0027),"},{"line_number":73,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_7d9499e1","line":70,"range":{"start_line":70,"start_character":16,"end_line":70,"end_character":32},"in_reply_to":"dab17558_e758798c","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":69,"context_line":"               ),"},{"line_number":70,"context_line":"    cfg.StrOpt(\u0027default_selector\u0027,"},{"line_number":71,"context_line":"               default\u003d\u0027simple\u0027,"},{"line_number":72,"context_line":"               help\u003d\u0027The default destination selector load in BaseSelector\u0027),"},{"line_number":73,"context_line":"]"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"decision_engine_opt_group \u003d cfg.OptGroup(name\u003d\u0027watcher_decision_engine\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_87f36d72","line":72,"range":{"start_line":72,"start_character":21,"end_line":72,"end_character":74},"updated":"2016-05-17 10:12:03.000000000","message":"The destination selector plugin to be used.","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"               ),"},{"line_number":70,"context_line":"    cfg.StrOpt(\u0027default_selector\u0027,"},{"line_number":71,"context_line":"               default\u003d\u0027simple\u0027,"},{"line_number":72,"context_line":"               help\u003d\u0027The default destination selector load in BaseSelector\u0027),"},{"line_number":73,"context_line":"]"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"decision_engine_opt_group \u003d cfg.OptGroup(name\u003d\u0027watcher_decision_engine\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_5d8f15cc","line":72,"range":{"start_line":72,"start_character":21,"end_line":72,"end_character":74},"in_reply_to":"dab17558_87f36d72","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"}],"watcher/decision_engine/strategy/destination_selectors/base.py":[{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"1a3213c70de2a17dd23bd502022cd982728ed801","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @abc.abstractmethod"},{"line_number":33,"context_line":"    def select_destinations(self, cluster_data_model, spec):"},{"line_number":34,"context_line":"        \"\"\"Select destinations form hypervisors in spec or cluster"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        :param cluster_data_model: the current state of the cluster"}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_f3f1e36b","line":33,"updated":"2016-05-30 14:37:33.000000000","message":"IMO, the function select_destinations should be :\n\ndef select_destinations(instance_uuid,requested_destinations):\nparam instance_uuid: the uuid of the virtual machine \nparam requested_destination : a list of targed nodes","commit_id":"9392a80d5727d89878e91f02a9d995e554146d91"}],"watcher/decision_engine/strategy/destination_selectors/simple.py":[{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"1a3213c70de2a17dd23bd502022cd982728ed801","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        super(SimpleDestinationSelector, self).__init__()"},{"line_number":37,"context_line":"        # TODO(jinquan) make it configurable"},{"line_number":38,"context_line":"        self.threshold_mem \u003d 1"},{"line_number":39,"context_line":"        self.threshold_disk \u003d 1"},{"line_number":40,"context_line":"        self.threshold_cores \u003d 1"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def get_threshold_cores(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_f13ee9d8","line":39,"updated":"2016-05-30 14:37:33.000000000","message":"IMHO, we didn\u0027t need parameters for this class. The \"select destination\" have to be generic and only check if the destination hosts are compliant with the constraints or policies. It is the responsability of the  strategy to implement the logic of the optimization (e.g:  react to a threshold)","commit_id":"9392a80d5727d89878e91f02a9d995e554146d91"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"1a3213c70de2a17dd23bd502022cd982728ed801","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                      vm_to_mig)"},{"line_number":68,"context_line":"            return {}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        for hypervisor_id in tmp_hypervisors:"},{"line_number":71,"context_line":"            hypervisor \u003d cluster_data_model.get_hypervisor_from_id("},{"line_number":72,"context_line":"                hypervisor_id)"},{"line_number":73,"context_line":"            result \u003d self.check_destination(cluster_data_model,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_f15a6929","line":70,"updated":"2016-05-30 14:37:33.000000000","message":"Imagine that we have a cluster of 100 nodes. You will need to try each hypervisor of your datacenter, this solution is costly.","commit_id":"9392a80d5727d89878e91f02a9d995e554146d91"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"1a3213c70de2a17dd23bd502022cd982728ed801","unresolved":false,"context_lines":[{"line_number":68,"context_line":"            return {}"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"        for hypervisor_id in tmp_hypervisors:"},{"line_number":71,"context_line":"            hypervisor \u003d cluster_data_model.get_hypervisor_from_id("},{"line_number":72,"context_line":"                hypervisor_id)"},{"line_number":73,"context_line":"            result \u003d self.check_destination(cluster_data_model,"},{"line_number":74,"context_line":"                                            hypervisor, vm_to_mig)"}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_0c59d4fe","line":71,"updated":"2016-05-30 14:37:33.000000000","message":"I agree that you can ignore some hosts in the \u0027spec\u0027 variable.\nHowever, if the strategy know that some hypervisors have to be ignored we should directly pass the list of selected host(s) to the selector.\n\nthis one reason why I prefer :\ndef select_destinations(instance_uuid,requested_destinations):","commit_id":"9392a80d5727d89878e91f02a9d995e554146d91"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"1a3213c70de2a17dd23bd502022cd982728ed801","unresolved":false,"context_lines":[{"line_number":104,"context_line":"        total_disk +\u003d disk_capacity.get_capacity(vm_to_mig)"},{"line_number":105,"context_line":"        total_mem +\u003d memory_capacity.get_capacity(vm_to_mig)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        return self.check_threshold(cluster_data_model,"},{"line_number":108,"context_line":"                                    hypervisor,"},{"line_number":109,"context_line":"                                    total_cores,"},{"line_number":110,"context_line":"                                    total_disk,"}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_5336ef52","line":107,"updated":"2016-05-30 14:37:33.000000000","message":"The function \u0027check_threshold\u0027 is out of scope of the blueprint select-destinations-filter.\n\nThis function is a part of the logic of the strategy basic consolidation.","commit_id":"9392a80d5727d89878e91f02a9d995e554146d91"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"1a3213c70de2a17dd23bd502022cd982728ed801","unresolved":false,"context_lines":[{"line_number":130,"context_line":"        \"\"\"Check threshold"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        check the threshold value defined by the ratio of"},{"line_number":133,"context_line":"        aggregated CPU capacity of VMs on one node to CPU capacity"},{"line_number":134,"context_line":"        of this node must not exceed the threshold value."},{"line_number":135,"context_line":"        :param cluster_data_model: the current state of the cluster"},{"line_number":136,"context_line":"        :param hypervisor: the destination of the virtual machine"}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_73221303","line":133,"updated":"2016-05-30 14:37:33.000000000","message":"You have to remove this function and adapt the code of basic_consolidation to use select_destinations and check_threshold.","commit_id":"9392a80d5727d89878e91f02a9d995e554146d91"}],"watcher/decision_engine/strategy/loading/default.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":29,"context_line":"            namespace\u003d\u0027watcher_strategies\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class DefaultSelectorLoader(default.DefaultLoader):"},{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        super(DefaultSelectorLoader, self).__init__("},{"line_number":35,"context_line":"            namespace\u003d\u0027watcher_destination_selectors\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_8a425166","line":32,"range":{"start_line":32,"start_character":6,"end_line":32,"end_character":27},"updated":"2016-05-17 10:12:03.000000000","message":"s/DefaultSelectorLoader/DefaultDestinationSelectorLoader","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":29,"context_line":"            namespace\u003d\u0027watcher_strategies\u0027)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class DefaultSelectorLoader(default.DefaultLoader):"},{"line_number":33,"context_line":"    def __init__(self):"},{"line_number":34,"context_line":"        super(DefaultSelectorLoader, self).__init__("},{"line_number":35,"context_line":"            namespace\u003d\u0027watcher_destination_selectors\u0027)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_007d246e","line":32,"range":{"start_line":32,"start_character":6,"end_line":32,"end_character":27},"in_reply_to":"dab17558_8a425166","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"}],"watcher/decision_engine/strategy/selectors/base.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"# Copyright (c) 2015 ZTE Corporation"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Authors: Jinquan Ni \u003cni.jinquan@zte.com.cn\u003e"},{"line_number":5,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_e76518af","line":2,"range":{"start_line":2,"start_character":16,"end_line":2,"end_character":20},"updated":"2016-05-17 10:12:03.000000000","message":"s/2015/2016","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"# Copyright (c) 2015 ZTE Corporation"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Authors: Jinquan Ni \u003cni.jinquan@zte.com.cn\u003e"},{"line_number":5,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_6935fbd8","line":2,"range":{"start_line":2,"start_character":16,"end_line":2,"end_character":20},"in_reply_to":"dab17558_e76518af","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":25,"context_line":"class BaseSelector(object):"},{"line_number":26,"context_line":"    \"\"\"A base class for all selectors"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    A Selector is an algorithm implementation which is able to find available"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_0a9e6162","line":25,"range":{"start_line":25,"start_character":6,"end_line":25,"end_character":18},"updated":"2016-05-17 10:12:03.000000000","message":"IMHO we should call this the BaseDestinationSelector to avoid any confusion with the StrategySelector for example.\n\nFor the same reason, I would also argue that the package should be renamed as destination_selectors.","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":25,"context_line":"class BaseSelector(object):"},{"line_number":26,"context_line":"    \"\"\"A base class for all selectors"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    A Selector is an algorithm implementation which is able to find available"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_ef7c4b74","line":25,"range":{"start_line":25,"start_character":6,"end_line":25,"end_character":18},"in_reply_to":"dab17558_0a9e6162","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    \"\"\"A base class for all selectors"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    A Selector is an algorithm implementation which is able to find available"},{"line_number":29,"context_line":"     destination hosts form the cluster or given hosts."},{"line_number":30,"context_line":"    \"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def __init__(self, name\u003dNone, description\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_472ea443","line":29,"range":{"start_line":29,"start_character":4,"end_line":29,"end_character":5},"updated":"2016-05-17 10:12:03.000000000","message":"nit: extra space here","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":26,"context_line":"    \"\"\"A base class for all selectors"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    A Selector is an algorithm implementation which is able to find available"},{"line_number":29,"context_line":"     destination hosts form the cluster or given hosts."},{"line_number":30,"context_line":"    \"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def __init__(self, name\u003dNone, description\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_afd08354","line":29,"range":{"start_line":29,"start_character":4,"end_line":29,"end_character":5},"in_reply_to":"dab17558_472ea443","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def __init__(self, name\u003dNone, description\u003dNone):"},{"line_number":33,"context_line":"        self._name \u003d name"},{"line_number":34,"context_line":"        self.description \u003d description"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_27e280d5","line":33,"range":{"start_line":33,"start_character":8,"end_line":33,"end_character":25},"updated":"2016-05-17 10:12:03.000000000","message":"what is it used for? If you don\u0027t expose it through the API, I don\u0027t see their use.","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    \"\"\""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def __init__(self, name\u003dNone, description\u003dNone):"},{"line_number":33,"context_line":"        self._name \u003d name"},{"line_number":34,"context_line":"        self.description \u003d description"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_8147534a","line":33,"range":{"start_line":33,"start_character":8,"end_line":33,"end_character":25},"in_reply_to":"dab17558_27e280d5","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def __init__(self, name\u003dNone, description\u003dNone):"},{"line_number":33,"context_line":"        self._name \u003d name"},{"line_number":34,"context_line":"        self.description \u003d description"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @property"},{"line_number":37,"context_line":"    def name(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_c7d3b402","line":34,"range":{"start_line":34,"start_character":8,"end_line":34,"end_character":38},"updated":"2016-05-17 10:12:03.000000000","message":"ditto","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    def __init__(self, name\u003dNone, description\u003dNone):"},{"line_number":33,"context_line":"        self._name \u003d name"},{"line_number":34,"context_line":"        self.description \u003d description"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @property"},{"line_number":37,"context_line":"    def name(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_c1779b9d","line":34,"range":{"start_line":34,"start_character":8,"end_line":34,"end_character":38},"in_reply_to":"dab17558_c7d3b402","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        \"\"\"Select destinations form hypervisors in spec or cluster"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        :param cluster_data_model: the current state of the cluster"},{"line_number":49,"context_line":"        :param spec: the spec for select destination"},{"line_number":50,"context_line":"        :return: available destinations"},{"line_number":51,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_67b5a8eb","line":49,"range":{"start_line":49,"start_character":15,"end_line":49,"end_character":19},"updated":"2016-05-17 10:12:03.000000000","message":"nit: can you indicate the type of this parameter?","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        \"\"\"Select destinations form hypervisors in spec or cluster"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        :param cluster_data_model: the current state of the cluster"},{"line_number":49,"context_line":"        :param spec: the spec for select destination"},{"line_number":50,"context_line":"        :return: available destinations"},{"line_number":51,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_61786fc5","line":49,"range":{"start_line":49,"start_character":15,"end_line":49,"end_character":19},"in_reply_to":"dab17558_67b5a8eb","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        :param cluster_data_model: the current state of the cluster"},{"line_number":49,"context_line":"        :param spec: the spec for select destination"},{"line_number":50,"context_line":"        :return: available destinations"},{"line_number":51,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_67ac889f","line":50,"range":{"start_line":50,"start_character":17,"end_line":50,"end_character":39},"updated":"2016-05-17 10:12:03.000000000","message":"ditto","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        :param cluster_data_model: the current state of the cluster"},{"line_number":49,"context_line":"        :param spec: the spec for select destination"},{"line_number":50,"context_line":"        :return: available destinations"},{"line_number":51,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_a1825792","line":50,"range":{"start_line":50,"start_character":17,"end_line":50,"end_character":39},"in_reply_to":"dab17558_67ac889f","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"}],"watcher/decision_engine/strategy/selectors/simple_selector.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"# Copyright (c) 2015 ZTE Corporation"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Authors: Jinquan Ni \u003cni.jinquan@zte.com.cn\u003e"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_6af44df0","line":1,"updated":"2016-05-17 10:12:03.000000000","message":"IMHO, we should call this file \"simple.py\" instead of \"simple_selector.py\" since we are already within the \"selectors\" package","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"# Copyright (c) 2015 ZTE Corporation"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Authors: Jinquan Ni \u003cni.jinquan@zte.com.cn\u003e"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_35d97d84","line":1,"in_reply_to":"dab17558_6af44df0","updated":"2016-05-20 09:02:24.000000000","message":"OK","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"# Copyright (c) 2015 ZTE Corporation"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Authors: Jinquan Ni \u003cni.jinquan@zte.com.cn\u003e"},{"line_number":5,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_8797ec38","line":2,"range":{"start_line":2,"start_character":16,"end_line":2,"end_character":20},"updated":"2016-05-17 10:12:03.000000000","message":"s/2015/2016","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"# Copyright (c) 2015 ZTE Corporation"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Authors: Jinquan Ni \u003cni.jinquan@zte.com.cn\u003e"},{"line_number":5,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_b5ec4d2a","line":2,"range":{"start_line":2,"start_character":16,"end_line":2,"end_character":20},"in_reply_to":"dab17558_8797ec38","updated":"2016-05-20 09:02:24.000000000","message":"OK","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class SimpleSelector(base.BaseSelector):"},{"line_number":32,"context_line":"    \"\"\"Select available destinations which has enough core, mem and  disk \"\"\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    DEFAULT_NAME \u003d \"simple\""},{"line_number":35,"context_line":"    DEFAULT_DESCRIPTION \u003d \"The Simple Selector\""}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_0775bc30","line":32,"range":{"start_line":32,"start_character":67,"end_line":32,"end_character":68},"updated":"2016-05-17 10:12:03.000000000","message":"nit: extra space here","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class SimpleSelector(base.BaseSelector):"},{"line_number":32,"context_line":"    \"\"\"Select available destinations which has enough core, mem and  disk \"\"\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    DEFAULT_NAME \u003d \"simple\""},{"line_number":35,"context_line":"    DEFAULT_DESCRIPTION \u003d \"The Simple Selector\""}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_9591499c","line":32,"range":{"start_line":32,"start_character":67,"end_line":32,"end_character":68},"in_reply_to":"dab17558_0775bc30","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class SimpleSelector(base.BaseSelector):"},{"line_number":32,"context_line":"    \"\"\"Select available destinations which has enough core, mem and  disk \"\"\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    DEFAULT_NAME \u003d \"simple\""},{"line_number":35,"context_line":"    DEFAULT_DESCRIPTION \u003d \"The Simple Selector\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, name\u003dDEFAULT_NAME, description\u003dDEFAULT_DESCRIPTION):"},{"line_number":38,"context_line":"        super(SimpleSelector, self).__init__(name, description)"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_a7f5d083","line":35,"range":{"start_line":34,"start_character":0,"end_line":35,"end_character":47},"updated":"2016-05-17 10:12:03.000000000","message":"Same comment as before, why do you need to define these?","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class SimpleSelector(base.BaseSelector):"},{"line_number":32,"context_line":"    \"\"\"Select available destinations which has enough core, mem and  disk \"\"\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    DEFAULT_NAME \u003d \"simple\""},{"line_number":35,"context_line":"    DEFAULT_DESCRIPTION \u003d \"The Simple Selector\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, name\u003dDEFAULT_NAME, description\u003dDEFAULT_DESCRIPTION):"},{"line_number":38,"context_line":"        super(SimpleSelector, self).__init__(name, description)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_3afe8c38","line":35,"range":{"start_line":34,"start_character":0,"end_line":35,"end_character":47},"in_reply_to":"dab17558_a7f5d083","updated":"2016-05-20 09:02:24.000000000","message":"I define these because i made reference to the old version basic_consolidation.py.I will remove these define.","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    DEFAULT_NAME \u003d \"simple\""},{"line_number":35,"context_line":"    DEFAULT_DESCRIPTION \u003d \"The Simple Selector\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, name\u003dDEFAULT_NAME, description\u003dDEFAULT_DESCRIPTION):"},{"line_number":38,"context_line":"        super(SimpleSelector, self).__init__(name, description)"},{"line_number":39,"context_line":"        # TODO(jinquan) make it configurable"},{"line_number":40,"context_line":"        self.threshold_mem \u003d 1"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_472d04fd","line":37,"range":{"start_line":37,"start_character":23,"end_line":37,"end_character":73},"updated":"2016-05-17 10:12:03.000000000","message":"ditto","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    DEFAULT_NAME \u003d \"simple\""},{"line_number":35,"context_line":"    DEFAULT_DESCRIPTION \u003d \"The Simple Selector\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, name\u003dDEFAULT_NAME, description\u003dDEFAULT_DESCRIPTION):"},{"line_number":38,"context_line":"        super(SimpleSelector, self).__init__(name, description)"},{"line_number":39,"context_line":"        # TODO(jinquan) make it configurable"},{"line_number":40,"context_line":"        self.threshold_mem \u003d 1"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_daee608a","line":37,"range":{"start_line":37,"start_character":23,"end_line":37,"end_character":73},"in_reply_to":"dab17558_472d04fd","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    DEFAULT_DESCRIPTION \u003d \"The Simple Selector\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, name\u003dDEFAULT_NAME, description\u003dDEFAULT_DESCRIPTION):"},{"line_number":38,"context_line":"        super(SimpleSelector, self).__init__(name, description)"},{"line_number":39,"context_line":"        # TODO(jinquan) make it configurable"},{"line_number":40,"context_line":"        self.threshold_mem \u003d 1"},{"line_number":41,"context_line":"        self.threshold_disk \u003d 1"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_4714e49e","line":38,"range":{"start_line":38,"start_character":45,"end_line":38,"end_character":62},"updated":"2016-05-17 10:12:03.000000000","message":"ditto","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    DEFAULT_DESCRIPTION \u003d \"The Simple Selector\""},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    def __init__(self, name\u003dDEFAULT_NAME, description\u003dDEFAULT_DESCRIPTION):"},{"line_number":38,"context_line":"        super(SimpleSelector, self).__init__(name, description)"},{"line_number":39,"context_line":"        # TODO(jinquan) make it configurable"},{"line_number":40,"context_line":"        self.threshold_mem \u003d 1"},{"line_number":41,"context_line":"        self.threshold_disk \u003d 1"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_5a971090","line":38,"range":{"start_line":38,"start_character":45,"end_line":38,"end_character":62},"in_reply_to":"dab17558_4714e49e","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        selected_hosts \u003d {}"},{"line_number":58,"context_line":"        vm_to_mig \u003d spec[\u0027vm_to_mig\u0027]"},{"line_number":59,"context_line":"        hypervisors \u003d spec.get(\u0027hypervisors\u0027, {})"},{"line_number":60,"context_line":"        hypervisors \u003d hypervisors if hypervisors else \\"},{"line_number":61,"context_line":"            cluster_data_model.get_all_hypervisors()"},{"line_number":62,"context_line":"        ignore_hosts \u003d spec.get(\u0027ignore_hosts\u0027, {})"},{"line_number":63,"context_line":"        tmp_hypervisors \u003d copy.deepcopy(hypervisors)"},{"line_number":64,"context_line":"        if ignore_hosts:"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_c760d403","line":61,"range":{"start_line":60,"start_character":22,"end_line":61,"end_character":52},"updated":"2016-05-17 10:12:03.000000000","message":"nit: can be sinplified as:\n\nhypervisors \u003d hypervisors or cluster_data_model.get_all_hypervisors()","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        selected_hosts \u003d {}"},{"line_number":58,"context_line":"        vm_to_mig \u003d spec[\u0027vm_to_mig\u0027]"},{"line_number":59,"context_line":"        hypervisors \u003d spec.get(\u0027hypervisors\u0027, {})"},{"line_number":60,"context_line":"        hypervisors \u003d hypervisors if hypervisors else \\"},{"line_number":61,"context_line":"            cluster_data_model.get_all_hypervisors()"},{"line_number":62,"context_line":"        ignore_hosts \u003d spec.get(\u0027ignore_hosts\u0027, {})"},{"line_number":63,"context_line":"        tmp_hypervisors \u003d copy.deepcopy(hypervisors)"},{"line_number":64,"context_line":"        if ignore_hosts:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_1a2108a0","line":61,"range":{"start_line":60,"start_character":22,"end_line":61,"end_character":52},"in_reply_to":"dab17558_c760d403","updated":"2016-05-20 09:02:24.000000000","message":"Will be good！","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    def calculate_total_used(self, cluster_data_model, cpu_capacity,"},{"line_number":116,"context_line":"                             disk_capacity, hypervisor, memory_capacity,"},{"line_number":117,"context_line":"                             total_cores, total_disk, total_mem):"},{"line_number":118,"context_line":"        for vm_id in cluster_data_model. \\"},{"line_number":119,"context_line":"                get_mapping().get_node_vms(hypervisor):"},{"line_number":120,"context_line":"            vm \u003d cluster_data_model.get_vm_from_id(vm_id)"},{"line_number":121,"context_line":"            total_cores +\u003d cpu_capacity.get_capacity(vm)"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_07a93c24","line":118,"range":{"start_line":118,"start_character":41,"end_line":118,"end_character":42},"updated":"2016-05-17 10:12:03.000000000","message":"nit: can you avoid the backslash here?\n    for vm_id in cluster_data_model.get_mapping().get_node_vms(\n            hypervisor):\n        # [...]","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    def calculate_total_used(self, cluster_data_model, cpu_capacity,"},{"line_number":116,"context_line":"                             disk_capacity, hypervisor, memory_capacity,"},{"line_number":117,"context_line":"                             total_cores, total_disk, total_mem):"},{"line_number":118,"context_line":"        for vm_id in cluster_data_model. \\"},{"line_number":119,"context_line":"                get_mapping().get_node_vms(hypervisor):"},{"line_number":120,"context_line":"            vm \u003d cluster_data_model.get_vm_from_id(vm_id)"},{"line_number":121,"context_line":"            total_cores +\u003d cpu_capacity.get_capacity(vm)"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_9a1e9861","line":118,"range":{"start_line":118,"start_character":41,"end_line":118,"end_character":42},"in_reply_to":"dab17558_07a93c24","updated":"2016-05-20 09:02:24.000000000","message":"Will be good！","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        memory_capacity \u003d cluster_data_model.get_resource_from_id("},{"line_number":149,"context_line":"            resource.ResourceType.memory).get_capacity(hypervisor)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        if (cpu_capacity \u003e\u003d total_cores * self.threshold_cores and"},{"line_number":152,"context_line":"                disk_capacity \u003e\u003d total_disk * self.threshold_disk and"},{"line_number":153,"context_line":"                memory_capacity \u003e\u003d total_mem * self.threshold_mem):"},{"line_number":154,"context_line":"            return True"},{"line_number":155,"context_line":"        else:"},{"line_number":156,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_07e49ca9","line":156,"range":{"start_line":151,"start_character":0,"end_line":156,"end_character":24},"updated":"2016-05-17 10:12:03.000000000","message":"how about:\n\nreturn (\n    cpu_capacity \u003e\u003d total_cores * self.threshold_cores and\n    disk_capacity \u003e\u003d total_disk * self.threshold_disk and\n    memory_capacity \u003e\u003d total_mem * self.threshold_mem)","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        memory_capacity \u003d cluster_data_model.get_resource_from_id("},{"line_number":149,"context_line":"            resource.ResourceType.memory).get_capacity(hypervisor)"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"        if (cpu_capacity \u003e\u003d total_cores * self.threshold_cores and"},{"line_number":152,"context_line":"                disk_capacity \u003e\u003d total_disk * self.threshold_disk and"},{"line_number":153,"context_line":"                memory_capacity \u003e\u003d total_mem * self.threshold_mem):"},{"line_number":154,"context_line":"            return True"},{"line_number":155,"context_line":"        else:"},{"line_number":156,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_d74ab982","line":156,"range":{"start_line":151,"start_character":0,"end_line":156,"end_character":24},"in_reply_to":"dab17558_07e49ca9","updated":"2016-05-20 09:02:24.000000000","message":"Will be good！","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"}],"watcher/decision_engine/strategy/strategies/base.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"846da9c5423cfe3079fc0f85641bc2a93ec6c2f8","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self._solution \u003d default.DefaultSolution()"},{"line_number":65,"context_line":"        self._osc \u003d osc"},{"line_number":66,"context_line":"        self.selectorloader \u003d load.DefaultSelectorLoader()"},{"line_number":67,"context_line":"        self.selector \u003d self.selectorloader.load(\u0027simple\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @abc.abstractmethod"},{"line_number":70,"context_line":"    def execute(self, original_model):"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_8898a71d","line":67,"range":{"start_line":67,"start_character":49,"end_line":67,"end_character":57},"updated":"2016-05-11 07:30:41.000000000","message":"IMHO, this should be a configuration option so that if a new selector is selector is impplemented, then you can switch the entrypoint without having to change the code. See https://github.com/openstack/watcher/blob/master/watcher/applier/default.py#L47-L55 where the same thing was done for the workflow engine of the applier.","commit_id":"f3478c6effd4e2a623a7045f319e72d4e381bf6f"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"f6b6a81a618a1421d64828d7b0f2bf8eb46dfafe","unresolved":false,"context_lines":[{"line_number":64,"context_line":"        self._solution \u003d default.DefaultSolution()"},{"line_number":65,"context_line":"        self._osc \u003d osc"},{"line_number":66,"context_line":"        self.selectorloader \u003d load.DefaultSelectorLoader()"},{"line_number":67,"context_line":"        self.selector \u003d self.selectorloader.load(\u0027simple\u0027)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @abc.abstractmethod"},{"line_number":70,"context_line":"    def execute(self, original_model):"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_e5d079cb","line":67,"range":{"start_line":67,"start_character":49,"end_line":67,"end_character":57},"in_reply_to":"dab17558_8898a71d","updated":"2016-05-11 09:27:37.000000000","message":"Done","commit_id":"f3478c6effd4e2a623a7045f319e72d4e381bf6f"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        # the solution given by the strategy"},{"line_number":69,"context_line":"        self._solution \u003d default.DefaultSolution()"},{"line_number":70,"context_line":"        self._osc \u003d osc"},{"line_number":71,"context_line":"        self.selectorloader \u003d load.DefaultSelectorLoader()"},{"line_number":72,"context_line":"        self.selector \u003d self.selectorloader.load(CONF.watcher_decision_engine."},{"line_number":73,"context_line":"                                                 default_selector,)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_aa3755e1","line":71,"range":{"start_line":71,"start_character":35,"end_line":71,"end_character":56},"updated":"2016-05-17 10:12:03.000000000","message":"s/DefaultSelectorLoader/DefaultDestinationSelectorLoader","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        # the solution given by the strategy"},{"line_number":69,"context_line":"        self._solution \u003d default.DefaultSolution()"},{"line_number":70,"context_line":"        self._osc \u003d osc"},{"line_number":71,"context_line":"        self.selectorloader \u003d load.DefaultSelectorLoader()"},{"line_number":72,"context_line":"        self.selector \u003d self.selectorloader.load(CONF.watcher_decision_engine."},{"line_number":73,"context_line":"                                                 default_selector,)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_4a286986","line":71,"range":{"start_line":71,"start_character":13,"end_line":71,"end_character":27},"updated":"2016-05-17 10:12:03.000000000","message":"s/selectorloader/destination_selector_loader","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        # the solution given by the strategy"},{"line_number":69,"context_line":"        self._solution \u003d default.DefaultSolution()"},{"line_number":70,"context_line":"        self._osc \u003d osc"},{"line_number":71,"context_line":"        self.selectorloader \u003d load.DefaultSelectorLoader()"},{"line_number":72,"context_line":"        self.selector \u003d self.selectorloader.load(CONF.watcher_decision_engine."},{"line_number":73,"context_line":"                                                 default_selector,)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_d504717f","line":71,"range":{"start_line":71,"start_character":13,"end_line":71,"end_character":27},"in_reply_to":"dab17558_4a286986","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        # the solution given by the strategy"},{"line_number":69,"context_line":"        self._solution \u003d default.DefaultSolution()"},{"line_number":70,"context_line":"        self._osc \u003d osc"},{"line_number":71,"context_line":"        self.selectorloader \u003d load.DefaultSelectorLoader()"},{"line_number":72,"context_line":"        self.selector \u003d self.selectorloader.load(CONF.watcher_decision_engine."},{"line_number":73,"context_line":"                                                 default_selector,)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_15ff1968","line":71,"range":{"start_line":71,"start_character":35,"end_line":71,"end_character":56},"in_reply_to":"dab17558_aa3755e1","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"1a3213c70de2a17dd23bd502022cd982728ed801","unresolved":false,"context_lines":[{"line_number":70,"context_line":"        self._osc \u003d osc"},{"line_number":71,"context_line":"        self.destination_selector_loader \u003d ("},{"line_number":72,"context_line":"            load.DefaultDestinationSelectorLoader())"},{"line_number":73,"context_line":"        self.selector \u003d self.destination_selector_loader .load("},{"line_number":74,"context_line":"            CONF.watcher_decision_engine.destination_selector)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_31ca316f","line":73,"updated":"2016-05-30 14:37:33.000000000","message":"I tend to prefer @property","commit_id":"9392a80d5727d89878e91f02a9d995e554146d91"}],"watcher/decision_engine/strategy/strategies/basic_consolidation.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"148916808aa7a7b6cab333cbb1cbea77d3102b82","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                    instance"},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        super(BasicConsolidation, self).__init__(name, description, osc)"},{"line_number":90,"context_line":"        self.select \u003d select.FilterHosts()"},{"line_number":91,"context_line":"        # set default value for the number of released nodes"},{"line_number":92,"context_line":"        self.number_of_released_nodes \u003d 0"},{"line_number":93,"context_line":"        # set default value for the number of migrations"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_210fc5e2","line":90,"range":{"start_line":90,"start_character":22,"end_line":90,"end_character":42},"updated":"2016-04-15 14:38:45.000000000","message":"You actually forgot to implement these 2 work items:\n\n- Provide a stevedore extension to load dynamically the implementation of select_destinations(self, hypervisors).\n- Make it available to every strategy developer.\n\nTo make it available to every strategy developer, I suggest you move this into the BaseStrategy.","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"2d3114a7c19d5e35ff9043edeb7e847c222ec611","unresolved":false,"context_lines":[{"line_number":87,"context_line":"                    instance"},{"line_number":88,"context_line":"        \"\"\""},{"line_number":89,"context_line":"        super(BasicConsolidation, self).__init__(name, description, osc)"},{"line_number":90,"context_line":"        self.select \u003d select.FilterHosts()"},{"line_number":91,"context_line":"        # set default value for the number of released nodes"},{"line_number":92,"context_line":"        self.number_of_released_nodes \u003d 0"},{"line_number":93,"context_line":"        # set default value for the number of migrations"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_4c1db5bc","line":90,"range":{"start_line":90,"start_character":22,"end_line":90,"end_character":42},"in_reply_to":"1a122d0e_210fc5e2","updated":"2016-04-22 10:19:08.000000000","message":"Done","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":19014,"name":"jiangyuhao","email":"jiang.yuhao@zte.com.cn","username":"dimmy"},"change_message_id":"5baf1cd288d4469e1ee93720566dfc43608294e4","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            mig_vm \u003d current_model.get_vm_from_id(vm[0])"},{"line_number":339,"context_line":"            mig_src_hypervisor \u003d current_model.get_hypervisor_from_id("},{"line_number":340,"context_line":"                node_to_release)"},{"line_number":341,"context_line":"            spec \u003d dict()"},{"line_number":342,"context_line":"            spec[\u0027vm_to_mig\u0027] \u003d mig_vm"},{"line_number":343,"context_line":"            spec[\u0027ignore_hosts\u0027] \u003d {node_to_release: mig_src_hypervisor}"},{"line_number":344,"context_line":"            spec[\u0027hypervisors\u0027] \u003d current_model.get_all_hypervisors()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_575a0c2b","line":341,"range":{"start_line":341,"start_character":12,"end_line":341,"end_character":25},"updated":"2016-04-19 12:24:44.000000000","message":"spec can define with initial value directly","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"2d3114a7c19d5e35ff9043edeb7e847c222ec611","unresolved":false,"context_lines":[{"line_number":338,"context_line":"            mig_vm \u003d current_model.get_vm_from_id(vm[0])"},{"line_number":339,"context_line":"            mig_src_hypervisor \u003d current_model.get_hypervisor_from_id("},{"line_number":340,"context_line":"                node_to_release)"},{"line_number":341,"context_line":"            spec \u003d dict()"},{"line_number":342,"context_line":"            spec[\u0027vm_to_mig\u0027] \u003d mig_vm"},{"line_number":343,"context_line":"            spec[\u0027ignore_hosts\u0027] \u003d {node_to_release: mig_src_hypervisor}"},{"line_number":344,"context_line":"            spec[\u0027hypervisors\u0027] \u003d current_model.get_all_hypervisors()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_cc8705d6","line":341,"range":{"start_line":341,"start_character":12,"end_line":341,"end_character":25},"in_reply_to":"1a122d0e_575a0c2b","updated":"2016-04-22 10:19:08.000000000","message":"Done","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                mig_dst_hypervisor \u003d None"},{"line_number":356,"context_line":"                for i in range(0, len(sorted_score)):"},{"line_number":357,"context_line":"                    if sorted_score[i][0] in destinations.keys():"},{"line_number":358,"context_line":"                        mig_dst_hypervisor \u003d current_model.\\"},{"line_number":359,"context_line":"                            get_hypervisor_from_id(sorted_score[i][0])"},{"line_number":360,"context_line":"                        break"},{"line_number":361,"context_line":"                if mig_dst_hypervisor:"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_4abea965","line":358,"range":{"start_line":358,"start_character":59,"end_line":358,"end_character":60},"updated":"2016-05-17 10:12:03.000000000","message":"nit: can you avoid the \u0027\\\u0027?\n\n                    if sorted_score[i][0] in destinations.keys():\n                        mig_dst_hypervisor \u003d (\n                            current_model.get_hypervisor_from_id(\n                            sorted_score[i][0]))","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":355,"context_line":"                mig_dst_hypervisor \u003d None"},{"line_number":356,"context_line":"                for i in range(0, len(sorted_score)):"},{"line_number":357,"context_line":"                    if sorted_score[i][0] in destinations.keys():"},{"line_number":358,"context_line":"                        mig_dst_hypervisor \u003d current_model.\\"},{"line_number":359,"context_line":"                            get_hypervisor_from_id(sorted_score[i][0])"},{"line_number":360,"context_line":"                        break"},{"line_number":361,"context_line":"                if mig_dst_hypervisor:"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_af67b5e7","line":358,"range":{"start_line":358,"start_character":59,"end_line":358,"end_character":60},"in_reply_to":"dab17558_4abea965","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"1a3213c70de2a17dd23bd502022cd982728ed801","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                                                            dest_hypervisor,"},{"line_number":161,"context_line":"                                                            ))"},{"line_number":162,"context_line":""},{"line_number":163,"context_line":"        total_cores \u003d 0"},{"line_number":164,"context_line":"        total_disk \u003d 0"},{"line_number":165,"context_line":"        total_mem \u003d 0"},{"line_number":166,"context_line":"        cpu_capacity \u003d cluster_data_model.get_resource_from_id("}],"source_content_type":"text/x-python","patch_set":17,"id":"9abb7d3a_d112c5b3","side":"PARENT","line":163,"updated":"2016-05-30 14:37:33.000000000","message":"IMHO, you should keep check_migration and call the function select_destinations.","commit_id":"fb82131d8529ded01ed5cdcd1ce5a32463468ab1"}],"watcher/decision_engine/strategy/strategies/select_destinations.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"148916808aa7a7b6cab333cbb1cbea77d3102b82","unresolved":false,"context_lines":[{"line_number":17,"context_line":"# limitations under the License."},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import copy"},{"line_number":21,"context_line":"from oslo_log import log"},{"line_number":22,"context_line":"from watcher.decision_engine.model import resource"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_8e100a5b","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":11},"updated":"2016-04-15 14:38:45.000000000","message":"nit: missing a blank line after this import","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"3f543cdb09fd44f79b355c8adb102e3bde728381","unresolved":false,"context_lines":[{"line_number":17,"context_line":"# limitations under the License."},{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import copy"},{"line_number":21,"context_line":"from oslo_log import log"},{"line_number":22,"context_line":"from watcher.decision_engine.model import resource"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_b5368a00","line":20,"range":{"start_line":20,"start_character":0,"end_line":20,"end_character":11},"in_reply_to":"5a18252c_8e100a5b","updated":"2016-04-22 10:18:34.000000000","message":"Done","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"148916808aa7a7b6cab333cbb1cbea77d3102b82","unresolved":false,"context_lines":[{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import copy"},{"line_number":21,"context_line":"from oslo_log import log"},{"line_number":22,"context_line":"from watcher.decision_engine.model import resource"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d log.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_ce0e823a","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":24},"updated":"2016-04-15 14:38:45.000000000","message":"ditto","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"3f543cdb09fd44f79b355c8adb102e3bde728381","unresolved":false,"context_lines":[{"line_number":18,"context_line":"#"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"import copy"},{"line_number":21,"context_line":"from oslo_log import log"},{"line_number":22,"context_line":"from watcher.decision_engine.model import resource"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"LOG \u003d log.getLogger(__name__)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_153adee6","line":21,"range":{"start_line":21,"start_character":0,"end_line":21,"end_character":24},"in_reply_to":"5a18252c_ce0e823a","updated":"2016-04-22 10:18:34.000000000","message":"Done","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":19014,"name":"jiangyuhao","email":"jiang.yuhao@zte.com.cn","username":"dimmy"},"change_message_id":"5baf1cd288d4469e1ee93720566dfc43608294e4","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            for hypervisor_id in ignore_hosts:"},{"line_number":58,"context_line":"                tmp_hypervisors.pop(hypervisor_id)"},{"line_number":59,"context_line":"        else:"},{"line_number":60,"context_line":"            LOG.error(\u0027Need ignore src hypervisor at least\u0027)"},{"line_number":61,"context_line":"            return {}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        for hypervisor_id in tmp_hypervisors:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_6c813fc3","line":60,"range":{"start_line":60,"start_character":23,"end_line":60,"end_character":58},"updated":"2016-04-19 12:24:44.000000000","message":"add \u0027.\u0027 in the end","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"148916808aa7a7b6cab333cbb1cbea77d3102b82","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            for hypervisor_id in ignore_hosts:"},{"line_number":58,"context_line":"                tmp_hypervisors.pop(hypervisor_id)"},{"line_number":59,"context_line":"        else:"},{"line_number":60,"context_line":"            LOG.error(\u0027Need ignore src hypervisor at least\u0027)"},{"line_number":61,"context_line":"            return {}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        for hypervisor_id in tmp_hypervisors:"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_31067b1d","line":60,"range":{"start_line":60,"start_character":22,"end_line":60,"end_character":59},"updated":"2016-04-15 14:38:45.000000000","message":"can you wrap your log with the _LE  from watcher._i18n ?","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"3f543cdb09fd44f79b355c8adb102e3bde728381","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            for hypervisor_id in ignore_hosts:"},{"line_number":58,"context_line":"                tmp_hypervisors.pop(hypervisor_id)"},{"line_number":59,"context_line":"        else:"},{"line_number":60,"context_line":"            LOG.error(\u0027Need ignore src hypervisor at least\u0027)"},{"line_number":61,"context_line":"            return {}"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"        for hypervisor_id in tmp_hypervisors:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_f53c82e2","line":60,"range":{"start_line":60,"start_character":23,"end_line":60,"end_character":58},"in_reply_to":"1a122d0e_6c813fc3","updated":"2016-04-22 10:18:34.000000000","message":"Done","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":19014,"name":"jiangyuhao","email":"jiang.yuhao@zte.com.cn","username":"dimmy"},"change_message_id":"5baf1cd288d4469e1ee93720566dfc43608294e4","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        :param vm_to_mig: the virtual machine"},{"line_number":78,"context_line":"        :return: True if the there is enough place otherwise false"},{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":"        total_cores \u003d 0"},{"line_number":81,"context_line":"        total_disk \u003d 0"},{"line_number":82,"context_line":"        total_mem \u003d 0"},{"line_number":83,"context_line":"        cpu_capacity \u003d cluster_data_model.get_resource_from_id("},{"line_number":84,"context_line":"            resource.ResourceType.cpu_cores)"},{"line_number":85,"context_line":"        disk_capacity \u003d cluster_data_model.get_resource_from_id("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_ac8b57c2","line":82,"range":{"start_line":80,"start_character":8,"end_line":82,"end_character":21},"updated":"2016-04-19 12:24:44.000000000","message":"move these to where it\u0027s been used.","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"3f543cdb09fd44f79b355c8adb102e3bde728381","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        :param vm_to_mig: the virtual machine"},{"line_number":78,"context_line":"        :return: True if the there is enough place otherwise false"},{"line_number":79,"context_line":"        \"\"\""},{"line_number":80,"context_line":"        total_cores \u003d 0"},{"line_number":81,"context_line":"        total_disk \u003d 0"},{"line_number":82,"context_line":"        total_mem \u003d 0"},{"line_number":83,"context_line":"        cpu_capacity \u003d cluster_data_model.get_resource_from_id("},{"line_number":84,"context_line":"            resource.ResourceType.cpu_cores)"},{"line_number":85,"context_line":"        disk_capacity \u003d cluster_data_model.get_resource_from_id("}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_550f3636","line":82,"range":{"start_line":80,"start_character":8,"end_line":82,"end_character":21},"in_reply_to":"1a122d0e_ac8b57c2","updated":"2016-04-22 10:18:34.000000000","message":"Done","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":19014,"name":"jiangyuhao","email":"jiang.yuhao@zte.com.cn","username":"dimmy"},"change_message_id":"5baf1cd288d4469e1ee93720566dfc43608294e4","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        memory_capacity \u003d cluster_data_model.get_resource_from_id("},{"line_number":88,"context_line":"            resource.ResourceType.memory)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        for vm_id in cluster_data_model. \\"},{"line_number":91,"context_line":"                get_mapping().get_node_vms(hypervisor):"},{"line_number":92,"context_line":"            vm \u003d cluster_data_model.get_vm_from_id(vm_id)"},{"line_number":93,"context_line":"            total_cores +\u003d cpu_capacity.get_capacity(vm)"},{"line_number":94,"context_line":"            total_disk +\u003d disk_capacity.get_capacity(vm)"},{"line_number":95,"context_line":"            total_mem +\u003d memory_capacity.get_capacity(vm)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        # capacity requested by hypervisor"},{"line_number":98,"context_line":"        total_cores +\u003d cpu_capacity.get_capacity(vm_to_mig)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a122d0e_57f68cf9","line":95,"range":{"start_line":90,"start_character":7,"end_line":95,"end_character":57},"updated":"2016-04-19 12:24:44.000000000","message":"here can refactor","commit_id":"a2d1e6f9822aad3333e4a5c746cf04a6910a6480"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"48259aa60b0f59caa83bb8901535bf7919f03414","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class FilterHosts(object):"},{"line_number":31,"context_line":"    \"\"\"Select available destinations \"\"\""},{"line_number":32,"context_line":"    def __init__(self):"},{"line_number":33,"context_line":"        super(FilterHosts, self).__init__()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a122d0e_fa722f7b","line":30,"range":{"start_line":30,"start_character":6,"end_line":30,"end_character":17},"updated":"2016-04-25 13:01:56.000000000","message":"One thing I would like to see here is an abstract base class which defines the contract/interface the \u0027select_destinations\u0027 plugin developer would have to implement. This would be done just like for strategies (see https://github.com/openstack/watcher/blob/master/watcher/decision_engine/strategy/strategies/base.py). In your case, I believe that \"select_destinations\" would be the only abstract method one would need to implement.\n\nPS: If you do so, you could then follow the same documentation structure (see https://github.com/openstack/watcher/blob/master/doc/source/dev/plugin/strategy-plugin.rst) if you haven\u0027t done it already.","commit_id":"d6740e198a30ef172958107b58d566139f987c48"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"4f6d2b9abbfbf3da4dfce6032dd5c4464232acc2","unresolved":false,"context_lines":[{"line_number":27,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"class FilterHosts(object):"},{"line_number":31,"context_line":"    \"\"\"Select available destinations \"\"\""},{"line_number":32,"context_line":"    def __init__(self):"},{"line_number":33,"context_line":"        super(FilterHosts, self).__init__()"}],"source_content_type":"text/x-python","patch_set":2,"id":"dab17558_19441419","line":30,"range":{"start_line":30,"start_character":6,"end_line":30,"end_character":17},"in_reply_to":"1a122d0e_fa722f7b","updated":"2016-05-11 02:44:11.000000000","message":"Done， thank you！ ：）","commit_id":"d6740e198a30ef172958107b58d566139f987c48"}],"watcher/tests/decision_engine/strategy/selector/test_select_destinations.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"846da9c5423cfe3079fc0f85641bc2a93ec6c2f8","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class TestSelectDestinations(base.BaseTestCase):"},{"line_number":27,"context_line":"    # fake cluster"},{"line_number":28,"context_line":"    fake_cluster \u003d faker_cluster_state.FakerModelCollector()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def test_basic_select_destination_success(self):"},{"line_number":31,"context_line":"        cluster \u003d self.fake_cluster.generate_scenario_1()"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_a8148b4c","line":28,"range":{"start_line":28,"start_character":4,"end_line":28,"end_character":60},"updated":"2016-05-11 07:30:41.000000000","message":"nit: can you move this into a setUp() method?","commit_id":"f3478c6effd4e2a623a7045f319e72d4e381bf6f"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"f6b6a81a618a1421d64828d7b0f2bf8eb46dfafe","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class TestSelectDestinations(base.BaseTestCase):"},{"line_number":27,"context_line":"    # fake cluster"},{"line_number":28,"context_line":"    fake_cluster \u003d faker_cluster_state.FakerModelCollector()"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def test_basic_select_destination_success(self):"},{"line_number":31,"context_line":"        cluster \u003d self.fake_cluster.generate_scenario_1()"}],"source_content_type":"text/x-python","patch_set":7,"id":"dab17558_98e0f4ce","line":28,"range":{"start_line":28,"start_character":4,"end_line":28,"end_character":60},"in_reply_to":"dab17558_a8148b4c","updated":"2016-05-11 09:27:37.000000000","message":"Done","commit_id":"f3478c6effd4e2a623a7045f319e72d4e381bf6f"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"f4a5afc49caffae9cb9315f321d443a809fd6970","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"# Copyright (c) 2015 ZTE Corporation"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Authors: Jinquan Ni \u003cni.jinquan@zte.com.cn\u003e"},{"line_number":5,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":11,"id":"dab17558_ea44bd47","line":2,"range":{"start_line":2,"start_character":16,"end_line":2,"end_character":20},"updated":"2016-05-17 10:12:03.000000000","message":"nit: s/2015/2016","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"1bc3b44e621d266eb42e0552fbcb62442511928c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*- encoding: utf-8 -*-"},{"line_number":2,"context_line":"# Copyright (c) 2015 ZTE Corporation"},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"# Authors: Jinquan Ni \u003cni.jinquan@zte.com.cn\u003e"},{"line_number":5,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":11,"id":"bab6814e_9a55cdfb","line":2,"range":{"start_line":2,"start_character":16,"end_line":2,"end_character":20},"in_reply_to":"dab17558_ea44bd47","updated":"2016-05-20 09:02:24.000000000","message":"Done","commit_id":"76291f01e2e8d3c33286f48cf54e6c5c2d3625d6"}]}
