)]}'
{"specs/newton/approved/persistent-audit-parameters.rst":[{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"9c903b9e01cfd07b0fc6f7d4fd86fdf18e1125ba","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"dab17558_03eae30e","updated":"2016-05-17 00:04:36.000000000","message":"Work in Progress","commit_id":"6bf103bc4ab4672ed88b29fedb695a767d039218"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"840d304c8e57d07fb29dab902b2b791710201739","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"dab17558_bbb7b283","in_reply_to":"dab17558_03eae30e","updated":"2016-05-19 08:13:45.000000000","message":"FYI, if you want to indicate this is Work In Progress, just add a Workflow -1 to your changeset.","commit_id":"6bf103bc4ab4672ed88b29fedb695a767d039218"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"3ecaff2d21b34ecf7666e305984fc8ab526bd8eb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"bab6814e_1651c30e","in_reply_to":"dab17558_bbb7b283","updated":"2016-05-19 20:44:33.000000000","message":"Done","commit_id":"6bf103bc4ab4672ed88b29fedb695a767d039218"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"840d304c8e57d07fb29dab902b2b791710201739","unresolved":false,"context_lines":[{"line_number":1,"context_line":".."},{"line_number":2,"context_line":" This work is licensed under a Creative Commons Attribution 3.0 Unported"},{"line_number":3,"context_line":" License."},{"line_number":4,"context_line":""},{"line_number":5,"context_line":" http://creativecommons.org/licenses/by/3.0/legalcode"}],"source_content_type":"text/x-rst","patch_set":2,"id":"bab6814e_fea406ba","line":2,"updated":"2016-05-19 08:13:45.000000000","message":"Here below a copy/paste of the important part of the discussion we had yesterday:\n\n\u003d\u003d\u003d\n\n(17:04:19)\t vfrancoise:\t not removing audit_template\n(17:04:38)\t vfrancoise:\t just make a copy of the needed fields from audit template down to the audit\n(17:05:29)\t vfrancoise:\t if you look at https://github.com/openstack/watcher/blob/master/doc/source/images/watcher_class_diagram.png\n(17:06:07)\t hvprash:\t seeing\n(17:06:21)\t vfrancoise:\t we see the foreign key from audit to audit template\n(17:07:08)\t vfrancoise:\t you probably saw that we use this foreign key to retrieve the goal and the strategy that is specified in the audit template\n(17:07:13)\t hvprash:\t yes\n(17:07:33)\t vfrancoise:\t so these are the fields that we would need to copy in the audit\n(17:07:49)\t vfrancoise:\t so that if the associated audit template changes\n(17:07:58)\t vfrancoise:\t the audit wouldn\u0027t be affected\n(17:08:09)\t vfrancoise:\t the other impact I have for my blueprint\n(17:08:52)\t vfrancoise:\t is that at the moment, if you create an audit template with no strategy and with a goal\n(17:09:32)\t vfrancoise:\t there is a strategy selector that will automatically pick the most suited strategy for the goal you specified (only in theory for now)\n(17:10:50)\t vfrancoise:\t and since the audit has no record of which strategy was picked, we lost the bit of information stating the actual name of the strategy the global efficacy I calculated is about \n\n-----\n\n(17:34:23)\t vfrancoise:\t https://github.com/openstack/watcher/blob/master/watcher/decision_engine/strategy/selection/default.py#L64-L68\n(17:34:44)\t vfrancoise:\t this is the strategy selector\n(17:35:58)\t vfrancoise:\t https://github.com/openstack/watcher/blob/master/watcher/decision_engine/strategy/context/default.py#L39-L63\n(17:36:16)\t vfrancoise:\t this is the piece of code that actually calls the strategy selector\n(17:36:40)\t hvprash:\t ic\n(17:37:30)\t vfrancoise:\t and in the latter (line 43), you can see that we have to query the related audit template to the goal ID (line 56)\n(17:37:42)\t vfrancoise:\t so this is the strong coupling that we have to get rid of\n(17:38:14)\t hvprash:\t ok\n(17:39:10)\t vfrancoise:\t and the result of the select() (line 60) also has to be persisted\n(17:40:39)\t vfrancoise:\t that should be all ;)\n(17:41:06)\t hvprash:\t question..\n(17:41:22)\t vfrancoise:\t what is it?\n(17:42:25)\t hvprash:\t where in the code is the action selector based on the strategy result ?\n(17:43:00)\t vfrancoise:\t that\u0027s what I have to do as part of my blueprint actually\n(17:43:08)\t vfrancoise:\t as of now\n(17:43:09)\t hvprash:\t ah ok.. lol\n(17:43:18)\t vfrancoise:\t we pick the 1st one available\n(17:43:51)\t vfrancoise:\t hence the TODO in the first link I sent you\n(17:44:11)\t hvprash:\t understood\n(17:44:37)\t vfrancoise:\t so on my side\n(17:44:49)\t vfrancoise:\t I can compute the efficacy of a strategy\n(17:44:57)\t vfrancoise:\t and store it into the DB\n(17:45:11)\t vfrancoise:\t but I cannot tell to which strategy it refers...\n(17:45:53)\t vfrancoise:\t so I cannot compare them","commit_id":"6bf103bc4ab4672ed88b29fedb695a767d039218"},{"author":{"_account_id":11750,"name":"Antoine Cabot","email":"antoine.cabot@b-com.com","username":"antoinecabot"},"change_message_id":"4ca2a7e899d491d2e2124cf32d784c73c525153a","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"If we create an `Audit Template`_ with no strategy but with a `Goal`_ there"},{"line_number":38,"context_line":"is a strategy selector that will automatically pick the most suited strategy"},{"line_number":39,"context_line":"for the goal we specified (only in theory for now) and since the `Audit`_ has"},{"line_number":40,"context_line":"no record of which strategy was picked, we lose the information stating the"},{"line_number":41,"context_line":"actual name of the strategy and the global efficacy is calculated upon. Also,"},{"line_number":42,"context_line":"there can be a different strategy for an `Audit`_ simply because the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bab6814e_dc645923","line":39,"range":{"start_line":39,"start_character":26,"end_line":39,"end_character":50},"updated":"2016-05-20 13:43:10.000000000","message":"you should mention the BP https://blueprints.launchpad.net/watcher/+spec/get-goal-from-strategy instead","commit_id":"1caf36db2fbabbeb1f8d6f45664a5d0b1d42f1fa"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"4c0ea4dc7ae13b159fd57bfc13b2345e36b41588","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"If we create an `Audit Template`_ with no strategy but with a `Goal`_ there"},{"line_number":38,"context_line":"is a strategy selector that will automatically pick the most suited strategy"},{"line_number":39,"context_line":"for the goal we specified (only in theory for now) and since the `Audit`_ has"},{"line_number":40,"context_line":"no record of which strategy was picked, we lose the information stating the"},{"line_number":41,"context_line":"actual name of the strategy and the global efficacy is calculated upon. Also,"},{"line_number":42,"context_line":"there can be a different strategy for an `Audit`_ simply because the"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bab6814e_d0ef181c","line":39,"range":{"start_line":39,"start_character":26,"end_line":39,"end_character":50},"in_reply_to":"bab6814e_dc645923","updated":"2016-05-20 14:27:41.000000000","message":"will do","commit_id":"1caf36db2fbabbeb1f8d6f45664a5d0b1d42f1fa"},{"author":{"_account_id":11750,"name":"Antoine Cabot","email":"antoine.cabot@b-com.com","username":"antoinecabot"},"change_message_id":"4ca2a7e899d491d2e2124cf32d784c73c525153a","unresolved":false,"context_lines":[{"line_number":52,"context_line":"Addressed in blueprint `get-goal-from-strategy`_"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"3. Handling `Goal`_ parameters in Audit -"},{"line_number":55,"context_line":"Does blueprint `optimization-threshold`_ handle this scenario ?"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"Use Cases"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bab6814e_ff0b0f22","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":63},"updated":"2016-05-20 13:43:10.000000000","message":"no, to my understanding, this is handled by https://blueprints.launchpad.net/watcher/+spec/get-goal-from-strategy","commit_id":"1caf36db2fbabbeb1f8d6f45664a5d0b1d42f1fa"},{"author":{"_account_id":11750,"name":"Antoine Cabot","email":"antoine.cabot@b-com.com","username":"antoinecabot"},"change_message_id":"4ca2a7e899d491d2e2124cf32d784c73c525153a","unresolved":false,"context_lines":[{"line_number":61,"context_line":"I need to ensure data integrity and consistency of an `Audit`_ when an"},{"line_number":62,"context_line":"`Audit Template`_ is updated or removed."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"As an `Administrator`_"},{"line_number":65,"context_line":"I should be able to set an optimal `Strategy`_ to an `Audit`_ based on the"},{"line_number":66,"context_line":"recommendation and efficacy indicators"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"As an `Administrator`_"},{"line_number":69,"context_line":"I should not be allowed to remove an `Audit Template`_ if there is an active"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bab6814e_5f433b42","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":38},"updated":"2016-05-20 13:43:10.000000000","message":"I don\u0027t think this particular use case is part of this BP","commit_id":"1caf36db2fbabbeb1f8d6f45664a5d0b1d42f1fa"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"1a5927c4601e32aebc08441099c67cc76e7d862c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"I need to ensure data integrity and consistency of an `Audit`_ when an"},{"line_number":62,"context_line":"`Audit Template`_ is updated or removed."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"As an `Administrator`_"},{"line_number":65,"context_line":"I should be able to set an optimal `Strategy`_ to an `Audit`_ based on the"},{"line_number":66,"context_line":"recommendation and efficacy indicators"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"As an `Administrator`_"},{"line_number":69,"context_line":"I should not be allowed to remove an `Audit Template`_ if there is an active"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bab6814e_96a58848","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":38},"in_reply_to":"bab6814e_10a880da","updated":"2016-05-20 15:11:49.000000000","message":"You are right, removed this use case","commit_id":"1caf36db2fbabbeb1f8d6f45664a5d0b1d42f1fa"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"4c0ea4dc7ae13b159fd57bfc13b2345e36b41588","unresolved":false,"context_lines":[{"line_number":61,"context_line":"I need to ensure data integrity and consistency of an `Audit`_ when an"},{"line_number":62,"context_line":"`Audit Template`_ is updated or removed."},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"As an `Administrator`_"},{"line_number":65,"context_line":"I should be able to set an optimal `Strategy`_ to an `Audit`_ based on the"},{"line_number":66,"context_line":"recommendation and efficacy indicators"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"As an `Administrator`_"},{"line_number":69,"context_line":"I should not be allowed to remove an `Audit Template`_ if there is an active"}],"source_content_type":"text/x-rst","patch_set":3,"id":"bab6814e_10a880da","line":66,"range":{"start_line":64,"start_character":0,"end_line":66,"end_character":38},"in_reply_to":"bab6814e_5f433b42","updated":"2016-05-20 14:27:41.000000000","message":"Agreed, should have re-phrased it to support the persistency to acheive that.","commit_id":"1caf36db2fbabbeb1f8d6f45664a5d0b1d42f1fa"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"ffb0869021ab747265e7fdabfc50e02544e24c37","unresolved":false,"context_lines":[{"line_number":59,"context_line":"I need to ensure data integrity and consistency of an `Audit`_ when an"},{"line_number":60,"context_line":"`Audit Template`_ is updated or removed."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"As an `Administrator`_"},{"line_number":63,"context_line":"I should not be allowed to remove an `Audit Template`_ if there is an active"},{"line_number":64,"context_line":"`Audit`_ associated with the template."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"Project Priority"}],"source_content_type":"text/x-rst","patch_set":5,"id":"bab6814e_0746534e","line":64,"range":{"start_line":62,"start_character":0,"end_line":64,"end_character":38},"updated":"2016-05-23 09:12:13.000000000","message":"If all the needed information are present in the Audit table, then how about we simply de-reference the audit whenever we want to delete an audit template?","commit_id":"0ddd115da35ba940e94a102b9eb7867e0ee85d23"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"b7ccc3fe57785f722824660d0024d9b0566b232d","unresolved":false,"context_lines":[{"line_number":59,"context_line":"I need to ensure data integrity and consistency of an `Audit`_ when an"},{"line_number":60,"context_line":"`Audit Template`_ is updated or removed."},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"As an `Administrator`_"},{"line_number":63,"context_line":"I should not be allowed to remove an `Audit Template`_ if there is an active"},{"line_number":64,"context_line":"`Audit`_ associated with the template."},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"Project Priority"}],"source_content_type":"text/x-rst","patch_set":5,"id":"bab6814e_a55c8d19","line":64,"range":{"start_line":62,"start_character":0,"end_line":64,"end_character":38},"in_reply_to":"bab6814e_0746534e","updated":"2016-05-23 14:34:51.000000000","message":"Agree. Will update","commit_id":"0ddd115da35ba940e94a102b9eb7867e0ee85d23"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"ffb0869021ab747265e7fdabfc50e02544e24c37","unresolved":false,"context_lines":[{"line_number":127,"context_line":"  | type              | varchar(20) | YES  |     | NULL    |                |"},{"line_number":128,"context_line":"  | state             | varchar(20) | YES  |     | NULL    |                |"},{"line_number":129,"context_line":"  | deadline          | datetime    | YES  |     | NULL    |                |"},{"line_number":130,"context_line":"  | audit_template_id | int(11)     | NO   | MUL | NULL    |                |"},{"line_number":131,"context_line":"  | goal_id           | int(11)     | NO   | MUL | NULL    |                |"},{"line_number":132,"context_line":"  | strategy_id       | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":133,"context_line":"  +-------------------+-------------+------+-----+---------+----------------+"}],"source_content_type":"text/x-rst","patch_set":5,"id":"bab6814e_a7f2e703","line":130,"range":{"start_line":130,"start_character":38,"end_line":130,"end_character":40},"updated":"2016-05-23 09:12:13.000000000","message":"As stated in my previous comment, how about making this nullable?","commit_id":"0ddd115da35ba940e94a102b9eb7867e0ee85d23"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"b7ccc3fe57785f722824660d0024d9b0566b232d","unresolved":false,"context_lines":[{"line_number":127,"context_line":"  | type              | varchar(20) | YES  |     | NULL    |                |"},{"line_number":128,"context_line":"  | state             | varchar(20) | YES  |     | NULL    |                |"},{"line_number":129,"context_line":"  | deadline          | datetime    | YES  |     | NULL    |                |"},{"line_number":130,"context_line":"  | audit_template_id | int(11)     | NO   | MUL | NULL    |                |"},{"line_number":131,"context_line":"  | goal_id           | int(11)     | NO   | MUL | NULL    |                |"},{"line_number":132,"context_line":"  | strategy_id       | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":133,"context_line":"  +-------------------+-------------+------+-----+---------+----------------+"}],"source_content_type":"text/x-rst","patch_set":5,"id":"bab6814e_a5b3ed4b","line":130,"range":{"start_line":130,"start_character":38,"end_line":130,"end_character":40},"in_reply_to":"bab6814e_a7f2e703","updated":"2016-05-23 14:34:51.000000000","message":"Done","commit_id":"0ddd115da35ba940e94a102b9eb7867e0ee85d23"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"ffb0869021ab747265e7fdabfc50e02544e24c37","unresolved":false,"context_lines":[{"line_number":205,"context_line":"  - ``/watcher/objects/audit_template.py``"},{"line_number":206,"context_line":"  - ``/watcher/objects/audit.py``"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"Dependencies"},{"line_number":211,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"bab6814e_673abf9a","line":208,"updated":"2016-05-23 09:12:13.000000000","message":"As a side effect of my proposition, we would have to rework the purge script here. Indeed, the purge script currently assume that there is a strong relationship between an audit template and an audit. So if we were to loosen this relationship, we also have to reflect this change in the purge.","commit_id":"0ddd115da35ba940e94a102b9eb7867e0ee85d23"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"b7ccc3fe57785f722824660d0024d9b0566b232d","unresolved":false,"context_lines":[{"line_number":205,"context_line":"  - ``/watcher/objects/audit_template.py``"},{"line_number":206,"context_line":"  - ``/watcher/objects/audit.py``"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"Dependencies"},{"line_number":211,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/x-rst","patch_set":5,"id":"bab6814e_802977e8","line":208,"in_reply_to":"bab6814e_673abf9a","updated":"2016-05-23 14:34:51.000000000","message":"Thx ! Will include these.","commit_id":"0ddd115da35ba940e94a102b9eb7867e0ee85d23"},{"author":{"_account_id":7664,"name":"Joe Cropper","email":"jwcroppe@us.ibm.com","username":"jwcroppe"},"change_message_id":"048191bbd365d476858de5e11ea5cdc3162289b6","unresolved":false,"context_lines":[{"line_number":18,"context_line":"to an `Audit Template`_ object."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"When processing an audit request, parameters taken into account by the"},{"line_number":21,"context_line":"Watcher DE come from `Audit`_ object itself and also from"},{"line_number":22,"context_line":"`Audit Template`_ ones (goal name, ...)."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Problems:"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_f52939e7","line":21,"updated":"2016-06-01 15:37:50.000000000","message":"please spell out \u0027DE\u0027 as decision engine","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":7664,"name":"Joe Cropper","email":"jwcroppe@us.ibm.com","username":"jwcroppe"},"change_message_id":"048191bbd365d476858de5e11ea5cdc3162289b6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"Project Priority"},{"line_number":67,"context_line":"-----------------"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Not relevant because Watcher is not in the big tent so far."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_f58c99db","line":69,"updated":"2016-06-01 15:37:50.000000000","message":"No longer true.  :-)","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":16495,"name":"Jean-Emile DARTOIS","email":"jean-emile.dartois@b-com.com","username":"JeD"},"change_message_id":"4dadc79009b8cec0889bd37166d870dbb2220644","unresolved":false,"context_lines":[{"line_number":66,"context_line":"Project Priority"},{"line_number":67,"context_line":"-----------------"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"Not relevant because Watcher is not in the big tent so far."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"Proposed change"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_8bad2e9d","line":69,"in_reply_to":"9abb7d3a_f58c99db","updated":"2016-06-01 15:51:34.000000000","message":"Yeah !","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"672aac125d055a33dc00651c8db7c525f67d758d","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Alternatives"},{"line_number":78,"context_line":"------------"},{"line_number":79,"context_line":"None"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Data model impact"},{"line_number":82,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"bab6814e_b20a51d0","line":79,"updated":"2016-05-26 14:44:32.000000000","message":"What about the alternative to make audit template records immutable? IOW, when you want to modify a template, it leaves the old template record in place, and creates a new record with the modifications? The old record could be marked as inactive so that it doesn\u0027t show up in a template listing, but is available for audits which used it. This is a more common approach for related data records.","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":7664,"name":"Joe Cropper","email":"jwcroppe@us.ibm.com","username":"jwcroppe"},"change_message_id":"048191bbd365d476858de5e11ea5cdc3162289b6","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Alternatives"},{"line_number":78,"context_line":"------------"},{"line_number":79,"context_line":"None"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Data model impact"},{"line_number":82,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_089ae46d","line":79,"in_reply_to":"9abb7d3a_a999f121","updated":"2016-06-01 15:37:50.000000000","message":"Hmm, there is also other information in the audit template such as aggregate id.  As more data comes into the template, we\u0027d need to keep copying this information into the audit structure as well to really know what was happening.  It really seems like Ed\u0027s idea is a more appropriate long-term solution and probably isn\u0027t really much more work than what\u0027s being proposed here... and keeps the audit data more \u0027pure\u0027 IMO.\n\nIf we go down the path of pushing all the template data into the audit, we should minimally delete the reference to the template id from the audit since it\u0027s essentially non-trustworthy data.","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"4cf3077d9ddcc15df35589ca9d24aa4253580d0d","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Alternatives"},{"line_number":78,"context_line":"------------"},{"line_number":79,"context_line":"None"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Data model impact"},{"line_number":82,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_8cc9d1ae","line":79,"in_reply_to":"9abb7d3a_a999f121","updated":"2016-06-01 13:45:19.000000000","message":"Yeah, I thought about this. My initial solution was to make it immutable by setting a flag. Anyways I will add this as an alternative.","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"987b59ef628bb3925d5fe799d724e25c87c948ab","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Alternatives"},{"line_number":78,"context_line":"------------"},{"line_number":79,"context_line":"None"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Data model impact"},{"line_number":82,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_5bca621b","line":79,"in_reply_to":"9abb7d3a_c8945c8c","updated":"2016-06-03 18:35:23.000000000","message":"It will be ideal for audit to refer an immutable audit template so we don\u0027t keep copying the fields. At a minimum we will still need strategy_id and goal_id  in audit structure because strategy selection criteria can change over time for an audit object (Ref. https://blueprints.launchpad.net/watcher/+spec/efficacy-indicator and https://blueprints.launchpad.net/watcher/+spec/watcher-strategy-selector)\nFor other generic information like host aggregate_id etc it can refer to the audit_template.","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":7664,"name":"Joe Cropper","email":"jwcroppe@us.ibm.com","username":"jwcroppe"},"change_message_id":"048191bbd365d476858de5e11ea5cdc3162289b6","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Alternatives"},{"line_number":78,"context_line":"------------"},{"line_number":79,"context_line":"None"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Data model impact"},{"line_number":82,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_c8945c8c","line":79,"in_reply_to":"bab6814e_b20a51d0","updated":"2016-06-01 15:37:50.000000000","message":"Good suggestion, Ed.  I actually somewhat prefer this solution.","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":11750,"name":"Antoine Cabot","email":"antoine.cabot@b-com.com","username":"antoinecabot"},"change_message_id":"b9d967e321f748ad774aff7bf9591d201325e210","unresolved":false,"context_lines":[{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Alternatives"},{"line_number":78,"context_line":"------------"},{"line_number":79,"context_line":"None"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"Data model impact"},{"line_number":82,"context_line":"-----------------"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_a999f121","line":79,"in_reply_to":"bab6814e_b20a51d0","updated":"2016-05-27 08:53:11.000000000","message":"You are right Ed, we should add this as an alternative.\nIMHO, audit templates are small objects today (2 fields to copy in Audit) so I don\u0027t want to have to deal with \"inactive\" audit templates in the DB. In the future, if templates become more consistent; we will look at this alternative.","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":11750,"name":"Antoine Cabot","email":"antoine.cabot@b-com.com","username":"antoinecabot"},"change_message_id":"b9d967e321f748ad774aff7bf9591d201325e210","unresolved":false,"context_lines":[{"line_number":126,"context_line":"  | type              | varchar(20) | YES  |     | NULL    |                |"},{"line_number":127,"context_line":"  | state             | varchar(20) | YES  |     | NULL    |                |"},{"line_number":128,"context_line":"  | deadline          | datetime    | YES  |     | NULL    |                |"},{"line_number":129,"context_line":"  | audit_template_id | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":130,"context_line":"  | goal_id           | int(11)     | NO   | MUL | NULL    |                |"},{"line_number":131,"context_line":"  | strategy_id       | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":132,"context_line":"  +-------------------+-------------+------+-----+---------+----------------+"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_047c6471","line":129,"range":{"start_line":129,"start_character":4,"end_line":129,"end_character":21},"updated":"2016-05-27 08:53:11.000000000","message":"why should we keep a reference to the audit template ? If we consider that the template is simply a way to pre-fill audit parameters, we probably do not need to keep a reference in the audit object. It will also simplify purge mechanism.","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":7664,"name":"Joe Cropper","email":"jwcroppe@us.ibm.com","username":"jwcroppe"},"change_message_id":"048191bbd365d476858de5e11ea5cdc3162289b6","unresolved":false,"context_lines":[{"line_number":126,"context_line":"  | type              | varchar(20) | YES  |     | NULL    |                |"},{"line_number":127,"context_line":"  | state             | varchar(20) | YES  |     | NULL    |                |"},{"line_number":128,"context_line":"  | deadline          | datetime    | YES  |     | NULL    |                |"},{"line_number":129,"context_line":"  | audit_template_id | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":130,"context_line":"  | goal_id           | int(11)     | NO   | MUL | NULL    |                |"},{"line_number":131,"context_line":"  | strategy_id       | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":132,"context_line":"  +-------------------+-------------+------+-----+---------+----------------+"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_68b9f0cb","line":129,"range":{"start_line":129,"start_character":4,"end_line":129,"end_character":21},"in_reply_to":"9abb7d3a_047c6471","updated":"2016-06-01 15:37:50.000000000","message":"Agreed - the reference essentially becomes useless.","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"4cf3077d9ddcc15df35589ca9d24aa4253580d0d","unresolved":false,"context_lines":[{"line_number":126,"context_line":"  | type              | varchar(20) | YES  |     | NULL    |                |"},{"line_number":127,"context_line":"  | state             | varchar(20) | YES  |     | NULL    |                |"},{"line_number":128,"context_line":"  | deadline          | datetime    | YES  |     | NULL    |                |"},{"line_number":129,"context_line":"  | audit_template_id | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":130,"context_line":"  | goal_id           | int(11)     | NO   | MUL | NULL    |                |"},{"line_number":131,"context_line":"  | strategy_id       | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":132,"context_line":"  +-------------------+-------------+------+-----+---------+----------------+"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_8c40b108","line":129,"range":{"start_line":129,"start_character":4,"end_line":129,"end_character":21},"in_reply_to":"9abb7d3a_047c6471","updated":"2016-06-01 13:45:19.000000000","message":"Done","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"987b59ef628bb3925d5fe799d724e25c87c948ab","unresolved":false,"context_lines":[{"line_number":126,"context_line":"  | type              | varchar(20) | YES  |     | NULL    |                |"},{"line_number":127,"context_line":"  | state             | varchar(20) | YES  |     | NULL    |                |"},{"line_number":128,"context_line":"  | deadline          | datetime    | YES  |     | NULL    |                |"},{"line_number":129,"context_line":"  | audit_template_id | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":130,"context_line":"  | goal_id           | int(11)     | NO   | MUL | NULL    |                |"},{"line_number":131,"context_line":"  | strategy_id       | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":132,"context_line":"  +-------------------+-------------+------+-----+---------+----------------+"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_36821595","line":129,"range":{"start_line":129,"start_character":4,"end_line":129,"end_character":21},"in_reply_to":"9abb7d3a_68b9f0cb","updated":"2016-06-03 18:35:23.000000000","message":"See my comments in alternatives section. We may need audit_template_id for reference to other information in audit template.","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":11750,"name":"Antoine Cabot","email":"antoine.cabot@b-com.com","username":"antoinecabot"},"change_message_id":"b9d967e321f748ad774aff7bf9591d201325e210","unresolved":false,"context_lines":[{"line_number":128,"context_line":"  | deadline          | datetime    | YES  |     | NULL    |                |"},{"line_number":129,"context_line":"  | audit_template_id | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":130,"context_line":"  | goal_id           | int(11)     | NO   | MUL | NULL    |                |"},{"line_number":131,"context_line":"  | strategy_id       | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":132,"context_line":"  +-------------------+-------------+------+-----+---------+----------------+"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"  +---------------------+--------------------------------------+"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_648d707b","line":131,"range":{"start_line":131,"start_character":38,"end_line":131,"end_character":41},"updated":"2016-05-27 08:53:11.000000000","message":"IMO, strategy_id cannot be Null","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"4cf3077d9ddcc15df35589ca9d24aa4253580d0d","unresolved":false,"context_lines":[{"line_number":128,"context_line":"  | deadline          | datetime    | YES  |     | NULL    |                |"},{"line_number":129,"context_line":"  | audit_template_id | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":130,"context_line":"  | goal_id           | int(11)     | NO   | MUL | NULL    |                |"},{"line_number":131,"context_line":"  | strategy_id       | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":132,"context_line":"  +-------------------+-------------+------+-----+---------+----------------+"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"  +---------------------+--------------------------------------+"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_8cd0b1ca","line":131,"range":{"start_line":131,"start_character":38,"end_line":131,"end_character":41},"in_reply_to":"9abb7d3a_648d707b","updated":"2016-06-01 13:45:19.000000000","message":"My understanding was when we create a new audit, the strategy-id is optional and initially set to null. Later the strategy selector will update it.  Am I wrong ?","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"592a2135cf15086781d90b49582dd87d5776a62e","unresolved":false,"context_lines":[{"line_number":128,"context_line":"  | deadline          | datetime    | YES  |     | NULL    |                |"},{"line_number":129,"context_line":"  | audit_template_id | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":130,"context_line":"  | goal_id           | int(11)     | NO   | MUL | NULL    |                |"},{"line_number":131,"context_line":"  | strategy_id       | int(11)     | YES  | MUL | NULL    |                |"},{"line_number":132,"context_line":"  +-------------------+-------------+------+-----+---------+----------------+"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"  +---------------------+--------------------------------------+"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_6f11ff03","line":131,"range":{"start_line":131,"start_character":38,"end_line":131,"end_character":41},"in_reply_to":"9abb7d3a_8cd0b1ca","updated":"2016-06-01 15:51:50.000000000","message":"You are correct. When the audit is created from an audit template, Watcher will automatically select a strategy if none is provided (see https://github.com/openstack/watcher/blob/master/watcher/decision_engine/strategy/context/default.py#L60). But because this is a 2-steps process, you actually have to keep the strategy_id nullable even though this means that at this stage, we should always know the strategy the audit shall execute. I guess this 2-step setup should be documented somewhere.","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":11750,"name":"Antoine Cabot","email":"antoine.cabot@b-com.com","username":"antoinecabot"},"change_message_id":"b9d967e321f748ad774aff7bf9591d201325e210","unresolved":false,"context_lines":[{"line_number":205,"context_line":"  - ``/watcher/objects/audit.py``"},{"line_number":206,"context_line":"  - ``/watcher/db/purge.py``"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_c4737cb3","line":208,"updated":"2016-05-27 08:53:11.000000000","message":"there is probably also an impact on python-watcherclient","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"},{"author":{"_account_id":9392,"name":"Prashanth Hari","email":"hvprash@gmail.com","username":"hvprash"},"change_message_id":"4cf3077d9ddcc15df35589ca9d24aa4253580d0d","unresolved":false,"context_lines":[{"line_number":205,"context_line":"  - ``/watcher/objects/audit.py``"},{"line_number":206,"context_line":"  - ``/watcher/db/purge.py``"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":""},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"Dependencies"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9abb7d3a_acd935f5","line":208,"in_reply_to":"9abb7d3a_c4737cb3","updated":"2016-06-01 13:45:19.000000000","message":"Done","commit_id":"94a21f5ad53527b51b052926e2da539279d36988"}]}
