)]}'
{"rally/plugins/openstack/context/cinder/volume_types.py":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"bff740cc27f075fb532a0c32502685c5d031048d","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        \"additionalProperties\": False"},{"line_number":33,"context_line":"    }"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    @logging.log_task_wrapper(LOG.info, _(\"Enter context: `volumes_types`\"))"},{"line_number":36,"context_line":"    def setup(self):"},{"line_number":37,"context_line":"        admin_clients \u003d osclients.Clients("},{"line_number":38,"context_line":"            self.context.get(\"admin\", {}).get(\"credential\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"da0c15f0_75a59fb3","line":35,"updated":"2016-03-28 13:47:13.000000000","message":"volume_types","commit_id":"10b9e1bcad7a429a591e2f437dc63b605cfc9721"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"5b5fa0f6f1af03089d8c901aa61d54ee12309e28","unresolved":false,"context_lines":[{"line_number":32,"context_line":"        \"additionalProperties\": False"},{"line_number":33,"context_line":"    }"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    @logging.log_task_wrapper(LOG.info, _(\"Enter context: `volumes_types`\"))"},{"line_number":36,"context_line":"    def setup(self):"},{"line_number":37,"context_line":"        admin_clients \u003d osclients.Clients("},{"line_number":38,"context_line":"            self.context.get(\"admin\", {}).get(\"credential\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"da0c15f0_f53b6f36","line":35,"in_reply_to":"da0c15f0_75a59fb3","updated":"2016-03-28 13:49:34.000000000","message":"Done","commit_id":"10b9e1bcad7a429a591e2f437dc63b605cfc9721"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"8dc0eab58a919dd01931f73a1d21cb1d470d55ac","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.context[\"volume_types\"] \u003d []"},{"line_number":42,"context_line":"        for vtype_name in self.config:"},{"line_number":43,"context_line":"            LOG.debug(\"Creating Cinder volume type %s\" % vtype_name)"},{"line_number":44,"context_line":"            vtype \u003d cinder.volume_types.create(vtype_name)"},{"line_number":45,"context_line":"            self.context[\"volume_types\"].append({\"id\": vtype.id,"},{"line_number":46,"context_line":"                                                 \"name\": vtype_name})"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da0c15f0_fd47e474","line":44,"updated":"2016-03-28 08:00:35.000000000","message":"V2 support `is_public` option, this is useful when creating volume type access, so it would be nice to wrap this in cinder wrapper for latter use.","commit_id":"10b9e1bcad7a429a591e2f437dc63b605cfc9721"},{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"bff740cc27f075fb532a0c32502685c5d031048d","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.context[\"volume_types\"] \u003d []"},{"line_number":42,"context_line":"        for vtype_name in self.config:"},{"line_number":43,"context_line":"            LOG.debug(\"Creating Cinder volume type %s\" % vtype_name)"},{"line_number":44,"context_line":"            vtype \u003d cinder.volume_types.create(vtype_name)"},{"line_number":45,"context_line":"            self.context[\"volume_types\"].append({\"id\": vtype.id,"},{"line_number":46,"context_line":"                                                 \"name\": vtype_name})"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da0c15f0_15d0a31e","line":44,"in_reply_to":"da0c15f0_9f3fb2d5","updated":"2016-03-28 13:47:13.000000000","message":"Make sense, we can add it in a follow up patch. Then the patch looks good to me.","commit_id":"10b9e1bcad7a429a591e2f437dc63b605cfc9721"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"8b75b4426de632ba1e7e36d04006fdf3e2efe286","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.context[\"volume_types\"] \u003d []"},{"line_number":42,"context_line":"        for vtype_name in self.config:"},{"line_number":43,"context_line":"            LOG.debug(\"Creating Cinder volume type %s\" % vtype_name)"},{"line_number":44,"context_line":"            vtype \u003d cinder.volume_types.create(vtype_name)"},{"line_number":45,"context_line":"            self.context[\"volume_types\"].append({\"id\": vtype.id,"},{"line_number":46,"context_line":"                                                 \"name\": vtype_name})"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da0c15f0_9f3fb2d5","line":44,"in_reply_to":"da0c15f0_fd47e474","updated":"2016-03-28 13:18:42.000000000","message":"If someone needs this, they can add it in a later commit. For now, YAGNI.","commit_id":"10b9e1bcad7a429a591e2f437dc63b605cfc9721"},{"author":{"_account_id":6172,"name":"Boris Pavlovic","email":"boris@pavlovic.me","username":"boris-42"},"change_message_id":"b26d8a93f0f2dde62e4724706e77041efb213ab1","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.context[\"volume_types\"] \u003d []"},{"line_number":42,"context_line":"        for vtype_name in self.config:"},{"line_number":43,"context_line":"            LOG.debug(\"Creating Cinder volume type %s\" % vtype_name)"},{"line_number":44,"context_line":"            vtype \u003d cinder.volume_types.create(vtype_name)"},{"line_number":45,"context_line":"            self.context[\"volume_types\"].append({\"id\": vtype.id,"},{"line_number":46,"context_line":"                                                 \"name\": vtype_name})"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_272cef49","line":44,"updated":"2016-03-29 04:16:23.000000000","message":"Everything is okay with this patch, except that user can provide any \"vtype_name\" which means we won\u0027t be able even in theory to create disaster cleanup. \n\nWhat if we check that \"name\" math the context resource name template?","commit_id":"b0176a278cb85b77c87e25114dae7623ad405ee7"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"b5ed6338f64c825a6d0b7756dad3bd9d0f6b8dbe","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        self.context[\"volume_types\"] \u003d []"},{"line_number":42,"context_line":"        for vtype_name in self.config:"},{"line_number":43,"context_line":"            LOG.debug(\"Creating Cinder volume type %s\" % vtype_name)"},{"line_number":44,"context_line":"            vtype \u003d cinder.volume_types.create(vtype_name)"},{"line_number":45,"context_line":"            self.context[\"volume_types\"].append({\"id\": vtype.id,"},{"line_number":46,"context_line":"                                                 \"name\": vtype_name})"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba0121b8_a5f58584","line":44,"in_reply_to":"ba0121b8_272cef49","updated":"2016-03-29 12:21:34.000000000","message":"I think checking against the resource name template is excessively restrictive and deeply unfriendly to the user. I think this is appropriate for now; in the long run, we should find a way to generate resources in contexts with random names, and then pass those names dynamically to the scenario. That\u0027s likely the subject of its own spec, and I think this approach is acceptable for now. Our disaster cleanups won\u0027t be perfect, but they were never going to be since this is also how other contexts that create resources for use in the task work as well.","commit_id":"b0176a278cb85b77c87e25114dae7623ad405ee7"}],"tests/unit/plugins/openstack/context/cinder/test_volume_types.py":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"841a668f21e496149c15a58e5af5671a83a9c0e8","unresolved":false,"context_lines":[{"line_number":36,"context_line":"        create.assert_has_calls("},{"line_number":37,"context_line":"            [mock.call(\"foo\"), mock.call(\"bar\")])"},{"line_number":38,"context_line":"        self.assertEqual(self.context[\"volume_types\"],"},{"line_number":39,"context_line":"                         [{\"id\": create.return_value.id, \"name\": \"foo\"},"},{"line_number":40,"context_line":"                          {\"id\": create.return_value.id, \"name\": \"bar\"}])"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def test_cleanup(self):"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_16081a2d","line":39,"updated":"2016-04-21 13:11:37.000000000","message":"So it is possible to run \"create\" two times but save only first (or last) ID for all volume_types.\n\nLet\u0027s use different IDs:\n\n create.side_effect \u003d iter([\"foo-id\", \"bar-id\"])\n ...\n self.assertEqual(self.context[\"volume_types\"],\n                  [{\"id\": \"foo-id\", \"name\": \"foo\"},\n                   {\"id\": \"bar-id\", \"name\": \"bar\"}])","commit_id":"e5cf9a5e69a2b852928b9fd50470ba6450bd1e01"}]}
