)]}'
{"api-ref/source/parameters.yaml":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"5fd6c8d7409ec67fc2249a3d53139a9bdf4f5e09","unresolved":false,"context_lines":[{"line_number":4703,"context_line":"  type: array"},{"line_number":4704,"context_line":"  in: body"},{"line_number":4705,"context_line":"  required: false"},{"line_number":4706,"context_line":"  min_version: 2.40"},{"line_number":4707,"context_line":"  description: |"},{"line_number":4708,"context_line":"    A list of tags. The maximum count of tags in this list is 50."},{"line_number":4709,"context_line":"tenant_id_body:"}],"source_content_type":"text/x-yaml","patch_set":26,"id":"7ffa3b31_cc3450fe","line":4706,"range":{"start_line":4706,"start_character":15,"end_line":4706,"end_character":19},"updated":"2017-04-18 08:40:09.000000000","message":"this needs to be 2.43 now.","commit_id":"bafffeb35f3c7de591206e5ee2a7d6794707f2b9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8601f21f1b890a4ab304cc72b786cd7b2296f33d","unresolved":false,"context_lines":[{"line_number":4703,"context_line":"  type: array"},{"line_number":4704,"context_line":"  in: body"},{"line_number":4705,"context_line":"  required: false"},{"line_number":4706,"context_line":"  min_version: 2.40"},{"line_number":4707,"context_line":"  description: |"},{"line_number":4708,"context_line":"    A list of tags. The maximum count of tags in this list is 50."},{"line_number":4709,"context_line":"tenant_id_body:"}],"source_content_type":"text/x-yaml","patch_set":26,"id":"7ffa3b31_477259e5","line":4706,"range":{"start_line":4706,"start_character":15,"end_line":4706,"end_character":19},"in_reply_to":"7ffa3b31_cc3450fe","updated":"2017-04-18 09:00:30.000000000","message":"Ah, thanks","commit_id":"bafffeb35f3c7de591206e5ee2a7d6794707f2b9"}],"api-ref/source/servers.inc":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":321,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.37/server-create-req.json"},{"line_number":322,"context_line":"   :language: javascript"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"**Example Create Server With Tags (v2.40)**"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.40/server-create-req.json"},{"line_number":327,"context_line":"   :language: javascript"}],"source_content_type":"text/x-c++src","patch_set":17,"id":"da4df55a_26fbabc2","line":324,"updated":"2016-12-27 22:23:15.000000000","message":"I\u0027m not sure that we need this really. The reason we had the separate sample for 2.37 in here was because of the simplified request format with respect to networking.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":362,"context_line":"  - status: server_status"},{"line_number":363,"context_line":"  - host_status: host_status"},{"line_number":364,"context_line":"  - tenant_id: tenant_id_body"},{"line_number":365,"context_line":"  - tags: tags"},{"line_number":366,"context_line":"  - updated: updated"},{"line_number":367,"context_line":"  - user_id: user_id"},{"line_number":368,"context_line":"  - OS-EXT-SERV-ATTR:hostname: server_hostname"}],"source_content_type":"text/x-c++src","patch_set":17,"id":"da4df55a_c632dfa6","line":365,"range":{"start_line":365,"start_character":10,"end_line":365,"end_character":14},"updated":"2016-12-27 22:23:15.000000000","message":"This should be \"tags_server_create\" else it says it\u0027s in the response as of 2.26.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":362,"context_line":"  - status: server_status"},{"line_number":363,"context_line":"  - host_status: host_status"},{"line_number":364,"context_line":"  - tenant_id: tenant_id_body"},{"line_number":365,"context_line":"  - tags: tags"},{"line_number":366,"context_line":"  - updated: updated"},{"line_number":367,"context_line":"  - user_id: user_id"},{"line_number":368,"context_line":"  - OS-EXT-SERV-ATTR:hostname: server_hostname"}],"source_content_type":"text/x-c++src","patch_set":17,"id":"ba5201f7_7845ca15","line":365,"range":{"start_line":365,"start_character":10,"end_line":365,"end_character":14},"in_reply_to":"da4df55a_c632dfa6","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":345,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.37/server-create-req.json"},{"line_number":346,"context_line":"   :language: javascript"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"**Example Create Server With Tags (v2.43)**"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.43/server-create-req.json"},{"line_number":351,"context_line":"   :language: javascript"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"Response"},{"line_number":354,"context_line":"--------"}],"source_content_type":"text/x-c++src","patch_set":36,"id":"5ff73747_e3a06ba8","line":351,"range":{"start_line":348,"start_character":0,"end_line":351,"end_character":24},"updated":"2017-04-24 15:13:13.000000000","message":"This is probably unnecessary. I think we only had the example request for 2.37 because of how different it made the schema for the \u0027networks\u0027 field, so we wanted to show an example. Adding tags is pretty straightforward and should be understood just via the parameter description.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6eecb663f1d6cc74b57bbd412820b8a2702966d7","unresolved":false,"context_lines":[{"line_number":345,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.37/server-create-req.json"},{"line_number":346,"context_line":"   :language: javascript"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"**Example Create Server With Tags (v2.43)**"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":".. literalinclude:: ../../doc/api_samples/servers/v2.43/server-create-req.json"},{"line_number":351,"context_line":"   :language: javascript"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"Response"},{"line_number":354,"context_line":"--------"}],"source_content_type":"text/x-c++src","patch_set":36,"id":"5ff73747_98c21f33","line":351,"range":{"start_line":348,"start_character":0,"end_line":351,"end_character":24},"in_reply_to":"5ff73747_e3a06ba8","updated":"2017-04-25 03:15:39.000000000","message":"Done","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"}],"nova/api/openstack/api_version_request.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    * 2.38 - Add a condition to return HTTPBadRequest if invalid status is"},{"line_number":97,"context_line":"             provided for listing servers."},{"line_number":98,"context_line":"    * 2.39 - Deprecates image-metadata proxy API"},{"line_number":99,"context_line":"    * 2.40 - Support add tags to instances when boot."},{"line_number":100,"context_line":"\"\"\""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_e6236356","line":99,"range":{"start_line":99,"start_character":13,"end_line":99,"end_character":52},"updated":"2016-12-27 22:23:15.000000000","message":"Let\u0027s reword this as:\n\n\"Adds support for applying tags when creating a server.\"","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":96,"context_line":"    * 2.38 - Add a condition to return HTTPBadRequest if invalid status is"},{"line_number":97,"context_line":"             provided for listing servers."},{"line_number":98,"context_line":"    * 2.39 - Deprecates image-metadata proxy API"},{"line_number":99,"context_line":"    * 2.40 - Support add tags to instances when boot."},{"line_number":100,"context_line":"\"\"\""},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"# The minimum and maximum versions of the API supported"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_182bde34","line":99,"range":{"start_line":99,"start_character":13,"end_line":99,"end_character":52},"in_reply_to":"da4df55a_e6236356","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/api/openstack/compute/rest_api_version_history.rst":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":488,"context_line":"----"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"  Adds support for applying tags when creating a server. The tag schema is"},{"line_number":491,"context_line":"  the as in the 2.26 microversion."}],"source_content_type":"text/x-rst","patch_set":36,"id":"5ff73747_03e1179b","line":491,"range":{"start_line":491,"start_character":2,"end_line":491,"end_character":5},"updated":"2017-04-24 15:13:13.000000000","message":"the same","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6eecb663f1d6cc74b57bbd412820b8a2702966d7","unresolved":false,"context_lines":[{"line_number":488,"context_line":"----"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"  Adds support for applying tags when creating a server. The tag schema is"},{"line_number":491,"context_line":"  the as in the 2.26 microversion."}],"source_content_type":"text/x-rst","patch_set":36,"id":"5ff73747_78dd1313","line":491,"range":{"start_line":491,"start_character":2,"end_line":491,"end_character":5},"in_reply_to":"5ff73747_03e1179b","updated":"2017-04-25 03:15:39.000000000","message":"Done","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"}],"nova/api/openstack/compute/schemas/servers.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9964a4893674e5d30135028ba602edd8c039be7d","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    \"type\": \"array\","},{"line_number":112,"context_line":"    \"items\": {"},{"line_number":113,"context_line":"        \"type\": \"string\","},{"line_number":114,"context_line":"        \"pattern\": \"^[^,/]*$\""},{"line_number":115,"context_line":"    }"},{"line_number":116,"context_line":"}"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_eb368701","line":114,"range":{"start_line":114,"start_character":8,"end_line":114,"end_character":29},"updated":"2016-12-07 06:58:01.000000000","message":"You will validate the schema in the later python method. So we needn\u0027t put the regex at here again.","commit_id":"5c0e9c53f367e25e93a816899ea6e29bc652aea9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"706e7d4015acc19d26297534874cc2639b8e00a3","unresolved":false,"context_lines":[{"line_number":111,"context_line":"    \"type\": \"array\","},{"line_number":112,"context_line":"    \"items\": {"},{"line_number":113,"context_line":"        \"type\": \"string\","},{"line_number":114,"context_line":"        \"pattern\": \"^[^,/]*$\""},{"line_number":115,"context_line":"    }"},{"line_number":116,"context_line":"}"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_b7df8c0b","line":114,"range":{"start_line":114,"start_character":8,"end_line":114,"end_character":29},"in_reply_to":"3a71b18c_eb368701","updated":"2016-12-07 09:00:27.000000000","message":"Done","commit_id":"5c0e9c53f367e25e93a816899ea6e29bc652aea9"}],"nova/api/openstack/compute/server_tags.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9964a4893674e5d30135028ba602edd8c039be7d","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            msg \u003d (_(\"Tag \u0027%(tag)s\u0027 is too long. Maximum length of a tag \""},{"line_number":143,"context_line":"                     \"is %(length)d\") % {\u0027tag\u0027: id,"},{"line_number":144,"context_line":"                                         \u0027length\u0027: objects.tag.MAX_TAG_LENGTH})"},{"line_number":145,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        if id in _get_tags_names(tags):"},{"line_number":148,"context_line":"            # NOTE(snikitin): server already has specified tag"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_0b9e6306","line":145,"updated":"2016-12-07 06:58:01.000000000","message":"We can put the check of tag length and the schema validation into _validate_tag method. Then _validate_tags call the _validate_tag.","commit_id":"5c0e9c53f367e25e93a816899ea6e29bc652aea9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"706e7d4015acc19d26297534874cc2639b8e00a3","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            msg \u003d (_(\"Tag \u0027%(tag)s\u0027 is too long. Maximum length of a tag \""},{"line_number":143,"context_line":"                     \"is %(length)d\") % {\u0027tag\u0027: id,"},{"line_number":144,"context_line":"                                         \u0027length\u0027: objects.tag.MAX_TAG_LENGTH})"},{"line_number":145,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        if id in _get_tags_names(tags):"},{"line_number":148,"context_line":"            # NOTE(snikitin): server already has specified tag"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_779254f7","line":145,"in_reply_to":"3a71b18c_0b9e6306","updated":"2016-12-07 09:00:27.000000000","message":"Done, I think we can just use the _valid_tags, it is actually the same as tags can be just one tag","commit_id":"5c0e9c53f367e25e93a816899ea6e29bc652aea9"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"7db3632a060dcc788ab5f7de0efe029daa28c47f","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            msg \u003d (_(\"Tag \u0027%(tag)s\u0027 is too long. Maximum length of a tag \""},{"line_number":143,"context_line":"                     \"is %(length)d\") % {\u0027tag\u0027: id,"},{"line_number":144,"context_line":"                                         \u0027length\u0027: objects.tag.MAX_TAG_LENGTH})"},{"line_number":145,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        if id in _get_tags_names(tags):"},{"line_number":148,"context_line":"            # NOTE(snikitin): server already has specified tag"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a71b18c_fd29db38","line":145,"in_reply_to":"3a71b18c_779254f7","updated":"2016-12-07 13:19:15.000000000","message":"yeah, some refactory work can be a follow up patch","commit_id":"5c0e9c53f367e25e93a816899ea6e29bc652aea9"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"403781f1f02e24f55182b7d2816f0457b9488ff5","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                  \u0027count\u0027: tag_count})"},{"line_number":45,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    long_tags \u003d ["},{"line_number":48,"context_line":"        t for t in tags if len(t) \u003e objects.tag.MAX_TAG_LENGTH]"},{"line_number":49,"context_line":"    if long_tags:"},{"line_number":50,"context_line":"        msg \u003d (_(\"Tags %(tags)s are too long. Maximum length of a tag \""},{"line_number":51,"context_line":"                 \"is %(length)d\") % {\u0027tags\u0027: long_tags,"},{"line_number":52,"context_line":"                                     \u0027length\u0027: objects.tag.MAX_TAG_LENGTH})"},{"line_number":53,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def _validate_tag_schema_and_len(tags):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_adb8f1e6","line":53,"range":{"start_line":47,"start_character":0,"end_line":53,"end_character":55},"updated":"2016-12-08 04:41:53.000000000","message":"long_tags seems already done in _validate_tag_schema_and_len","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"403781f1f02e24f55182b7d2816f0457b9488ff5","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    return [t.tag for t in tags]"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def _validate_tag_num(tags):"},{"line_number":39,"context_line":"    tag_count \u003d len(tags)"},{"line_number":40,"context_line":"    if tag_count \u003e objects.instance.MAX_TAG_COUNT:"},{"line_number":41,"context_line":"        msg \u003d (_(\"The number of tags exceeded the per-server limit \""},{"line_number":42,"context_line":"                 \"%(max)d. The number of tags in request is %(count)d.\")"},{"line_number":43,"context_line":"               % {\u0027max\u0027: objects.instance.MAX_TAG_COUNT,"},{"line_number":44,"context_line":"                  \u0027count\u0027: tag_count})"},{"line_number":45,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    long_tags \u003d ["},{"line_number":48,"context_line":"        t for t in tags if len(t) \u003e objects.tag.MAX_TAG_LENGTH]"},{"line_number":49,"context_line":"    if long_tags:"},{"line_number":50,"context_line":"        msg \u003d (_(\"Tags %(tags)s are too long. Maximum length of a tag \""},{"line_number":51,"context_line":"                 \"is %(length)d\") % {\u0027tags\u0027: long_tags,"},{"line_number":52,"context_line":"                                     \u0027length\u0027: objects.tag.MAX_TAG_LENGTH})"},{"line_number":53,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def _validate_tag_schema_and_len(tags):"},{"line_number":57,"context_line":"    invalid_tags \u003d []"},{"line_number":58,"context_line":"    for tag in tags:"},{"line_number":59,"context_line":"        try:"},{"line_number":60,"context_line":"            jsonschema.validate(tag, parameter_types.tag)"},{"line_number":61,"context_line":"        except jsonschema.ValidationError:"},{"line_number":62,"context_line":"            invalid_tags.append(tag)"},{"line_number":63,"context_line":"    if invalid_tags:"},{"line_number":64,"context_line":"        msg \u003d (_(\"Tags \u0027%s\u0027 are invalid. Each tag must be a string \""},{"line_number":65,"context_line":"                 \"without characters \u0027/\u0027 and \u0027,\u0027.\") % invalid_tags)"},{"line_number":66,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    long_tags \u003d ["},{"line_number":69,"context_line":"        t for t in tags if len(t) \u003e objects.tag.MAX_TAG_LENGTH]"},{"line_number":70,"context_line":"    if long_tags:"},{"line_number":71,"context_line":"        msg \u003d (_(\"Tags %(tags)s are too long. Maximum length of a tag \""},{"line_number":72,"context_line":"                 \"is %(length)d\") % {\u0027tags\u0027: long_tags,"},{"line_number":73,"context_line":"                                     \u0027length\u0027: objects.tag.MAX_TAG_LENGTH})"},{"line_number":74,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def _validate_tags(tags):"},{"line_number":78,"context_line":"    _validate_tag_schema_and_len(tags)"},{"line_number":79,"context_line":"    _validate_tag_num(tags)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"class ServerTagsController(wsgi.Controller):"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_6d3b399d","line":79,"range":{"start_line":38,"start_character":0,"end_line":79,"end_character":27},"updated":"2016-12-08 04:41:53.000000000","message":"All or most of those should go in schema. i started those [1] but ok with this also as should not block this.\n\n..1 https://review.openstack.org/#/q/topic:tag-schema","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"403781f1f02e24f55182b7d2816f0457b9488ff5","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        context.can(st_policies.POLICY_ROOT % \u0027update\u0027)"},{"line_number":136,"context_line":"        self._check_instance_in_valid_state(context, server_id, \u0027update tag\u0027)"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"        _validate_tag_schema_and_len(id)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        try:"},{"line_number":141,"context_line":"            tags \u003d objects.TagList.get_by_resource_id(context, server_id)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_6dbed9d5","line":138,"range":{"start_line":138,"start_character":37,"end_line":138,"end_character":39},"updated":"2016-12-08 04:41:53.000000000","message":"we should send this in list [id]. If anyone request tag with int value (or any other non-iterable) then L58 will endup with TypeError and so 500 from API.","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0d2229d991b2d05ec46fc8ce4a9b15cd7aef6d33","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                  \u0027count\u0027: tag_count})"},{"line_number":45,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    long_tags \u003d ["},{"line_number":48,"context_line":"        t for t in tags if len(t) \u003e objects.tag.MAX_TAG_LENGTH]"},{"line_number":49,"context_line":"    if long_tags:"},{"line_number":50,"context_line":"        msg \u003d (_(\"Tags %(tags)s are too long. Maximum length of a tag \""},{"line_number":51,"context_line":"                 \"is %(length)d\") % {\u0027tags\u0027: long_tags,"},{"line_number":52,"context_line":"                                     \u0027length\u0027: objects.tag.MAX_TAG_LENGTH})"},{"line_number":53,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def _validate_tag_schema_and_len(tags):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a71b18c_c9d99a85","line":53,"range":{"start_line":47,"start_character":4,"end_line":53,"end_character":55},"updated":"2016-12-08 08:51:53.000000000","message":"this is duplicate to below function?","commit_id":"57dc58d71019c121f8388e3276ad96011282c2b9"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"01b30a024215cf979131b3bba765866f03e80127","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                  \u0027count\u0027: tag_count})"},{"line_number":45,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    long_tags \u003d ["},{"line_number":48,"context_line":"        t for t in tags if len(t) \u003e objects.tag.MAX_TAG_LENGTH]"},{"line_number":49,"context_line":"    if long_tags:"},{"line_number":50,"context_line":"        msg \u003d (_(\"Tags %(tags)s are too long. Maximum length of a tag \""},{"line_number":51,"context_line":"                 \"is %(length)d\") % {\u0027tags\u0027: long_tags,"},{"line_number":52,"context_line":"                                     \u0027length\u0027: objects.tag.MAX_TAG_LENGTH})"},{"line_number":53,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def _validate_tag_schema_and_len(tags):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a71b18c_c8916d48","line":53,"range":{"start_line":47,"start_character":4,"end_line":53,"end_character":55},"in_reply_to":"3a71b18c_09aab270","updated":"2016-12-08 23:44:59.000000000","message":"yea, please check PS6 comments. you need to fix L138 too. But i suggest to go with this- https://review.openstack.org/#/c/408424/","commit_id":"57dc58d71019c121f8388e3276ad96011282c2b9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"dbfdc8e3538dc20531cf273289c2b3845b96d452","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                  \u0027count\u0027: tag_count})"},{"line_number":45,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    long_tags \u003d ["},{"line_number":48,"context_line":"        t for t in tags if len(t) \u003e objects.tag.MAX_TAG_LENGTH]"},{"line_number":49,"context_line":"    if long_tags:"},{"line_number":50,"context_line":"        msg \u003d (_(\"Tags %(tags)s are too long. Maximum length of a tag \""},{"line_number":51,"context_line":"                 \"is %(length)d\") % {\u0027tags\u0027: long_tags,"},{"line_number":52,"context_line":"                                     \u0027length\u0027: objects.tag.MAX_TAG_LENGTH})"},{"line_number":53,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def _validate_tag_schema_and_len(tags):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a71b18c_09aab270","line":53,"range":{"start_line":47,"start_character":4,"end_line":53,"end_character":55},"in_reply_to":"3a71b18c_c9d99a85","updated":"2016-12-08 08:56:06.000000000","message":"Ah, yes, will update in next patchset.","commit_id":"57dc58d71019c121f8388e3276ad96011282c2b9"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0d2229d991b2d05ec46fc8ce4a9b15cd7aef6d33","unresolved":false,"context_lines":[{"line_number":65,"context_line":"                 \"without characters \u0027/\u0027 and \u0027,\u0027.\") % invalid_tags)"},{"line_number":66,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    long_tags \u003d ["},{"line_number":69,"context_line":"        t for t in tags if len(t) \u003e objects.tag.MAX_TAG_LENGTH]"},{"line_number":70,"context_line":"    if long_tags:"},{"line_number":71,"context_line":"        msg \u003d (_(\"Tags %(tags)s are too long. Maximum length of a tag \""},{"line_number":72,"context_line":"                 \"is %(length)d\") % {\u0027tags\u0027: long_tags,"},{"line_number":73,"context_line":"                                     \u0027length\u0027: objects.tag.MAX_TAG_LENGTH})"},{"line_number":74,"context_line":"        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def validate_tags(tags):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a71b18c_69c966ac","line":74,"range":{"start_line":68,"start_character":4,"end_line":74,"end_character":55},"updated":"2016-12-08 08:51:53.000000000","message":"here","commit_id":"57dc58d71019c121f8388e3276ad96011282c2b9"}],"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e37b8eb97b6c64f9b33a465ae4d75418afd7746","unresolved":false,"context_lines":[{"line_number":517,"context_line":"    @validation.schema(schema_server_create, \u00272.1\u0027, \u00272.18\u0027)"},{"line_number":518,"context_line":"    @validation.schema(schema_server_create_v219, \u00272.19\u0027, \u00272.31\u0027)"},{"line_number":519,"context_line":"    @validation.schema(schema_server_create_v232, \u00272.32\u0027, \u00272.36\u0027)"},{"line_number":520,"context_line":"    @validation.schema(schema_server_create_v237, \u00272.37\u0027, \u00272.38\u0027)"},{"line_number":521,"context_line":"    @validation.schema(schema_server_create_v240, \u00272.40\u0027)"},{"line_number":522,"context_line":"    def create(self, req, body):"},{"line_number":523,"context_line":"        \"\"\"Creates a new server for a given user.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_e7abe8d4","line":520,"range":{"start_line":520,"start_character":62,"end_line":520,"end_character":63},"updated":"2016-12-08 03:01:02.000000000","message":"This needs to be 2.39 else you can\u0027t create a server with microversion 2.39.","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cc94b3b7c42cafa5195bdae33f714eb94c16e8fa","unresolved":false,"context_lines":[{"line_number":517,"context_line":"    @validation.schema(schema_server_create, \u00272.1\u0027, \u00272.18\u0027)"},{"line_number":518,"context_line":"    @validation.schema(schema_server_create_v219, \u00272.19\u0027, \u00272.31\u0027)"},{"line_number":519,"context_line":"    @validation.schema(schema_server_create_v232, \u00272.32\u0027, \u00272.36\u0027)"},{"line_number":520,"context_line":"    @validation.schema(schema_server_create_v237, \u00272.37\u0027, \u00272.38\u0027)"},{"line_number":521,"context_line":"    @validation.schema(schema_server_create_v240, \u00272.40\u0027)"},{"line_number":522,"context_line":"    def create(self, req, body):"},{"line_number":523,"context_line":"        \"\"\"Creates a new server for a given user.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_c7018c3b","line":520,"range":{"start_line":520,"start_character":62,"end_line":520,"end_character":63},"in_reply_to":"3a71b18c_e7abe8d4","updated":"2016-12-08 03:18:04.000000000","message":"Done, bad rebase :)","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"5fd6c8d7409ec67fc2249a3d53139a9bdf4f5e09","unresolved":false,"context_lines":[{"line_number":449,"context_line":"    @validation.schema(schema_server_create_v219, \u00272.19\u0027, \u00272.31\u0027)"},{"line_number":450,"context_line":"    @validation.schema(schema_server_create_v232, \u00272.32\u0027, \u00272.36\u0027)"},{"line_number":451,"context_line":"    @validation.schema(schema_server_create_v237, \u00272.37\u0027, \u00272.41\u0027)"},{"line_number":452,"context_line":"    @validation.schema(schema_server_create_v242, \u00272.42\u0027, \u00272.43\u0027)"},{"line_number":453,"context_line":"    @validation.schema(schema_server_create_v243, \u00272.43\u0027)"},{"line_number":454,"context_line":"    def create(self, req, body):"},{"line_number":455,"context_line":"        \"\"\"Creates a new server for a given user.\"\"\""}],"source_content_type":"text/x-python","patch_set":26,"id":"7ffa3b31_27b98d2d","line":452,"range":{"start_line":452,"start_character":59,"end_line":452,"end_character":63},"updated":"2017-04-18 08:40:09.000000000","message":"2.42","commit_id":"bafffeb35f3c7de591206e5ee2a7d6794707f2b9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8601f21f1b890a4ab304cc72b786cd7b2296f33d","unresolved":false,"context_lines":[{"line_number":449,"context_line":"    @validation.schema(schema_server_create_v219, \u00272.19\u0027, \u00272.31\u0027)"},{"line_number":450,"context_line":"    @validation.schema(schema_server_create_v232, \u00272.32\u0027, \u00272.36\u0027)"},{"line_number":451,"context_line":"    @validation.schema(schema_server_create_v237, \u00272.37\u0027, \u00272.41\u0027)"},{"line_number":452,"context_line":"    @validation.schema(schema_server_create_v242, \u00272.42\u0027, \u00272.43\u0027)"},{"line_number":453,"context_line":"    @validation.schema(schema_server_create_v243, \u00272.43\u0027)"},{"line_number":454,"context_line":"    def create(self, req, body):"},{"line_number":455,"context_line":"        \"\"\"Creates a new server for a given user.\"\"\""}],"source_content_type":"text/x-python","patch_set":26,"id":"7ffa3b31_475b7953","line":452,"range":{"start_line":452,"start_character":59,"end_line":452,"end_character":63},"in_reply_to":"7ffa3b31_27b98d2d","updated":"2017-04-18 09:00:30.000000000","message":"Done","commit_id":"bafffeb35f3c7de591206e5ee2a7d6794707f2b9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fd0c3e0517c93102ee4da6565e6f3f12c14f12ef","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        # TODO(alex_xu): The final goal is that merging all of"},{"line_number":138,"context_line":"        # extended json-schema into server main json-schema."},{"line_number":139,"context_line":"        self._create_schema(self.schema_server_create_v243, \u00272.43\u0027)"},{"line_number":140,"context_line":"        self._create_schema(self.schema_server_create_v242, \u00272.42\u0027)"},{"line_number":141,"context_line":"        self._create_schema(self.schema_server_create_v237, \u00272.37\u0027)"},{"line_number":142,"context_line":"        self._create_schema(self.schema_server_create_v232, \u00272.32\u0027)"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_ab35a7f9","line":139,"updated":"2017-04-24 06:55:20.000000000","message":"Emm...Really hope I can get rid of this soon","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"13d575369bcf5bc30a77a1c234f5398901eda548","unresolved":false,"context_lines":[{"line_number":136,"context_line":""},{"line_number":137,"context_line":"        # TODO(alex_xu): The final goal is that merging all of"},{"line_number":138,"context_line":"        # extended json-schema into server main json-schema."},{"line_number":139,"context_line":"        self._create_schema(self.schema_server_create_v243, \u00272.43\u0027)"},{"line_number":140,"context_line":"        self._create_schema(self.schema_server_create_v242, \u00272.42\u0027)"},{"line_number":141,"context_line":"        self._create_schema(self.schema_server_create_v237, \u00272.37\u0027)"},{"line_number":142,"context_line":"        self._create_schema(self.schema_server_create_v232, \u00272.32\u0027)"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_d1d1c659","line":139,"in_reply_to":"5ff73747_ab35a7f9","updated":"2017-04-24 07:13:46.000000000","message":"Ha me too","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"}],"nova/api/openstack/rest_api_version_history.rst":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9964a4893674e5d30135028ba602edd8c039be7d","unresolved":false,"context_lines":[{"line_number":419,"context_line":"2.39"},{"line_number":420,"context_line":"----"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"  Support add tags for instances when booting."}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a71b18c_aba48f4a","line":422,"range":{"start_line":422,"start_character":23,"end_line":422,"end_character":32},"updated":"2016-12-07 06:58:01.000000000","message":"nit, s/instances/servers/.  The \u0027servers\u0027 is the word using in the API.","commit_id":"5c0e9c53f367e25e93a816899ea6e29bc652aea9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"706e7d4015acc19d26297534874cc2639b8e00a3","unresolved":false,"context_lines":[{"line_number":419,"context_line":"2.39"},{"line_number":420,"context_line":"----"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"  Support add tags for instances when booting."}],"source_content_type":"text/x-rst","patch_set":5,"id":"3a71b18c_77f17494","line":422,"range":{"start_line":422,"start_character":23,"end_line":422,"end_character":32},"in_reply_to":"3a71b18c_aba48f4a","updated":"2016-12-07 09:00:27.000000000","message":"Done","commit_id":"5c0e9c53f367e25e93a816899ea6e29bc652aea9"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e37b8eb97b6c64f9b33a465ae4d75418afd7746","unresolved":false,"context_lines":[{"line_number":430,"context_line":"2.40"},{"line_number":431,"context_line":"----"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"  Support add tags for servers when booting."}],"source_content_type":"text/x-rst","patch_set":6,"id":"3a71b18c_a7f730f4","line":433,"updated":"2016-12-08 03:01:02.000000000","message":"We probably need to re-word this a bit. Maybe something like:\n\n\"Adds support for providing tags when creating a server. The schema is the same as in the 2.26 microversion.\"","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cc94b3b7c42cafa5195bdae33f714eb94c16e8fa","unresolved":false,"context_lines":[{"line_number":430,"context_line":"2.40"},{"line_number":431,"context_line":"----"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"  Support add tags for servers when booting."}],"source_content_type":"text/x-rst","patch_set":6,"id":"3a71b18c_47949ce7","line":433,"in_reply_to":"3a71b18c_a7f730f4","updated":"2016-12-08 03:18:04.000000000","message":"Done","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2186fb43f5724ec143a46eceb3eb28c9fc4a3698","unresolved":false,"context_lines":[{"line_number":430,"context_line":"2.40"},{"line_number":431,"context_line":"----"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"  Adds support for providing tags when creating a server. The schema is"},{"line_number":434,"context_line":"  the same as in the 2.26 microversion."}],"source_content_type":"text/x-rst","patch_set":17,"id":"1a6eadb0_b99be571","line":434,"range":{"start_line":433,"start_character":58,"end_line":434,"end_character":39},"updated":"2016-12-19 07:11:43.000000000","message":"This words make people confuse. Maybe we should say: The tag schema is same as....","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":430,"context_line":"2.40"},{"line_number":431,"context_line":"----"},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"  Adds support for providing tags when creating a server. The schema is"},{"line_number":434,"context_line":"  the same as in the 2.26 microversion."}],"source_content_type":"text/x-rst","patch_set":17,"id":"ba5201f7_f8ed3af0","line":434,"range":{"start_line":433,"start_character":58,"end_line":434,"end_character":39},"in_reply_to":"1a6eadb0_b99be571","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e37b8eb97b6c64f9b33a465ae4d75418afd7746","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"                    # instance"},{"line_number":1016,"context_line":"                    instance_group.members.extend(members)"},{"line_number":1017,"context_line":""},{"line_number":1018,"context_line":"                if tags:"},{"line_number":1019,"context_line":"                    tags \u003d objects.TagList.create(context, instance.uuid,"},{"line_number":1020,"context_line":"                                                  tags)"},{"line_number":1021,"context_line":""},{"line_number":1022,"context_line":"        # In the case of any exceptions, attempt DB cleanup and rollback the"},{"line_number":1023,"context_line":"        # quota reservations."}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_47365cb5","line":1020,"range":{"start_line":1018,"start_character":16,"end_line":1020,"end_character":55},"updated":"2016-12-08 03:01:02.000000000","message":"I think we need to set this on the instance above because that gets serialized and persisted in the BuildRequest which is eventually what\u0027s going to create the instance in conductor once we move this out (for cells v2).","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cc94b3b7c42cafa5195bdae33f714eb94c16e8fa","unresolved":false,"context_lines":[{"line_number":1015,"context_line":"                    # instance"},{"line_number":1016,"context_line":"                    instance_group.members.extend(members)"},{"line_number":1017,"context_line":""},{"line_number":1018,"context_line":"                if tags:"},{"line_number":1019,"context_line":"                    tags \u003d objects.TagList.create(context, instance.uuid,"},{"line_number":1020,"context_line":"                                                  tags)"},{"line_number":1021,"context_line":""},{"line_number":1022,"context_line":"        # In the case of any exceptions, attempt DB cleanup and rollback the"},{"line_number":1023,"context_line":"        # quota reservations."}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_87b5d47f","line":1020,"range":{"start_line":1018,"start_character":16,"end_line":1020,"end_character":55},"in_reply_to":"3a71b18c_47365cb5","updated":"2016-12-08 03:18:04.000000000","message":"Done","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e37b8eb97b6c64f9b33a465ae4d75418afd7746","unresolved":false,"context_lines":[{"line_number":1136,"context_line":"               availability_zone, user_data, metadata, injected_files,"},{"line_number":1137,"context_line":"               admin_password, access_ip_v4, access_ip_v6,"},{"line_number":1138,"context_line":"               requested_networks, config_drive,"},{"line_number":1139,"context_line":"               block_device_mapping, auto_disk_config, tags,"},{"line_number":1140,"context_line":"               filter_properties, reservation_id\u003dNone, legacy_bdm\u003dTrue,"},{"line_number":1141,"context_line":"               shutdown_terminate\u003dFalse, check_server_group_quota\u003dFalse):"},{"line_number":1142,"context_line":"        \"\"\"Verify all the input parameters regardless of the provisioning"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_87407409","line":1139,"range":{"start_line":1139,"start_character":55,"end_line":1139,"end_character":59},"updated":"2016-12-08 03:01:02.000000000","message":"Can we make this a kwarg and add it to the end with just tags\u003dNone?","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cc94b3b7c42cafa5195bdae33f714eb94c16e8fa","unresolved":false,"context_lines":[{"line_number":1136,"context_line":"               availability_zone, user_data, metadata, injected_files,"},{"line_number":1137,"context_line":"               admin_password, access_ip_v4, access_ip_v6,"},{"line_number":1138,"context_line":"               requested_networks, config_drive,"},{"line_number":1139,"context_line":"               block_device_mapping, auto_disk_config, tags,"},{"line_number":1140,"context_line":"               filter_properties, reservation_id\u003dNone, legacy_bdm\u003dTrue,"},{"line_number":1141,"context_line":"               shutdown_terminate\u003dFalse, check_server_group_quota\u003dFalse):"},{"line_number":1142,"context_line":"        \"\"\"Verify all the input parameters regardless of the provisioning"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_27a7a050","line":1139,"range":{"start_line":1139,"start_character":55,"end_line":1139,"end_character":59},"in_reply_to":"3a71b18c_87407409","updated":"2016-12-08 03:18:04.000000000","message":"Done","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e37b8eb97b6c64f9b33a465ae4d75418afd7746","unresolved":false,"context_lines":[{"line_number":1204,"context_line":""},{"line_number":1205,"context_line":"        instances \u003d []"},{"line_number":1206,"context_line":"        build_requests \u003d []"},{"line_number":1207,"context_line":"        # TODO(alaski): Cast to conductor here which will call the"},{"line_number":1208,"context_line":"        # scheduler and defer instance creation until the scheduler"},{"line_number":1209,"context_line":"        # has picked a cell/host. Set the instance_mapping to the cell"},{"line_number":1210,"context_line":"        # that the instance is scheduled to."},{"line_number":1211,"context_line":"        # NOTE(alaski): Instance and block device creation are going"},{"line_number":1212,"context_line":"        # to move to the conductor."},{"line_number":1213,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_c74a6c27","line":1210,"range":{"start_line":1207,"start_character":8,"end_line":1210,"end_character":44},"updated":"2016-12-08 03:01:02.000000000","message":"See this is what we\u0027re eventually going to do with the instance creation.","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e37b8eb97b6c64f9b33a465ae4d75418afd7746","unresolved":false,"context_lines":[{"line_number":1214,"context_line":"            for rs, build_request, im in instances_to_build:"},{"line_number":1215,"context_line":"                build_requests.append(build_request)"},{"line_number":1216,"context_line":"                instance \u003d build_request.get_new_instance(context)"},{"line_number":1217,"context_line":"                instance.create()"},{"line_number":1218,"context_line":"                instances.append(instance)"},{"line_number":1219,"context_line":"                self._create_block_device_mapping("},{"line_number":1220,"context_line":"                    build_request.block_device_mappings)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_275240de","line":1217,"updated":"2016-12-08 03:01:02.000000000","message":"Right now this is where the actual instance is created. I think we want tags to be a part of that. We probably need to handle this similar to how we\u0027re going to handle BlockDeviceMappings for an instance at create.","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cc94b3b7c42cafa5195bdae33f714eb94c16e8fa","unresolved":false,"context_lines":[{"line_number":1214,"context_line":"            for rs, build_request, im in instances_to_build:"},{"line_number":1215,"context_line":"                build_requests.append(build_request)"},{"line_number":1216,"context_line":"                instance \u003d build_request.get_new_instance(context)"},{"line_number":1217,"context_line":"                instance.create()"},{"line_number":1218,"context_line":"                instances.append(instance)"},{"line_number":1219,"context_line":"                self._create_block_device_mapping("},{"line_number":1220,"context_line":"                    build_request.block_device_mappings)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_674ef897","line":1217,"in_reply_to":"3a71b18c_275240de","updated":"2016-12-08 03:18:04.000000000","message":"Done","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"07b0d2333eda18b8d7cee3af15677cdb038e7781","unresolved":false,"context_lines":[{"line_number":965,"context_line":"                        instance_type, boot_meta, instance, security_groups,"},{"line_number":966,"context_line":"                        block_device_mapping, num_instances, i,"},{"line_number":967,"context_line":"                        shutdown_terminate, create_instance\u003dFalse)"},{"line_number":968,"context_line":"                tags_list \u003d []"},{"line_number":969,"context_line":"                if tags:"},{"line_number":970,"context_line":"                    for tag in tags:"},{"line_number":971,"context_line":"                        tag \u003d objects.Tag(context\u003dcontext,"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_362149fc","line":968,"updated":"2016-12-09 13:07:54.000000000","message":"tag_list is used only in \u0027if\u0027 body. I think this line should be moved there","commit_id":"3dcb1e769acb46ff747b96db98f3516151d8a62f"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"07b0d2333eda18b8d7cee3af15677cdb038e7781","unresolved":false,"context_lines":[{"line_number":985,"context_line":"                        instance\u003dinstance, instance_uuid\u003dinstance.uuid,"},{"line_number":986,"context_line":"                        project_id\u003dinstance.project_id,"},{"line_number":987,"context_line":"                        block_device_mappings\u003dblock_device_mapping.obj_clone(),"},{"line_number":988,"context_line":"                        tags\u003dtags.obj_clone())"},{"line_number":989,"context_line":"                build_request.create()"},{"line_number":990,"context_line":"                build_request.block_device_mappings \u003d block_device_mapping"},{"line_number":991,"context_line":"                build_request.tags \u003d tags"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_96669d27","line":988,"updated":"2016-12-09 13:07:54.000000000","message":"if tags is \u0027None\u0027 of \u0027[]\u0027 here will be an error","commit_id":"3dcb1e769acb46ff747b96db98f3516151d8a62f"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"07b0d2333eda18b8d7cee3af15677cdb038e7781","unresolved":false,"context_lines":[{"line_number":1428,"context_line":"                raise exception.InvalidBDMLocalsLimit()"},{"line_number":1429,"context_line":""},{"line_number":1430,"context_line":"    def _create_tags(self, tags):"},{"line_number":1431,"context_line":"        db_tags \u003d copy.deepcopy(tags)"},{"line_number":1432,"context_line":"        for tag in db_tags:"},{"line_number":1433,"context_line":"            tag.create()"},{"line_number":1434,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_3135d3d9","line":1431,"updated":"2016-12-09 13:07:54.000000000","message":"nit: \u0027db_tags\u0027 is not the best name. Here you have an object \u0027TagList\u0027. \u0027db_tags\u0027 is a good name for list and db models which were returned from db. like here https://github.com/openstack/nova/blob/master/nova/objects/tag.py#L71","commit_id":"3dcb1e769acb46ff747b96db98f3516151d8a62f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"0afa84012b5a52745f9428a809dff86593071d2c","unresolved":false,"context_lines":[{"line_number":1428,"context_line":"                raise exception.InvalidBDMLocalsLimit()"},{"line_number":1429,"context_line":""},{"line_number":1430,"context_line":"    def _create_tags(self, tags):"},{"line_number":1431,"context_line":"        db_tags \u003d copy.deepcopy(tags)"},{"line_number":1432,"context_line":"        for tag in db_tags:"},{"line_number":1433,"context_line":"            tag.create()"},{"line_number":1434,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_9dd5a3e6","line":1431,"in_reply_to":"3a71b18c_3135d3d9","updated":"2016-12-12 07:48:16.000000000","message":"Done","commit_id":"3dcb1e769acb46ff747b96db98f3516151d8a62f"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"07b0d2333eda18b8d7cee3af15677cdb038e7781","unresolved":false,"context_lines":[{"line_number":1430,"context_line":"    def _create_tags(self, tags):"},{"line_number":1431,"context_line":"        db_tags \u003d copy.deepcopy(tags)"},{"line_number":1432,"context_line":"        for tag in db_tags:"},{"line_number":1433,"context_line":"            tag.create()"},{"line_number":1434,"context_line":""},{"line_number":1435,"context_line":"    def _populate_instance_names(self, instance, num_instances):"},{"line_number":1436,"context_line":"        \"\"\"Populate instance display_name and hostname.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_b15803fc","line":1433,"updated":"2016-12-09 13:07:54.000000000","message":"Here you create tags one by one. It will create n\u003dlen(tags) queries to db. \n\nThe better way is to do it in one db query. You can do it by two ways:\n1) extract tag names from \u0027tags\u0027 and use class method of TagList object to create a set of tags by one query\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/tag.py#L70-L72\n\n2) add new method into TagList which will be create current TagList object. Like you do it for single tag \u0027tag.create()\u0027 but new method will do it for whole set of tags by one db query. like here https://github.com/openstack/nova/blob/master/nova/objects/tag.py#L71","commit_id":"3dcb1e769acb46ff747b96db98f3516151d8a62f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"0afa84012b5a52745f9428a809dff86593071d2c","unresolved":false,"context_lines":[{"line_number":1430,"context_line":"    def _create_tags(self, tags):"},{"line_number":1431,"context_line":"        db_tags \u003d copy.deepcopy(tags)"},{"line_number":1432,"context_line":"        for tag in db_tags:"},{"line_number":1433,"context_line":"            tag.create()"},{"line_number":1434,"context_line":""},{"line_number":1435,"context_line":"    def _populate_instance_names(self, instance, num_instances):"},{"line_number":1436,"context_line":"        \"\"\"Populate instance display_name and hostname.\"\"\""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_5dcf8b55","line":1433,"in_reply_to":"3a71b18c_b15803fc","updated":"2016-12-12 07:48:16.000000000","message":"Done","commit_id":"3dcb1e769acb46ff747b96db98f3516151d8a62f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":931,"context_line":"            max_count, base_options, boot_meta, security_groups,"},{"line_number":932,"context_line":"            block_device_mapping, shutdown_terminate,"},{"line_number":933,"context_line":"            instance_group, check_server_group_quota, filter_properties,"},{"line_number":934,"context_line":"            key_pair, tags):"},{"line_number":935,"context_line":"        # Reserve quotas"},{"line_number":936,"context_line":"        num_instances, quotas \u003d self._check_num_instances_quota("},{"line_number":937,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_26cc8b69","line":934,"range":{"start_line":934,"start_character":22,"end_line":934,"end_character":26},"updated":"2016-12-27 22:23:15.000000000","message":"Can we make this a kwarg which defaults to None so we don\u0027t have to make a bunch of unit test changes for this?","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":931,"context_line":"            max_count, base_options, boot_meta, security_groups,"},{"line_number":932,"context_line":"            block_device_mapping, shutdown_terminate,"},{"line_number":933,"context_line":"            instance_group, check_server_group_quota, filter_properties,"},{"line_number":934,"context_line":"            key_pair, tags):"},{"line_number":935,"context_line":"        # Reserve quotas"},{"line_number":936,"context_line":"        num_instances, quotas \u003d self._check_num_instances_quota("},{"line_number":937,"context_line":"                context, instance_type, min_count, max_count)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_388c2235","line":934,"range":{"start_line":934,"start_character":22,"end_line":934,"end_character":26},"in_reply_to":"da4df55a_26cc8b69","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":988,"context_line":"                        tags\u003dtags)"},{"line_number":989,"context_line":"                build_request.create()"},{"line_number":990,"context_line":"                build_request.block_device_mappings \u003d block_device_mapping"},{"line_number":991,"context_line":"                build_request.tags \u003d tags"},{"line_number":992,"context_line":""},{"line_number":993,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":994,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_a6d4fb1f","line":991,"updated":"2016-12-27 22:23:15.000000000","message":"This is redundant.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":988,"context_line":"                        tags\u003dtags)"},{"line_number":989,"context_line":"                build_request.create()"},{"line_number":990,"context_line":"                build_request.block_device_mappings \u003d block_device_mapping"},{"line_number":991,"context_line":"                build_request.tags \u003d tags"},{"line_number":992,"context_line":""},{"line_number":993,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":994,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_78b4ead0","line":991,"in_reply_to":"da4df55a_a6d4fb1f","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fd0c3e0517c93102ee4da6565e6f3f12c14f12ef","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"                        instance_type, boot_meta, instance, security_groups,"},{"line_number":1031,"context_line":"                        block_device_mapping, num_instances, i,"},{"line_number":1032,"context_line":"                        shutdown_terminate, create_instance\u003dFalse)"},{"line_number":1033,"context_line":"                tags_list \u003d []"},{"line_number":1034,"context_line":"                if tags:"},{"line_number":1035,"context_line":"                    for tag in tags:"},{"line_number":1036,"context_line":"                        tag \u003d objects.Tag(context\u003dcontext,"},{"line_number":1037,"context_line":"                                          resource_id\u003dinstance.uuid,"},{"line_number":1038,"context_line":"                                          tag\u003dtag)"},{"line_number":1039,"context_line":"                        tags_list.append(tag)"},{"line_number":1040,"context_line":"                tags \u003d objects.TagList(context\u003dcontext, objects\u003dtags_list)"},{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"                block_device_mapping \u003d ("},{"line_number":1043,"context_line":"                    self._bdm_validate_set_size_and_instance(context,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_4e3bd1d0","line":1040,"range":{"start_line":1033,"start_character":16,"end_line":1040,"end_character":74},"updated":"2017-04-24 06:55:20.000000000","message":"Can we move this into API layer? I hope after the API layer, the tags is just a \u0027objects.TagList\u0027","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6eecb663f1d6cc74b57bbd412820b8a2702966d7","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"                        instance_type, boot_meta, instance, security_groups,"},{"line_number":1031,"context_line":"                        block_device_mapping, num_instances, i,"},{"line_number":1032,"context_line":"                        shutdown_terminate, create_instance\u003dFalse)"},{"line_number":1033,"context_line":"                tags_list \u003d []"},{"line_number":1034,"context_line":"                if tags:"},{"line_number":1035,"context_line":"                    for tag in tags:"},{"line_number":1036,"context_line":"                        tag \u003d objects.Tag(context\u003dcontext,"},{"line_number":1037,"context_line":"                                          resource_id\u003dinstance.uuid,"},{"line_number":1038,"context_line":"                                          tag\u003dtag)"},{"line_number":1039,"context_line":"                        tags_list.append(tag)"},{"line_number":1040,"context_line":"                tags \u003d objects.TagList(context\u003dcontext, objects\u003dtags_list)"},{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"                block_device_mapping \u003d ("},{"line_number":1043,"context_line":"                    self._bdm_validate_set_size_and_instance(context,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_58e257d7","line":1040,"range":{"start_line":1033,"start_character":16,"end_line":1040,"end_character":74},"in_reply_to":"5ff73747_44c28435","updated":"2017-04-25 03:15:39.000000000","message":"Done","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"13d575369bcf5bc30a77a1c234f5398901eda548","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"                        instance_type, boot_meta, instance, security_groups,"},{"line_number":1031,"context_line":"                        block_device_mapping, num_instances, i,"},{"line_number":1032,"context_line":"                        shutdown_terminate, create_instance\u003dFalse)"},{"line_number":1033,"context_line":"                tags_list \u003d []"},{"line_number":1034,"context_line":"                if tags:"},{"line_number":1035,"context_line":"                    for tag in tags:"},{"line_number":1036,"context_line":"                        tag \u003d objects.Tag(context\u003dcontext,"},{"line_number":1037,"context_line":"                                          resource_id\u003dinstance.uuid,"},{"line_number":1038,"context_line":"                                          tag\u003dtag)"},{"line_number":1039,"context_line":"                        tags_list.append(tag)"},{"line_number":1040,"context_line":"                tags \u003d objects.TagList(context\u003dcontext, objects\u003dtags_list)"},{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"                block_device_mapping \u003d ("},{"line_number":1043,"context_line":"                    self._bdm_validate_set_size_and_instance(context,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_71d0b251","line":1040,"range":{"start_line":1033,"start_character":16,"end_line":1040,"end_character":74},"in_reply_to":"5ff73747_4e3bd1d0","updated":"2017-04-24 07:13:46.000000000","message":"I will check","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"88a7e34dcae10ff2b236487bd292d2d2d4bbbb3d","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"                        instance_type, boot_meta, instance, security_groups,"},{"line_number":1031,"context_line":"                        block_device_mapping, num_instances, i,"},{"line_number":1032,"context_line":"                        shutdown_terminate, create_instance\u003dFalse)"},{"line_number":1033,"context_line":"                tags_list \u003d []"},{"line_number":1034,"context_line":"                if tags:"},{"line_number":1035,"context_line":"                    for tag in tags:"},{"line_number":1036,"context_line":"                        tag \u003d objects.Tag(context\u003dcontext,"},{"line_number":1037,"context_line":"                                          resource_id\u003dinstance.uuid,"},{"line_number":1038,"context_line":"                                          tag\u003dtag)"},{"line_number":1039,"context_line":"                        tags_list.append(tag)"},{"line_number":1040,"context_line":"                tags \u003d objects.TagList(context\u003dcontext, objects\u003dtags_list)"},{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"                block_device_mapping \u003d ("},{"line_number":1043,"context_line":"                    self._bdm_validate_set_size_and_instance(context,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_ec603c35","line":1040,"range":{"start_line":1033,"start_character":16,"end_line":1040,"end_character":74},"in_reply_to":"5ff73747_58e257d7","updated":"2017-04-25 09:12:57.000000000","message":"Ah, no, it is not possible, as tags requires resource_id(instance.uuid here) to create, and in REST API layer, we do not have instance.uuid.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":1030,"context_line":"                        instance_type, boot_meta, instance, security_groups,"},{"line_number":1031,"context_line":"                        block_device_mapping, num_instances, i,"},{"line_number":1032,"context_line":"                        shutdown_terminate, create_instance\u003dFalse)"},{"line_number":1033,"context_line":"                tags_list \u003d []"},{"line_number":1034,"context_line":"                if tags:"},{"line_number":1035,"context_line":"                    for tag in tags:"},{"line_number":1036,"context_line":"                        tag \u003d objects.Tag(context\u003dcontext,"},{"line_number":1037,"context_line":"                                          resource_id\u003dinstance.uuid,"},{"line_number":1038,"context_line":"                                          tag\u003dtag)"},{"line_number":1039,"context_line":"                        tags_list.append(tag)"},{"line_number":1040,"context_line":"                tags \u003d objects.TagList(context\u003dcontext, objects\u003dtags_list)"},{"line_number":1041,"context_line":""},{"line_number":1042,"context_line":"                block_device_mapping \u003d ("},{"line_number":1043,"context_line":"                    self._bdm_validate_set_size_and_instance(context,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_44c28435","line":1040,"range":{"start_line":1033,"start_character":16,"end_line":1040,"end_character":74},"in_reply_to":"5ff73747_71d0b251","updated":"2017-04-24 15:13:13.000000000","message":"I assume Alex means the REST API layer. I think that\u0027s a good point, and will help with some of the object clone weirdness below.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":1050,"context_line":"                        instance\u003dinstance, instance_uuid\u003dinstance.uuid,"},{"line_number":1051,"context_line":"                        project_id\u003dinstance.project_id,"},{"line_number":1052,"context_line":"                        block_device_mappings\u003dblock_device_mapping.obj_clone(),"},{"line_number":1053,"context_line":"                        tags\u003dtags)"},{"line_number":1054,"context_line":"                build_request.create()"},{"line_number":1055,"context_line":"                build_request.block_device_mappings \u003d block_device_mapping"},{"line_number":1056,"context_line":"                build_request.tags \u003d tags"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_64da2018","line":1053,"range":{"start_line":1053,"start_character":29,"end_line":1053,"end_character":33},"updated":"2017-04-24 15:13:13.000000000","message":"We should clone this since build_request.create() is going to serialize and then deserialize it, which will drop the context and orphan the TagList object which is why you\u0027re jumping through hoops later to try and create the tags in conductor.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fd0c3e0517c93102ee4da6565e6f3f12c14f12ef","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"                        tags\u003dtags)"},{"line_number":1054,"context_line":"                build_request.create()"},{"line_number":1055,"context_line":"                build_request.block_device_mappings \u003d block_device_mapping"},{"line_number":1056,"context_line":"                build_request.tags \u003d tags"},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":1059,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_ee5f3d0c","line":1056,"updated":"2017-04-24 06:55:20.000000000","message":"You already assign the tags at line 1053, why assign again?","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8bd5872d81a731d0fd4d185ef943f958dbf3fa63","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"                        tags\u003dtags)"},{"line_number":1054,"context_line":"                build_request.create()"},{"line_number":1055,"context_line":"                build_request.block_device_mappings \u003d block_device_mapping"},{"line_number":1056,"context_line":"                build_request.tags \u003d tags"},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":1059,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_30be9265","line":1056,"in_reply_to":"5ff73747_01190ed6","updated":"2017-04-24 16:47:47.000000000","message":"This removes the build_request.block_device_mapping workaround:\n\nhttps://review.openstack.org/#/c/459406/","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"13b647d66c75e16a509b40f7b85762900a127fde","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"                        tags\u003dtags)"},{"line_number":1054,"context_line":"                build_request.create()"},{"line_number":1055,"context_line":"                build_request.block_device_mappings \u003d block_device_mapping"},{"line_number":1056,"context_line":"                build_request.tags \u003d tags"},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":1059,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_3b6540b6","line":1056,"in_reply_to":"5ff73747_30be9265","updated":"2017-04-25 07:38:14.000000000","message":"@Matt, thanks, I see now.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"f4300f36ea9c1212f6a75b0a28fb9aee11576578","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"                        tags\u003dtags)"},{"line_number":1054,"context_line":"                build_request.create()"},{"line_number":1055,"context_line":"                build_request.block_device_mappings \u003d block_device_mapping"},{"line_number":1056,"context_line":"                build_request.tags \u003d tags"},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":1059,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_0ef3600c","line":1056,"in_reply_to":"5ff73747_3b6540b6","updated":"2017-04-25 08:02:50.000000000","message":"So, should we still add tags to build_request?","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"13d575369bcf5bc30a77a1c234f5398901eda548","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"                        tags\u003dtags)"},{"line_number":1054,"context_line":"                build_request.create()"},{"line_number":1055,"context_line":"                build_request.block_device_mappings \u003d block_device_mapping"},{"line_number":1056,"context_line":"                build_request.tags \u003d tags"},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":1059,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_f1ecc2f4","line":1056,"in_reply_to":"5ff73747_ee5f3d0c","updated":"2017-04-24 07:13:46.000000000","message":"as you see, bdm has done the same, and I founded that if I don\u0027t do this here, problem will happen latter, for example in: https://review.openstack.org/#/c/394321/36/nova/conductor/manager.py@1075 , if I don\u0027t do it here, build_request will have tags record, but the tags record there will not include _context, which will cause error. I did some reading and it seems something related obj, and I may need some help on it if the current way is unacceptable.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":1053,"context_line":"                        tags\u003dtags)"},{"line_number":1054,"context_line":"                build_request.create()"},{"line_number":1055,"context_line":"                build_request.block_device_mappings \u003d block_device_mapping"},{"line_number":1056,"context_line":"                build_request.tags \u003d tags"},{"line_number":1057,"context_line":""},{"line_number":1058,"context_line":"                # Create an instance_mapping.  The null cell_mapping indicates"},{"line_number":1059,"context_line":"                # that the instance doesn\u0027t yet exist in a cell, and lookups"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_01190ed6","line":1056,"in_reply_to":"5ff73747_f1ecc2f4","updated":"2017-04-24 15:13:13.000000000","message":"This is the change Kevin is referring to I believe:\n\nhttps://review.openstack.org/#/c/374267/24/nova/compute/api.py\n\nNote that _bdm_validate_set_size_and_instance makes a clone of the bdm list and then we clone it again when we initialize the BuildRequest object.\n\nI believe that came about because of something I noted here earlier in that change:\n\nhttps://review.openstack.org/#/c/374267/21/nova/compute/api.py@1197\n\nSpecifically:\n\n\u003e _bdm_validate_set_size_and_instance clones the BlockDeviceMappingList and stores the volume size and instance_uuid on each BDM in the list. Then that BDMList is stored on the BuildRequest. When BuildRequest.create() is called it serializes that list to store it in the DB and then hydrates it to set it back on the BuildRequest object, which loses the RequestContext making the BuildRequest.block_device_mapping an orphaned object.\n\nSo I think to summarize the problem, we pass the BDM list when creating the BuildRequest because that will serialize and then deserialize that BDM list, and when we deserialize it, it won\u0027t have a context set, so it\u0027s \"orphaned\". This is problematic later when we call BlockDeviceMapping.update_or_create to create the BDMs in the database, because of the @remotable decorator:\n\nhttps://github.com/openstack/nova/blob/master/nova/objects/block_device.py#L168\n\nhttps://github.com/openstack/oslo.versionedobjects/blob/master/oslo_versionedobjects/base.py#L206\n\nSo that\u0027s where it used to fail before we put the original BDM list back onto the BuildRequest *after* we called create(), because the original BDM list still has it\u0027s context set.\n\nAt that time it was a necessary change because we used the build_request.block_device_mapping to create the BDMs in the API here:\n\nhttps://review.openstack.org/#/c/374267/24/nova/compute/api.py@1215\n\nHowever, we don\u0027t do that anymore - we pass the original BlockDeviceMappingList to conductor now on L1279 below.\n\nSo we could probably clean some of this BDM hack code up now.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"               requested_networks, config_drive,"},{"line_number":1187,"context_line":"               block_device_mapping, auto_disk_config,"},{"line_number":1188,"context_line":"               filter_properties, reservation_id\u003dNone, legacy_bdm\u003dTrue,"},{"line_number":1189,"context_line":"               tags\u003dNone, shutdown_terminate\u003dFalse,"},{"line_number":1190,"context_line":"               check_server_group_quota\u003dFalse):"},{"line_number":1191,"context_line":"        \"\"\"Verify all the input parameters regardless of the provisioning"},{"line_number":1192,"context_line":"        strategy being performed and schedule the instance(s) for"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_4445e4b2","line":1189,"range":{"start_line":1189,"start_character":15,"end_line":1189,"end_character":24},"updated":"2017-04-24 15:13:13.000000000","message":"nit: if you\u0027re adding new kwargs, add them to the end of the list please.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6eecb663f1d6cc74b57bbd412820b8a2702966d7","unresolved":false,"context_lines":[{"line_number":1186,"context_line":"               requested_networks, config_drive,"},{"line_number":1187,"context_line":"               block_device_mapping, auto_disk_config,"},{"line_number":1188,"context_line":"               filter_properties, reservation_id\u003dNone, legacy_bdm\u003dTrue,"},{"line_number":1189,"context_line":"               tags\u003dNone, shutdown_terminate\u003dFalse,"},{"line_number":1190,"context_line":"               check_server_group_quota\u003dFalse):"},{"line_number":1191,"context_line":"        \"\"\"Verify all the input parameters regardless of the provisioning"},{"line_number":1192,"context_line":"        strategy being performed and schedule the instance(s) for"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_b8483bcc","line":1189,"range":{"start_line":1189,"start_character":15,"end_line":1189,"end_character":24},"in_reply_to":"5ff73747_4445e4b2","updated":"2017-04-25 03:15:39.000000000","message":"Done","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":1276,"context_line":"                block_device_mapping\u003dblock_device_mapping,"},{"line_number":1277,"context_line":"                legacy_bdm\u003dFalse)"},{"line_number":1278,"context_line":"        else:"},{"line_number":1279,"context_line":"            self.compute_task_api.schedule_and_build_instances("},{"line_number":1280,"context_line":"                context,"},{"line_number":1281,"context_line":"                build_requests\u003dbuild_requests,"},{"line_number":1282,"context_line":"                request_spec\u003drequest_specs,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_04bd9cb6","line":1279,"range":{"start_line":1279,"start_character":34,"end_line":1279,"end_character":62},"updated":"2017-04-24 15:13:13.000000000","message":"I think we need to pass the original TagList to this method rather than pulling the tags off the build request. As noted above, we want the original TagList going to conductor which has the request context on it, so it\u0027s not orphaned. You\u0027re doing that today but setting it on the build request that is passed to conductor, which also works, but is much less obvious. Maybe dansmith has an opinion on this.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6eecb663f1d6cc74b57bbd412820b8a2702966d7","unresolved":false,"context_lines":[{"line_number":1276,"context_line":"                block_device_mapping\u003dblock_device_mapping,"},{"line_number":1277,"context_line":"                legacy_bdm\u003dFalse)"},{"line_number":1278,"context_line":"        else:"},{"line_number":1279,"context_line":"            self.compute_task_api.schedule_and_build_instances("},{"line_number":1280,"context_line":"                context,"},{"line_number":1281,"context_line":"                build_requests\u003dbuild_requests,"},{"line_number":1282,"context_line":"                request_spec\u003drequest_specs,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_d8242710","line":1279,"range":{"start_line":1279,"start_character":34,"end_line":1279,"end_character":62},"in_reply_to":"5ff73747_04bd9cb6","updated":"2017-04-25 03:15:39.000000000","message":"Yeah, I also thought that will be easier while coding","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":1640,"context_line":"               admin_password\u003dNone, block_device_mapping\u003dNone,"},{"line_number":1641,"context_line":"               access_ip_v4\u003dNone, access_ip_v6\u003dNone, requested_networks\u003dNone,"},{"line_number":1642,"context_line":"               config_drive\u003dNone, auto_disk_config\u003dNone, scheduler_hints\u003dNone,"},{"line_number":1643,"context_line":"               tags\u003dNone, legacy_bdm\u003dTrue, shutdown_terminate\u003dFalse,"},{"line_number":1644,"context_line":"               check_server_group_quota\u003dFalse):"},{"line_number":1645,"context_line":"        \"\"\"Provision instances, sending instance information to the"},{"line_number":1646,"context_line":"        scheduler.  The scheduler will determine where the instance(s)"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_e7a4f20a","line":1643,"updated":"2017-04-24 15:13:13.000000000","message":"put the new kwarg at the end","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6eecb663f1d6cc74b57bbd412820b8a2702966d7","unresolved":false,"context_lines":[{"line_number":1640,"context_line":"               admin_password\u003dNone, block_device_mapping\u003dNone,"},{"line_number":1641,"context_line":"               access_ip_v4\u003dNone, access_ip_v6\u003dNone, requested_networks\u003dNone,"},{"line_number":1642,"context_line":"               config_drive\u003dNone, auto_disk_config\u003dNone, scheduler_hints\u003dNone,"},{"line_number":1643,"context_line":"               tags\u003dNone, legacy_bdm\u003dTrue, shutdown_terminate\u003dFalse,"},{"line_number":1644,"context_line":"               check_server_group_quota\u003dFalse):"},{"line_number":1645,"context_line":"        \"\"\"Provision instances, sending instance information to the"},{"line_number":1646,"context_line":"        scheduler.  The scheduler will determine where the instance(s)"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_b8215bfe","line":1643,"in_reply_to":"5ff73747_e7a4f20a","updated":"2017-04-25 03:15:39.000000000","message":"Done","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":1677,"context_line":"                       access_ip_v4, access_ip_v6,"},{"line_number":1678,"context_line":"                       requested_networks, config_drive,"},{"line_number":1679,"context_line":"                       block_device_mapping, auto_disk_config,"},{"line_number":1680,"context_line":"                       tags\u003dtags,"},{"line_number":1681,"context_line":"                       filter_properties\u003dfilter_properties,"},{"line_number":1682,"context_line":"                       legacy_bdm\u003dlegacy_bdm,"},{"line_number":1683,"context_line":"                       shutdown_terminate\u003dshutdown_terminate,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_24f09867","line":1680,"updated":"2017-04-24 15:13:13.000000000","message":"Pass the new kwarg at the end of the list please.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6eecb663f1d6cc74b57bbd412820b8a2702966d7","unresolved":false,"context_lines":[{"line_number":1677,"context_line":"                       access_ip_v4, access_ip_v6,"},{"line_number":1678,"context_line":"                       requested_networks, config_drive,"},{"line_number":1679,"context_line":"                       block_device_mapping, auto_disk_config,"},{"line_number":1680,"context_line":"                       tags\u003dtags,"},{"line_number":1681,"context_line":"                       filter_properties\u003dfilter_properties,"},{"line_number":1682,"context_line":"                       legacy_bdm\u003dlegacy_bdm,"},{"line_number":1683,"context_line":"                       shutdown_terminate\u003dshutdown_terminate,"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_981e9fb8","line":1680,"in_reply_to":"5ff73747_24f09867","updated":"2017-04-25 03:15:39.000000000","message":"Done","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"}],"nova/conductor/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":834,"context_line":"                                     block_device_mapping):"},{"line_number":835,"context_line":"        \"\"\"Create the BlockDeviceMapping objects in the db."},{"line_number":836,"context_line":""},{"line_number":837,"context_line":"        This method makes a copy of the list in order to avoid using the same"},{"line_number":838,"context_line":"        id field in case this is called for multiple instances."},{"line_number":839,"context_line":"        \"\"\""},{"line_number":840,"context_line":"        LOG.debug(\"block_device_mapping %s\", list(block_device_mapping),"},{"line_number":841,"context_line":"                  instance_uuid\u003dinstance_uuid)"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_c713360d","line":838,"range":{"start_line":837,"start_character":8,"end_line":838,"end_character":63},"updated":"2017-04-24 15:13:13.000000000","message":"We probably need to do similar for the TagList too.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fd0c3e0517c93102ee4da6565e6f3f12c14f12ef","unresolved":false,"context_lines":[{"line_number":848,"context_line":""},{"line_number":849,"context_line":"    def _create_tags(self, context, instance_id, tags_to_create):"},{"line_number":850,"context_line":"        tags \u003d []"},{"line_number":851,"context_line":"        for tag in tags_to_create:"},{"line_number":852,"context_line":"            tags.append(tag.tag)"},{"line_number":853,"context_line":"        objects.TagList.create(context, instance_id, tags)"},{"line_number":854,"context_line":"        return tags_to_create"},{"line_number":855,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_111cce68","line":852,"range":{"start_line":851,"start_character":8,"end_line":852,"end_character":32},"updated":"2017-04-24 06:55:20.000000000","message":"Maybe we should make the objects.TagListCreate to accept the TagList","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":848,"context_line":""},{"line_number":849,"context_line":"    def _create_tags(self, context, instance_id, tags_to_create):"},{"line_number":850,"context_line":"        tags \u003d []"},{"line_number":851,"context_line":"        for tag in tags_to_create:"},{"line_number":852,"context_line":"            tags.append(tag.tag)"},{"line_number":853,"context_line":"        objects.TagList.create(context, instance_id, tags)"},{"line_number":854,"context_line":"        return tags_to_create"},{"line_number":855,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_6791029a","line":852,"range":{"start_line":851,"start_character":8,"end_line":852,"end_character":32},"in_reply_to":"5ff73747_111cce68","updated":"2017-04-24 15:13:13.000000000","message":"What is TagListCreate? Do you mean TagList.create()?","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"13d575369bcf5bc30a77a1c234f5398901eda548","unresolved":false,"context_lines":[{"line_number":848,"context_line":""},{"line_number":849,"context_line":"    def _create_tags(self, context, instance_id, tags_to_create):"},{"line_number":850,"context_line":"        tags \u003d []"},{"line_number":851,"context_line":"        for tag in tags_to_create:"},{"line_number":852,"context_line":"            tags.append(tag.tag)"},{"line_number":853,"context_line":"        objects.TagList.create(context, instance_id, tags)"},{"line_number":854,"context_line":"        return tags_to_create"},{"line_number":855,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_f1c5e25c","line":852,"range":{"start_line":851,"start_character":8,"end_line":852,"end_character":32},"in_reply_to":"5ff73747_111cce68","updated":"2017-04-24 07:13:46.000000000","message":"Yeah, I\u0027m also thinking something like this, had a very hard time coding this patch","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"13b647d66c75e16a509b40f7b85762900a127fde","unresolved":false,"context_lines":[{"line_number":848,"context_line":""},{"line_number":849,"context_line":"    def _create_tags(self, context, instance_id, tags_to_create):"},{"line_number":850,"context_line":"        tags \u003d []"},{"line_number":851,"context_line":"        for tag in tags_to_create:"},{"line_number":852,"context_line":"            tags.append(tag.tag)"},{"line_number":853,"context_line":"        objects.TagList.create(context, instance_id, tags)"},{"line_number":854,"context_line":"        return tags_to_create"},{"line_number":855,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_d8cb0251","line":852,"range":{"start_line":851,"start_character":8,"end_line":852,"end_character":32},"in_reply_to":"5ff73747_6791029a","updated":"2017-04-25 07:38:14.000000000","message":"@Matt, yea, I mean TagList.create(), sorry for the typo.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":851,"context_line":"        for tag in tags_to_create:"},{"line_number":852,"context_line":"            tags.append(tag.tag)"},{"line_number":853,"context_line":"        objects.TagList.create(context, instance_id, tags)"},{"line_number":854,"context_line":"        return tags_to_create"},{"line_number":855,"context_line":""},{"line_number":856,"context_line":"    def _bury_in_cell0(self, context, request_spec, exc,"},{"line_number":857,"context_line":"                       build_requests\u003dNone, instances\u003dNone):"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_07335ead","line":854,"range":{"start_line":854,"start_character":15,"end_line":854,"end_character":29},"updated":"2017-04-24 15:13:13.000000000","message":"This is returning the formal parameter, I\u0027d think you\u0027d want to return the result of TagList.create.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":985,"context_line":"                instance_bdms \u003d self._create_block_device_mapping("},{"line_number":986,"context_line":"                    instance.flavor, instance.uuid, block_device_mapping)"},{"line_number":987,"context_line":"                instance_tags \u003d self._create_tags(context, instance.uuid,"},{"line_number":988,"context_line":"                                                  build_request.tags)"},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"            # Update mapping for instance. Normally this check is guarded by"},{"line_number":991,"context_line":"            # a try/except but if we\u0027re here we know that a newer nova-api"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_e7cbd2a2","line":988,"range":{"start_line":988,"start_character":50,"end_line":988,"end_character":68},"updated":"2017-04-24 15:13:13.000000000","message":"As noted in the API code, you\u0027re rebuilding this TagList from scratch because what is on build_request.tags is orphaned, because BuildRequest.create() serialized and then deserialized it. If we just pass the original TagList in from the API to schedule_and_build_instances, then it will have the context set and we can just create it in the cell. So your _create_tags method just becomes a for loop over the TagList and call tag.create() on each object in the list.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"13b647d66c75e16a509b40f7b85762900a127fde","unresolved":false,"context_lines":[{"line_number":985,"context_line":"                instance_bdms \u003d self._create_block_device_mapping("},{"line_number":986,"context_line":"                    instance.flavor, instance.uuid, block_device_mapping)"},{"line_number":987,"context_line":"                instance_tags \u003d self._create_tags(context, instance.uuid,"},{"line_number":988,"context_line":"                                                  build_request.tags)"},{"line_number":989,"context_line":""},{"line_number":990,"context_line":"            # Update mapping for instance. Normally this check is guarded by"},{"line_number":991,"context_line":"            # a try/except but if we\u0027re here we know that a newer nova-api"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_db73fc7f","line":988,"range":{"start_line":988,"start_character":50,"end_line":988,"end_character":68},"in_reply_to":"5ff73747_e7cbd2a2","updated":"2017-04-25 07:38:14.000000000","message":"Can we pass the context in obj_from_primitive method at https://review.openstack.org/#/c/394321/36/nova/objects/build_request.py@142 ?\n\n\u0027obj_from_primitive\u0027 have a optional \u0027context\u0027 parameter?","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"fd0c3e0517c93102ee4da6565e6f3f12c14f12ef","unresolved":false,"context_lines":[{"line_number":1074,"context_line":"            for tag in instance_tags:"},{"line_number":1075,"context_line":"                with obj_target_cell(tag, cell):"},{"line_number":1076,"context_line":"                    try:"},{"line_number":1077,"context_line":"                        tag.destroy(context, tag.resource_id, tag.tag)"},{"line_number":1078,"context_line":"                    except (exception.InstanceNotFound,"},{"line_number":1079,"context_line":"                            exception.InstanceTagNotFound):"},{"line_number":1080,"context_line":"                        pass"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_0e594959","line":1077,"updated":"2017-04-24 06:55:20.000000000","message":"we can delete the tags by one db call https://github.com/openstack/nova/blob/master/nova/objects/tag.py#L75","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"3e981377f5fb43126a9ee136144c8c5013d531ab","unresolved":false,"context_lines":[{"line_number":1074,"context_line":"            for tag in instance_tags:"},{"line_number":1075,"context_line":"                with obj_target_cell(tag, cell):"},{"line_number":1076,"context_line":"                    try:"},{"line_number":1077,"context_line":"                        tag.destroy(context, tag.resource_id, tag.tag)"},{"line_number":1078,"context_line":"                    except (exception.InstanceNotFound,"},{"line_number":1079,"context_line":"                            exception.InstanceTagNotFound):"},{"line_number":1080,"context_line":"                        pass"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_fb87d8d6","line":1077,"in_reply_to":"5ff73747_0e594959","updated":"2017-04-25 07:47:12.000000000","message":"Yeah","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"}],"nova/db/sqlalchemy/api_migrations/migrate_repo/versions/031_build_requests_add_tags.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"8490736cb9ebd0edd211b7a303f2743d1be7a5cf","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova.db.sqlalchemy import api_models"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def upgrade(migrate_engine):"},{"line_number":21,"context_line":"    meta \u003d MetaData()"},{"line_number":22,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_a62cfb02","line":20,"updated":"2016-12-27 22:24:24.000000000","message":"We need a unit test for this. They go here:\n\nhttps://github.com/openstack/nova/blob/master/nova/tests/functional/db/api/test_migrations.py","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova.db.sqlalchemy import api_models"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def upgrade(migrate_engine):"},{"line_number":21,"context_line":"    meta \u003d MetaData()"},{"line_number":22,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_f8c0da2c","line":20,"in_reply_to":"da4df55a_a62cfb02","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    build_requests \u003d Table(\u0027build_requests\u0027, meta, autoload\u003dTrue)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    if not hasattr(build_requests.c, \u0027block_device_mappings\u0027):"},{"line_number":27,"context_line":"        build_requests.create_column(Column(\u0027tags\u0027, api_models.MediumText()))"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_06e067f9","line":26,"range":{"start_line":26,"start_character":38,"end_line":26,"end_character":59},"updated":"2016-12-27 22:23:15.000000000","message":"This should be \u0027tags\u0027.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    build_requests \u003d Table(\u0027build_requests\u0027, meta, autoload\u003dTrue)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    if not hasattr(build_requests.c, \u0027block_device_mappings\u0027):"},{"line_number":27,"context_line":"        build_requests.create_column(Column(\u0027tags\u0027, api_models.MediumText()))"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_18dcbe17","line":26,"range":{"start_line":26,"start_character":38,"end_line":26,"end_character":59},"in_reply_to":"da4df55a_06e067f9","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    build_requests \u003d Table(\u0027build_requests\u0027, meta, autoload\u003dTrue)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    if not hasattr(build_requests.c, \u0027block_device_mappings\u0027):"},{"line_number":27,"context_line":"        build_requests.create_column(Column(\u0027tags\u0027, api_models.MediumText()))"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_66ef73e9","line":27,"range":{"start_line":27,"start_character":63,"end_line":27,"end_character":73},"updated":"2016-12-27 22:23:15.000000000","message":"We could probably be smarter about the size of this column. If we only allow up to 50 tags, and a tag column in the database is itself Unicode(80), then we should have an upper-bound on what this can be. At a minimum I\u0027d think this could be just Text rather than MediumText as we won\u0027t get this big enough for MediumText.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    build_requests \u003d Table(\u0027build_requests\u0027, meta, autoload\u003dTrue)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    if not hasattr(build_requests.c, \u0027block_device_mappings\u0027):"},{"line_number":27,"context_line":"        build_requests.create_column(Column(\u0027tags\u0027, api_models.MediumText()))"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_58e646e9","line":27,"range":{"start_line":27,"start_character":63,"end_line":27,"end_character":73},"in_reply_to":"da4df55a_66ef73e9","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/db/sqlalchemy/api_migrations/migrate_repo/versions/042_build_requests_add_tags.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova.db.sqlalchemy import api_models"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def upgrade(migrate_engine):"},{"line_number":21,"context_line":"    meta \u003d MetaData()"},{"line_number":22,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_23e65346","line":20,"updated":"2017-04-24 15:13:13.000000000","message":"As Alex said, let\u0027s split the DB schema and model change to a separate patch to start the series.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6eecb663f1d6cc74b57bbd412820b8a2702966d7","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova.db.sqlalchemy import api_models"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def upgrade(migrate_engine):"},{"line_number":21,"context_line":"    meta \u003d MetaData()"},{"line_number":22,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":23,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_18884fe5","line":20,"in_reply_to":"5ff73747_23e65346","updated":"2017-04-25 03:15:39.000000000","message":"Done","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"}],"nova/db/sqlalchemy/api_models.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":243,"context_line":"    project_id \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":244,"context_line":"    instance \u003d Column(MediumText())"},{"line_number":245,"context_line":"    block_device_mappings \u003d Column(MediumText())"},{"line_number":246,"context_line":"    tags \u003d Column(MediumText())"},{"line_number":247,"context_line":"    # TODO(alaski): Drop these from the db in Ocata"},{"line_number":248,"context_line":"    # columns_to_drop \u003d [\u0027request_spec_id\u0027, \u0027user_id\u0027, \u0027display_name\u0027,"},{"line_number":249,"context_line":"    #         \u0027instance_metadata\u0027, \u0027progress\u0027, \u0027vm_state\u0027, \u0027task_state\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_06b787f5","line":246,"range":{"start_line":246,"start_character":18,"end_line":246,"end_character":28},"updated":"2016-12-27 22:23:15.000000000","message":"See other comment, this would at most be Text.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":243,"context_line":"    project_id \u003d Column(String(255), nullable\u003dFalse)"},{"line_number":244,"context_line":"    instance \u003d Column(MediumText())"},{"line_number":245,"context_line":"    block_device_mappings \u003d Column(MediumText())"},{"line_number":246,"context_line":"    tags \u003d Column(MediumText())"},{"line_number":247,"context_line":"    # TODO(alaski): Drop these from the db in Ocata"},{"line_number":248,"context_line":"    # columns_to_drop \u003d [\u0027request_spec_id\u0027, \u0027user_id\u0027, \u0027display_name\u0027,"},{"line_number":249,"context_line":"    #         \u0027instance_metadata\u0027, \u0027progress\u0027, \u0027vm_state\u0027, \u0027task_state\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_7efe9306","line":246,"range":{"start_line":246,"start_character":18,"end_line":246,"end_character":28},"in_reply_to":"da4df55a_06b787f5","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/objects/build_request.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        # NOTE(alaski): Normally these would come from the NovaPersistentObject"},{"line_number":48,"context_line":"        # mixin but they\u0027re being set explicitly because we only need"},{"line_number":49,"context_line":"        # created_at/updated_at. There is no soft delete for this object."},{"line_number":50,"context_line":"        \u0027tags\u0027: fields.ObjectField(\u0027TagList\u0027, nullable\u003dTrue),"},{"line_number":51,"context_line":"        \u0027created_at\u0027: fields.DateTimeField(nullable\u003dTrue),"},{"line_number":52,"context_line":"        \u0027updated_at\u0027: fields.DateTimeField(nullable\u003dTrue),"},{"line_number":53,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_26d00b1f","line":50,"updated":"2016-12-27 22:23:15.000000000","message":"Move this to the end of the fields list, otherwise the comment above doesn\u0027t make sense.\n\nYou also need to handle this in obj_make_compatible() below where if the target_version \u003c (1, 3) then you need to pop \u0027tags\u0027 from the primitive. We\u0027d also need a unit test for that logic.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        # NOTE(alaski): Normally these would come from the NovaPersistentObject"},{"line_number":48,"context_line":"        # mixin but they\u0027re being set explicitly because we only need"},{"line_number":49,"context_line":"        # created_at/updated_at. There is no soft delete for this object."},{"line_number":50,"context_line":"        \u0027tags\u0027: fields.ObjectField(\u0027TagList\u0027, nullable\u003dTrue),"},{"line_number":51,"context_line":"        \u0027created_at\u0027: fields.DateTimeField(nullable\u003dTrue),"},{"line_number":52,"context_line":"        \u0027updated_at\u0027: fields.DateTimeField(nullable\u003dTrue),"},{"line_number":53,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_1e3e67b8","line":50,"in_reply_to":"da4df55a_26d00b1f","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2186fb43f5724ec143a46eceb3eb28c9fc4a3698","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        # was never persisted."},{"line_number":106,"context_line":"        self.instance.created_at \u003d self.created_at"},{"line_number":107,"context_line":"        self.instance.updated_at \u003d self.updated_at"},{"line_number":108,"context_line":"        self.instance.tags \u003d objects.TagList([])"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _load_block_device_mappings(self, db_bdms):"},{"line_number":111,"context_line":"        # \u0027db_bdms\u0027 is a serialized BlockDeviceMappingList object. If it\u0027s None"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a6eadb0_d9b8a1eb","line":108,"range":{"start_line":108,"start_character":8,"end_line":108,"end_character":48},"updated":"2016-12-19 07:11:43.000000000","message":"So I guess you need to update the tags at here.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        # was never persisted."},{"line_number":106,"context_line":"        self.instance.created_at \u003d self.created_at"},{"line_number":107,"context_line":"        self.instance.updated_at \u003d self.updated_at"},{"line_number":108,"context_line":"        self.instance.tags \u003d objects.TagList([])"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _load_block_device_mappings(self, db_bdms):"},{"line_number":111,"context_line":"        # \u0027db_bdms\u0027 is a serialized BlockDeviceMappingList object. If it\u0027s None"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_a6a23bac","line":108,"range":{"start_line":108,"start_character":8,"end_line":108,"end_character":48},"in_reply_to":"1a6eadb0_d9b8a1eb","updated":"2016-12-27 22:23:15.000000000","message":"This is tricky and I forget the rules around when this is used in the REST API, we probably need to ask Dan Smith about this one.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        # was never persisted."},{"line_number":106,"context_line":"        self.instance.created_at \u003d self.created_at"},{"line_number":107,"context_line":"        self.instance.updated_at \u003d self.updated_at"},{"line_number":108,"context_line":"        self.instance.tags \u003d objects.TagList([])"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _load_block_device_mappings(self, db_bdms):"},{"line_number":111,"context_line":"        # \u0027db_bdms\u0027 is a serialized BlockDeviceMappingList object. If it\u0027s None"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_feae03e6","line":108,"range":{"start_line":108,"start_character":8,"end_line":108,"end_character":48},"in_reply_to":"da4df55a_a6a23bac","updated":"2017-01-10 08:21:43.000000000","message":"I will left this as a outstanding question when I rebasing","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        for field in self.instance.obj_fields:"},{"line_number":227,"context_line":"            # NOTE(danms): Don\u0027t copy the defaulted tags field"},{"line_number":228,"context_line":"            # as instance.create() won\u0027t handle it properly."},{"line_number":229,"context_line":"            if field \u003d\u003d \u0027tags\u0027:"},{"line_number":230,"context_line":"                continue"},{"line_number":231,"context_line":"            if self.instance.obj_attr_is_set(field):"},{"line_number":232,"context_line":"                setattr(instance, field, getattr(self.instance, field))"},{"line_number":233,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_c6a73fbb","line":230,"range":{"start_line":229,"start_character":12,"end_line":230,"end_character":24},"updated":"2016-12-27 22:23:15.000000000","message":"I\u0027m also curious about this. Again, we need to ask dansmith.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        for field in self.instance.obj_fields:"},{"line_number":227,"context_line":"            # NOTE(danms): Don\u0027t copy the defaulted tags field"},{"line_number":228,"context_line":"            # as instance.create() won\u0027t handle it properly."},{"line_number":229,"context_line":"            if field \u003d\u003d \u0027tags\u0027:"},{"line_number":230,"context_line":"                continue"},{"line_number":231,"context_line":"            if self.instance.obj_attr_is_set(field):"},{"line_number":232,"context_line":"                setattr(instance, field, getattr(self.instance, field))"},{"line_number":233,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_7ee85317","line":230,"range":{"start_line":229,"start_character":12,"end_line":230,"end_character":24},"in_reply_to":"da4df55a_c6a73fbb","updated":"2017-01-10 08:21:43.000000000","message":"ditto","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    # Version 1.0: Initial version"},{"line_number":37,"context_line":"    # Version 1.1: Added block_device_mappings"},{"line_number":38,"context_line":"    # Version 1.2: Added save() method"},{"line_number":39,"context_line":"    # Version 1.3: Added tags"},{"line_number":40,"context_line":"    VERSION \u003d \u00271.3\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_e3d2ab34","line":39,"updated":"2017-04-24 15:13:13.000000000","message":"As Alex said, I\u0027d make the object changes your second patch in the series, after the data model changes.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6eecb663f1d6cc74b57bbd412820b8a2702966d7","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    # Version 1.0: Initial version"},{"line_number":37,"context_line":"    # Version 1.1: Added block_device_mappings"},{"line_number":38,"context_line":"    # Version 1.2: Added save() method"},{"line_number":39,"context_line":"    # Version 1.3: Added tags"},{"line_number":40,"context_line":"    VERSION \u003d \u00271.3\u0027"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_d869c725","line":39,"in_reply_to":"5ff73747_e3d2ab34","updated":"2017-04-25 03:15:39.000000000","message":"Done","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        # was never persisted."},{"line_number":109,"context_line":"        self.instance.created_at \u003d self.created_at"},{"line_number":110,"context_line":"        self.instance.updated_at \u003d self.updated_at"},{"line_number":111,"context_line":"        self.instance.tags \u003d objects.TagList([])"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _load_block_device_mappings(self, db_bdms):"},{"line_number":114,"context_line":"        # \u0027db_bdms\u0027 is a serialized BlockDeviceMappingList object. If it\u0027s None"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_a7e6ea15","line":111,"range":{"start_line":111,"start_character":8,"end_line":111,"end_character":48},"updated":"2017-04-24 15:13:13.000000000","message":"This is wrong. It should be:\n\nself.instance.tags \u003d self.tags\n\nSince _from_db_object would call _load_tags before _load_instance.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6eecb663f1d6cc74b57bbd412820b8a2702966d7","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        # was never persisted."},{"line_number":109,"context_line":"        self.instance.created_at \u003d self.created_at"},{"line_number":110,"context_line":"        self.instance.updated_at \u003d self.updated_at"},{"line_number":111,"context_line":"        self.instance.tags \u003d objects.TagList([])"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _load_block_device_mappings(self, db_bdms):"},{"line_number":114,"context_line":"        # \u0027db_bdms\u0027 is a serialized BlockDeviceMappingList object. If it\u0027s None"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_98733f16","line":111,"range":{"start_line":111,"start_character":8,"end_line":111,"end_character":48},"in_reply_to":"5ff73747_a7e6ea15","updated":"2017-04-25 03:15:39.000000000","message":"Done","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"33610f972d73e6220fbe9a1fb6668fbe041ee967","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        # so this is okay for the moment."},{"line_number":244,"context_line":"        instance \u003d objects.Instance(context)"},{"line_number":245,"context_line":"        for field in self.instance.obj_fields:"},{"line_number":246,"context_line":"            # NOTE(danms): Don\u0027t copy the defaulted tags field"},{"line_number":247,"context_line":"            # as instance.create() won\u0027t handle it properly."},{"line_number":248,"context_line":"            if field \u003d\u003d \u0027tags\u0027:"},{"line_number":249,"context_line":"                continue"},{"line_number":250,"context_line":"            if self.instance.obj_attr_is_set(field):"},{"line_number":251,"context_line":"                setattr(instance, field, getattr(self.instance, field))"},{"line_number":252,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_c33b2f9a","line":249,"range":{"start_line":246,"start_character":12,"end_line":249,"end_character":24},"updated":"2017-04-24 15:13:13.000000000","message":"We need to sort this out still, but I\u0027ve kind of forgotten what happens here if we remove this. Have you tried just removing this to see what happens? We probably need to update the instance.create() method.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"6eecb663f1d6cc74b57bbd412820b8a2702966d7","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        # so this is okay for the moment."},{"line_number":244,"context_line":"        instance \u003d objects.Instance(context)"},{"line_number":245,"context_line":"        for field in self.instance.obj_fields:"},{"line_number":246,"context_line":"            # NOTE(danms): Don\u0027t copy the defaulted tags field"},{"line_number":247,"context_line":"            # as instance.create() won\u0027t handle it properly."},{"line_number":248,"context_line":"            if field \u003d\u003d \u0027tags\u0027:"},{"line_number":249,"context_line":"                continue"},{"line_number":250,"context_line":"            if self.instance.obj_attr_is_set(field):"},{"line_number":251,"context_line":"                setattr(instance, field, getattr(self.instance, field))"},{"line_number":252,"context_line":"        return instance"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_385c2b7d","line":249,"range":{"start_line":246,"start_character":12,"end_line":249,"end_character":24},"in_reply_to":"5ff73747_c33b2f9a","updated":"2017-04-25 03:15:39.000000000","message":"Not yet, I will have a try in my new patch","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"}],"nova/tests/functional/api_sample_tests/test_servers.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def test_servers_post_with_tags(self):"},{"line_number":199,"context_line":"        uuid \u003d self._post_server(use_common_server_api_samples\u003dFalse,"},{"line_number":200,"context_line":"                                 tags\u003d\"[\u0027tag1\u0027, \u0027tag2\u0027]\")"},{"line_number":201,"context_line":"        response \u003d self._do_get(\u0027servers/%s/detail\u0027 % uuid)"},{"line_number":202,"context_line":"        self._verify_response(\u0027server-create-with-tags-detail-resp\u0027,"},{"line_number":203,"context_line":"                              response, 200)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_e6a8c38e","line":200,"range":{"start_line":200,"start_character":49,"end_line":200,"end_character":53},"updated":"2016-12-27 22:23:15.000000000","message":"A more interesting wrinkle on this test would be to make one of these unicode, maybe out old friend pile-of-poo? :)\n\nu\"\\U0001F4A9\"","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":197,"context_line":""},{"line_number":198,"context_line":"    def test_servers_post_with_tags(self):"},{"line_number":199,"context_line":"        uuid \u003d self._post_server(use_common_server_api_samples\u003dFalse,"},{"line_number":200,"context_line":"                                 tags\u003d\"[\u0027tag1\u0027, \u0027tag2\u0027]\")"},{"line_number":201,"context_line":"        response \u003d self._do_get(\u0027servers/%s/detail\u0027 % uuid)"},{"line_number":202,"context_line":"        self._verify_response(\u0027server-create-with-tags-detail-resp\u0027,"},{"line_number":203,"context_line":"                              response, 200)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_9e3097a0","line":200,"range":{"start_line":200,"start_character":49,"end_line":200,"end_character":53},"in_reply_to":"da4df55a_e6a8c38e","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/tests/functional/db/test_build_request.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fcbfb9c8dff50748e2172a5497eab0432868c739","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                objects.base.obj_equal_prims(expected[0], db_value[0])"},{"line_number":72,"context_line":"                continue"},{"line_number":73,"context_line":"            elif key \u003d\u003d \u0027tags\u0027:"},{"line_number":74,"context_line":"                self.assertEqual(1, len(db_value))"},{"line_number":75,"context_line":"                # Can\u0027t compare list objects directly, just compare the single"},{"line_number":76,"context_line":"                # item they contain."},{"line_number":77,"context_line":"                objects.base.obj_equal_prims(expected[0], db_value[0])"},{"line_number":78,"context_line":"                continue"},{"line_number":79,"context_line":"            self.assertEqual(expected, db_value)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_b21cb86a","line":77,"range":{"start_line":74,"start_character":16,"end_line":77,"end_character":70},"updated":"2017-04-25 19:39:39.000000000","message":"Why would this have a tags value in it? fake_build_request.fake_db_req() doesn\u0027t include tags.","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8064d60cdeec31bf005a331922cc56bdc0cb4ae7","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                objects.base.obj_equal_prims(expected[0], db_value[0])"},{"line_number":72,"context_line":"                continue"},{"line_number":73,"context_line":"            elif key \u003d\u003d \u0027tags\u0027:"},{"line_number":74,"context_line":"                self.assertEqual(1, len(db_value))"},{"line_number":75,"context_line":"                # Can\u0027t compare list objects directly, just compare the single"},{"line_number":76,"context_line":"                # item they contain."},{"line_number":77,"context_line":"                objects.base.obj_equal_prims(expected[0], db_value[0])"},{"line_number":78,"context_line":"                continue"},{"line_number":79,"context_line":"            self.assertEqual(expected, db_value)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_565c3f7d","line":77,"range":{"start_line":74,"start_character":16,"end_line":77,"end_character":70},"in_reply_to":"5ff73747_b21cb86a","updated":"2017-04-26 02:33:14.000000000","message":"I added it\nhttps://review.openstack.org/#/c/394321/36/nova/tests/unit/fake_build_request.py","commit_id":"599191b132ebc46f9405d2c748e5f174411b8504"}],"nova/tests/unit/api/openstack/compute/test_availability_zone.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                tag_list.append(tag_dict)"},{"line_number":228,"context_line":"            return tag_list"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.req \u003d fakes.HTTPRequest.blank(\u0027\u0027)"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_0685c705","line":230,"updated":"2016-12-27 22:23:15.000000000","message":"Why do we need to do this here? This seems to be mocking too far down in the stack when all we\u0027re testing is the REST API. If the microversion isn\u0027t high enough on this it shouldn\u0027t be an issue either way.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":227,"context_line":"                tag_list.append(tag_dict)"},{"line_number":228,"context_line":"            return tag_list"},{"line_number":229,"context_line":""},{"line_number":230,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.req \u003d fakes.HTTPRequest.blank(\u0027\u0027)"},{"line_number":233,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_9e35f7f8","line":230,"in_reply_to":"da4df55a_0685c705","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/tests/unit/api/openstack/compute/test_config_drive.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                tag_list.append(tag_dict)"},{"line_number":148,"context_line":"            return tag_list"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _test_create_extra(self, params, override_controller):"},{"line_number":153,"context_line":"        image_uuid \u003d \u0027c905cedb-7281-47e4-8a62-f26bc5fc4c77\u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_267e4b19","line":150,"updated":"2016-12-27 22:23:15.000000000","message":"same comment - this seems unnecessary and out of context for this change.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                tag_list.append(tag_dict)"},{"line_number":148,"context_line":"            return tag_list"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"    def _test_create_extra(self, params, override_controller):"},{"line_number":153,"context_line":"        image_uuid \u003d \u0027c905cedb-7281-47e4-8a62-f26bc5fc4c77\u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_be3abbe5","line":150,"in_reply_to":"da4df55a_267e4b19","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/tests/unit/api/openstack/compute/test_disk_config.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                tag_list.append(tag_dict)"},{"line_number":139,"context_line":"            return tag_list"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _set_up_app(self):"},{"line_number":144,"context_line":"        self.app \u003d compute.APIRouterV21()"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_467b4f28","line":141,"updated":"2016-12-27 22:23:15.000000000","message":"same","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":138,"context_line":"                tag_list.append(tag_dict)"},{"line_number":139,"context_line":"            return tag_list"},{"line_number":140,"context_line":""},{"line_number":141,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def _set_up_app(self):"},{"line_number":144,"context_line":"        self.app \u003d compute.APIRouterV21()"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_e124a6b0","line":141,"in_reply_to":"da4df55a_467b4f28","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/tests/unit/api/openstack/compute/test_multiple_create.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                tag_list.append(tag_dict)"},{"line_number":119,"context_line":"            return tag_list"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        def project_get_networks(context, user_id):"},{"line_number":124,"context_line":"            return dict(id\u003d\u00271\u0027, host\u003d\u0027localhost\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_6674d335","line":121,"updated":"2016-12-27 22:23:15.000000000","message":"same","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                tag_list.append(tag_dict)"},{"line_number":119,"context_line":"            return tag_list"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        def project_get_networks(context, user_id):"},{"line_number":124,"context_line":"            return dict(id\u003d\u00271\u0027, host\u003d\u0027localhost\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_814cba77","line":121,"in_reply_to":"da4df55a_6674d335","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/tests/unit/api/openstack/compute/test_scheduler_hints.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                tag_list.append(tag_dict)"},{"line_number":187,"context_line":"            return tag_list"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        fake.stub_out_image_service(self)"},{"line_number":192,"context_line":"        self.stub_out(\u0027nova.db.instance_create\u0027, instance_create)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_8671b746","line":189,"updated":"2016-12-27 22:23:15.000000000","message":"same","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":186,"context_line":"                tag_list.append(tag_dict)"},{"line_number":187,"context_line":"            return tag_list"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"        fake.stub_out_image_service(self)"},{"line_number":192,"context_line":"        self.stub_out(\u0027nova.db.instance_create\u0027, instance_create)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_c1a4020a","line":189,"in_reply_to":"da4df55a_8671b746","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/tests/unit/api/openstack/compute/test_serversV21.py":[{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"07b0d2333eda18b8d7cee3af15677cdb038e7781","unresolved":false,"context_lines":[{"line_number":3616,"context_line":""},{"line_number":3617,"context_line":""},{"line_number":3618,"context_line":"class ServersControllerCreateTestV240(ServersControllerCreateTest):"},{"line_number":3619,"context_line":"    def _create_instance_req(self, set_tags, tags\u003dNone):"},{"line_number":3620,"context_line":"        if set_tags:"},{"line_number":3621,"context_line":"            self.body[\u0027server\u0027][\u0027tags\u0027] \u003d tags"},{"line_number":3622,"context_line":"        self.req.body \u003d jsonutils.dump_as_bytes(self.body)"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_f1a35b9c","line":3619,"range":{"start_line":3619,"start_character":35,"end_line":3619,"end_character":43},"updated":"2016-12-09 13:07:54.000000000","message":"Why we need this argument? It is always True.\nMaybe you planed to add second test which will test that we can create an instance without tags. But there is no such test here","commit_id":"3dcb1e769acb46ff747b96db98f3516151d8a62f"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"07b0d2333eda18b8d7cee3af15677cdb038e7781","unresolved":false,"context_lines":[{"line_number":3625,"context_line":""},{"line_number":3626,"context_line":"    def test_create_instance_with_description(self):"},{"line_number":3627,"context_line":"        self._create_instance_req(True, [\u0027tag1\u0027, \u0027tag2\u0027])"},{"line_number":3628,"context_line":"        # The fact that the action doesn\u0027t raise is enough validation"},{"line_number":3629,"context_line":"        self.controller.create(self.req, body\u003dself.body).obj"},{"line_number":3630,"context_line":""},{"line_number":3631,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a71b18c_912ea7f8","line":3628,"updated":"2016-12-09 13:07:54.000000000","message":"nit: I think we should check that \u0027tag1\u0027 and \u0027tag2\u0027 were actually created","commit_id":"3dcb1e769acb46ff747b96db98f3516151d8a62f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":2445,"context_line":"                server_update_and_get_original)"},{"line_number":2446,"context_line":"        self.stubs.Set(manager.VlanManager, \u0027allocate_fixed_ip\u0027,"},{"line_number":2447,"context_line":"                       fake_method)"},{"line_number":2448,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":2449,"context_line":"        self.body \u003d {"},{"line_number":2450,"context_line":"            \u0027server\u0027: {"},{"line_number":2451,"context_line":"                \u0027name\u0027: \u0027server_test\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_a6907b44","line":2448,"updated":"2016-12-27 22:23:15.000000000","message":"I\u0027m not sure why we need to do this - this should only happen for a test that\u0027s passing a high enough microversion, which would only happen in ServersControllerCreateTestV240.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":2445,"context_line":"                server_update_and_get_original)"},{"line_number":2446,"context_line":"        self.stubs.Set(manager.VlanManager, \u0027allocate_fixed_ip\u0027,"},{"line_number":2447,"context_line":"                       fake_method)"},{"line_number":2448,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":2449,"context_line":"        self.body \u003d {"},{"line_number":2450,"context_line":"            \u0027server\u0027: {"},{"line_number":2451,"context_line":"                \u0027name\u0027: \u0027server_test\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_c17b227a","line":2448,"in_reply_to":"da4df55a_a6907b44","updated":"2017-01-10 08:21:43.000000000","message":"I will try to look deeper","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":3627,"context_line":""},{"line_number":3628,"context_line":""},{"line_number":3629,"context_line":"class ServersControllerCreateTestV240(ServersControllerCreateTest):"},{"line_number":3630,"context_line":"    def _create_instance_req(self, set_tags, tags\u003dNone):"},{"line_number":3631,"context_line":"        if set_tags:"},{"line_number":3632,"context_line":"            self.body[\u0027server\u0027][\u0027tags\u0027] \u003d tags"},{"line_number":3633,"context_line":"        self.body[\u0027server\u0027][\u0027networks\u0027] \u003d [{\u0027port\u0027: None, \u0027uuid\u0027: FAKE_UUID}]"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_26a56ba1","line":3630,"range":{"start_line":3630,"start_character":35,"end_line":3630,"end_character":43},"updated":"2016-12-27 22:23:15.000000000","message":"This is unnecessary. I would just set the tags based on the tags formal parameter, which should always be set for this test.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":3637,"context_line":""},{"line_number":3638,"context_line":"    def test_create_instance_with_tags(self):"},{"line_number":3639,"context_line":"        self._create_instance_req(True, [\u0027tag1\u0027, \u0027tag2\u0027])"},{"line_number":3640,"context_line":"        # The fact that the action doesn\u0027t raise is enough validation"},{"line_number":3641,"context_line":"        self.controller.create(self.req, body\u003dself.body).obj"},{"line_number":3642,"context_line":""},{"line_number":3643,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_86a8d778","line":3640,"updated":"2016-12-27 22:23:15.000000000","message":"How about some negative tests, like maxItems, to make sure our jsonschema validation is correct?","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":3637,"context_line":""},{"line_number":3638,"context_line":"    def test_create_instance_with_tags(self):"},{"line_number":3639,"context_line":"        self._create_instance_req(True, [\u0027tag1\u0027, \u0027tag2\u0027])"},{"line_number":3640,"context_line":"        # The fact that the action doesn\u0027t raise is enough validation"},{"line_number":3641,"context_line":"        self.controller.create(self.req, body\u003dself.body).obj"},{"line_number":3642,"context_line":""},{"line_number":3643,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_81e83a18","line":3640,"in_reply_to":"da4df55a_86a8d778","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/tests/unit/api/openstack/compute/test_user_data.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                tag_list.append(tag_dict)"},{"line_number":126,"context_line":"            return tag_list"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        def project_get_networks(context, user_id):"},{"line_number":131,"context_line":"            return dict(id\u003d\u00271\u0027, host\u003d\u0027localhost\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_a6b79bd6","line":128,"updated":"2016-12-27 22:23:15.000000000","message":"we shouldn\u0027t need this","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":125,"context_line":"                tag_list.append(tag_dict)"},{"line_number":126,"context_line":"            return tag_list"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        self.stub_out(\u0027nova.db.instance_tag_set\u0027, fake_db_tags_create)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"        def project_get_networks(context, user_id):"},{"line_number":131,"context_line":"            return dict(id\u003d\u00271\u0027, host\u003d\u0027localhost\u0027)"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_014b6a2c","line":128,"in_reply_to":"da4df55a_a6b79bd6","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e37b8eb97b6c64f9b33a465ae4d75418afd7746","unresolved":false,"context_lines":[{"line_number":3637,"context_line":"            rs, br, im \u003d instances_to_build[0]"},{"line_number":3638,"context_line":"            self.assertTrue(uuidutils.is_uuid_like(br.instance.uuid))"},{"line_number":3639,"context_line":"            self.assertEqual(br.instance_uuid, im.instance_uuid)"},{"line_number":3640,"context_line":""},{"line_number":3641,"context_line":"            self.assertEqual(br.instance.uuid,"},{"line_number":3642,"context_line":"                             inst_mapping_mock.instance_uuid)"},{"line_number":3643,"context_line":"            self.assertIsNone(inst_mapping_mock.cell_mapping)"}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_870eb4e3","side":"PARENT","line":3640,"updated":"2016-12-08 03:01:02.000000000","message":"unrelated","commit_id":"1506c36b4446f6ba1487a2d68e4b23cb3fca44cb"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e37b8eb97b6c64f9b33a465ae4d75418afd7746","unresolved":false,"context_lines":[{"line_number":3435,"context_line":"                              boot_meta, security_groups, block_device_mapping,"},{"line_number":3436,"context_line":"                              shutdown_terminate, instance_group,"},{"line_number":3437,"context_line":"                              check_server_group_quota, filter_properties,"},{"line_number":3438,"context_line":"                              None, None)"},{"line_number":3439,"context_line":""},{"line_number":3440,"context_line":"        do_test()"},{"line_number":3441,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_c7f8acc7","line":3438,"range":{"start_line":3438,"start_character":36,"end_line":3438,"end_character":40},"updated":"2016-12-08 03:01:02.000000000","message":"See if we use a kwarg of tags\u003dNone we don\u0027t need to change this.","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"cc94b3b7c42cafa5195bdae33f714eb94c16e8fa","unresolved":false,"context_lines":[{"line_number":3435,"context_line":"                              boot_meta, security_groups, block_device_mapping,"},{"line_number":3436,"context_line":"                              shutdown_terminate, instance_group,"},{"line_number":3437,"context_line":"                              check_server_group_quota, filter_properties,"},{"line_number":3438,"context_line":"                              None, None)"},{"line_number":3439,"context_line":""},{"line_number":3440,"context_line":"        do_test()"},{"line_number":3441,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3a71b18c_c75d0c4a","line":3438,"range":{"start_line":3438,"start_character":36,"end_line":3438,"end_character":40},"in_reply_to":"3a71b18c_c7f8acc7","updated":"2016-12-08 03:18:04.000000000","message":"Done","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":3637,"context_line":"            rs, br, im \u003d instances_to_build[0]"},{"line_number":3638,"context_line":"            self.assertTrue(uuidutils.is_uuid_like(br.instance.uuid))"},{"line_number":3639,"context_line":"            self.assertEqual(br.instance_uuid, im.instance_uuid)"},{"line_number":3640,"context_line":""},{"line_number":3641,"context_line":"            self.assertEqual(br.instance.uuid,"},{"line_number":3642,"context_line":"                             inst_mapping_mock.instance_uuid)"},{"line_number":3643,"context_line":"            self.assertIsNone(inst_mapping_mock.cell_mapping)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_06b307ea","side":"PARENT","line":3640,"updated":"2016-12-27 22:23:15.000000000","message":"unrelated whitespace change, please remove","commit_id":"7e0847bc70763f9c121c324cb01607b70607446f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":3435,"context_line":"                              boot_meta, security_groups, block_device_mapping,"},{"line_number":3436,"context_line":"                              shutdown_terminate, instance_group,"},{"line_number":3437,"context_line":"                              check_server_group_quota, filter_properties,"},{"line_number":3438,"context_line":"                              None, None)"},{"line_number":3439,"context_line":""},{"line_number":3440,"context_line":"        do_test()"},{"line_number":3441,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_e6ad2385","line":3438,"range":{"start_line":3438,"start_character":36,"end_line":3438,"end_character":40},"updated":"2016-12-27 22:23:15.000000000","message":"If we make tags a kwarg on _provision_instances then we don\u0027t need to make this change here or below.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":3435,"context_line":"                              boot_meta, security_groups, block_device_mapping,"},{"line_number":3436,"context_line":"                              shutdown_terminate, instance_group,"},{"line_number":3437,"context_line":"                              check_server_group_quota, filter_properties,"},{"line_number":3438,"context_line":"                              None, None)"},{"line_number":3439,"context_line":""},{"line_number":3440,"context_line":"        do_test()"},{"line_number":3441,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_a130de9f","line":3438,"range":{"start_line":3438,"start_character":36,"end_line":3438,"end_character":40},"in_reply_to":"da4df55a_e6ad2385","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"nova/tests/unit/fake_tags.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 Red Hat Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_86bff7a8","line":1,"updated":"2016-12-27 22:23:15.000000000","message":"Isn\u0027t this the wrong copyright? Or is this copied from something else?","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2013 Red Hat Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":17,"id":"ba5201f7_e19d865a","line":1,"in_reply_to":"da4df55a_86bff7a8","updated":"2017-01-10 08:21:43.000000000","message":"Yeah this is copied.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"def fake_tag_object(context, resource_id, tag):"},{"line_number":21,"context_line":"    \"\"\"Creates a Tag object from the given tag_dict"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    :param context: nova request context"},{"line_number":24,"context_line":"    :param tag_dict: dict of instance tag"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_c6e3bfd7","line":21,"range":{"start_line":21,"start_character":43,"end_line":21,"end_character":51},"updated":"2016-12-27 22:23:15.000000000","message":"is it really a dict?","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    \"\"\"Creates a Tag object from the given tag_dict"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    :param context: nova request context"},{"line_number":24,"context_line":"    :param tag_dict: dict of instance tag"},{"line_number":25,"context_line":"    :returns: nova.objects.tag.Tag"},{"line_number":26,"context_line":"    \"\"\""},{"line_number":27,"context_line":"    return objects.Tag(context, resource_id\u003dresource_id, tag\u003dtag)"}],"source_content_type":"text/x-python","patch_set":17,"id":"da4df55a_a6debb0e","line":24,"range":{"start_line":24,"start_character":11,"end_line":24,"end_character":19},"updated":"2016-12-27 22:23:15.000000000","message":"wrong name for the parameter on this method","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"releasenotes/notes/support-tag-instances-when-boot-fa3cb135213327d8.yaml":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"387ff6ae54266bcb329dd8fdc9314ba47b86272d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Microversion v2.40 allows to add simple string tags to instances when"},{"line_number":4,"context_line":"    boot."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"da4df55a_06ea27ac","line":4,"range":{"start_line":4,"start_character":4,"end_line":4,"end_character":8},"updated":"2016-12-27 22:23:15.000000000","message":"Let\u0027s not use the nova CLI name for this, let\u0027s call it server create.","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"5e26b6bf32b2430a35e388bdf4cbf81f51c37593","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - Microversion v2.40 allows to add simple string tags to instances when"},{"line_number":4,"context_line":"    boot."}],"source_content_type":"text/x-yaml","patch_set":17,"id":"ba5201f7_01d1aafb","line":4,"range":{"start_line":4,"start_character":4,"end_line":4,"end_character":8},"in_reply_to":"da4df55a_06ea27ac","updated":"2017-01-10 08:21:43.000000000","message":"Done","commit_id":"d48e9d2c576c002f9d2214b8a69a7ec8411ec5f2"}],"setup.cfg":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d4b095375184f4b1d1223034f490a1aec4c857c7","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    scheduler_hints \u003d nova.api.openstack.compute.scheduler_hints:SchedulerHints"},{"line_number":168,"context_line":"    security_groups \u003d nova.api.openstack.compute.security_groups:SecurityGroups"},{"line_number":169,"context_line":"    user_data \u003d nova.api.openstack.compute.user_data:UserData"},{"line_number":170,"context_line":"    server_tags \u003d nova.api.openstack.compute.server_tags:ServerTags"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"nova.api.v21.test_extensions \u003d"},{"line_number":173,"context_line":"    basic \u003d nova.tests.unit.api.openstack.compute.basic:Basic"}],"source_content_type":"text/x-ttcn-cfg","patch_set":4,"id":"9a629dbe_6b98cd78","line":170,"range":{"start_line":170,"start_character":37,"end_line":170,"end_character":44},"updated":"2016-11-11 13:57:19.000000000","message":"I think it\u0027s the wrong direction, why need additional extensions? as http://specs.openstack.org/openstack/nova-specs/specs/newton/implemented/api-no-more-extensions.html ?","commit_id":"a4df091e66677f93c72a69a680b830cb25db7c61"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"0312c3a089eab9741710cead8efbaff77e4f1db9","unresolved":false,"context_lines":[{"line_number":167,"context_line":"    scheduler_hints \u003d nova.api.openstack.compute.scheduler_hints:SchedulerHints"},{"line_number":168,"context_line":"    security_groups \u003d nova.api.openstack.compute.security_groups:SecurityGroups"},{"line_number":169,"context_line":"    user_data \u003d nova.api.openstack.compute.user_data:UserData"},{"line_number":170,"context_line":"    server_tags \u003d nova.api.openstack.compute.server_tags:ServerTags"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"nova.api.v21.test_extensions \u003d"},{"line_number":173,"context_line":"    basic \u003d nova.tests.unit.api.openstack.compute.basic:Basic"}],"source_content_type":"text/x-ttcn-cfg","patch_set":4,"id":"9a629dbe_54253d08","line":170,"range":{"start_line":170,"start_character":37,"end_line":170,"end_character":44},"in_reply_to":"9a629dbe_6b98cd78","updated":"2016-11-14 07:03:25.000000000","message":"good question, but I think it\u0027s fine to follow the current way. In the future we should have something instead of those extension mechanism.","commit_id":"a4df091e66677f93c72a69a680b830cb25db7c61"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"3f8d99e74265c7a3965aca08c41256b7d4eb7957","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    scheduler_hints \u003d nova.api.openstack.compute.scheduler_hints:SchedulerHints"},{"line_number":167,"context_line":"    security_groups \u003d nova.api.openstack.compute.security_groups:SecurityGroups"},{"line_number":168,"context_line":"    user_data \u003d nova.api.openstack.compute.user_data:UserData"},{"line_number":169,"context_line":"    server_tags \u003d nova.api.openstack.compute.server_tags:ServerTags"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"nova.api.v21.test_extensions \u003d"},{"line_number":172,"context_line":"    basic \u003d nova.tests.unit.api.openstack.compute.basic:Basic"}],"source_content_type":"text/x-ttcn-cfg","patch_set":6,"id":"3a71b18c_a1bac06c","line":169,"updated":"2016-12-08 02:05:30.000000000","message":"I\u0027m pretty sure we don\u0027t want to add in new extensions like this, Sean Dague was actively working on removing these in Newton. Why can\u0027t we just modify the server create request in a microversion to allow passing in tags?","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"403781f1f02e24f55182b7d2816f0457b9488ff5","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    scheduler_hints \u003d nova.api.openstack.compute.scheduler_hints:SchedulerHints"},{"line_number":167,"context_line":"    security_groups \u003d nova.api.openstack.compute.security_groups:SecurityGroups"},{"line_number":168,"context_line":"    user_data \u003d nova.api.openstack.compute.user_data:UserData"},{"line_number":169,"context_line":"    server_tags \u003d nova.api.openstack.compute.server_tags:ServerTags"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"nova.api.v21.test_extensions \u003d"},{"line_number":172,"context_line":"    basic \u003d nova.tests.unit.api.openstack.compute.basic:Basic"}],"source_content_type":"text/x-ttcn-cfg","patch_set":6,"id":"3a71b18c_ad9d515b","line":169,"in_reply_to":"3a71b18c_47b9fceb","updated":"2016-12-08 04:41:53.000000000","message":"Yes, i think moving the validation in common place/utils are better options.\n\n+1 on not adding new extension.","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"7b860f1f255ea6fb40c7cbe90850664c341db05f","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    scheduler_hints \u003d nova.api.openstack.compute.scheduler_hints:SchedulerHints"},{"line_number":167,"context_line":"    security_groups \u003d nova.api.openstack.compute.security_groups:SecurityGroups"},{"line_number":168,"context_line":"    user_data \u003d nova.api.openstack.compute.user_data:UserData"},{"line_number":169,"context_line":"    server_tags \u003d nova.api.openstack.compute.server_tags:ServerTags"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"nova.api.v21.test_extensions \u003d"},{"line_number":172,"context_line":"    basic \u003d nova.tests.unit.api.openstack.compute.basic:Basic"}],"source_content_type":"text/x-ttcn-cfg","patch_set":6,"id":"3a71b18c_e233d3f4","line":169,"in_reply_to":"3a71b18c_5f562007","updated":"2016-12-08 06:25:14.000000000","message":"I just moved those validation code to schema - https://review.openstack.org/#/c/408424/1\n\nSo with that we can just do \n\nbase_create_v240[\u0027properties\u0027][\u0027server\u0027][\u0027properties\u0027][\u0027tags\u0027] \u003d server_tag_schema.update_all\n\nThen we do not need extension or any other utils.","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"73b4acaf5cddefbc841a18c1f4cd0b1c65b1018b","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    scheduler_hints \u003d nova.api.openstack.compute.scheduler_hints:SchedulerHints"},{"line_number":167,"context_line":"    security_groups \u003d nova.api.openstack.compute.security_groups:SecurityGroups"},{"line_number":168,"context_line":"    user_data \u003d nova.api.openstack.compute.user_data:UserData"},{"line_number":169,"context_line":"    server_tags \u003d nova.api.openstack.compute.server_tags:ServerTags"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"nova.api.v21.test_extensions \u003d"},{"line_number":172,"context_line":"    basic \u003d nova.tests.unit.api.openstack.compute.basic:Basic"}],"source_content_type":"text/x-ttcn-cfg","patch_set":6,"id":"3a71b18c_47b9fceb","line":169,"in_reply_to":"3a71b18c_8cb33b0a","updated":"2016-12-08 03:02:15.000000000","message":"On the validators, could we just move the tag validation code to a public utility/staticmethod in the tags module and then the servers module can use it from there? We could also ask sdague about his thoughts on the extension.","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"d08d7b937a63ecce0698551a074443a741b539a3","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    scheduler_hints \u003d nova.api.openstack.compute.scheduler_hints:SchedulerHints"},{"line_number":167,"context_line":"    security_groups \u003d nova.api.openstack.compute.security_groups:SecurityGroups"},{"line_number":168,"context_line":"    user_data \u003d nova.api.openstack.compute.user_data:UserData"},{"line_number":169,"context_line":"    server_tags \u003d nova.api.openstack.compute.server_tags:ServerTags"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"nova.api.v21.test_extensions \u003d"},{"line_number":172,"context_line":"    basic \u003d nova.tests.unit.api.openstack.compute.basic:Basic"}],"source_content_type":"text/x-ttcn-cfg","patch_set":6,"id":"3a71b18c_8cb33b0a","line":169,"in_reply_to":"3a71b18c_a1bac06c","updated":"2016-12-08 02:27:14.000000000","message":"Done","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"74a62ccd2439863ae3c7122cc0e1dca682423732","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    scheduler_hints \u003d nova.api.openstack.compute.scheduler_hints:SchedulerHints"},{"line_number":167,"context_line":"    security_groups \u003d nova.api.openstack.compute.security_groups:SecurityGroups"},{"line_number":168,"context_line":"    user_data \u003d nova.api.openstack.compute.user_data:UserData"},{"line_number":169,"context_line":"    server_tags \u003d nova.api.openstack.compute.server_tags:ServerTags"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"nova.api.v21.test_extensions \u003d"},{"line_number":172,"context_line":"    basic \u003d nova.tests.unit.api.openstack.compute.basic:Basic"}],"source_content_type":"text/x-ttcn-cfg","patch_set":6,"id":"3a71b18c_5f562007","line":169,"in_reply_to":"3a71b18c_ad9d515b","updated":"2016-12-08 05:24:13.000000000","message":"I just think the current way is more modular. In the future, hope we can remove the stevedore.\n\nIf I check the server_tags.py, then I can easy to know everything about tags, whether there is related in the servers API or not.\n\nI\u0027m happy to merge the \u0027extension\u0027 which is only added one field to the servers API. But for more than one extended field, I like put them in one modular.","commit_id":"9147a9dfaf81787eb5c25e54a6ff8f633ca5200b"}]}
