)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"2f6dd790394bea8e90a339fef77a105cf6decfbe","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     kairat_kushaev \u003ckkushaev@mirantis.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-05-27 12:30:23 +0300"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add create-snapshot-restore-delete stack scenario"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The patch adds rally scenario that tests the following"},{"line_number":10,"context_line":"sequence of actions for Heat:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"7a016987_8a41bd65","line":7,"updated":"2015-05-29 00:50:44.000000000","message":"Please prefix with [Heat] or \u0027heat:\u0027","commit_id":"612581d048603cd4dc732feeff3e3edae62739b8"}],"rally-jobs/rally.yaml":[{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"4fd3cfeef2ce86b3983a0f17e0a175b83e3f696e","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        concurrency: 3"},{"line_number":898,"context_line":"      context:"},{"line_number":899,"context_line":"        users:"},{"line_number":900,"context_line":"          tenants: 3"},{"line_number":901,"context_line":"          users_per_tenant: 3"},{"line_number":902,"context_line":"      sla:"},{"line_number":903,"context_line":"        failure_rate:"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5afe65bd_4b6f62c5","line":900,"updated":"2015-06-04 01:24:42.000000000","message":"It makes no sense to create more users than needed to perform all iterations:\n\n    3 tenants * 3 users_per_tenant \u003d 9 \u003e 6 (times)\n\nSo please use here\n\n    tenants: 2","commit_id":"58e729490491571cd35fc900aa25eb41fa7cce97"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"26a62a918726d007a6f1e0336c8ade38edd59408","unresolved":false,"context_lines":[{"line_number":897,"context_line":"        concurrency: 3"},{"line_number":898,"context_line":"      context:"},{"line_number":899,"context_line":"        users:"},{"line_number":900,"context_line":"          tenants: 3"},{"line_number":901,"context_line":"          users_per_tenant: 3"},{"line_number":902,"context_line":"      sla:"},{"line_number":903,"context_line":"        failure_rate:"}],"source_content_type":"text/x-yaml","patch_set":8,"id":"5afe65bd_04def0dc","line":900,"in_reply_to":"5afe65bd_4b6f62c5","updated":"2015-06-04 10:05:36.000000000","message":"Done. Thanks for comment.","commit_id":"58e729490491571cd35fc900aa25eb41fa7cce97"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"359dd7120f5c342e9431b5c0194b6ebd85f684c5","unresolved":false,"context_lines":[{"line_number":675,"context_line":"        failure_rate:"},{"line_number":676,"context_line":"          max: 0"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"  Authenticate.keystone:"},{"line_number":680,"context_line":"    -"},{"line_number":681,"context_line":"      runner:"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"fa32b979_11740ffb","side":"PARENT","line":678,"updated":"2015-06-16 14:04:08.000000000","message":"Seems like an unrelated change.","commit_id":"e4b0df0e9ea4f0f48b5bad7e68b06e9d912eb167"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"2ba610a28f65dc65264321da56c270af8adc4439","unresolved":false,"context_lines":[{"line_number":675,"context_line":"        failure_rate:"},{"line_number":676,"context_line":"          max: 0"},{"line_number":677,"context_line":""},{"line_number":678,"context_line":""},{"line_number":679,"context_line":"  Authenticate.keystone:"},{"line_number":680,"context_line":"    -"},{"line_number":681,"context_line":"      runner:"}],"source_content_type":"text/x-yaml","patch_set":16,"id":"fa32b979_3bd462ea","side":"PARENT","line":678,"in_reply_to":"fa32b979_11740ffb","updated":"2015-06-17 12:47:46.000000000","message":"I did it when rebasing a patch.\nThe typical distance should be one line. So it would be good if folks excuse me for this little fix.","commit_id":"e4b0df0e9ea4f0f48b5bad7e68b06e9d912eb167"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"cee58e5af9ba6efc514cc7c12b5ac159db2dee8d","unresolved":false,"context_lines":[{"line_number":745,"context_line":"        failure_rate:"},{"line_number":746,"context_line":"          max: 0"},{"line_number":747,"context_line":""},{"line_number":748,"context_line":""},{"line_number":749,"context_line":"  Authenticate.keystone:"},{"line_number":750,"context_line":"    -"},{"line_number":751,"context_line":"      runner:"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"fa32b979_6504f9c5","side":"PARENT","line":748,"updated":"2015-06-20 03:04:26.000000000","message":"please in future avoid such changes..","commit_id":"02772b1c704e945d8e990e462138eb0c4cb36074"}],"rally/plugins/openstack/scenarios/heat/stacks.py":[{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"cee58e5af9ba6efc514cc7c12b5ac159db2dee8d","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        heat stack-create"},{"line_number":192,"context_line":"        heat stack-snapshot"},{"line_number":193,"context_line":"        heat stack-restore"},{"line_number":194,"context_line":"        heat stack-delete"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        :param template_path: path to stack template file"},{"line_number":197,"context_line":"        :param parameters: parameters to use in heat template"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa32b979_250ef1e5","line":194,"updated":"2015-06-20 03:04:26.000000000","message":"I would prefer to see deleted restored stack in this scenario as well.","commit_id":"deb1622aff437eeac661b2344f455bc55b63ce68"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"fd835ce3d338f7ad59a749f51cc8e92d1c546679","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        heat stack-create"},{"line_number":192,"context_line":"        heat stack-snapshot"},{"line_number":193,"context_line":"        heat stack-restore"},{"line_number":194,"context_line":"        heat stack-delete"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        :param template_path: path to stack template file"},{"line_number":197,"context_line":"        :param parameters: parameters to use in heat template"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa32b979_f563b7db","line":194,"in_reply_to":"fa32b979_250ef1e5","updated":"2015-06-22 13:57:19.000000000","message":"Ok, I think we don\u0027t need this:\n1) Snapshot will be deleted together with stack (this is heat logic)\n2) Restored stack and initial stack are the same instances (so we need to delete stack once).","commit_id":"deb1622aff437eeac661b2344f455bc55b63ce68"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"34008949965e2ba7e664ad428a3962190d4f1e69","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        heat stack-create"},{"line_number":192,"context_line":"        heat stack-snapshot"},{"line_number":193,"context_line":"        heat stack-restore"},{"line_number":194,"context_line":"        heat stack-delete"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        :param template_path: path to stack template file"},{"line_number":197,"context_line":"        :param parameters: parameters to use in heat template"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa32b979_fdb94416","line":194,"in_reply_to":"fa32b979_f563b7db","updated":"2015-06-23 00:30:40.000000000","message":"Great could you rebase this patch and I will merge it.","commit_id":"deb1622aff437eeac661b2344f455bc55b63ce68"}],"rally/plugins/openstack/scenarios/heat/utils.py":[{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"4fd3cfeef2ce86b3983a0f17e0a175b83e3f696e","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @base.atomic_action_timer(\"heat.snapshot_stack\")"},{"line_number":242,"context_line":"    def _snapshot_stack(self, stack):"},{"line_number":243,"context_line":"        \"\"\"Creates a snapshots for given stack."},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        :param stack: stack that will be used as base for snapshot"},{"line_number":246,"context_line":"        :return updated stack and created snapshot"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_cb91129b","line":243,"updated":"2015-06-04 01:24:42.000000000","message":"Please correct:\n\n    Creates a snapshot for a given stack.","commit_id":"58e729490491571cd35fc900aa25eb41fa7cce97"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"26a62a918726d007a6f1e0336c8ade38edd59408","unresolved":false,"context_lines":[{"line_number":240,"context_line":""},{"line_number":241,"context_line":"    @base.atomic_action_timer(\"heat.snapshot_stack\")"},{"line_number":242,"context_line":"    def _snapshot_stack(self, stack):"},{"line_number":243,"context_line":"        \"\"\"Creates a snapshots for given stack."},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        :param stack: stack that will be used as base for snapshot"},{"line_number":246,"context_line":"        :return updated stack and created snapshot"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_c4569829","line":243,"in_reply_to":"5afe65bd_cb91129b","updated":"2015-06-04 10:05:36.000000000","message":"Done","commit_id":"58e729490491571cd35fc900aa25eb41fa7cce97"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"4fd3cfeef2ce86b3983a0f17e0a175b83e3f696e","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        \"\"\"Creates a snapshots for given stack."},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        :param stack: stack that will be used as base for snapshot"},{"line_number":246,"context_line":"        :return updated stack and created snapshot"},{"line_number":247,"context_line":"        \"\"\""},{"line_number":248,"context_line":"        snapshot \u003d self.clients(\"heat\").stacks.snapshot("},{"line_number":249,"context_line":"            stack.id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_4bf402f1","line":246,"updated":"2015-06-04 01:24:42.000000000","message":"Should be\n\n    :returns: ...\n\nAlso seems like you are returning just the snapshot, not the stack","commit_id":"58e729490491571cd35fc900aa25eb41fa7cce97"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"26a62a918726d007a6f1e0336c8ade38edd59408","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        \"\"\"Creates a snapshots for given stack."},{"line_number":244,"context_line":""},{"line_number":245,"context_line":"        :param stack: stack that will be used as base for snapshot"},{"line_number":246,"context_line":"        :return updated stack and created snapshot"},{"line_number":247,"context_line":"        \"\"\""},{"line_number":248,"context_line":"        snapshot \u003d self.clients(\"heat\").stacks.snapshot("},{"line_number":249,"context_line":"            stack.id)"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_04283099","line":246,"in_reply_to":"5afe65bd_4bf402f1","updated":"2015-06-04 10:05:36.000000000","message":"Done","commit_id":"58e729490491571cd35fc900aa25eb41fa7cce97"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"4fd3cfeef2ce86b3983a0f17e0a175b83e3f696e","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        snapshot \u003d self.clients(\"heat\").stacks.snapshot("},{"line_number":249,"context_line":"            stack.id)"},{"line_number":250,"context_line":"        bench_utils.wait_for("},{"line_number":251,"context_line":"            stack,"},{"line_number":252,"context_line":"            is_ready\u003dbench_utils.resource_is(\"SNAPSHOT_COMPLETE\"),"},{"line_number":253,"context_line":"            update_resource\u003dbench_utils.get_from_manager("},{"line_number":254,"context_line":"                [\"SNAPSHOT_FAILED\"]),"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_2b454616","line":251,"updated":"2015-06-04 01:24:42.000000000","message":"Just a question: can we check for the status of the snapshot, not for the status of the stack? This would be more consistent.","commit_id":"58e729490491571cd35fc900aa25eb41fa7cce97"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"26a62a918726d007a6f1e0336c8ade38edd59408","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        snapshot \u003d self.clients(\"heat\").stacks.snapshot("},{"line_number":249,"context_line":"            stack.id)"},{"line_number":250,"context_line":"        bench_utils.wait_for("},{"line_number":251,"context_line":"            stack,"},{"line_number":252,"context_line":"            is_ready\u003dbench_utils.resource_is(\"SNAPSHOT_COMPLETE\"),"},{"line_number":253,"context_line":"            update_resource\u003dbench_utils.get_from_manager("},{"line_number":254,"context_line":"                [\"SNAPSHOT_FAILED\"]),"}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_af46d54c","line":251,"in_reply_to":"5afe65bd_2b454616","updated":"2015-06-04 10:05:36.000000000","message":"Unfortunately, it is not possible right now.\nSnapshots are not managed by separate manager in client, so we don\u0027t have get method for snapshot. So it will require specific changes in heatclient or rally bench_utils.","commit_id":"58e729490491571cd35fc900aa25eb41fa7cce97"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"4fd3cfeef2ce86b3983a0f17e0a175b83e3f696e","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    def _restore_stack(self, stack, snapshot_id):"},{"line_number":261,"context_line":"        \"\"\"Restores stack from given snapshot."},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        :param stack: stack that will be restored from snapshot"},{"line_number":264,"context_line":"        \"\"\""},{"line_number":265,"context_line":"        self.clients(\"heat\").stacks.restore(stack.id, snapshot_id)"},{"line_number":266,"context_line":"        bench_utils.wait_for("}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_cbe8f212","line":263,"updated":"2015-06-04 01:24:42.000000000","message":"Please add\n\n    :param snapshot_id: ...","commit_id":"58e729490491571cd35fc900aa25eb41fa7cce97"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"26a62a918726d007a6f1e0336c8ade38edd59408","unresolved":false,"context_lines":[{"line_number":260,"context_line":"    def _restore_stack(self, stack, snapshot_id):"},{"line_number":261,"context_line":"        \"\"\"Restores stack from given snapshot."},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        :param stack: stack that will be restored from snapshot"},{"line_number":264,"context_line":"        \"\"\""},{"line_number":265,"context_line":"        self.clients(\"heat\").stacks.restore(stack.id, snapshot_id)"},{"line_number":266,"context_line":"        bench_utils.wait_for("}],"source_content_type":"text/x-python","patch_set":8,"id":"5afe65bd_ef95ed86","line":263,"in_reply_to":"5afe65bd_cbe8f212","updated":"2015-06-04 10:05:36.000000000","message":"Done","commit_id":"58e729490491571cd35fc900aa25eb41fa7cce97"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"53bab52f136ab6f9721c9b51d75b2ddf51502a7d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    cfg.FloatOpt(\"heat_stack_restore_poll_interval\","},{"line_number":88,"context_line":"                 default\u003d1.0,"},{"line_number":89,"context_line":"                 help\u003d\"Time interval(in sec) between checks when waiting for \""},{"line_number":90,"context_line":"                      \"stack to be restored.\")"},{"line_number":91,"context_line":"]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":10,"id":"5afe65bd_ccc10c56","line":90,"updated":"2015-06-04 16:47:01.000000000","message":"These need to be added to etc/rally/rally.conf.sample","commit_id":"b76edd5a12161b3a80f12118b7ece852377c6ab6"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"c95f1dadae6017c736588d5cb5834e96552e4398","unresolved":false,"context_lines":[{"line_number":87,"context_line":"    cfg.FloatOpt(\"heat_stack_restore_poll_interval\","},{"line_number":88,"context_line":"                 default\u003d1.0,"},{"line_number":89,"context_line":"                 help\u003d\"Time interval(in sec) between checks when waiting for \""},{"line_number":90,"context_line":"                      \"stack to be restored.\")"},{"line_number":91,"context_line":"]"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_5f73054e","line":90,"in_reply_to":"5afe65bd_ccc10c56","updated":"2015-06-05 08:04:04.000000000","message":"Done","commit_id":"b76edd5a12161b3a80f12118b7ece852377c6ab6"}],"samples/tasks/scenarios/heat/create-snapshot-restore-delete-stack.json":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"8d87df8bcc7dddb5c071fa4d6100390cd1e3f924","unresolved":false,"context_lines":[{"line_number":2,"context_line":"    \"HeatStacks.create_snapshot_restore_delete_stack\": ["},{"line_number":3,"context_line":"        {"},{"line_number":4,"context_line":"            \"args\": {"},{"line_number":5,"context_line":"               \"template_path\": \"templates/random_strings.yaml.template\""},{"line_number":6,"context_line":"            },"},{"line_number":7,"context_line":"            \"runner\": {"},{"line_number":8,"context_line":"                \"type\": \"constant\","}],"source_content_type":"application/json","patch_set":12,"id":"3afb71cf_d8a46bba","line":5,"updated":"2015-06-08 11:39:29.000000000","message":"I would recommend to add another available parameters (files, parameters, environment) with empty values - just to make a hint for users that these parameters are available","commit_id":"ea9e8388818f99c2a65410bfe5a1d6ccdfc11af1"}],"tests/unit/benchmark/scenarios/heat/test_utils.py":[{"author":{"_account_id":13555,"name":"Pradeep K Surisetty","username":"pradeepkumars","inactive":true},"change_message_id":"e8b52c565124ae87ca8d64ac359c0de4ac98a45d","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    def test_snapshot_stack(self, mock_clients):"},{"line_number":172,"context_line":"        scenario \u003d utils.HeatScenario()"},{"line_number":173,"context_line":"        scenario._snapshot_stack(self.stack)"},{"line_number":174,"context_line":"        mock_clients(\"heat\").stacks.snapshot.assert_called_once_with("},{"line_number":175,"context_line":"            self.stack.id)"},{"line_number":176,"context_line":"        self.wait_for.mock.assert_called_once_with("},{"line_number":177,"context_line":"            self.stack,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9af37de9_d002486f","line":174,"updated":"2015-05-11 11:14:48.000000000","message":"you would have to add stacks under snapshot in fakes.py","commit_id":"f8249e0a39633b7d43af95e1e3583a682609810f"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"e90049b3595515e9a79ed10b6eca8b795d506ddf","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    def test_snapshot_stack(self, mock_clients):"},{"line_number":172,"context_line":"        scenario \u003d utils.HeatScenario()"},{"line_number":173,"context_line":"        scenario._snapshot_stack(self.stack)"},{"line_number":174,"context_line":"        mock_clients(\"heat\").stacks.snapshot.assert_called_once_with("},{"line_number":175,"context_line":"            self.stack.id)"},{"line_number":176,"context_line":"        self.wait_for.mock.assert_called_once_with("},{"line_number":177,"context_line":"            self.stack,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a0c5dc1_fabe48d3","line":174,"in_reply_to":"9af37de9_d002486f","updated":"2015-05-12 10:13:54.000000000","message":"Hmm, could you please describe in details why do I need it here?\nI am mocking the client here and not using any fake stacks.","commit_id":"f8249e0a39633b7d43af95e1e3583a682609810f"}],"tests/unit/plugins/openstack/scenarios/heat/test_stacks.py":[{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"53bab52f136ab6f9721c9b51d75b2ddf51502a7d","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                                                  mock_restore,"},{"line_number":181,"context_line":"                                                  mock_delete):"},{"line_number":182,"context_line":"        heat_scenario \u003d stacks.HeatStacks()"},{"line_number":183,"context_line":"        mock_create.return_value \u003d \"fake_stack_create_snapshot_restore_delete\""},{"line_number":184,"context_line":"        mock_snapshot.return_value \u003d {\"id\": \"dummy_id\"}"},{"line_number":185,"context_line":"        heat_scenario.create_snapshot_restore_delete_stack("},{"line_number":186,"context_line":"            template_path\u003dself.default_template,"}],"source_content_type":"text/x-python","patch_set":10,"id":"5afe65bd_2c5420c8","line":183,"updated":"2015-06-04 16:47:01.000000000","message":"I think this test would be a little more readable if you got rid of this and just used mock_create.return_value below where you need to test for it, rather than testing for an arbitrary (and confusing, IMO) string.","commit_id":"b76edd5a12161b3a80f12118b7ece852377c6ab6"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"c95f1dadae6017c736588d5cb5834e96552e4398","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                                                  mock_restore,"},{"line_number":181,"context_line":"                                                  mock_delete):"},{"line_number":182,"context_line":"        heat_scenario \u003d stacks.HeatStacks()"},{"line_number":183,"context_line":"        mock_create.return_value \u003d \"fake_stack_create_snapshot_restore_delete\""},{"line_number":184,"context_line":"        mock_snapshot.return_value \u003d {\"id\": \"dummy_id\"}"},{"line_number":185,"context_line":"        heat_scenario.create_snapshot_restore_delete_stack("},{"line_number":186,"context_line":"            template_path\u003dself.default_template,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3afb71cf_7f9361fb","line":183,"in_reply_to":"5afe65bd_2c5420c8","updated":"2015-06-05 08:04:04.000000000","message":"Done","commit_id":"b76edd5a12161b3a80f12118b7ece852377c6ab6"}],"tests/unit/plugins/openstack/scenarios/heat/test_utils.py":[{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"2f6dd790394bea8e90a339fef77a105cf6decfbe","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    def test_snapshot_stack(self, mock_clients):"},{"line_number":172,"context_line":"        scenario \u003d utils.HeatScenario()"},{"line_number":173,"context_line":"        scenario._snapshot_stack(self.stack)"},{"line_number":174,"context_line":"        mock_clients(\"heat\").stacks.snapshot.assert_called_once_with("},{"line_number":175,"context_line":"            self.stack.id)"},{"line_number":176,"context_line":"        self.wait_for.mock.assert_called_once_with("},{"line_number":177,"context_line":"            self.stack,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_6a3d61dc","line":174,"updated":"2015-05-29 00:50:44.000000000","message":"Just:\n mock_clients.return_value.stacks.snapshot.assert_called_once_with","commit_id":"612581d048603cd4dc732feeff3e3edae62739b8"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"612a5a13e51e97e8cd59d02e6d4eb5328fcebf07","unresolved":false,"context_lines":[{"line_number":171,"context_line":"    def test_snapshot_stack(self, mock_clients):"},{"line_number":172,"context_line":"        scenario \u003d utils.HeatScenario()"},{"line_number":173,"context_line":"        scenario._snapshot_stack(self.stack)"},{"line_number":174,"context_line":"        mock_clients(\"heat\").stacks.snapshot.assert_called_once_with("},{"line_number":175,"context_line":"            self.stack.id)"},{"line_number":176,"context_line":"        self.wait_for.mock.assert_called_once_with("},{"line_number":177,"context_line":"            self.stack,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5afe65bd_ebf78af3","line":174,"in_reply_to":"7a016987_6a3d61dc","updated":"2015-06-02 08:07:01.000000000","message":"Done","commit_id":"612581d048603cd4dc732feeff3e3edae62739b8"},{"author":{"_account_id":13609,"name":"Pavel Boldin","email":"pboldin@mirantis.com","username":"pboldin"},"change_message_id":"2f6dd790394bea8e90a339fef77a105cf6decfbe","unresolved":false,"context_lines":[{"line_number":187,"context_line":"    def test_restore_stack(self, mock_clients):"},{"line_number":188,"context_line":"        scenario \u003d utils.HeatScenario()"},{"line_number":189,"context_line":"        scenario._restore_stack(self.stack, \"dummy_id\")"},{"line_number":190,"context_line":"        mock_clients(\"heat\").stacks.restore.assert_called_once_with("},{"line_number":191,"context_line":"            self.stack.id, \"dummy_id\")"},{"line_number":192,"context_line":"        self.wait_for.mock.assert_called_once_with("},{"line_number":193,"context_line":"            self.stack,"}],"source_content_type":"text/x-python","patch_set":5,"id":"7a016987_0a2dcda7","line":190,"updated":"2015-05-29 00:50:44.000000000","message":"Same here.","commit_id":"612581d048603cd4dc732feeff3e3edae62739b8"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"612a5a13e51e97e8cd59d02e6d4eb5328fcebf07","unresolved":false,"context_lines":[{"line_number":187,"context_line":"    def test_restore_stack(self, mock_clients):"},{"line_number":188,"context_line":"        scenario \u003d utils.HeatScenario()"},{"line_number":189,"context_line":"        scenario._restore_stack(self.stack, \"dummy_id\")"},{"line_number":190,"context_line":"        mock_clients(\"heat\").stacks.restore.assert_called_once_with("},{"line_number":191,"context_line":"            self.stack.id, \"dummy_id\")"},{"line_number":192,"context_line":"        self.wait_for.mock.assert_called_once_with("},{"line_number":193,"context_line":"            self.stack,"}],"source_content_type":"text/x-python","patch_set":5,"id":"5afe65bd_cbddee71","line":190,"in_reply_to":"7a016987_0a2dcda7","updated":"2015-06-02 08:07:01.000000000","message":"Done","commit_id":"612581d048603cd4dc732feeff3e3edae62739b8"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"359dd7120f5c342e9431b5c0194b6ebd85f684c5","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        self._test_atomic_action_timer(scenario.atomic_actions(),"},{"line_number":162,"context_line":"                                       \"heat.resume_stack\")"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    @mock.patch(HEAT_UTILS + \".HeatScenario.clients\")"},{"line_number":165,"context_line":"    def test_snapshot_stack(self, mock_clients):"},{"line_number":166,"context_line":"        scenario \u003d utils.HeatScenario()"},{"line_number":167,"context_line":"        scenario._snapshot_stack(self.stack)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_3197d349","line":164,"updated":"2015-06-16 14:04:08.000000000","message":"Please use the new clients mocking stuff (https://review.openstack.org/#/c/188554/).","commit_id":"973af49b2ecd8cfa1698c9d4215781be6537192a"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"2ba610a28f65dc65264321da56c270af8adc4439","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        self._test_atomic_action_timer(scenario.atomic_actions(),"},{"line_number":162,"context_line":"                                       \"heat.resume_stack\")"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    @mock.patch(HEAT_UTILS + \".HeatScenario.clients\")"},{"line_number":165,"context_line":"    def test_snapshot_stack(self, mock_clients):"},{"line_number":166,"context_line":"        scenario \u003d utils.HeatScenario()"},{"line_number":167,"context_line":"        scenario._snapshot_stack(self.stack)"}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_5b02863e","line":164,"in_reply_to":"fa32b979_3197d349","updated":"2015-06-17 12:47:46.000000000","message":"Done","commit_id":"973af49b2ecd8cfa1698c9d4215781be6537192a"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"359dd7120f5c342e9431b5c0194b6ebd85f684c5","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            is_ready\u003dself.res_is.mock(),"},{"line_number":174,"context_line":"            check_interval\u003dCONF.benchmark.heat_stack_snapshot_poll_interval,"},{"line_number":175,"context_line":"            timeout\u003dCONF.benchmark.heat_stack_snapshot_timeout)"},{"line_number":176,"context_line":"        self.res_is.mock.assert_has_calls([mock.call(\"SNAPSHOT_COMPLETE\")])"},{"line_number":177,"context_line":"        self._test_atomic_action_timer(scenario.atomic_actions(),"},{"line_number":178,"context_line":"                                       \"heat.snapshot_stack\")"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_1173af4e","line":176,"updated":"2015-06-16 14:04:08.000000000","message":"This could just be:\n\n    self.res_is.mock.assert_called_with(\"SNAPSHOT_COMPLETE\")\n\nTechnically it could even be assert_called_once_with().","commit_id":"973af49b2ecd8cfa1698c9d4215781be6537192a"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"2ba610a28f65dc65264321da56c270af8adc4439","unresolved":false,"context_lines":[{"line_number":173,"context_line":"            is_ready\u003dself.res_is.mock(),"},{"line_number":174,"context_line":"            check_interval\u003dCONF.benchmark.heat_stack_snapshot_poll_interval,"},{"line_number":175,"context_line":"            timeout\u003dCONF.benchmark.heat_stack_snapshot_timeout)"},{"line_number":176,"context_line":"        self.res_is.mock.assert_has_calls([mock.call(\"SNAPSHOT_COMPLETE\")])"},{"line_number":177,"context_line":"        self._test_atomic_action_timer(scenario.atomic_actions(),"},{"line_number":178,"context_line":"                                       \"heat.snapshot_stack\")"},{"line_number":179,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_fbfa7a42","line":176,"in_reply_to":"fa32b979_1173af4e","updated":"2015-06-17 12:47:46.000000000","message":"Cannot do this because res_is.mock has several calls and the first call is without any parameters.","commit_id":"973af49b2ecd8cfa1698c9d4215781be6537192a"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"359dd7120f5c342e9431b5c0194b6ebd85f684c5","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            is_ready\u003dself.res_is.mock(),"},{"line_number":190,"context_line":"            check_interval\u003dCONF.benchmark.heat_stack_restore_poll_interval,"},{"line_number":191,"context_line":"            timeout\u003dCONF.benchmark.heat_stack_restore_timeout)"},{"line_number":192,"context_line":"        self.res_is.mock.assert_has_calls([mock.call(\"RESTORE_COMPLETE\")])"},{"line_number":193,"context_line":"        self._test_atomic_action_timer(scenario.atomic_actions(),"},{"line_number":194,"context_line":"                                       \"heat.restore_stack\")"},{"line_number":195,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"fa32b979_719a3b65","line":192,"updated":"2015-06-16 14:04:08.000000000","message":"Same.","commit_id":"973af49b2ecd8cfa1698c9d4215781be6537192a"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"0728a76eca77b28a76fcdad28a22f1155676edd4","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            is_ready\u003dself.res_is.mock(),"},{"line_number":173,"context_line":"            check_interval\u003dCONF.benchmark.heat_stack_snapshot_poll_interval,"},{"line_number":174,"context_line":"            timeout\u003dCONF.benchmark.heat_stack_snapshot_timeout)"},{"line_number":175,"context_line":"        self.res_is.mock.assert_has_calls([mock.call(\"SNAPSHOT_COMPLETE\")])"},{"line_number":176,"context_line":"        self._test_atomic_action_timer(scenario.atomic_actions(),"},{"line_number":177,"context_line":"                                       \"heat.snapshot_stack\")"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_b77f1e16","line":175,"updated":"2015-06-17 14:07:22.000000000","message":"The first, parameter-less call to res_is is actually in the test itself, so you can do:\n\n     self.wait_for.mock.assert_called_once_with(\n        self.stack,\n        update_resource\u003dself.gfm(),\n        is_ready\u003dself.res_is.mock.return_value,\n        check_interval\u003dCONF.benchmark.heat_stack_snapshot_poll_interval,\n        timeout\u003dCONF.benchmark.heat_stack_snapshot_timeout)\n    self.res_is.mock.assert_called_once_with(\"SNAPSHOT_COMPLETE\")\n\nThat way you don\u0027t have to write your tests in a strange way in order to avoid the side effects of the tests themselves.\n\nLooks like that usage pattern needs to be fixed throughout this and some other test cases; I\u0027ll take that on.","commit_id":"cf439bd2a39e853df491432dcd8456f524346942"},{"author":{"_account_id":14676,"name":"Kairat Kushaev","email":"kkushaev@mirantis.com","username":"kairat_kushaev"},"change_message_id":"9625cd284949e9df147941a5e17b3c83523ba038","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            is_ready\u003dself.res_is.mock(),"},{"line_number":173,"context_line":"            check_interval\u003dCONF.benchmark.heat_stack_snapshot_poll_interval,"},{"line_number":174,"context_line":"            timeout\u003dCONF.benchmark.heat_stack_snapshot_timeout)"},{"line_number":175,"context_line":"        self.res_is.mock.assert_has_calls([mock.call(\"SNAPSHOT_COMPLETE\")])"},{"line_number":176,"context_line":"        self._test_atomic_action_timer(scenario.atomic_actions(),"},{"line_number":177,"context_line":"                                       \"heat.snapshot_stack\")"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_be482bb4","line":175,"in_reply_to":"fa32b979_b77f1e16","updated":"2015-06-18 11:18:26.000000000","message":"I agree that usage pattern might be improved but IMO we should do it as a separate patch. I tried the approach you proposed but it didn\u0027t work again, so I propose to agree on the current implementation and refactor it with separate patch. What do you think?","commit_id":"cf439bd2a39e853df491432dcd8456f524346942"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"f0bac3a05ccc81900f419a74f817706bf3a9f52d","unresolved":false,"context_lines":[{"line_number":172,"context_line":"            is_ready\u003dself.res_is.mock(),"},{"line_number":173,"context_line":"            check_interval\u003dCONF.benchmark.heat_stack_snapshot_poll_interval,"},{"line_number":174,"context_line":"            timeout\u003dCONF.benchmark.heat_stack_snapshot_timeout)"},{"line_number":175,"context_line":"        self.res_is.mock.assert_has_calls([mock.call(\"SNAPSHOT_COMPLETE\")])"},{"line_number":176,"context_line":"        self._test_atomic_action_timer(scenario.atomic_actions(),"},{"line_number":177,"context_line":"                                       \"heat.snapshot_stack\")"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa32b979_3211aa04","line":175,"in_reply_to":"fa32b979_be482bb4","updated":"2015-06-18 12:29:05.000000000","message":"Okay, that works for me.","commit_id":"cf439bd2a39e853df491432dcd8456f524346942"}]}
