)]}'
{"doc/source/reference/block_storage_usage_guide.rst":[{"author":{"_account_id":31821,"name":"LiangLu","email":"lu.liang@jp.fujitsu.com","username":"LiangLu"},"change_message_id":"8393356673db5026a4c1d1dee03633a6b83407a3","unresolved":true,"context_lines":[{"line_number":55,"context_line":"  topology_template:"},{"line_number":56,"context_line":"    inputs:"},{"line_number":57,"context_line":"      my_vol:"},{"line_number":58,"context_line":"        description: vloume id"},{"line_number":59,"context_line":"        type: string"},{"line_number":60,"context_line":"      ."},{"line_number":61,"context_line":"      ."}],"source_content_type":"text/x-rst","patch_set":5,"id":"daedf99c_d7d489a7","line":58,"range":{"start_line":58,"start_character":21,"end_line":58,"end_character":28},"updated":"2020-11-24 20:50:08.000000000","message":"volume id?","commit_id":"7eed467b9ccb3e5e98831c0220b2e7c12e074cea"},{"author":{"_account_id":26222,"name":"Cong Phuoc Hoang","email":"hoangphuocbk2.07@gmail.com","username":"hoangphuoc"},"change_message_id":"8ec691c095360f18d95cd042feecb2197df66c39","unresolved":true,"context_lines":[{"line_number":57,"context_line":"      my_vol:"},{"line_number":58,"context_line":"        description: vloume id"},{"line_number":59,"context_line":"        type: string"},{"line_number":60,"context_line":"      ."},{"line_number":61,"context_line":"      ."},{"line_number":62,"context_line":"    VB1:"},{"line_number":63,"context_line":"      type: tosca.nodes.BlockStorage.Tacker"}],"source_content_type":"text/x-rst","patch_set":5,"id":"d581cf8a_0838d9e9","line":60,"range":{"start_line":60,"start_character":0,"end_line":60,"end_character":7},"updated":"2020-11-26 17:07:54.000000000","message":"it\u0027s better to remove this empty line","commit_id":"7eed467b9ccb3e5e98831c0220b2e7c12e074cea"}],"tacker/tests/unit/vnfm/infra_drivers/openstack/data/sample-tosca-vnfd-existing-block-storage.yaml":[{"author":{"_account_id":26222,"name":"Cong Phuoc Hoang","email":"hoangphuocbk2.07@gmail.com","username":"hoangphuoc"},"change_message_id":"8ec691c095360f18d95cd042feecb2197df66c39","unresolved":true,"context_lines":[{"line_number":9,"context_line":"  inputs:"},{"line_number":10,"context_line":"    my_vol:"},{"line_number":11,"context_line":"      default: 0dbf28ba-d0b7-4369-99ce-7a3c31dc996f"},{"line_number":12,"context_line":"      description: vloume id"},{"line_number":13,"context_line":"      type: string"},{"line_number":14,"context_line":"  node_templates:"},{"line_number":15,"context_line":"    VDU1:"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"ca0673cd_68b9da66","line":12,"range":{"start_line":12,"start_character":19,"end_line":12,"end_character":26},"updated":"2020-11-26 17:07:54.000000000","message":"volume","commit_id":"7eed467b9ccb3e5e98831c0220b2e7c12e074cea"}],"tacker/tests/unit/vnfm/tosca/test_utils.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"e47fb023afa3c6d702c6ab5654e1584373d6ffdf","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        self.assertEqual(expected_dict, volume_details)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def test_get_block_storage_details_volume_id(self):"},{"line_number":303,"context_line":"        tosca_vol \u003d _get_template(\u0027sample-tosca-vnfd-existing-block-storage.yaml\u0027)"},{"line_number":304,"context_line":"        vnfd_dict \u003d yaml.safe_load(tosca_vol)"},{"line_number":305,"context_line":"        expected_dict \u003d {"},{"line_number":306,"context_line":"            \u0027volumes\u0027: {"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_7ca9cc7a","line":303,"updated":"2020-09-15 21:44:46.000000000","message":"pep8: E501 line too long (82 \u003e 79 characters)","commit_id":"62958691ae1a10b09d88ea523dcb196353eb5bc1"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"5ba128f4b0f5a9f343df4344963e402e488c8c22","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        self.assertEqual(expected_dict, volume_details)"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"    def test_get_block_storage_details_volume_id(self):"},{"line_number":303,"context_line":"        tosca_vol \u003d _get_template(\u0027sample-tosca-vnfd-existing-block-storage.yaml\u0027)"},{"line_number":304,"context_line":"        vnfd_dict \u003d yaml.safe_load(tosca_vol)"},{"line_number":305,"context_line":"        expected_dict \u003d {"},{"line_number":306,"context_line":"            \u0027volumes\u0027: {"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_f04a1d7e","line":303,"updated":"2020-07-28 12:28:44.000000000","message":"pep8: E501 line too long (82 \u003e 79 characters)","commit_id":"62958691ae1a10b09d88ea523dcb196353eb5bc1"}],"tacker/tosca/lib/tacker_nfv_defs.yaml":[{"author":{"_account_id":26588,"name":"Hiroyuki Jo","email":"joxyuki@gmail.com","username":"joxyuki"},"change_message_id":"cd29bbc869ffb3472833dccf81f116711e388b82","unresolved":false,"context_lines":[{"line_number":372,"context_line":"      image:"},{"line_number":373,"context_line":"        type: string"},{"line_number":374,"context_line":"        required: false"},{"line_number":375,"context_line":"      volume_id:"},{"line_number":376,"context_line":"        type: string"},{"line_number":377,"context_line":"        required: false"},{"line_number":378,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_7a7c641f","line":375,"range":{"start_line":375,"start_character":5,"end_line":375,"end_character":16},"updated":"2019-12-12 03:16:07.000000000","message":"tosca.nodes.BlockStorage already have volume_id property[1]. Is this really needed?\n\n[1] https://github.com/openstack/tosca-parser/blob/58ddb23387b77c47891ea81bd1d8c2b9ee0d02bd/toscaparser/elements/TOSCA_definition_1_0.yaml#L184","commit_id":"62958691ae1a10b09d88ea523dcb196353eb5bc1"},{"author":{"_account_id":26588,"name":"Hiroyuki Jo","email":"joxyuki@gmail.com","username":"joxyuki"},"change_message_id":"66d0905053dfbd2c77a69a984e978962509cdaf7","unresolved":false,"context_lines":[{"line_number":375,"context_line":"      volume_id:"},{"line_number":376,"context_line":"        type: string"},{"line_number":377,"context_line":"        required: false"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"  tosca.nodes.BlockStorageAttachment:"},{"line_number":380,"context_line":"    derived_from: tosca.nodes.Root"},{"line_number":381,"context_line":"    properties:"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"3fa7e38b_61d8d451","line":378,"updated":"2019-12-19 01:58:42.000000000","message":"As I commented in your tosca-parser patch, you can add here:\n\n  size:\n    type: scalar-unit.size\n    required: false\n    constraints:\n      - greater_or_equal: 1 MB","commit_id":"62958691ae1a10b09d88ea523dcb196353eb5bc1"},{"author":{"_account_id":32102,"name":"Manpreet Kaur","email":"kaurmanpreet2620@gmail.com","username":"manpreet"},"change_message_id":"4329152d9d147eeab0651fd72ec2e2bd254f4c51","unresolved":false,"context_lines":[{"line_number":372,"context_line":"      image:"},{"line_number":373,"context_line":"        type: string"},{"line_number":374,"context_line":"        required: false"},{"line_number":375,"context_line":"      volume_id:"},{"line_number":376,"context_line":"        type: string"},{"line_number":377,"context_line":"        required: false"},{"line_number":378,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":2,"id":"9f560f44_425bd584","line":375,"range":{"start_line":375,"start_character":6,"end_line":375,"end_character":15},"updated":"2020-10-08 12:30:00.000000000","message":"Explicit addition of volume_id could also be remove from \"tacker/tosca/lib/tacker_nfv_defs.yaml\".\nAs tosca.nodes.BlockStorage (in toscaparser/elements/TOSCA_definition_1_0.yaml) already \ndefines \"volume_id\".","commit_id":"89c3af56a174c90aa1414f5dc723192c453f47f2"}],"tacker/tosca/utils.py":[{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"4349996af4bcc767fd718e60dabbb211d4bd6d2e","unresolved":false,"context_lines":[{"line_number":387,"context_line":"                vol_attach_dict[node_name][\u0027instance_uuid\u0027] \u003d \\"},{"line_number":388,"context_line":"                    {\u0027get_resource\u0027: req[\u0027virtualBinding\u0027][\u0027node\u0027]}"},{"line_number":389,"context_line":"            elif \u0027virtualAttachment\u0027 in req:"},{"line_number":390,"context_line":"                if VOLUME_IDs:"},{"line_number":391,"context_line":"                    vol_attach_dict[node_name][\u0027volume_id\u0027] \u003d \\"},{"line_number":392,"context_line":"                        {\u0027get_param\u0027: VOLUME_IDs["},{"line_number":393,"context_line":"                         req[\u0027virtualAttachment\u0027][\u0027node\u0027]]}"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_3229ab9b","line":390,"updated":"2020-09-23 23:37:24.000000000","message":"It seems this code is executed only once by one process. Is it right ?\nOtherwise it is broken.","commit_id":"89c3af56a174c90aa1414f5dc723192c453f47f2"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"ae2d2860af9798f05e701065012868c85c5ecbce","unresolved":false,"context_lines":[{"line_number":387,"context_line":"                vol_attach_dict[node_name][\u0027instance_uuid\u0027] \u003d \\"},{"line_number":388,"context_line":"                    {\u0027get_resource\u0027: req[\u0027virtualBinding\u0027][\u0027node\u0027]}"},{"line_number":389,"context_line":"            elif \u0027virtualAttachment\u0027 in req:"},{"line_number":390,"context_line":"                if VOLUME_IDs:"},{"line_number":391,"context_line":"                    vol_attach_dict[node_name][\u0027volume_id\u0027] \u003d \\"},{"line_number":392,"context_line":"                        {\u0027get_param\u0027: VOLUME_IDs["},{"line_number":393,"context_line":"                         req[\u0027virtualAttachment\u0027][\u0027node\u0027]]}"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f621f24_5326a4b9","line":390,"in_reply_to":"9f560f44_3229ab9b","updated":"2020-10-28 05:03:00.000000000","message":"I mean;\nIt seems this code is executed only once by per porcess. Is it right ?\nOtherwise it is broken.\n\nOnce get_volumes called with template with volume_id, VOLUME_IDs become not None thereafter. Then later if get_vol_attachments is called with template without volume_id, it go through here.\nSo it seems it assumes get_volumes and get_vol_attachment are execute only once with same template in per process. I want to confirm it.\n\nGenerally global variables should not be used.","commit_id":"89c3af56a174c90aa1414f5dc723192c453f47f2"},{"author":{"_account_id":32395,"name":"Koichiro Den","email":"koichiro.den@gmail.com","username":"kden"},"change_message_id":"ad5aac09d430479138a7f76798f64c1889206bd1","unresolved":false,"context_lines":[{"line_number":926,"context_line":"@log.log"},{"line_number":927,"context_line":"def add_volume_resources(heat_dict, vol_res):"},{"line_number":928,"context_line":"    # Add cinder volumes"},{"line_number":929,"context_line":"    if \u0027volume_id\u0027 not in vol_res[\u0027volumes\u0027].values()[0]:"},{"line_number":930,"context_line":"        for res_name, cinder_vol in vol_res[\u0027volumes\u0027].items():"},{"line_number":931,"context_line":"            heat_dict[\u0027resources\u0027][res_name] \u003d {"},{"line_number":932,"context_line":"                \u0027type\u0027: \u0027OS::Cinder::Volume\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9f560f44_6f67d025","line":929,"updated":"2020-09-23 10:25:07.000000000","message":"Looking ahead to python 3 (https://bugs.launchpad.net/tacker/+bug/1778644), it\u0027d be better to preclude \"\u0027dict_values\u0027 object is not subscriptable\" error.\nAnyway, IIUC this part looks broken so I cooked up a patch. Please check if this was what you meant. (Note: this has not been tested yet.)\n\n def add_volume_resources(heat_dict, vol_res):\n     # Add cinder volumes\n-    if \u0027volume_id\u0027 not in vol_res[\u0027volumes\u0027].values()[0]:\n-        for res_name, cinder_vol in vol_res[\u0027volumes\u0027].items():\n-            heat_dict[\u0027resources\u0027][res_name] \u003d {\n-                \u0027type\u0027: \u0027OS::Cinder::Volume\u0027,\n-                \u0027properties\u0027: {}\n-            }\n-            for prop_name, prop_val in cinder_vol.items():\n-                heat_dict[\u0027resources\u0027][res_name][\u0027properties\u0027][prop_name] \u003d \\\n-                    prop_val\n+    for res_name, cinder_vol in vol_res[\u0027volumes\u0027].items():\n+        if \u0027volume_id\u0027 in cinder_vol:\n+            continue\n+        heat_dict[\u0027resources\u0027][res_name] \u003d {\n+            \u0027type\u0027: \u0027OS::Cinder::Volume\u0027,\n+            \u0027properties\u0027: {}\n+        }\n+        for prop_name, prop_val in cinder_vol.items():\n+            heat_dict[\u0027resources\u0027][res_name][\u0027properties\u0027][prop_name] \u003d \\\n+                prop_val","commit_id":"89c3af56a174c90aa1414f5dc723192c453f47f2"},{"author":{"_account_id":31821,"name":"LiangLu","email":"lu.liang@jp.fujitsu.com","username":"LiangLu"},"change_message_id":"8393356673db5026a4c1d1dee03633a6b83407a3","unresolved":true,"context_lines":[{"line_number":374,"context_line":"        volume_dict[node_name] \u003d dict()"},{"line_number":375,"context_line":"        block_properties \u003d node_value.get(\u0027properties\u0027, {})"},{"line_number":376,"context_line":"        if \u0027volume_id\u0027 in block_properties:"},{"line_number":377,"context_line":"            global VOLUME_IDs"},{"line_number":378,"context_line":"            VOLUME_IDs[node_name] \u003d block_properties[\u0027volume_id\u0027]"},{"line_number":379,"context_line":"            volume_dict[node_name][\u0027volume_id\u0027] \u003d block_properties[\u0027volume_id\u0027]"},{"line_number":380,"context_line":"            del node_tpl[node_name]"}],"source_content_type":"text/x-python","patch_set":5,"id":"6472354e_a6c5db4e","line":377,"range":{"start_line":377,"start_character":12,"end_line":377,"end_character":29},"updated":"2020-11-24 20:50:08.000000000","message":"VOLUME_IDs is already a global variable, seems no need to declear here especially every loop.","commit_id":"7eed467b9ccb3e5e98831c0220b2e7c12e074cea"},{"author":{"_account_id":26222,"name":"Cong Phuoc Hoang","email":"hoangphuocbk2.07@gmail.com","username":"hoangphuoc"},"change_message_id":"8ec691c095360f18d95cd042feecb2197df66c39","unresolved":true,"context_lines":[{"line_number":412,"context_line":"                vol_attach_dict[node_name][\u0027instance_uuid\u0027] \u003d \\"},{"line_number":413,"context_line":"                    {\u0027get_resource\u0027: req[\u0027virtualBinding\u0027][\u0027node\u0027]}"},{"line_number":414,"context_line":"            elif \u0027virtualAttachment\u0027 in req:"},{"line_number":415,"context_line":"                if VOLUME_IDs:"},{"line_number":416,"context_line":"                    vol_attach_dict[node_name][\u0027volume_id\u0027] \u003d \\"},{"line_number":417,"context_line":"                        {\u0027get_param\u0027: VOLUME_IDs["},{"line_number":418,"context_line":"                         req[\u0027virtualAttachment\u0027][\u0027node\u0027]]}"}],"source_content_type":"text/x-python","patch_set":5,"id":"0cae5b6f_577d9104","line":415,"range":{"start_line":415,"start_character":19,"end_line":415,"end_character":29},"updated":"2020-11-26 17:07:54.000000000","message":"I am not sure if using global variable is a good idea here. IMO, you can call get_volumes() to get volume_dict, then get volume_id with a given volume_name.","commit_id":"7eed467b9ccb3e5e98831c0220b2e7c12e074cea"}]}
