)]}'
{"doc/source/dev/plugin/action-plugin.rst":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"52cf6b42421ff681cc47d2bf7fbd6f6c6d5ff051","unresolved":false,"context_lines":[{"line_number":205,"context_line":"processed by the planner for creating an action plan which can then be executed"},{"line_number":206,"context_line":"by the Watcher Applier via its workflow engine."},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"At the last, remember to add the new action into the weights in watcher.conf,"},{"line_number":209,"context_line":"otherwise you will get an error when the action be referenced in a strategy."},{"line_number":210,"context_line":""},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"1aa78d24_b78decd4","line":208,"range":{"start_line":208,"start_character":64,"end_line":208,"end_character":76},"updated":"2016-07-07 12:39:18.000000000","message":"can you wrap this like ``watcher.conf`` please?","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"aae5d6c3c83a0fe5ed0aa784e2ee1821e9e905b7","unresolved":false,"context_lines":[{"line_number":205,"context_line":"processed by the planner for creating an action plan which can then be executed"},{"line_number":206,"context_line":"by the Watcher Applier via its workflow engine."},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"At the last, remember to add the new action into the weights in watcher.conf,"},{"line_number":209,"context_line":"otherwise you will get an error when the action be referenced in a strategy."},{"line_number":210,"context_line":""},{"line_number":211,"context_line":""}],"source_content_type":"text/x-rst","patch_set":2,"id":"1aa78d24_60561c07","line":208,"range":{"start_line":208,"start_character":64,"end_line":208,"end_character":76},"in_reply_to":"1aa78d24_b78decd4","updated":"2016-07-07 16:16:33.000000000","message":"Done","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"}],"watcher/decision_engine/planner/default.py":[{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"52cf6b42421ff681cc47d2bf7fbd6f6c6d5ff051","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    This implementation comes with basic rules with a set of action types that"},{"line_number":35,"context_line":"    are weighted. An action having a lower weight will be scheduled before the"},{"line_number":36,"context_line":"    other ones. The set of action types can be specified by \u0027weights\u0027 in the"},{"line_number":37,"context_line":"    watcher.conf. You need add the new action into the weights(default value:"},{"line_number":38,"context_line":"    weights_dict), otherwise you will get an error when the new action be"},{"line_number":39,"context_line":"    referenced in a strategy."},{"line_number":40,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_1a02250a","line":37,"range":{"start_line":37,"start_character":18,"end_line":37,"end_character":62},"updated":"2016-07-07 12:39:18.000000000","message":"You need to associate a different weight to all available actions into the configuration file, otherwise [...]","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"52cf6b42421ff681cc47d2bf7fbd6f6c6d5ff051","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    This implementation comes with basic rules with a set of action types that"},{"line_number":35,"context_line":"    are weighted. An action having a lower weight will be scheduled before the"},{"line_number":36,"context_line":"    other ones. The set of action types can be specified by \u0027weights\u0027 in the"},{"line_number":37,"context_line":"    watcher.conf. You need add the new action into the weights(default value:"},{"line_number":38,"context_line":"    weights_dict), otherwise you will get an error when the new action be"},{"line_number":39,"context_line":"    referenced in a strategy."},{"line_number":40,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_3a59e135","line":37,"range":{"start_line":37,"start_character":4,"end_line":37,"end_character":16},"updated":"2016-07-07 12:39:18.000000000","message":"can you also wrap this in `` `` please?","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"aae5d6c3c83a0fe5ed0aa784e2ee1821e9e905b7","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    This implementation comes with basic rules with a set of action types that"},{"line_number":35,"context_line":"    are weighted. An action having a lower weight will be scheduled before the"},{"line_number":36,"context_line":"    other ones. The set of action types can be specified by \u0027weights\u0027 in the"},{"line_number":37,"context_line":"    watcher.conf. You need add the new action into the weights(default value:"},{"line_number":38,"context_line":"    weights_dict), otherwise you will get an error when the new action be"},{"line_number":39,"context_line":"    referenced in a strategy."},{"line_number":40,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_2092544c","line":37,"range":{"start_line":37,"start_character":18,"end_line":37,"end_character":62},"in_reply_to":"1aa78d24_1a02250a","updated":"2016-07-07 16:16:33.000000000","message":"Done","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"aae5d6c3c83a0fe5ed0aa784e2ee1821e9e905b7","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    This implementation comes with basic rules with a set of action types that"},{"line_number":35,"context_line":"    are weighted. An action having a lower weight will be scheduled before the"},{"line_number":36,"context_line":"    other ones. The set of action types can be specified by \u0027weights\u0027 in the"},{"line_number":37,"context_line":"    watcher.conf. You need add the new action into the weights(default value:"},{"line_number":38,"context_line":"    weights_dict), otherwise you will get an error when the new action be"},{"line_number":39,"context_line":"    referenced in a strategy."},{"line_number":40,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_a0cda467","line":37,"range":{"start_line":37,"start_character":4,"end_line":37,"end_character":16},"in_reply_to":"1aa78d24_3a59e135","updated":"2016-07-07 16:16:33.000000000","message":"Ok,Done","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"52cf6b42421ff681cc47d2bf7fbd6f6c6d5ff051","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    This implementation comes with basic rules with a set of action types that"},{"line_number":35,"context_line":"    are weighted. An action having a lower weight will be scheduled before the"},{"line_number":36,"context_line":"    other ones. The set of action types can be specified by \u0027weights\u0027 in the"},{"line_number":37,"context_line":"    watcher.conf. You need add the new action into the weights(default value:"},{"line_number":38,"context_line":"    weights_dict), otherwise you will get an error when the new action be"},{"line_number":39,"context_line":"    referenced in a strategy."},{"line_number":40,"context_line":"    \"\"\""},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_172e80fa","line":38,"range":{"start_line":37,"start_character":62,"end_line":38,"end_character":17},"updated":"2016-07-07 12:39:18.000000000","message":"IMHO, no need to indicate this since it will be shown in the generated configuration file sample.","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"aae5d6c3c83a0fe5ed0aa784e2ee1821e9e905b7","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    This implementation comes with basic rules with a set of action types that"},{"line_number":35,"context_line":"    are weighted. An action having a lower weight will be scheduled before the"},{"line_number":36,"context_line":"    other ones. The set of action types can be specified by \u0027weights\u0027 in the"},{"line_number":37,"context_line":"    watcher.conf. You need add the new action into the weights(default value:"},{"line_number":38,"context_line":"    weights_dict), otherwise you will get an error when the new action be"},{"line_number":39,"context_line":"    referenced in a strategy."},{"line_number":40,"context_line":"    \"\"\""},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_0018f8d1","line":38,"range":{"start_line":37,"start_character":62,"end_line":38,"end_character":17},"in_reply_to":"1aa78d24_172e80fa","updated":"2016-07-07 16:16:33.000000000","message":"Ok，Done","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"52cf6b42421ff681cc47d2bf7fbd6f6c6d5ff051","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    are weighted. An action having a lower weight will be scheduled before the"},{"line_number":36,"context_line":"    other ones. The set of action types can be specified by \u0027weights\u0027 in the"},{"line_number":37,"context_line":"    watcher.conf. You need add the new action into the weights(default value:"},{"line_number":38,"context_line":"    weights_dict), otherwise you will get an error when the new action be"},{"line_number":39,"context_line":"    referenced in a strategy."},{"line_number":40,"context_line":"    \"\"\""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    weights_dict \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_b7484cb4","line":39,"range":{"start_line":38,"start_character":71,"end_line":39,"end_character":28},"updated":"2016-07-07 12:39:18.000000000","message":"will be referenced in the solution produced by a strategy.","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"aae5d6c3c83a0fe5ed0aa784e2ee1821e9e905b7","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    are weighted. An action having a lower weight will be scheduled before the"},{"line_number":36,"context_line":"    other ones. The set of action types can be specified by \u0027weights\u0027 in the"},{"line_number":37,"context_line":"    watcher.conf. You need add the new action into the weights(default value:"},{"line_number":38,"context_line":"    weights_dict), otherwise you will get an error when the new action be"},{"line_number":39,"context_line":"    referenced in a strategy."},{"line_number":40,"context_line":"    \"\"\""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    weights_dict \u003d {"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_6059fc8d","line":39,"range":{"start_line":38,"start_character":71,"end_line":39,"end_character":28},"in_reply_to":"1aa78d24_b7484cb4","updated":"2016-07-07 16:16:33.000000000","message":"Done","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"52cf6b42421ff681cc47d2bf7fbd6f6c6d5ff051","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        \u0027migrate\u0027: 3,"},{"line_number":47,"context_line":"    }"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def get_config_opts(self):"},{"line_number":50,"context_line":"        return [cfg.DictOpt("},{"line_number":51,"context_line":"            \u0027weights\u0027,"},{"line_number":52,"context_line":"            help\u003d\"These weights are used to schedule the Actions\","}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_5af2ed06","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":30},"updated":"2016-07-07 12:39:18.000000000","message":"this has to be a @classmethod (see https://github.com/openstack/watcher/blob/master/watcher/common/loader/loadable.py#L33-L41):\n\n    def get_config_opts(cls):\n        return [cfg.DictOpt(\n            \u0027weights\u0027,\n            help\u003d\"These weights are used to schedule the actions\",\n            default\u003dcls.weights_dict),\n        ]","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"aae5d6c3c83a0fe5ed0aa784e2ee1821e9e905b7","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        \u0027migrate\u0027: 3,"},{"line_number":47,"context_line":"    }"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def get_config_opts(self):"},{"line_number":50,"context_line":"        return [cfg.DictOpt("},{"line_number":51,"context_line":"            \u0027weights\u0027,"},{"line_number":52,"context_line":"            help\u003d\"These weights are used to schedule the Actions\","}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_11cde830","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":30},"in_reply_to":"1aa78d24_5af2ed06","updated":"2016-07-07 16:16:33.000000000","message":"Done","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"52cf6b42421ff681cc47d2bf7fbd6f6c6d5ff051","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def get_config_opts(self):"},{"line_number":50,"context_line":"        return [cfg.DictOpt("},{"line_number":51,"context_line":"            \u0027weights\u0027,"},{"line_number":52,"context_line":"            help\u003d\"These weights are used to schedule the Actions\","},{"line_number":53,"context_line":"            default\u003dself.weights_dict),"},{"line_number":54,"context_line":"        ]"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_738559cd","line":52,"range":{"start_line":52,"start_character":57,"end_line":52,"end_character":64},"updated":"2016-07-07 12:39:18.000000000","message":"nit: can you lowercase it please?","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"aae5d6c3c83a0fe5ed0aa784e2ee1821e9e905b7","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def get_config_opts(self):"},{"line_number":50,"context_line":"        return [cfg.DictOpt("},{"line_number":51,"context_line":"            \u0027weights\u0027,"},{"line_number":52,"context_line":"            help\u003d\"These weights are used to schedule the Actions\","},{"line_number":53,"context_line":"            default\u003dself.weights_dict),"},{"line_number":54,"context_line":"        ]"},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_807508cc","line":52,"range":{"start_line":52,"start_character":57,"end_line":52,"end_character":64},"in_reply_to":"1aa78d24_738559cd","updated":"2016-07-07 16:16:33.000000000","message":"Done","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"52cf6b42421ff681cc47d2bf7fbd6f6c6d5ff051","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def schedule(self, context, audit_id, solution):"},{"line_number":72,"context_line":"        LOG.debug(\u0027Create an action plan for the audit uuid: %s \u0027, audit_id)"},{"line_number":73,"context_line":"        priorities \u003d self.get_config_opts()"},{"line_number":74,"context_line":"        action_plan \u003d self._create_action_plan(context, audit_id, solution)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        actions \u003d list(solution.actions)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_97a6f0ab","line":73,"range":{"start_line":73,"start_character":8,"end_line":73,"end_character":43},"updated":"2016-07-07 12:39:18.000000000","message":"The way you are trying to get the options here is not correct.\n\nYour config should be accessible like this (see https://github.com/openstack/watcher/blob/master/watcher/common/loader/loadable.py#L30-L31):\n\npriorities \u003d self.config.weights","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"},{"author":{"_account_id":17898,"name":"Jinquan Ni","email":"ni.jinquan@zte.com.cn","username":"jinquanni"},"change_message_id":"aae5d6c3c83a0fe5ed0aa784e2ee1821e9e905b7","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def schedule(self, context, audit_id, solution):"},{"line_number":72,"context_line":"        LOG.debug(\u0027Create an action plan for the audit uuid: %s \u0027, audit_id)"},{"line_number":73,"context_line":"        priorities \u003d self.get_config_opts()"},{"line_number":74,"context_line":"        action_plan \u003d self._create_action_plan(context, audit_id, solution)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        actions \u003d list(solution.actions)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_31caa41b","line":73,"range":{"start_line":73,"start_character":8,"end_line":73,"end_character":43},"in_reply_to":"1aa78d24_97a6f0ab","updated":"2016-07-07 16:16:33.000000000","message":"Done","commit_id":"2c22170e74e065d86d130d6ebc32c203bebbe617"}]}
