)]}'
{"watcher_tempest_plugin/tests/api/admin/base.py":[{"author":{"_account_id":12394,"name":"David TARDIVEL","email":"David.TARDIVEL@b-com.com","username":"David.T"},"change_message_id":"b10a9d9c4023210b6db597b6457565dd4d622047","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        cls.created_audit_templates \u003d set()"},{"line_number":44,"context_line":"        # Set of all created audit UUIDs"},{"line_number":45,"context_line":"        cls.created_audits \u003d set()"},{"line_number":46,"context_line":"        # Set of all audit UUIDs which *may* have created 1+ action plan(s)"},{"line_number":47,"context_line":"        cls.created_action_plans_audit_uuids \u003d set()"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_5a9217f8","line":46,"range":{"start_line":46,"start_character":8,"end_line":46,"end_character":75},"updated":"2016-02-02 14:33:20.000000000","message":"Set of all created audit UUIDs. We use it to build the list of action plans to delete (including potential orphan one(s))","commit_id":"1d6d768ca15fc94d1d61ac29bdeef16bdbbd3a12"},{"author":{"_account_id":12394,"name":"David TARDIVEL","email":"David.TARDIVEL@b-com.com","username":"David.T"},"change_message_id":"b10a9d9c4023210b6db597b6457565dd4d622047","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        \"\"\"Ensure that all created objects get destroyed.\"\"\""},{"line_number":52,"context_line":"        try:"},{"line_number":53,"context_line":"            action_plans_to_be_deleted \u003d set()"},{"line_number":54,"context_line":"            # Phase 1: Make sure all objects are in a final state"},{"line_number":55,"context_line":"            for audit_uuid in cls.created_audits:"},{"line_number":56,"context_line":"                test.call_until_true("},{"line_number":57,"context_line":"                    func\u003dfunctools.partial("}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_fab9837a","line":54,"range":{"start_line":54,"start_character":54,"end_line":54,"end_character":59},"updated":"2016-02-02 14:33:20.000000000","message":"use the same term: final or idle\n\nIMHO, maybe add: \u0027(Some objects can be asynchronously created  after the end of a test).","commit_id":"1d6d768ca15fc94d1d61ac29bdeef16bdbbd3a12"},{"author":{"_account_id":12394,"name":"David TARDIVEL","email":"David.TARDIVEL@b-com.com","username":"David.T"},"change_message_id":"b10a9d9c4023210b6db597b6457565dd4d622047","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            for audit_uuid in cls.created_audits:"},{"line_number":56,"context_line":"                test.call_until_true("},{"line_number":57,"context_line":"                    func\u003dfunctools.partial("},{"line_number":58,"context_line":"                        cls.is_audit_idle, audit_uuid),"},{"line_number":59,"context_line":"                    duration\u003d30,"},{"line_number":60,"context_line":"                    sleep_for\u003d.5"},{"line_number":61,"context_line":"                )"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_3a671b27","line":58,"range":{"start_line":58,"start_character":37,"end_line":58,"end_character":41},"updated":"2016-02-02 14:33:20.000000000","message":"ditto","commit_id":"1d6d768ca15fc94d1d61ac29bdeef16bdbbd3a12"},{"author":{"_account_id":12394,"name":"David TARDIVEL","email":"David.TARDIVEL@b-com.com","username":"David.T"},"change_message_id":"b10a9d9c4023210b6db597b6457565dd4d622047","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                for action_plan in action_plans[\u0027action_plans\u0027]:"},{"line_number":70,"context_line":"                    test.call_until_true("},{"line_number":71,"context_line":"                        func\u003dfunctools.partial("},{"line_number":72,"context_line":"                            cls.is_action_plan_idle, action_plan[\u0027uuid\u0027]),"},{"line_number":73,"context_line":"                        duration\u003d30,"},{"line_number":74,"context_line":"                        sleep_for\u003d.5"},{"line_number":75,"context_line":"                    )"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a5de9d1_5a80d78b","line":72,"range":{"start_line":72,"start_character":47,"end_line":72,"end_character":51},"updated":"2016-02-02 14:33:20.000000000","message":"ditto","commit_id":"1d6d768ca15fc94d1d61ac29bdeef16bdbbd3a12"},{"author":{"_account_id":13289,"name":"Taylor Peoples","email":"tpeoples@us.ibm.com","username":"tpeoples"},"change_message_id":"2b47cef37bd1582871b2487e6c6e1b4a2e87ac4e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\"Ensure that all created objects get destroyed.\"\"\""},{"line_number":58,"context_line":"        try:"},{"line_number":59,"context_line":"            action_plans_to_be_deleted \u003d set()"},{"line_number":60,"context_line":"            # Phase 1: Make sure all objects are in an idle state"},{"line_number":61,"context_line":"            for audit_uuid in cls.created_audits:"},{"line_number":62,"context_line":"                test.call_until_true("},{"line_number":63,"context_line":"                    func\u003dfunctools.partial("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a57f1b5_f1575dc8","line":60,"updated":"2016-02-10 05:54:37.000000000","message":"Seems like we\u0027d want to be able to issue the delete regardless of being in an idle state?  I imagine where a test fails for some reason and the action plan is left hanging in some other state (from a bug).  We\u0027d still want the test to clean up, wouldn\u0027t we?  Just thinking out loud here.","commit_id":"0d0d8a10c009280fb9df27832818bf1214c3fdee"},{"author":{"_account_id":13289,"name":"Taylor Peoples","email":"tpeoples@us.ibm.com","username":"tpeoples"},"change_message_id":"e6996d6aadd2598184d7d3c00eea40ff10bf3d35","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\"Ensure that all created objects get destroyed.\"\"\""},{"line_number":58,"context_line":"        try:"},{"line_number":59,"context_line":"            action_plans_to_be_deleted \u003d set()"},{"line_number":60,"context_line":"            # Phase 1: Make sure all objects are in an idle state"},{"line_number":61,"context_line":"            for audit_uuid in cls.created_audits:"},{"line_number":62,"context_line":"                test.call_until_true("},{"line_number":63,"context_line":"                    func\u003dfunctools.partial("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a57f1b5_e8b0cf8d","line":60,"in_reply_to":"3a57f1b5_2841070c","updated":"2016-02-10 08:39:23.000000000","message":"Thanks - makes sense.  I always forget that call_until_true doesn\u0027t raise anything.","commit_id":"0d0d8a10c009280fb9df27832818bf1214c3fdee"},{"author":{"_account_id":18971,"name":"Vincent Françoise","email":"Vincent.FRANCOISE@b-com.com","username":"v-francoise"},"change_message_id":"e2725f87a26f1a625286a7c0de0c55284af6e82a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        \"\"\"Ensure that all created objects get destroyed.\"\"\""},{"line_number":58,"context_line":"        try:"},{"line_number":59,"context_line":"            action_plans_to_be_deleted \u003d set()"},{"line_number":60,"context_line":"            # Phase 1: Make sure all objects are in an idle state"},{"line_number":61,"context_line":"            for audit_uuid in cls.created_audits:"},{"line_number":62,"context_line":"                test.call_until_true("},{"line_number":63,"context_line":"                    func\u003dfunctools.partial("}],"source_content_type":"text/x-python","patch_set":5,"id":"3a57f1b5_2841070c","line":60,"in_reply_to":"3a57f1b5_f1575dc8","updated":"2016-02-10 08:30:06.000000000","message":"The reason why I did this is because when you create an audit, this may result in the creation of an action plan during its ONGOING state/phase. Also, as we enforce some preconditions before any state transition when using the API (see blueprint statemachine-transition-permission and to a lesser extent blueprint watcher-api-validation), some transitions will be forbidden, i.e. going from RECOMMENDED to DELETED will not be possible and thus we shall have to patch to CANCELLED before deletion (at which point we would have to add an extra bit of code to take it into account).\n\nSo just to make sure I don\u0027t miss anything, I decided to wait up to 30 seconds per object. But if the threshold is reached for one of these objects, it will actually do just as you said by deleting these objects regardless of their current state as call_until_true() only returns a False whenever reaching its threshold (no exception).","commit_id":"0d0d8a10c009280fb9df27832818bf1214c3fdee"}]}
