)]}'
{"watcher/decision_engine/planner/weight.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"0dd3b25008aecedf3cd1080582e5512293235666","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class WeightPlanner(base.BasePlanner):"},{"line_number":37,"context_line":"    \"\"\"Default planner implementation"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    This implementation comes with basic rules with a set of action types that"},{"line_number":40,"context_line":"    are weighted. An action having a lower weight will be scheduled before the"},{"line_number":41,"context_line":"    other ones. The set of action types can be specified by \u0027weights\u0027 in the"},{"line_number":42,"context_line":"    ``watcher.conf``. You need to associate a different weight to all available"},{"line_number":43,"context_line":"    actions into the configuration file, otherwise you will get an error when"},{"line_number":44,"context_line":"    the new action will be referenced in the solution produced by a strategy."},{"line_number":45,"context_line":"    \"\"\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def __init__(self, config):"},{"line_number":48,"context_line":"        super(WeightPlanner, self).__init__(config)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a57fde8_81c77c44","line":45,"range":{"start_line":37,"start_character":0,"end_line":45,"end_character":7},"updated":"2017-01-12 13:37:47.000000000","message":"TODO: Update docstring","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":12394,"name":"David TARDIVEL","email":"David.TARDIVEL@b-com.com","username":"David.T"},"change_message_id":"bf2358e4adb1068ea0b3852c9d96c99fd1476559","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class WeightPlanner(base.BasePlanner):"},{"line_number":37,"context_line":"    \"\"\"Default planner implementation"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    This implementation comes with basic rules with a set of action types that"},{"line_number":40,"context_line":"    are weighted. An action having a lower weight will be scheduled before the"},{"line_number":41,"context_line":"    other ones. The set of action types can be specified by \u0027weights\u0027 in the"},{"line_number":42,"context_line":"    ``watcher.conf``. You need to associate a different weight to all available"},{"line_number":43,"context_line":"    actions into the configuration file, otherwise you will get an error when"},{"line_number":44,"context_line":"    the new action will be referenced in the solution produced by a strategy."},{"line_number":45,"context_line":"    \"\"\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def __init__(self, config):"},{"line_number":48,"context_line":"        super(WeightPlanner, self).__init__(config)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_cdae8c80","line":45,"range":{"start_line":37,"start_character":0,"end_line":45,"end_character":7},"updated":"2017-01-18 14:49:20.000000000","message":"you should rewrite this doctring part and add limitations as well","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"57b8773c8967134a5cd145b59246a457606694aa","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"class WeightPlanner(base.BasePlanner):"},{"line_number":37,"context_line":"    \"\"\"Default planner implementation"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    This implementation comes with basic rules with a set of action types that"},{"line_number":40,"context_line":"    are weighted. An action having a lower weight will be scheduled before the"},{"line_number":41,"context_line":"    other ones. The set of action types can be specified by \u0027weights\u0027 in the"},{"line_number":42,"context_line":"    ``watcher.conf``. You need to associate a different weight to all available"},{"line_number":43,"context_line":"    actions into the configuration file, otherwise you will get an error when"},{"line_number":44,"context_line":"    the new action will be referenced in the solution produced by a strategy."},{"line_number":45,"context_line":"    \"\"\""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def __init__(self, config):"},{"line_number":48,"context_line":"        super(WeightPlanner, self).__init__(config)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a3c09a3_4d1c8377","line":45,"range":{"start_line":37,"start_character":0,"end_line":45,"end_character":7},"in_reply_to":"9a57fde8_81c77c44","updated":"2017-01-16 16:32:45.000000000","message":"Done","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"0dd3b25008aecedf3cd1080582e5512293235666","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    def osc(self):"},{"line_number":58,"context_line":"        return self._osc"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    action_weights \u003d {"},{"line_number":61,"context_line":"        \u0027turn_host_to_acpi_s3_state\u0027: 10,"},{"line_number":62,"context_line":"        \u0027resize\u0027: 20,"},{"line_number":63,"context_line":"        \u0027migrate\u0027: 30,"},{"line_number":64,"context_line":"        \u0027sleep\u0027: 40,"},{"line_number":65,"context_line":"        \u0027change_nova_service_state\u0027: 50,"},{"line_number":66,"context_line":"        \u0027nop\u0027: 60,"},{"line_number":67,"context_line":"    }"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    parallelization \u003d {"},{"line_number":70,"context_line":"        \u0027turn_host_to_acpi_s3_state\u0027: 2,"},{"line_number":71,"context_line":"        \u0027resize\u0027: 2,"},{"line_number":72,"context_line":"        \u0027migrate\u0027: 2,"},{"line_number":73,"context_line":"        \u0027sleep\u0027: 1,"},{"line_number":74,"context_line":"        \u0027change_nova_service_state\u0027: 1,"},{"line_number":75,"context_line":"        \u0027nop\u0027: 1,"},{"line_number":76,"context_line":"    }"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    @classmethod"},{"line_number":79,"context_line":"    def get_config_opts(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a57fde8_e103e874","line":76,"range":{"start_line":60,"start_character":0,"end_line":76,"end_character":5},"updated":"2017-01-12 13:37:47.000000000","message":"TODO: make sure weights/parallelization opts defaults do make sense.","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"57b8773c8967134a5cd145b59246a457606694aa","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    def osc(self):"},{"line_number":58,"context_line":"        return self._osc"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    action_weights \u003d {"},{"line_number":61,"context_line":"        \u0027turn_host_to_acpi_s3_state\u0027: 10,"},{"line_number":62,"context_line":"        \u0027resize\u0027: 20,"},{"line_number":63,"context_line":"        \u0027migrate\u0027: 30,"},{"line_number":64,"context_line":"        \u0027sleep\u0027: 40,"},{"line_number":65,"context_line":"        \u0027change_nova_service_state\u0027: 50,"},{"line_number":66,"context_line":"        \u0027nop\u0027: 60,"},{"line_number":67,"context_line":"    }"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    parallelization \u003d {"},{"line_number":70,"context_line":"        \u0027turn_host_to_acpi_s3_state\u0027: 2,"},{"line_number":71,"context_line":"        \u0027resize\u0027: 2,"},{"line_number":72,"context_line":"        \u0027migrate\u0027: 2,"},{"line_number":73,"context_line":"        \u0027sleep\u0027: 1,"},{"line_number":74,"context_line":"        \u0027change_nova_service_state\u0027: 1,"},{"line_number":75,"context_line":"        \u0027nop\u0027: 1,"},{"line_number":76,"context_line":"    }"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    @classmethod"},{"line_number":79,"context_line":"    def get_config_opts(cls):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a3c09a3_ed07ef19","line":76,"range":{"start_line":60,"start_character":0,"end_line":76,"end_character":5},"in_reply_to":"9a57fde8_e103e874","updated":"2017-01-16 16:32:45.000000000","message":"Done","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":12394,"name":"David TARDIVEL","email":"David.TARDIVEL@b-com.com","username":"David.T"},"change_message_id":"bf2358e4adb1068ea0b3852c9d96c99fd1476559","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        return ["},{"line_number":81,"context_line":"            cfg.DictOpt("},{"line_number":82,"context_line":"                \u0027weights\u0027,"},{"line_number":83,"context_line":"                help\u003d\"These weights are used to schedule the actions. \""},{"line_number":84,"context_line":"                     \"Two action types cannot have the same weight\","},{"line_number":85,"context_line":"                default\u003dcls.action_weights),"},{"line_number":86,"context_line":"            cfg.DictOpt("}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_4598acc0","line":83,"range":{"start_line":83,"start_character":16,"end_line":83,"end_character":20},"updated":"2017-01-18 14:49:20.000000000","message":"Please also explain what is the meaning of the weight in the build of action plan","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"0dd3b25008aecedf3cd1080582e5512293235666","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            cfg.DictOpt("},{"line_number":82,"context_line":"                \u0027weights\u0027,"},{"line_number":83,"context_line":"                help\u003d\"These weights are used to schedule the actions. \""},{"line_number":84,"context_line":"                     \"Two action types cannot have the same weight\","},{"line_number":85,"context_line":"                default\u003dcls.action_weights),"},{"line_number":86,"context_line":"            cfg.DictOpt("},{"line_number":87,"context_line":"                \u0027parallelization\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a57fde8_0130ec55","line":84,"range":{"start_line":84,"start_character":21,"end_line":84,"end_character":68},"updated":"2017-01-12 13:37:47.000000000","message":"TODO:\n\nIndicate that a bigger weight comes first","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"57b8773c8967134a5cd145b59246a457606694aa","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            cfg.DictOpt("},{"line_number":82,"context_line":"                \u0027weights\u0027,"},{"line_number":83,"context_line":"                help\u003d\"These weights are used to schedule the actions. \""},{"line_number":84,"context_line":"                     \"Two action types cannot have the same weight\","},{"line_number":85,"context_line":"                default\u003dcls.action_weights),"},{"line_number":86,"context_line":"            cfg.DictOpt("},{"line_number":87,"context_line":"                \u0027parallelization\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a3c09a3_e00c6d96","line":84,"range":{"start_line":84,"start_character":21,"end_line":84,"end_character":68},"in_reply_to":"9a57fde8_0130ec55","updated":"2017-01-16 16:32:45.000000000","message":"Done","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":12394,"name":"David TARDIVEL","email":"David.TARDIVEL@b-com.com","username":"David.T"},"change_message_id":"bf2358e4adb1068ea0b3852c9d96c99fd1476559","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    @classmethod"},{"line_number":79,"context_line":"    def get_config_opts(cls):"},{"line_number":80,"context_line":"        return ["},{"line_number":81,"context_line":"            cfg.DictOpt("},{"line_number":82,"context_line":"                \u0027weights\u0027,"},{"line_number":83,"context_line":"                help\u003d\"These weights are used to schedule the actions. \""},{"line_number":84,"context_line":"                     \"Two action types cannot have the same weight\","},{"line_number":85,"context_line":"                default\u003dcls.action_weights),"},{"line_number":86,"context_line":"            cfg.DictOpt("},{"line_number":87,"context_line":"                \u0027parallelization\u0027,"},{"line_number":88,"context_line":"                help\u003d\"Number of actions to be run in parallel on a per \""},{"line_number":89,"context_line":"                     \"action type basis\","},{"line_number":90,"context_line":"                default\u003dcls.parallelization),"},{"line_number":91,"context_line":"        ]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba5201f7_a58b1867","line":90,"range":{"start_line":81,"start_character":0,"end_line":90,"end_character":45},"updated":"2017-01-18 14:49:20.000000000","message":"cfg.Opt(\n                \u0027weights\u0027,\n                type\u003dtypes.Dict(value_type\u003dtypes.Integer()),\n                help\u003d\"These weights are used to schedule the actions. \"\n                     \"Two action types cannot have the same weight\",\n                default\u003dcls.action_weights),\n            cfg.Opt(\n                \u0027parallelization\u0027,\n                type\u003dtypes.Dict(value_type\u003dtypes.Integer()),\n                help\u003d\"Number of actions to be run in parallel on a per \"\n                     \"action type basis\",\n                default\u003dcls.parallelization),","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"0dd3b25008aecedf3cd1080582e5512293235666","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    @staticmethod"},{"line_number":106,"context_line":"    def chunkify(lst, n):"},{"line_number":107,"context_line":"        \"\"\"Yield successive n-sized chunks from lst.\"\"\""},{"line_number":108,"context_line":"        if n \u003c 1:"},{"line_number":109,"context_line":"            # Just to make sure the number is valid"},{"line_number":110,"context_line":"            n \u003d 1"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a57fde8_c1aa6470","line":108,"updated":"2017-01-12 13:37:47.000000000","message":"TODO: write a better docstring\n\nSplit a flat list in a list of chunks of size n.\ne.g chunkify([0, 1, 2, 3, 4], 2) -\u003e [[0, 1], [2, 3], [4]]","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"57b8773c8967134a5cd145b59246a457606694aa","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    @staticmethod"},{"line_number":106,"context_line":"    def chunkify(lst, n):"},{"line_number":107,"context_line":"        \"\"\"Yield successive n-sized chunks from lst.\"\"\""},{"line_number":108,"context_line":"        if n \u003c 1:"},{"line_number":109,"context_line":"            # Just to make sure the number is valid"},{"line_number":110,"context_line":"            n \u003d 1"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7a3c09a3_bf3d0ebd","line":108,"in_reply_to":"9a57fde8_c1aa6470","updated":"2017-01-16 16:32:45.000000000","message":"Done","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"0dd3b25008aecedf3cd1080582e5512293235666","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        return reversed(sorted(weighted_actions.items(), key\u003dlambda x: x[0]))"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def create_scheduled_actions(self, action_plan, graph):"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        for action in graph.nodes():"},{"line_number":225,"context_line":"            LOG.debug(\"Creating the %s in the Watcher database\","},{"line_number":226,"context_line":"                      action.action_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a57fde8_813cdc30","line":223,"updated":"2017-01-12 13:37:47.000000000","message":"TODO: remove extra blank line","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"},{"author":{"_account_id":19055,"name":"Alexander Chadin","email":"joker946@gmail.com","username":"joker946"},"change_message_id":"57b8773c8967134a5cd145b59246a457606694aa","unresolved":false,"context_lines":[{"line_number":220,"context_line":"        return reversed(sorted(weighted_actions.items(), key\u003dlambda x: x[0]))"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"    def create_scheduled_actions(self, action_plan, graph):"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"        for action in graph.nodes():"},{"line_number":225,"context_line":"            LOG.debug(\"Creating the %s in the Watcher database\","},{"line_number":226,"context_line":"                      action.action_type)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a3c09a3_e0838dca","line":223,"in_reply_to":"9a57fde8_813cdc30","updated":"2017-01-16 16:32:45.000000000","message":"Done","commit_id":"ff79841e0001ee6e18cbb493b68c3df958035487"}]}
