)]}'
{"etc/ironic/ironic.conf.sample":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":708,"context_line":"# testing. (string value)"},{"line_number":709,"context_line":"# Allowed values: keystone, noauth"},{"line_number":710,"context_line":"#auth_strategy \u003d keystone"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"[cisco_ucs]"},{"line_number":714,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":16,"id":"3a71b18c_bb7208af","line":711,"updated":"2016-12-07 14:32:27.000000000","message":"we should have all authentication options here (similar to other services). dunno though how pas-ha did it back then..","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a82b4e90d60c86829f6343eced363c6f669c7f6b","unresolved":false,"context_lines":[{"line_number":708,"context_line":"# testing. (string value)"},{"line_number":709,"context_line":"# Allowed values: keystone, noauth"},{"line_number":710,"context_line":"#auth_strategy \u003d keystone"},{"line_number":711,"context_line":""},{"line_number":712,"context_line":""},{"line_number":713,"context_line":"[cisco_ucs]"},{"line_number":714,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":16,"id":"1a6eadb0_a7caad6c","line":711,"in_reply_to":"3a71b18c_bb7208af","updated":"2016-12-13 20:58:11.000000000","message":"So I\u0027m not sure we really should, given our use has to pass along the context of the tenant requesting the action, thus they need to have sufficient access to request actions upon volumes they own.\n\nI guess looking at https://github.com/openstack/ironic/blob/master/ironic/common/neutron.py#L37 coupled with the ironic/conf/auth.py parameters being imported into ironic/conf/neutron.py means that we get parameters that are unused. :(","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ac6ba9fc431ae598c651727978e1267a3a32214f","unresolved":false,"context_lines":[{"line_number":892,"context_line":"#"},{"line_number":893,"context_line":""},{"line_number":894,"context_line":"# URL for connecting to cinder. (string value)"},{"line_number":895,"context_line":"#url \u003d \u003cNone\u003e"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"# Timeout value for connecting to cinder in seconds. (integer"},{"line_number":898,"context_line":"# value)"}],"source_content_type":"application/octet-stream","patch_set":21,"id":"ba5201f7_39588832","line":895,"updated":"2017-01-03 17:16:32.000000000","message":"nit: maybe api_url, for consistency with other config options in this file? or service_url looks like another thing that\u0027s used","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":892,"context_line":"#"},{"line_number":893,"context_line":""},{"line_number":894,"context_line":"# URL for connecting to cinder. (string value)"},{"line_number":895,"context_line":"#url \u003d \u003cNone\u003e"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"# Timeout value for connecting to cinder in seconds. (integer"},{"line_number":898,"context_line":"# value)"}],"source_content_type":"application/octet-stream","patch_set":21,"id":"ba5201f7_cdcc978b","line":895,"in_reply_to":"ba5201f7_39588832","updated":"2017-01-06 20:57:06.000000000","message":"along with url :)","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":853,"context_line":"# From ironic"},{"line_number":854,"context_line":"#"},{"line_number":855,"context_line":""},{"line_number":856,"context_line":"# URL for connecting to cinder. (string value)"},{"line_number":857,"context_line":"#url \u003d \u003cNone\u003e"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"# Timeout value for connecting to cinder in seconds. (integer"}],"source_content_type":"application/octet-stream","patch_set":33,"id":"3a461143_aefbac45","line":856,"updated":"2017-02-01 00:16:53.000000000","message":"does it need to have protocol included?","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":853,"context_line":"# From ironic"},{"line_number":854,"context_line":"#"},{"line_number":855,"context_line":""},{"line_number":856,"context_line":"# URL for connecting to cinder. (string value)"},{"line_number":857,"context_line":"#url \u003d \u003cNone\u003e"},{"line_number":858,"context_line":""},{"line_number":859,"context_line":"# Timeout value for connecting to cinder in seconds. (integer"}],"source_content_type":"application/octet-stream","patch_set":33,"id":"fa31d9ce_08c8a621","line":856,"in_reply_to":"3a461143_aefbac45","updated":"2017-02-13 20:13:44.000000000","message":"I perceive URL as including protocol.","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":858,"context_line":""},{"line_number":859,"context_line":"# Timeout value for connecting to cinder in seconds. (integer"},{"line_number":860,"context_line":"# value)"},{"line_number":861,"context_line":"#url_timeout \u003d 30"},{"line_number":862,"context_line":""},{"line_number":863,"context_line":"# Client retries in the case of a failed request connection."},{"line_number":864,"context_line":"# (integer value)"}],"source_content_type":"application/octet-stream","patch_set":33,"id":"3a461143_6e054444","line":861,"updated":"2017-02-01 00:16:53.000000000","message":"simple timeout seems better","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":858,"context_line":""},{"line_number":859,"context_line":"# Timeout value for connecting to cinder in seconds. (integer"},{"line_number":860,"context_line":"# value)"},{"line_number":861,"context_line":"#url_timeout \u003d 30"},{"line_number":862,"context_line":""},{"line_number":863,"context_line":"# Client retries in the case of a failed request connection."},{"line_number":864,"context_line":"# (integer value)"}],"source_content_type":"application/octet-stream","patch_set":33,"id":"fa31d9ce_0896e6ef","line":861,"in_reply_to":"3a461143_6e054444","updated":"2017-02-13 20:13:44.000000000","message":"Done","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"63ccd26c5c6b74ca7cd8d652129e4e30a0677fff","unresolved":false,"context_lines":[{"line_number":895,"context_line":"#"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"# URL for connecting to cinder. (string value)"},{"line_number":898,"context_line":"#url \u003d \u003cNone\u003e"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"# Timeout value for connecting to cinder in seconds. (integer"},{"line_number":901,"context_line":"# value)"}],"source_content_type":"application/octet-stream","patch_set":48,"id":"1a1ced50_2cc02e7b","line":898,"updated":"2017-03-20 18:36:12.000000000","message":"nit: Let\u0027s force this to begin with either http:// or https:// like we do for ironic API: https://github.com/openstack/ironic/blob/master/etc/ironic/ironic.conf.sample#L923","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":895,"context_line":"#"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"# URL for connecting to cinder. (string value)"},{"line_number":898,"context_line":"#url \u003d \u003cNone\u003e"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"# Timeout value for connecting to cinder in seconds. (integer"},{"line_number":901,"context_line":"# value)"}],"source_content_type":"application/octet-stream","patch_set":48,"id":"1a1ced50_214bd4b1","line":898,"in_reply_to":"1a1ced50_2cc02e7b","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"85abc386e184c83da8f6808e119229292048e8b2","unresolved":false,"context_lines":[{"line_number":897,"context_line":"# URL for connecting to cinder. (string value)"},{"line_number":898,"context_line":"#url \u003d \u003cNone\u003e"},{"line_number":899,"context_line":""},{"line_number":900,"context_line":"# Timeout value for connecting to cinder in seconds. (integer"},{"line_number":901,"context_line":"# value)"},{"line_number":902,"context_line":"#url_timeout \u003d 30"},{"line_number":903,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":49,"id":"1a1ced50_3e8cc234","line":900,"range":{"start_line":900,"start_character":0,"end_line":900,"end_character":61},"updated":"2017-03-21 04:52:43.000000000","message":"nit: Timeout value in seconds for connecting to cinder.","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"}],"ironic/common/cinder.py":[{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    return _CINDER_SESSION"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def get_client(token\u003dNone, tenant\u003dNone, proxy_only\u003dFalse):"},{"line_number":48,"context_line":"    \"\"\"Get a cinder clint connection"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"       :param token: A requestor token, if applicable. Default: None"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_8166004f","line":47,"range":{"start_line":47,"start_character":40,"end_line":47,"end_character":56},"updated":"2016-12-06 11:22:29.000000000","message":"This parameter is not used anywhere in this method.","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"def get_client(token\u003dNone, tenant\u003dNone, proxy_only\u003dFalse):"},{"line_number":48,"context_line":"    \"\"\"Get a cinder clint connection"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"       :param token: A requestor token, if applicable. Default: None"},{"line_number":51,"context_line":"       :param tenant: The requestor tenant ID. Default: None"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_41d6a8f1","line":48,"range":{"start_line":48,"start_character":20,"end_line":48,"end_character":25},"updated":"2016-12-06 11:22:29.000000000","message":"nit: clint/client","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":112,"context_line":""},{"line_number":113,"context_line":"       Returns true if cinder shows the volume as presently attached."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"       :param task: The task for the request."},{"line_number":116,"context_line":"       :param volume: The dictionary representing the volume."},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"       :returns: Boolean indicating if the volume is attached."}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_017670d6","line":115,"range":{"start_line":115,"start_character":7,"end_line":115,"end_character":45},"updated":"2016-12-06 11:22:29.000000000","message":"nit: Its \u0027node\u0027","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":150,"context_line":"def _create_metadata_dictionary(node, action):"},{"line_number":151,"context_line":"    \"\"\"Create a metadata dictonary utilizing the node UUID."},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"       :param node: Dictonary representing a node"},{"line_number":154,"context_line":"       :param action: String value representing the last action"},{"line_number":155,"context_line":"    \"\"\""},{"line_number":156,"context_line":"    label \u003d (\"ironic_node_%s\" % node.uuid)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_d3cc4bbd","line":153,"range":{"start_line":153,"start_character":20,"end_line":153,"end_character":29},"updated":"2016-12-06 11:22:29.000000000","message":"nit: s/Dictonary/Dictionary/","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":230,"context_line":"        client \u003d get_client(token\u003dtask.context.auth_token,"},{"line_number":231,"context_line":"                            tenant\u003dtask.context.tenant,"},{"line_number":232,"context_line":"                            proxy_only\u003dTrue)"},{"line_number":233,"context_line":"    except exception.InvalidParameterValue as msg:"},{"line_number":234,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":235,"context_line":"            # The message has been pre-formatted,"},{"line_number":236,"context_line":"            # no need to generate a longer error message."}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_f3cdc766","line":233,"range":{"start_line":233,"start_character":4,"end_line":233,"end_character":50},"updated":"2016-12-06 11:22:29.000000000","message":"This may not be required as get_client does not raise this exception.","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            # no need to generate a longer error message."},{"line_number":237,"context_line":"            LOG.error(msg)"},{"line_number":238,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":239,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client. %(error)s\u0027) %"},{"line_number":240,"context_line":"               {\u0027error\u0027: e})"},{"line_number":241,"context_line":"        LOG.exception(msg)"},{"line_number":242,"context_line":"        raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_13f7a38b","line":239,"range":{"start_line":239,"start_character":28,"end_line":239,"end_character":53},"updated":"2016-12-06 11:22:29.000000000","message":"Better to add node uuid in the message.","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":250,"context_line":"        try:"},{"line_number":251,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":252,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":253,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder. \u0027"},{"line_number":254,"context_line":"                     \u0027%(error)s\u0027) %"},{"line_number":255,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027error\u0027: e})"},{"line_number":256,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_53ed9bb5","line":253,"range":{"start_line":253,"start_character":54,"end_line":253,"end_character":65},"updated":"2016-12-06 11:22:29.000000000","message":"Better to add node uuid in the message.","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                # attachment process involves updating the volume"},{"line_number":305,"context_line":"                # database record to indicate that the attachment has"},{"line_number":306,"context_line":"                # been completed, which moves the volume to the"},{"line_number":307,"context_line":"                # \u0027atached\u0027 state."},{"line_number":308,"context_line":"                client.volumes.attach(volume_id, instance_uuid, mountpoint)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"                # Set metadata to assist a user in volume identification"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_733457fb","line":307,"range":{"start_line":307,"start_character":19,"end_line":307,"end_character":26},"updated":"2016-12-06 11:22:29.000000000","message":"nit: s/ atached/ attached","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":310,"context_line":"                # Set metadata to assist a user in volume identification"},{"line_number":311,"context_line":"                client.volumes.set_metadata("},{"line_number":312,"context_line":"                    volume_id,"},{"line_number":313,"context_line":"                    _create_metadata_dictionary(node, \u0027attaching\u0027)"},{"line_number":314,"context_line":"                )"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"            except cinder_exceptions.ClientException as e:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_f30f8734","line":313,"range":{"start_line":313,"start_character":55,"end_line":313,"end_character":64},"updated":"2016-12-06 11:22:29.000000000","message":"Should it be said as \u0027attached\u0027, as volume attachment is complete at this point.","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":317,"context_line":"                LOG.warning(_LW(\u0027Failed to update volume metadata for \u0027"},{"line_number":318,"context_line":"                                \u0027volume %(vol_id)s. %(err)s \u0027),"},{"line_number":319,"context_line":"                            {\u0027vol_id\u0027: volume_id, \u0027err\u0027: e})"},{"line_number":320,"context_line":"    return connected"},{"line_number":321,"context_line":""},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"def detach_volumes(task,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_565d8913","line":320,"range":{"start_line":320,"start_character":4,"end_line":320,"end_character":20},"updated":"2016-12-06 11:22:29.000000000","message":"If few of the given volumes are attached and we get a cinder exception then what would be the fate of the volumes already attached? How would user clean them up? Would it be useful to clean the attached nodes from \u0027connected\u0027 if any cinder exception were to occur?","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":368,"context_line":"        client \u003d get_client(token\u003dtask.context.auth_token,"},{"line_number":369,"context_line":"                            tenant\u003dtask.context.tenant,"},{"line_number":370,"context_line":"                            proxy_only\u003dTrue)"},{"line_number":371,"context_line":"    except exception.InvalidParameterValue as msg:"},{"line_number":372,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":373,"context_line":"            # The message has been pre-formatted,"},{"line_number":374,"context_line":"            # no need to generate a longer error message."}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_76ec452a","line":371,"range":{"start_line":371,"start_character":4,"end_line":371,"end_character":50},"updated":"2016-12-06 11:22:29.000000000","message":"ditto","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":397,"context_line":"            # before we we\u0027re attempting to power off the node."},{"line_number":398,"context_line":"            continue"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        if is_volume_attached(task, volume):"},{"line_number":401,"context_line":"            # Attempt to identify the attachment id value as we only"},{"line_number":402,"context_line":"            # want to remove the attachment record for the node, even"},{"line_number":403,"context_line":"            # though connector information"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_7661a5a8","line":400,"range":{"start_line":400,"start_character":11,"end_line":400,"end_character":29},"updated":"2016-12-06 11:22:29.000000000","message":"This is_volume_attached() and _get_attachment_id() should also be under try block as it can throw exception.","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":406,"context_line":"                client.volumes.begin_detaching(volume_id)"},{"line_number":407,"context_line":"            except cinder_exceptions.ClientException as e:"},{"line_number":408,"context_line":"                msg \u003d (_(\u0027Could not request detaching for volume %(vol_id)s \u0027"},{"line_number":409,"context_line":"                         \u0027from cinder. %(error)s\u0027),"},{"line_number":410,"context_line":"                       {\u0027vol_id\u0027: volume_id, \u0027error\u0027: e})"},{"line_number":411,"context_line":"                _handle_errors(allow_errors, msg)"},{"line_number":412,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_361acd17","line":409,"range":{"start_line":409,"start_character":31,"end_line":409,"end_character":37},"updated":"2016-12-06 11:22:29.000000000","message":"Better to add node uuid in the message.","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                # Set metadata to assist in volume identification."},{"line_number":429,"context_line":"                client.volumes.set_metadata("},{"line_number":430,"context_line":"                    volume_id,"},{"line_number":431,"context_line":"                    _create_metadata_dictionary(node, \u0027detaching\u0027)"},{"line_number":432,"context_line":"                )"},{"line_number":433,"context_line":"            except cinder_exceptions.ClientException as e:"},{"line_number":434,"context_line":"                LOG.warning(_LW(\u0027Failed to update volume metadata for \u0027"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_d6119905","line":431,"range":{"start_line":431,"start_character":55,"end_line":431,"end_character":64},"updated":"2016-12-06 11:22:29.000000000","message":"Should it be \u0027detached\u0027 here as detach operation is complete?","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"302a23822aa64d86f9225126dfd843d210ca3ede","unresolved":false,"context_lines":[{"line_number":431,"context_line":"                    _create_metadata_dictionary(node, \u0027detaching\u0027)"},{"line_number":432,"context_line":"                )"},{"line_number":433,"context_line":"            except cinder_exceptions.ClientException as e:"},{"line_number":434,"context_line":"                LOG.warning(_LW(\u0027Failed to update volume metadata for \u0027"},{"line_number":435,"context_line":"                                \u0027volume %(vol_id)s. %(err)s \u0027),"},{"line_number":436,"context_line":"                            {\u0027vol_id\u0027: volume_id, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":15,"id":"3a71b18c_96d9e159","line":434,"range":{"start_line":434,"start_character":57,"end_line":434,"end_character":65},"updated":"2016-12-06 11:22:29.000000000","message":"Better to add node uuid in the message.","commit_id":"6df090e7b23d170966ce828e8d211ed1a3e1e960"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"AVAILABLE \u003d \u0027available\u0027"},{"line_number":32,"context_line":"INUSE \u003d \u0027in-use\u0027"},{"line_number":33,"context_line":"# TODO(TheJulia) What if mutli-attach, and attaching...."},{"line_number":34,"context_line":"# That technically shouldn\u0027t be a standard configuration,"},{"line_number":35,"context_line":"# but if someone wanted a quorum volume... that is the way"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_8902690a","line":32,"updated":"2016-12-07 14:32:27.000000000","message":"nit: IN_USE","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"AVAILABLE \u003d \u0027available\u0027"},{"line_number":32,"context_line":"INUSE \u003d \u0027in-use\u0027"},{"line_number":33,"context_line":"# TODO(TheJulia) What if mutli-attach, and attaching...."},{"line_number":34,"context_line":"# That technically shouldn\u0027t be a standard configuration,"},{"line_number":35,"context_line":"# but if someone wanted a quorum volume... that is the way"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_38beb8d4","line":32,"in_reply_to":"3a71b18c_8902690a","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        (volume[\u0027status\u0027] \u003d\u003d INUSE and"},{"line_number":103,"context_line":"            volume[\u0027multiattach\u0027])):"},{"line_number":104,"context_line":"        return True"},{"line_number":105,"context_line":"    return False"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def is_volume_attached(node, volume):"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_bbfda80a","line":105,"updated":"2016-12-07 14:32:27.000000000","message":"nit:\n\n return volume[\u0027status\u0027] \u003d\u003d AVAILABLE or (...)","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":102,"context_line":"        (volume[\u0027status\u0027] \u003d\u003d INUSE and"},{"line_number":103,"context_line":"            volume[\u0027multiattach\u0027])):"},{"line_number":104,"context_line":"        return True"},{"line_number":105,"context_line":"    return False"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def is_volume_attached(node, volume):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_071361b9","line":105,"in_reply_to":"3a71b18c_bbfda80a","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def is_volume_attached(node, volume):"},{"line_number":109,"context_line":"    \"\"\"Check if a volume is attached."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"       Returns true if cinder shows the volume as presently attached."},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_db026409","line":109,"updated":"2016-12-07 14:32:27.000000000","message":"\"... is attached to a given node\"","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"def is_volume_attached(node, volume):"},{"line_number":109,"context_line":"    \"\"\"Check if a volume is attached."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"       Returns true if cinder shows the volume as presently attached."},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_876e912d","line":109,"in_reply_to":"3a71b18c_db026409","updated":"2016-12-14 02:53:25.000000000","message":"Done, used supplied instead of given.","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":108,"context_line":"def is_volume_attached(node, volume):"},{"line_number":109,"context_line":"    \"\"\"Check if a volume is attached."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"       Returns true if cinder shows the volume as presently attached."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"       :param node: The node for the request."},{"line_number":114,"context_line":"       :param volume: The dictionary representing the volume."}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_fb072016","line":111,"updated":"2016-12-07 14:32:27.000000000","message":"nit: overly indented block","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":108,"context_line":"def is_volume_attached(node, volume):"},{"line_number":109,"context_line":"    \"\"\"Check if a volume is attached."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"       Returns true if cinder shows the volume as presently attached."},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"       :param node: The node for the request."},{"line_number":114,"context_line":"       :param volume: The dictionary representing the volume."}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_4745596e","line":111,"in_reply_to":"3a71b18c_fb072016","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                    if (attachment[\u0027server_id\u0027] \u003d\u003d node[\u0027instance_uuid\u0027]):"},{"line_number":124,"context_line":"                        return True"},{"line_number":125,"context_line":"                    if attachment[\u0027server_id\u0027] \u003d\u003d node[\u0027uuid\u0027]:"},{"line_number":126,"context_line":"                        return True"},{"line_number":127,"context_line":"        return False"},{"line_number":128,"context_line":"    except KeyError:"},{"line_number":129,"context_line":"        raise exception.StorageError(_(\u0027Attachment data not present.\u0027))"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_1b0dbc37","line":126,"updated":"2016-12-07 14:32:27.000000000","message":"nit:\n\n return attachment.get(\u0027server_id\u0027) in (node[\u0027uuid\u0027], node[\u0027instance_uuid\u0027])\n\nalso this whole function seems to be equivalent to\n\n return _get_attachment_id(node, volume) is not None","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":123,"context_line":"                    if (attachment[\u0027server_id\u0027] \u003d\u003d node[\u0027instance_uuid\u0027]):"},{"line_number":124,"context_line":"                        return True"},{"line_number":125,"context_line":"                    if attachment[\u0027server_id\u0027] \u003d\u003d node[\u0027uuid\u0027]:"},{"line_number":126,"context_line":"                        return True"},{"line_number":127,"context_line":"        return False"},{"line_number":128,"context_line":"    except KeyError:"},{"line_number":129,"context_line":"        raise exception.StorageError(_(\u0027Attachment data not present.\u0027))"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_e77d85b2","line":126,"in_reply_to":"3a71b18c_1b0dbc37","updated":"2016-12-14 02:53:25.000000000","message":"A volume can have multiple attachments, and this attachment data comes from cinder.... so I don\u0027t think an immediate return is the right thing to do.","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        return True"},{"line_number":127,"context_line":"        return False"},{"line_number":128,"context_line":"    except KeyError:"},{"line_number":129,"context_line":"        raise exception.StorageError(_(\u0027Attachment data not present.\u0027))"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"def _get_attachment_id(node, volume):"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_3b127859","line":129,"updated":"2016-12-07 14:32:27.000000000","message":"let\u0027s maybe include volume UUID in the message (if we know it)","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        return True"},{"line_number":127,"context_line":"        return False"},{"line_number":128,"context_line":"    except KeyError:"},{"line_number":129,"context_line":"        raise exception.StorageError(_(\u0027Attachment data not present.\u0027))"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"def _get_attachment_id(node, volume):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_9a0fc42d","line":129,"in_reply_to":"3a71b18c_3b127859","updated":"2016-12-14 02:53:25.000000000","message":"Good idea!  We should have it.  I\u0027ll double check the cinder data structure and update it.","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                    return attachment[\u0027id\u0027]"},{"line_number":143,"context_line":"    except KeyError:"},{"line_number":144,"context_line":"        raise exception.StorageError(_(\u0027Invalid attachment data provided.\u0027))"},{"line_number":145,"context_line":"    return None"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"def _create_metadata_dictionary(node, action):"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_5b0f342e","line":145,"updated":"2016-12-07 14:32:27.000000000","message":"this is redundant","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                    return attachment[\u0027id\u0027]"},{"line_number":143,"context_line":"    except KeyError:"},{"line_number":144,"context_line":"        raise exception.StorageError(_(\u0027Invalid attachment data provided.\u0027))"},{"line_number":145,"context_line":"    return None"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"def _create_metadata_dictionary(node, action):"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_5a728cae","line":145,"in_reply_to":"3a71b18c_5b0f342e","updated":"2016-12-14 02:53:25.000000000","message":"For my sanity? :)","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":232,"context_line":"            # The message has been pre-formatted,"},{"line_number":233,"context_line":"            # no need to generate a longer error message."},{"line_number":234,"context_line":"            LOG.error(msg)"},{"line_number":235,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":236,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":237,"context_line":"                 \u0027%(node)s. %(error)s\u0027),"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_7b1cf06a","line":234,"updated":"2016-12-07 14:32:27.000000000","message":"let\u0027s log node UUID for context (similar to below)?\n\n LOG.error(\"Error creating Cinder client when attaching volumes to node %(node)s: %(error)s\", ..)","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":231,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":232,"context_line":"            # The message has been pre-formatted,"},{"line_number":233,"context_line":"            # no need to generate a longer error message."},{"line_number":234,"context_line":"            LOG.error(msg)"},{"line_number":235,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":236,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":237,"context_line":"                 \u0027%(node)s. %(error)s\u0027),"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_f8a9a07c","line":234,"in_reply_to":"3a71b18c_7b1cf06a","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":237,"context_line":"                 \u0027%(node)s. %(error)s\u0027),"},{"line_number":238,"context_line":"               {\u0027error\u0027: e, \u0027uuid\u0027: node.uuid})"},{"line_number":239,"context_line":"        LOG.exception(msg)"},{"line_number":240,"context_line":"        raise exception.StorageError(msg)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    # Raise an exception if we did not get a list"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_9b19cc7c","line":239,"updated":"2016-12-07 14:32:27.000000000","message":"do we really need traceback here? maybe we do, dunno","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":236,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":237,"context_line":"                 \u0027%(node)s. %(error)s\u0027),"},{"line_number":238,"context_line":"               {\u0027error\u0027: e, \u0027uuid\u0027: node.uuid})"},{"line_number":239,"context_line":"        LOG.exception(msg)"},{"line_number":240,"context_line":"        raise exception.StorageError(msg)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    # Raise an exception if we did not get a list"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_58e8d4b4","line":239,"in_reply_to":"3a71b18c_9b19cc7c","updated":"2016-12-14 02:53:25.000000000","message":"I would think for any spurious errors or unknown situations.  The client library returns ClientException for any nonspecific error, so it might be a good idea in my mind.","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    # Raise an exception if we did not get a list"},{"line_number":243,"context_line":"    if not isinstance(volume_list, list):"},{"line_number":244,"context_line":"        raise exception.StorageError(\u0027A list was not provided for the \u0027"},{"line_number":245,"context_line":"                                     \u0027volume list\u0027)"},{"line_number":246,"context_line":"    connected \u003d []"},{"line_number":247,"context_line":"    for volume_id in volume_list:"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_bb24c8b2","line":244,"updated":"2016-12-07 14:32:27.000000000","message":"missing _()\n\nalso it seems to be a programming error, I wonder if we should raise TypeError","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    # Raise an exception if we did not get a list"},{"line_number":243,"context_line":"    if not isinstance(volume_list, list):"},{"line_number":244,"context_line":"        raise exception.StorageError(\u0027A list was not provided for the \u0027"},{"line_number":245,"context_line":"                                     \u0027volume list\u0027)"},{"line_number":246,"context_line":"    connected \u003d []"},{"line_number":247,"context_line":"    for volume_id in volume_list:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_18ef3c88","line":244,"in_reply_to":"3a71b18c_bb24c8b2","updated":"2016-12-14 02:53:25.000000000","message":"I\u0027m really wondering why I put this here.  I guess TypeError would make sense actually.","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        try:"},{"line_number":249,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":250,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":251,"context_line":"            msg \u003d (_LE(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":252,"context_line":"                       \u0027%(node)s. %(error)s\u0027),"},{"line_number":253,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":254,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_db29848b","line":251,"updated":"2016-12-07 14:32:27.000000000","message":"you\u0027re raising an exception with this message, so it might hit a user. let\u0027s use _() instead of _LE()","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        try:"},{"line_number":249,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":250,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":251,"context_line":"            msg \u003d (_LE(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":252,"context_line":"                       \u0027%(node)s. %(error)s\u0027),"},{"line_number":253,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":254,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_b3366be5","line":251,"in_reply_to":"3a71b18c_db29848b","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":249,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":250,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":251,"context_line":"            msg \u003d (_LE(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":252,"context_line":"                       \u0027%(node)s. %(error)s\u0027),"},{"line_number":253,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":254,"context_line":"            LOG.error(msg)"},{"line_number":255,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_fb1e405e","line":252,"updated":"2016-12-07 14:32:27.000000000","message":"nit: . -\u003e :","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":249,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":250,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":251,"context_line":"            msg \u003d (_LE(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":252,"context_line":"                       \u0027%(node)s. %(error)s\u0027),"},{"line_number":253,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":254,"context_line":"            LOG.error(msg)"},{"line_number":255,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_933b2fd1","line":252,"in_reply_to":"3a71b18c_fb1e405e","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":254,"context_line":"            LOG.error(msg)"},{"line_number":255,"context_line":"            raise exception.StorageError(msg)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        if not is_volume_attached(task.node, volume):"},{"line_number":258,"context_line":"            try:"},{"line_number":259,"context_line":"                client.volumes.reserve(volume_id)"},{"line_number":260,"context_line":"            except cinder_exceptions.ClientException as e:"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_1b24dcad","line":257,"updated":"2016-12-07 14:32:27.000000000","message":"to reduce indentation, let\u0027s do:\n\n if is_volume_attached(task.node, volume):\n     continue","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":254,"context_line":"            LOG.error(msg)"},{"line_number":255,"context_line":"            raise exception.StorageError(msg)"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"        if not is_volume_attached(task.node, volume):"},{"line_number":258,"context_line":"            try:"},{"line_number":259,"context_line":"                client.volumes.reserve(volume_id)"},{"line_number":260,"context_line":"            except cinder_exceptions.ClientException as e:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_015c24ec","line":257,"in_reply_to":"3a71b18c_1b24dcad","updated":"2016-12-14 02:53:25.000000000","message":"Good idea!","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":261,"context_line":"                msg \u003d (_(\u0027Could not reserve volume %(vol_id) for %(node)s. \u0027"},{"line_number":262,"context_line":"                         \u0027%(error)s)\u0027),"},{"line_number":263,"context_line":"                       {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":264,"context_line":"                LOG.exception(msg)"},{"line_number":265,"context_line":"                raise exception.StorageError(msg)"},{"line_number":266,"context_line":"            try:"},{"line_number":267,"context_line":"                # Provide connector information to cinder"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_3b3998d9","line":264,"updated":"2016-12-07 14:32:27.000000000","message":"ditto about needing traceback","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":261,"context_line":"                msg \u003d (_(\u0027Could not reserve volume %(vol_id) for %(node)s. \u0027"},{"line_number":262,"context_line":"                         \u0027%(error)s)\u0027),"},{"line_number":263,"context_line":"                       {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":264,"context_line":"                LOG.exception(msg)"},{"line_number":265,"context_line":"                raise exception.StorageError(msg)"},{"line_number":266,"context_line":"            try:"},{"line_number":267,"context_line":"                # Provide connector information to cinder"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_b33d8bbd","line":264,"in_reply_to":"3a71b18c_3b3998d9","updated":"2016-12-14 02:53:25.000000000","message":"Done.","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":275,"context_line":"                msg \u003d (_(\u0027Could not initialize storage attachment for \u0027"},{"line_number":276,"context_line":"                         \u0027volume %(vol_id)s to node %(node)s. %(error)s\u0027) %"},{"line_number":277,"context_line":"                       {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":278,"context_line":"                LOG.exception(msg)"},{"line_number":279,"context_line":"                try:"},{"line_number":280,"context_line":"                    client.volumes.unreserve(volume_id)"},{"line_number":281,"context_line":"                except cinder_exceptions.ClientException:"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_5b3654e8","line":278,"updated":"2016-12-07 14:32:27.000000000","message":"ditto","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":275,"context_line":"                msg \u003d (_(\u0027Could not initialize storage attachment for \u0027"},{"line_number":276,"context_line":"                         \u0027volume %(vol_id)s to node %(node)s. %(error)s\u0027) %"},{"line_number":277,"context_line":"                       {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":278,"context_line":"                LOG.exception(msg)"},{"line_number":279,"context_line":"                try:"},{"line_number":280,"context_line":"                    client.volumes.unreserve(volume_id)"},{"line_number":281,"context_line":"                except cinder_exceptions.ClientException:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_b364abe5","line":278,"in_reply_to":"3a71b18c_5b3654e8","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":279,"context_line":"                try:"},{"line_number":280,"context_line":"                    client.volumes.unreserve(volume_id)"},{"line_number":281,"context_line":"                except cinder_exceptions.ClientException:"},{"line_number":282,"context_line":"                    LOG.error(_LW(\"Failed to remove reservation for \""},{"line_number":283,"context_line":"                                  \"volume %s\"), volume_id)"},{"line_number":284,"context_line":"                raise exception.StorageError(msg)"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_7b3310f7","line":282,"updated":"2016-12-07 14:32:27.000000000","message":"s/LE/LE/ or s/error/warning/ (I guess the former)","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                raise exception.StorageError(msg)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"            LOG.info(_LI(\u0027Successfully initialized volume %(vol_id) for \u0027"},{"line_number":287,"context_line":"                         \u0027node %(node)s.\u0027),"},{"line_number":288,"context_line":"                     {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"            if node.instance_uuid is not None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_9b30ecea","line":287,"updated":"2016-12-07 14:32:27.000000000","message":"nit: maybe log instance_uuid too? we seem to use it pretty actively here","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                raise exception.StorageError(msg)"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"            LOG.info(_LI(\u0027Successfully initialized volume %(vol_id) for \u0027"},{"line_number":287,"context_line":"                         \u0027node %(node)s.\u0027),"},{"line_number":288,"context_line":"                     {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"            if node.instance_uuid is not None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_53b517ec","line":287,"in_reply_to":"3a71b18c_9b30ecea","updated":"2016-12-14 02:53:25.000000000","message":"I\u0027m not sure we really do that anywhere else, would be nice to have.... Not entirely sure right now.","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                # database record to indicate that the attachment has"},{"line_number":304,"context_line":"                # been completed, which moves the volume to the"},{"line_number":305,"context_line":"                # \u0027attached\u0027 state."},{"line_number":306,"context_line":"                client.volumes.attach(volume_id, instance_uuid, mountpoint)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"                # Set metadata to assist a user in volume identification"},{"line_number":309,"context_line":"                client.volumes.set_metadata("}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_bb4be85e","line":306,"updated":"2016-12-07 14:32:27.000000000","message":"mountpoint seems to always be None...","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":303,"context_line":"                # database record to indicate that the attachment has"},{"line_number":304,"context_line":"                # been completed, which moves the volume to the"},{"line_number":305,"context_line":"                # \u0027attached\u0027 state."},{"line_number":306,"context_line":"                client.volumes.attach(volume_id, instance_uuid, mountpoint)"},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"                # Set metadata to assist a user in volume identification"},{"line_number":309,"context_line":"                client.volumes.set_metadata("}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_9396cf4a","line":306,"in_reply_to":"3a71b18c_bb4be85e","updated":"2016-12-14 02:53:25.000000000","message":"There is absolutely no way for us to know or ensure attachment at that point. :(  We could explicitly pass None and I could move the note from above down.","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                )"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"            except cinder_exceptions.ClientException as e:"},{"line_number":315,"context_line":"                LOG.warning(_LW(\u0027Failed to update volume metadata for \u0027"},{"line_number":316,"context_line":"                                \u0027volume %(vol_id)s. %(err)s \u0027),"},{"line_number":317,"context_line":"                            {\u0027vol_id\u0027: volume_id, \u0027err\u0027: e})"},{"line_number":318,"context_line":"    return connected"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_db50a40d","line":315,"updated":"2016-12-07 14:32:27.000000000","message":"why is it a warning? will it work correctly after this failing?","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                )"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"            except cinder_exceptions.ClientException as e:"},{"line_number":315,"context_line":"                LOG.warning(_LW(\u0027Failed to update volume metadata for \u0027"},{"line_number":316,"context_line":"                                \u0027volume %(vol_id)s. %(err)s \u0027),"},{"line_number":317,"context_line":"                            {\u0027vol_id\u0027: volume_id, \u0027err\u0027: e})"},{"line_number":318,"context_line":"    return connected"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_b3782b2d","line":315,"in_reply_to":"3a71b18c_db50a40d","updated":"2016-12-14 02:53:25.000000000","message":"This is informational kindness to humans that actually look at the cinder side, or if an administrator needs to reconcile attachments, such as when performing audits.  As such, it will work correctly without the extra metadata information being stored.","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":368,"context_line":"    except exception.InvalidParameterValue as msg:"},{"line_number":369,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":370,"context_line":"            # The message has been pre-formatted,"},{"line_number":371,"context_line":"            # no need to generate a longer error message."},{"line_number":372,"context_line":"            LOG.error(msg)"},{"line_number":373,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":374,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client. %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_fb5560fa","line":371,"updated":"2016-12-07 14:32:27.000000000","message":"the same comments about error handling go here","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":368,"context_line":"    except exception.InvalidParameterValue as msg:"},{"line_number":369,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":370,"context_line":"            # The message has been pre-formatted,"},{"line_number":371,"context_line":"            # no need to generate a longer error message."},{"line_number":372,"context_line":"            LOG.error(msg)"},{"line_number":373,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":374,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client. %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_f3c0e32c","line":371,"in_reply_to":"3a71b18c_fb5560fa","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":379,"context_line":"    # Raise an exception if we did not get a list"},{"line_number":380,"context_line":"    if not isinstance(volume_list, list):"},{"line_number":381,"context_line":"        raise exception.StorageError(\u0027A list was not provided for the \u0027"},{"line_number":382,"context_line":"                                     \u0027volume list\u0027)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    for volume_id in volume_list:"},{"line_number":385,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_1b5bfc2f","line":382,"updated":"2016-12-07 14:32:27.000000000","message":"_()","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":379,"context_line":"    # Raise an exception if we did not get a list"},{"line_number":380,"context_line":"    if not isinstance(volume_list, list):"},{"line_number":381,"context_line":"        raise exception.StorageError(\u0027A list was not provided for the \u0027"},{"line_number":382,"context_line":"                                     \u0027volume list\u0027)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"    for volume_id in volume_list:"},{"line_number":385,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_93408fa7","line":382,"in_reply_to":"3a71b18c_1b5bfc2f","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":387,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":388,"context_line":"            msg \u003d (_LE(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":389,"context_line":"                       \u0027node %(node)s. %(error)s\u0027),"},{"line_number":390,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027error\u0027: e})"},{"line_number":391,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":392,"context_line":"            # If we do not raise an exception, we should move on to"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_3b40b835","line":389,"updated":"2016-12-07 14:32:27.000000000","message":"this won\u0027t work with , this way, you have to use %. otherwise msg becomes a tuple","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":387,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":388,"context_line":"            msg \u003d (_LE(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":389,"context_line":"                       \u0027node %(node)s. %(error)s\u0027),"},{"line_number":390,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027error\u0027: e})"},{"line_number":391,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":392,"context_line":"            # If we do not raise an exception, we should move on to"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_73393341","line":389,"in_reply_to":"3a71b18c_3b40b835","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            # before we we\u0027re attempting to power off the node."},{"line_number":395,"context_line":"            continue"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        if is_volume_attached(task, volume):"},{"line_number":398,"context_line":"            # Attempt to identify the attachment id value as we only"},{"line_number":399,"context_line":"            # want to remove the attachment record for the node, even"},{"line_number":400,"context_line":"            # though connector information"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_5b3d74ba","line":397,"updated":"2016-12-07 14:32:27.000000000","message":"nit:\n\n if not is_volume_attached:\n   continue","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            # before we we\u0027re attempting to power off the node."},{"line_number":395,"context_line":"            continue"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        if is_volume_attached(task, volume):"},{"line_number":398,"context_line":"            # Attempt to identify the attachment id value as we only"},{"line_number":399,"context_line":"            # want to remove the attachment record for the node, even"},{"line_number":400,"context_line":"            # though connector information"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_012424ad","line":397,"in_reply_to":"3a71b18c_5b3d74ba","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":403,"context_line":"                client.volumes.begin_detaching(volume_id)"},{"line_number":404,"context_line":"            except cinder_exceptions.ClientException as e:"},{"line_number":405,"context_line":"                msg \u003d (_LE(\u0027Could not request detach for volume %(vol_id)s \u0027"},{"line_number":406,"context_line":"                           \u0027from cinder for node %(node)s. %(error)s\u0027),"},{"line_number":407,"context_line":"                       {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":408,"context_line":"                _handle_errors(allow_errors, msg)"},{"line_number":409,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_7b4a3057","line":406,"updated":"2016-12-07 14:32:27.000000000","message":"ditto about ,","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":403,"context_line":"                client.volumes.begin_detaching(volume_id)"},{"line_number":404,"context_line":"            except cinder_exceptions.ClientException as e:"},{"line_number":405,"context_line":"                msg \u003d (_LE(\u0027Could not request detach for volume %(vol_id)s \u0027"},{"line_number":406,"context_line":"                           \u0027from cinder for node %(node)s. %(error)s\u0027),"},{"line_number":407,"context_line":"                       {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":408,"context_line":"                _handle_errors(allow_errors, msg)"},{"line_number":409,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_d3e687b3","line":406,"in_reply_to":"3a71b18c_7b4a3057","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a1efed84af5e5e49848961070c183fbe99f6983","unresolved":false,"context_lines":[{"line_number":411,"context_line":"                client.volumes.terminate_connection(volume_id, connector)"},{"line_number":412,"context_line":"            except cinder_exceptions.ClientException as e:"},{"line_number":413,"context_line":"                msg \u003d (_LE(\u0027Could not detach volume %(vol_id)s \u0027"},{"line_number":414,"context_line":"                           \u0027from node %{node}s. %(error)s\u0027),"},{"line_number":415,"context_line":"                       {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":416,"context_line":"                _handle_errors(allow_errors, msg)"},{"line_number":417,"context_line":"                # Skip proceeding with this method if we\u0027re not raising"}],"source_content_type":"text/x-python","patch_set":16,"id":"3a71b18c_9b470c4b","line":414,"updated":"2016-12-07 14:32:27.000000000","message":"ditto about ,","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"8287535b3a4fcd6a1f3a95ca6d0be926fec9cc6d","unresolved":false,"context_lines":[{"line_number":411,"context_line":"                client.volumes.terminate_connection(volume_id, connector)"},{"line_number":412,"context_line":"            except cinder_exceptions.ClientException as e:"},{"line_number":413,"context_line":"                msg \u003d (_LE(\u0027Could not detach volume %(vol_id)s \u0027"},{"line_number":414,"context_line":"                           \u0027from node %{node}s. %(error)s\u0027),"},{"line_number":415,"context_line":"                       {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":416,"context_line":"                _handle_errors(allow_errors, msg)"},{"line_number":417,"context_line":"                # Skip proceeding with this method if we\u0027re not raising"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a6eadb0_f3e1c39b","line":414,"in_reply_to":"3a71b18c_9b470c4b","updated":"2016-12-14 02:53:25.000000000","message":"Done","commit_id":"11cc8c537260577c983130d326ef7cf4681b67fa"},{"author":{"_account_id":20146,"name":"yuyafei","email":"yu.yafei@foxmail.com","username":"yuyafei"},"change_message_id":"33c56b2e0ad91e32ebecfe9ca7365264040c6bfb","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            try:"},{"line_number":287,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":288,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":289,"context_line":"                LOG.error(_LW(\"Failed to remove reservation for \""},{"line_number":290,"context_line":"                              \"volume %s\"), volume_id)"},{"line_number":291,"context_line":"            raise exception.StorageError(msg)"},{"line_number":292,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a6eadb0_03fe6cad","line":289,"range":{"start_line":289,"start_character":26,"end_line":289,"end_character":29},"updated":"2016-12-16 09:01:02.000000000","message":"_LE","commit_id":"b0bf113dd42dc22ff82a04e97ee2dec9f5a1f93c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"3ce62a5f60bc210ec1069e135f080ed4776d420c","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            try:"},{"line_number":287,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":288,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":289,"context_line":"                LOG.error(_LW(\"Failed to remove reservation for \""},{"line_number":290,"context_line":"                              \"volume %s\"), volume_id)"},{"line_number":291,"context_line":"            raise exception.StorageError(msg)"},{"line_number":292,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"1a6eadb0_eaa041f6","line":289,"range":{"start_line":289,"start_character":26,"end_line":289,"end_character":29},"in_reply_to":"1a6eadb0_03fe6cad","updated":"2016-12-16 21:40:04.000000000","message":"Done","commit_id":"b0bf113dd42dc22ff82a04e97ee2dec9f5a1f93c"},{"author":{"_account_id":20146,"name":"yuyafei","email":"yu.yafei@foxmail.com","username":"yuyafei"},"change_message_id":"33c56b2e0ad91e32ebecfe9ca7365264040c6bfb","unresolved":false,"context_lines":[{"line_number":418,"context_line":"            # Remove the attachment"},{"line_number":419,"context_line":"            client.volumes.terminate_connection(volume_id, connector)"},{"line_number":420,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":421,"context_line":"            msg \u003d (_LE(\u0027Could not detach volume %(vol_id)s \u0027"},{"line_number":422,"context_line":"                       \u0027from node %(node)s. %(error)s\u0027) %"},{"line_number":423,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":424,"context_line":"            _handle_errors(allow_errors, msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a6eadb0_63b3a00a","line":421,"range":{"start_line":421,"start_character":19,"end_line":421,"end_character":22},"updated":"2016-12-16 09:01:02.000000000","message":"_LE may remove.","commit_id":"b0bf113dd42dc22ff82a04e97ee2dec9f5a1f93c"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"3ce62a5f60bc210ec1069e135f080ed4776d420c","unresolved":false,"context_lines":[{"line_number":418,"context_line":"            # Remove the attachment"},{"line_number":419,"context_line":"            client.volumes.terminate_connection(volume_id, connector)"},{"line_number":420,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":421,"context_line":"            msg \u003d (_LE(\u0027Could not detach volume %(vol_id)s \u0027"},{"line_number":422,"context_line":"                       \u0027from node %(node)s. %(error)s\u0027) %"},{"line_number":423,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":424,"context_line":"            _handle_errors(allow_errors, msg)"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a6eadb0_aa456943","line":421,"range":{"start_line":421,"start_character":19,"end_line":421,"end_character":22},"in_reply_to":"1a6eadb0_63b3a00a","updated":"2016-12-16 21:40:04.000000000","message":"Done","commit_id":"b0bf113dd42dc22ff82a04e97ee2dec9f5a1f93c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from ironic.common.i18n import _"},{"line_number":23,"context_line":"from ironic.common.i18n import _LE"},{"line_number":24,"context_line":"from ironic.common.i18n import _LI"},{"line_number":25,"context_line":"from ironic.common.i18n import _LW"},{"line_number":26,"context_line":"from ironic.common import keystone"},{"line_number":27,"context_line":"from ironic.conf import CONF"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_e7ecb6c9","line":25,"updated":"2017-01-02 17:07:32.000000000","message":"nit: I think we tend to import this i18n stuff on one line","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from ironic.common.i18n import _"},{"line_number":23,"context_line":"from ironic.common.i18n import _LE"},{"line_number":24,"context_line":"from ironic.common.i18n import _LI"},{"line_number":25,"context_line":"from ironic.common.i18n import _LW"},{"line_number":26,"context_line":"from ironic.common import keystone"},{"line_number":27,"context_line":"from ironic.conf import CONF"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_edacfb8d","line":25,"in_reply_to":"ba5201f7_b9bab821","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ac6ba9fc431ae598c651727978e1267a3a32214f","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from ironic.common.i18n import _"},{"line_number":23,"context_line":"from ironic.common.i18n import _LE"},{"line_number":24,"context_line":"from ironic.common.i18n import _LI"},{"line_number":25,"context_line":"from ironic.common.i18n import _LW"},{"line_number":26,"context_line":"from ironic.common import keystone"},{"line_number":27,"context_line":"from ironic.conf import CONF"},{"line_number":28,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_b9bab821","line":25,"in_reply_to":"ba5201f7_e7ecb6c9","updated":"2017-01-03 17:16:32.000000000","message":"+1","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ac6ba9fc431ae598c651727978e1267a3a32214f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":"    if CONF.cinder.auth_strategy !\u003d \u0027keystone\u0027:"},{"line_number":55,"context_line":"        # TODO(TheJulia): Follow-up on noauth support."},{"line_number":56,"context_line":"        raise exception.InvalidParameterValue("},{"line_number":57,"context_line":"            _LE(\"The cinder driver only supports keystone authentication \""},{"line_number":58,"context_line":"                \"at this point in time. [cinder]auth_strategy is set to \""},{"line_number":59,"context_line":"                \"%(auth_strategy)s\") %"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_d9e3fc31","line":56,"updated":"2017-01-03 17:16:32.000000000","message":"This should probably just be checked at service startup. Oslo can handle that for you.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":"    if CONF.cinder.auth_strategy !\u003d \u0027keystone\u0027:"},{"line_number":55,"context_line":"        # TODO(TheJulia): Follow-up on noauth support."},{"line_number":56,"context_line":"        raise exception.InvalidParameterValue("},{"line_number":57,"context_line":"            _LE(\"The cinder driver only supports keystone authentication \""},{"line_number":58,"context_line":"                \"at this point in time. [cinder]auth_strategy is set to \""},{"line_number":59,"context_line":"                \"%(auth_strategy)s\") %"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_142f7fa1","line":56,"in_reply_to":"ba5201f7_d9e3fc31","updated":"2017-01-06 20:57:06.000000000","message":"I went ahead and added noauth client creation support.  Might not work based on discussion with some cinder folks.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    if CONF.cinder.auth_strategy !\u003d \u0027keystone\u0027:"},{"line_number":55,"context_line":"        # TODO(TheJulia): Follow-up on noauth support."},{"line_number":56,"context_line":"        raise exception.InvalidParameterValue("},{"line_number":57,"context_line":"            _LE(\"The cinder driver only supports keystone authentication \""},{"line_number":58,"context_line":"                \"at this point in time. [cinder]auth_strategy is set to \""},{"line_number":59,"context_line":"                \"%(auth_strategy)s\") %"},{"line_number":60,"context_line":"            {\u0027auth_strategy\u0027: CONF.cinder.auth_strategy})"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_07d29a00","line":57,"updated":"2017-01-02 17:07:32.000000000","message":"I think it should be s/LE// as this exception may be user-visible","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    if CONF.cinder.auth_strategy !\u003d \u0027keystone\u0027:"},{"line_number":55,"context_line":"        # TODO(TheJulia): Follow-up on noauth support."},{"line_number":56,"context_line":"        raise exception.InvalidParameterValue("},{"line_number":57,"context_line":"            _LE(\"The cinder driver only supports keystone authentication \""},{"line_number":58,"context_line":"                \"at this point in time. [cinder]auth_strategy is set to \""},{"line_number":59,"context_line":"                \"%(auth_strategy)s\") %"},{"line_number":60,"context_line":"            {\u0027auth_strategy\u0027: CONF.cinder.auth_strategy})"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_341563e4","line":57,"in_reply_to":"ba5201f7_07d29a00","updated":"2017-01-06 20:57:06.000000000","message":"Added noauth support, we may want to go back to this, but removed the LE.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    Returns true if cinder shows the volume as presently attached."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    :param node: The node for the request."},{"line_number":112,"context_line":"    :param volume: The dictionary representing the volume from cinder."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    :returns: Boolean indicating if the volume is attached."}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_27cf9e57","line":111,"updated":"2017-01-02 17:07:32.000000000","message":"nit: would be good to mention that node is expected to be a dictionary as well (not objects.Node, I guess)","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    Returns true if cinder shows the volume as presently attached."},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    :param node: The node for the request."},{"line_number":112,"context_line":"    :param volume: The dictionary representing the volume from cinder."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    :returns: Boolean indicating if the volume is attached."}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_275d3715","line":111,"in_reply_to":"ba5201f7_27cf9e57","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            for attachment in volume[\u0027attachments\u0027]:"},{"line_number":120,"context_line":"                if \u0027server_id\u0027 in attachment:"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"                    if (attachment[\u0027server_id\u0027] \u003d\u003d node[\u0027instance_uuid\u0027]):"},{"line_number":123,"context_line":"                        return True"},{"line_number":124,"context_line":"                    if attachment[\u0027server_id\u0027] \u003d\u003d node[\u0027uuid\u0027]:"},{"line_number":125,"context_line":"                        return True"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_47dca212","line":122,"updated":"2017-01-02 17:07:32.000000000","message":"nit: redundant brackets","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        if hasattr(volume, \u0027id\u0027):"},{"line_number":129,"context_line":"            msg \u003d (_(\u0027Attachment data not present in \u0027"},{"line_number":130,"context_line":"                     \u0027cinder volume %(vol_id)s.\u0027) %"},{"line_number":131,"context_line":"                   {\u0027vol_id\u0027: volume[\u0027id\u0027]})"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            msg \u003d _(\u0027No volume found. Unable to identify attachment status.\u0027)"},{"line_number":134,"context_line":"        raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_67d9a621","line":131,"updated":"2017-01-02 17:07:32.000000000","message":"this code looks suspicious: with hasattr above you\u0027re checking if volume.id exists. But here you use volume[\u0027id\u0027]. I wonder if the check should be \"\u0027id\u0027 in volume\" or \"volume.get(\u0027id\u0027)\"","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ac6ba9fc431ae598c651727978e1267a3a32214f","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        if hasattr(volume, \u0027id\u0027):"},{"line_number":129,"context_line":"            msg \u003d (_(\u0027Attachment data not present in \u0027"},{"line_number":130,"context_line":"                     \u0027cinder volume %(vol_id)s.\u0027) %"},{"line_number":131,"context_line":"                   {\u0027vol_id\u0027: volume[\u0027id\u0027]})"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            msg \u003d _(\u0027No volume found. Unable to identify attachment status.\u0027)"},{"line_number":134,"context_line":"        raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_99d7b4be","line":131,"in_reply_to":"ba5201f7_67d9a621","updated":"2017-01-03 17:16:32.000000000","message":"Yes, this looks wrong, if volume is supposed to be a dict as mentioned in the docstring and by the use of []. \n\nhasattr will not return the right boolean if you\u0027re checking whether a particular key is in a dict:\n\n\u003e\u003e\u003e my_dict \u003d {\u0027id\u0027: 123}\n\u003e\u003e\u003e hasattr(my_dict, \u0027id\u0027)\nFalse","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        if hasattr(volume, \u0027id\u0027):"},{"line_number":129,"context_line":"            msg \u003d (_(\u0027Attachment data not present in \u0027"},{"line_number":130,"context_line":"                     \u0027cinder volume %(vol_id)s.\u0027) %"},{"line_number":131,"context_line":"                   {\u0027vol_id\u0027: volume[\u0027id\u0027]})"},{"line_number":132,"context_line":"        else:"},{"line_number":133,"context_line":"            msg \u003d _(\u0027No volume found. Unable to identify attachment status.\u0027)"},{"line_number":134,"context_line":"        raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_87c983ae","line":131,"in_reply_to":"ba5201f7_99d7b4be","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                        attachment[\u0027server_id\u0027] \u003d\u003d node.uuid):"},{"line_number":147,"context_line":"                    return attachment[\u0027id\u0027]"},{"line_number":148,"context_line":"    except KeyError:"},{"line_number":149,"context_line":"        raise exception.StorageError(_(\u0027Invalid attachment data provided.\u0027))"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"def _create_metadata_dictionary(node, action):"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_8704ca7e","line":149,"updated":"2017-01-02 17:07:32.000000000","message":"nit: could be improved by also reporting the missing key (which is str(exc) in case of KeyError)","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":146,"context_line":"                        attachment[\u0027server_id\u0027] \u003d\u003d node.uuid):"},{"line_number":147,"context_line":"                    return attachment[\u0027id\u0027]"},{"line_number":148,"context_line":"    except KeyError:"},{"line_number":149,"context_line":"        raise exception.StorageError(_(\u0027Invalid attachment data provided.\u0027))"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"def _create_metadata_dictionary(node, action):"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_271537e4","line":149,"in_reply_to":"ba5201f7_8704ca7e","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"def attach_volumes(task, volume_list, connector):"},{"line_number":167,"context_line":"    \"\"\"Attach a volume."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"       Enumerate through the provided list of volumes and attach the volumes"},{"line_number":170,"context_line":"       to the node defined in the task utilizing the provided connector"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_a709ce97","line":167,"updated":"2017-01-02 17:07:32.000000000","message":"nit: Attach volumes to a node","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"def attach_volumes(task, volume_list, connector):"},{"line_number":167,"context_line":"    \"\"\"Attach a volume."},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"       Enumerate through the provided list of volumes and attach the volumes"},{"line_number":170,"context_line":"       to the node defined in the task utilizing the provided connector"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_27ec57f2","line":167,"in_reply_to":"ba5201f7_a709ce97","updated":"2017-01-06 20:57:06.000000000","message":"doh!  Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ac6ba9fc431ae598c651727978e1267a3a32214f","unresolved":false,"context_lines":[{"line_number":170,"context_line":"       to the node defined in the task utilizing the provided connector"},{"line_number":171,"context_line":"       information."},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"       If an attachment appears to already exist, we will skip attempting to"},{"line_number":174,"context_line":"       attach the volume. If use of the volume fails, a user may need to"},{"line_number":175,"context_line":"       remove any lingering pre-existing/unused attachment records since"},{"line_number":176,"context_line":"       we have no way to validate if the connector profile data differs"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_797850c5","line":173,"updated":"2017-01-03 17:16:32.000000000","message":"Would it be useful to somehow return to the user some indication that the volume is already attached?\n\nedit: never mind, I prefer Dmitry\u0027s comment on L262","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ac6ba9fc431ae598c651727978e1267a3a32214f","unresolved":false,"context_lines":[{"line_number":176,"context_line":"       we have no way to validate if the connector profile data differs"},{"line_number":177,"context_line":"       from what was provided to cinder."},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"       :param task: Task Manager instance representing the operation."},{"line_number":180,"context_line":"       :param volume_list: List of volume_id UUID values representing volumes."},{"line_number":181,"context_line":"       :param connector: Dictonary object representing the node sufficently"},{"line_number":182,"context_line":"                         to attach a volume. This value can vary based upon"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_f94a8082","line":179,"range":{"start_line":179,"start_character":20,"end_line":179,"end_character":32},"updated":"2017-01-03 17:16:32.000000000","message":"nit: s/Task Manager/TaskManager","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":176,"context_line":"       we have no way to validate if the connector profile data differs"},{"line_number":177,"context_line":"       from what was provided to cinder."},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"       :param task: Task Manager instance representing the operation."},{"line_number":180,"context_line":"       :param volume_list: List of volume_id UUID values representing volumes."},{"line_number":181,"context_line":"       :param connector: Dictonary object representing the node sufficently"},{"line_number":182,"context_line":"                         to attach a volume. This value can vary based upon"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_c7cd4b67","line":179,"range":{"start_line":179,"start_character":20,"end_line":179,"end_character":32},"in_reply_to":"ba5201f7_f94a8082","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"       :param task: Task Manager instance representing the operation."},{"line_number":180,"context_line":"       :param volume_list: List of volume_id UUID values representing volumes."},{"line_number":181,"context_line":"       :param connector: Dictonary object representing the node sufficently"},{"line_number":182,"context_line":"                         to attach a volume. This value can vary based upon"},{"line_number":183,"context_line":"                         the node\u0027s configuration, capability, and ultimately"},{"line_number":184,"context_line":"                         the back-end storage driver. As cinder was designed"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_c7fed26a","line":181,"updated":"2017-01-02 17:07:32.000000000","message":"nit: typo in Dictionary","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":178,"context_line":""},{"line_number":179,"context_line":"       :param task: Task Manager instance representing the operation."},{"line_number":180,"context_line":"       :param volume_list: List of volume_id UUID values representing volumes."},{"line_number":181,"context_line":"       :param connector: Dictonary object representing the node sufficently"},{"line_number":182,"context_line":"                         to attach a volume. This value can vary based upon"},{"line_number":183,"context_line":"                         the node\u0027s configuration, capability, and ultimately"},{"line_number":184,"context_line":"                         the back-end storage driver. As cinder was designed"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_a7b207e3","line":181,"in_reply_to":"ba5201f7_c7fed26a","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ac6ba9fc431ae598c651727978e1267a3a32214f","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                         the node\u0027s configuration, capability, and ultimately"},{"line_number":184,"context_line":"                         the back-end storage driver. As cinder was designed"},{"line_number":185,"context_line":"                         around iSCSI, the \u0027ip\u0027 and \u0027initiator\u0027 keys are"},{"line_number":186,"context_line":"                         generally expected. For FiberChannel, the key"},{"line_number":187,"context_line":"                         \u0027wwpns\u0027 can be used with a list of port addresses."},{"line_number":188,"context_line":"                         Some drivers support a \u0027multipath\u0027 boolean key,"},{"line_number":189,"context_line":"                         although it is generally False. The \u0027host\u0027 key"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_795f7041","line":186,"range":{"start_line":186,"start_character":25,"end_line":186,"end_character":43},"updated":"2017-01-03 17:16:32.000000000","message":"are they strictly *required*?","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                         the node\u0027s configuration, capability, and ultimately"},{"line_number":184,"context_line":"                         the back-end storage driver. As cinder was designed"},{"line_number":185,"context_line":"                         around iSCSI, the \u0027ip\u0027 and \u0027initiator\u0027 keys are"},{"line_number":186,"context_line":"                         generally expected. For FiberChannel, the key"},{"line_number":187,"context_line":"                         \u0027wwpns\u0027 can be used with a list of port addresses."},{"line_number":188,"context_line":"                         Some drivers support a \u0027multipath\u0027 boolean key,"},{"line_number":189,"context_line":"                         although it is generally False. The \u0027host\u0027 key"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_c77f0b13","line":186,"range":{"start_line":186,"start_character":25,"end_line":186,"end_character":43},"in_reply_to":"ba5201f7_795f7041","updated":"2017-01-06 20:57:06.000000000","message":"Great question! Only if one wants an iscsi connection to work. It truly depends on the back-end cinder driver running in cinder.  I know, not a great answer, but cinder just passes the info through to the driver for attachments. Updated the description to try and better reflect this.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                             \u0027ip\u0027: \u0027ip address\u0027,"},{"line_number":196,"context_line":"                             \u0027initiator\u0027: \u0027initiator iqn\u0027"},{"line_number":197,"context_line":"                             \u0027multipath\u0027: False"},{"line_number":198,"context_line":"                             \u0027host\u0027: hostname"},{"line_number":199,"context_line":"                             }"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"       :raises: StorageError If storage subsystem exception is raised."}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_e703d671","line":198,"updated":"2017-01-02 17:07:32.000000000","message":"nit: missing trailing , in several places","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                             \u0027ip\u0027: \u0027ip address\u0027,"},{"line_number":196,"context_line":"                             \u0027initiator\u0027: \u0027initiator iqn\u0027"},{"line_number":197,"context_line":"                             \u0027multipath\u0027: False"},{"line_number":198,"context_line":"                             \u0027host\u0027: hostname"},{"line_number":199,"context_line":"                             }"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"       :raises: StorageError If storage subsystem exception is raised."}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_27ed37b7","line":198,"in_reply_to":"ba5201f7_e703d671","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                             }"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"       :raises: StorageError If storage subsystem exception is raised."},{"line_number":202,"context_line":"       :raises: TypeError If a list is not supplied for volumes."},{"line_number":203,"context_line":"       :returns: List of connected volumes. The returned list can be"},{"line_number":204,"context_line":"                 relatively consistent depending on the end storage"},{"line_number":205,"context_line":"                 driver that the volume is configured for, however"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_07f9ba80","line":202,"updated":"2017-01-02 17:07:32.000000000","message":"nit: \"If volume_list is not actually a list\"?","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":199,"context_line":"                             }"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"       :raises: StorageError If storage subsystem exception is raised."},{"line_number":202,"context_line":"       :raises: TypeError If a list is not supplied for volumes."},{"line_number":203,"context_line":"       :returns: List of connected volumes. The returned list can be"},{"line_number":204,"context_line":"                 relatively consistent depending on the end storage"},{"line_number":205,"context_line":"                 driver that the volume is configured for, however"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_47bf9b60","line":202,"in_reply_to":"ba5201f7_07f9ba80","updated":"2017-01-06 20:57:06.000000000","message":"Done, slightly different.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027error\u0027: msg})"},{"line_number":240,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":241,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":242,"context_line":"                 \u0027%(node)s. %(error)s\u0027),"},{"line_number":243,"context_line":"               {\u0027error\u0027: e, \u0027uuid\u0027: node.uuid})"},{"line_number":244,"context_line":"        LOG.error(msg)"},{"line_number":245,"context_line":"        raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_27f6be8f","line":242,"updated":"2017-01-02 17:07:32.000000000","message":", -\u003e %","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027error\u0027: msg})"},{"line_number":240,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":241,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":242,"context_line":"                 \u0027%(node)s. %(error)s\u0027),"},{"line_number":243,"context_line":"               {\u0027error\u0027: e, \u0027uuid\u0027: node.uuid})"},{"line_number":244,"context_line":"        LOG.error(msg)"},{"line_number":245,"context_line":"        raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_6769fff8","line":242,"in_reply_to":"ba5201f7_27f6be8f","updated":"2017-01-06 20:57:06.000000000","message":"Ugh, I thought I fixed these.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        raise exception.StorageError(msg)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    # Raise an exception if we did not get a list"},{"line_number":248,"context_line":"    if not isinstance(volume_list, list):"},{"line_number":249,"context_line":"        raise TypeError(_(\u0027A list was not provided for the \u0027"},{"line_number":250,"context_line":"                          \u0027volume list\u0027))"},{"line_number":251,"context_line":"    connected \u003d []"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_47f3c29e","line":248,"updated":"2017-01-02 17:07:32.000000000","message":"this check looks overly strict to me. I\u0027d leave it out, and just let Python raise an exception in the \"for\" loop. E.g. I see no reasons to not accept sets here.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":245,"context_line":"        raise exception.StorageError(msg)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    # Raise an exception if we did not get a list"},{"line_number":248,"context_line":"    if not isinstance(volume_list, list):"},{"line_number":249,"context_line":"        raise TypeError(_(\u0027A list was not provided for the \u0027"},{"line_number":250,"context_line":"                          \u0027volume list\u0027))"},{"line_number":251,"context_line":"    connected \u003d []"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_07583355","line":248,"in_reply_to":"ba5201f7_47f3c29e","updated":"2017-01-06 20:57:06.000000000","message":"Agreed. Changing.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":254,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":255,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":256,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":257,"context_line":"                     \u0027%(node)s: %(error)s\u0027),"},{"line_number":258,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":259,"context_line":"            LOG.error(msg)"},{"line_number":260,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_67f0c691","line":257,"updated":"2017-01-02 17:07:32.000000000","message":", -\u003e % (otherwise you can a tuple)","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            LOG.error(msg)"},{"line_number":260,"context_line":"            raise exception.StorageError(msg)"},{"line_number":261,"context_line":"        if is_volume_attached(task.node, volume):"},{"line_number":262,"context_line":"            continue"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        try:"},{"line_number":265,"context_line":"            client.volumes.reserve(volume_id)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_872beaea","line":262,"updated":"2017-01-02 17:07:32.000000000","message":"nit: I wonder if this situation needs LOG.debug","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            LOG.error(msg)"},{"line_number":260,"context_line":"            raise exception.StorageError(msg)"},{"line_number":261,"context_line":"        if is_volume_attached(task.node, volume):"},{"line_number":262,"context_line":"            continue"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        try:"},{"line_number":265,"context_line":"            client.volumes.reserve(volume_id)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_4af1626a","line":262,"in_reply_to":"ba5201f7_542431ae","updated":"2017-01-06 20:57:06.000000000","message":"Agreed, adding.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ac6ba9fc431ae598c651727978e1267a3a32214f","unresolved":false,"context_lines":[{"line_number":259,"context_line":"            LOG.error(msg)"},{"line_number":260,"context_line":"            raise exception.StorageError(msg)"},{"line_number":261,"context_line":"        if is_volume_attached(task.node, volume):"},{"line_number":262,"context_line":"            continue"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"        try:"},{"line_number":265,"context_line":"            client.volumes.reserve(volume_id)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_542431ae","line":262,"in_reply_to":"ba5201f7_872beaea","updated":"2017-01-03 17:16:32.000000000","message":"+1. Maybe this is better than what I suggested above about returning this information to the user somehow.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            client.volumes.reserve(volume_id)"},{"line_number":266,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":267,"context_line":"            msg \u003d (_(\u0027Could not reserve volume %(vol_id) for %(node)s: \u0027"},{"line_number":268,"context_line":"                     \u0027%(error)s)\u0027),"},{"line_number":269,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":270,"context_line":"            LOG.error(msg)"},{"line_number":271,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_a730ee57","line":268,"updated":"2017-01-02 17:07:32.000000000","message":", -\u003e %","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":265,"context_line":"            client.volumes.reserve(volume_id)"},{"line_number":266,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":267,"context_line":"            msg \u003d (_(\u0027Could not reserve volume %(vol_id) for %(node)s: \u0027"},{"line_number":268,"context_line":"                     \u0027%(error)s)\u0027),"},{"line_number":269,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":270,"context_line":"            LOG.error(msg)"},{"line_number":271,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_6af4665a","line":268,"in_reply_to":"ba5201f7_a730ee57","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            # database record to indicate that the attachment has"},{"line_number":311,"context_line":"            # been completed, which moves the volume to the"},{"line_number":312,"context_line":"            # \u0027attached\u0027 state."},{"line_number":313,"context_line":"            client.volumes.attach(volume_id, instance_uuid, mountpoint)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"            # Set metadata to assist a user in volume identification"},{"line_number":316,"context_line":"            client.volumes.set_metadata("}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_c735f246","line":313,"updated":"2017-01-02 17:07:32.000000000","message":"s/mountpoint/None/? It does not look like we need a variable here..","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            # database record to indicate that the attachment has"},{"line_number":311,"context_line":"            # been completed, which moves the volume to the"},{"line_number":312,"context_line":"            # \u0027attached\u0027 state."},{"line_number":313,"context_line":"            client.volumes.attach(volume_id, instance_uuid, mountpoint)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"            # Set metadata to assist a user in volume identification"},{"line_number":316,"context_line":"            client.volumes.set_metadata("}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_4a4de298","line":313,"in_reply_to":"ba5201f7_14862965","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            # database record to indicate that the attachment has"},{"line_number":311,"context_line":"            # been completed, which moves the volume to the"},{"line_number":312,"context_line":"            # \u0027attached\u0027 state."},{"line_number":313,"context_line":"            client.volumes.attach(volume_id, instance_uuid, mountpoint)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"            # Set metadata to assist a user in volume identification"},{"line_number":316,"context_line":"            client.volumes.set_metadata("}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_ea23f6ba","line":313,"in_reply_to":"ba5201f7_c735f246","updated":"2017-01-06 20:57:06.000000000","message":"I made it a variable so if anyone updates the code later, they are explicitly aware of the context.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ac6ba9fc431ae598c651727978e1267a3a32214f","unresolved":false,"context_lines":[{"line_number":310,"context_line":"            # database record to indicate that the attachment has"},{"line_number":311,"context_line":"            # been completed, which moves the volume to the"},{"line_number":312,"context_line":"            # \u0027attached\u0027 state."},{"line_number":313,"context_line":"            client.volumes.attach(volume_id, instance_uuid, mountpoint)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"            # Set metadata to assist a user in volume identification"},{"line_number":316,"context_line":"            client.volumes.set_metadata("}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_14862965","line":313,"in_reply_to":"ba5201f7_c735f246","updated":"2017-01-03 17:16:32.000000000","message":"I think it\u0027s fine to be explicit about what we\u0027re setting to None. Either keeping the variable or adding the fact that mountpoint is unavailable to the comment above should be clear enough.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                             \u0027wwpns\u0027: [\u0027list\u0027,\u0027of\u0027,\u0027port\u0027,\u0027wwns\u0027]"},{"line_number":353,"context_line":"                             \u0027ip\u0027: \u0027ip address\u0027,"},{"line_number":354,"context_line":"                             \u0027initiator\u0027: \u0027initiator iqn\u0027"},{"line_number":355,"context_line":"                             \u0027multipath\u0027: False"},{"line_number":356,"context_line":"                             \u0027host\u0027: hostname"},{"line_number":357,"context_line":"                             }"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_e73af635","line":355,"updated":"2017-01-02 17:07:32.000000000","message":"missing trailing , in 2 places","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                             \u0027wwpns\u0027: [\u0027list\u0027,\u0027of\u0027,\u0027port\u0027,\u0027wwns\u0027]"},{"line_number":353,"context_line":"                             \u0027ip\u0027: \u0027ip address\u0027,"},{"line_number":354,"context_line":"                             \u0027initiator\u0027: \u0027initiator iqn\u0027"},{"line_number":355,"context_line":"                             \u0027multipath\u0027: False"},{"line_number":356,"context_line":"                             \u0027host\u0027: hostname"},{"line_number":357,"context_line":"                             }"},{"line_number":358,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_4a1b2281","line":355,"in_reply_to":"ba5201f7_e73af635","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":383,"context_line":"        raise exception.StorageError(msg)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    # Raise an exception if we did not get a list"},{"line_number":386,"context_line":"    if not isinstance(volume_list, list):"},{"line_number":387,"context_line":"        raise TypeError(_(\u0027A list was not provided for the \u0027"},{"line_number":388,"context_line":"                          \u0027volume list\u0027))"},{"line_number":389,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_0740daa4","line":386,"updated":"2017-01-02 17:07:32.000000000","message":"ditto about this check being too strict","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":383,"context_line":"        raise exception.StorageError(msg)"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":"    # Raise an exception if we did not get a list"},{"line_number":386,"context_line":"    if not isinstance(volume_list, list):"},{"line_number":387,"context_line":"        raise TypeError(_(\u0027A list was not provided for the \u0027"},{"line_number":388,"context_line":"                          \u0027volume list\u0027))"},{"line_number":389,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_2a189e74","line":386,"in_reply_to":"ba5201f7_0740daa4","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ac6ba9fc431ae598c651727978e1267a3a32214f","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            continue"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        if not is_volume_attached(task, volume):"},{"line_number":404,"context_line":"            continue"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # Attempt to identify the attachment id value as we only"},{"line_number":407,"context_line":"        # want to remove the attachment record for the node, even"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_74de956e","line":404,"updated":"2017-01-03 17:16:32.000000000","message":"nit: maybe a debug statement is useful here, like the one Dmitry suggested in attach volumes","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":401,"context_line":"            continue"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"        if not is_volume_attached(task, volume):"},{"line_number":404,"context_line":"            continue"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        # Attempt to identify the attachment id value as we only"},{"line_number":407,"context_line":"        # want to remove the attachment record for the node, even"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_e566c7eb","line":404,"in_reply_to":"ba5201f7_74de956e","updated":"2017-01-06 20:57:06.000000000","message":"Done","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"388f41c9b68beecaa6beb49af000342e290596df","unresolved":false,"context_lines":[{"line_number":429,"context_line":"            continue"},{"line_number":430,"context_line":"        try:"},{"line_number":431,"context_line":"            # Update the API attachment record"},{"line_number":432,"context_line":"            client.volumes.detach(volume_id, attachment_id)"},{"line_number":433,"context_line":"            # Set metadata to assist in volume identification."},{"line_number":434,"context_line":"            client.volumes.set_metadata("},{"line_number":435,"context_line":"                volume_id,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_273dde2b","line":432,"updated":"2017-01-02 17:07:32.000000000","message":"just a question: can detaching take long time? is the request synchronous? do we need to wait for some result from cinder that detaching was successful?","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":429,"context_line":"            continue"},{"line_number":430,"context_line":"        try:"},{"line_number":431,"context_line":"            # Update the API attachment record"},{"line_number":432,"context_line":"            client.volumes.detach(volume_id, attachment_id)"},{"line_number":433,"context_line":"            # Set metadata to assist in volume identification."},{"line_number":434,"context_line":"            client.volumes.set_metadata("},{"line_number":435,"context_line":"                volume_id,"}],"source_content_type":"text/x-python","patch_set":21,"id":"ba5201f7_05902b94","line":432,"in_reply_to":"ba5201f7_273dde2b","updated":"2017-01-06 20:57:06.000000000","message":"The actual act I think is synchronous to the driver, I think everything else is just a DB interaction.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"d6b738e67f358e43ba02237b05536c96b94ae482","unresolved":false,"context_lines":[{"line_number":242,"context_line":"                 }]"},{"line_number":243,"context_line":"       \"\"\""},{"line_number":244,"context_line":"    node \u003d task.node"},{"line_number":245,"context_line":"    try:"},{"line_number":246,"context_line":"        client \u003d get_client(token\u003dtask.context.auth_token,"},{"line_number":247,"context_line":"                            tenant\u003dtask.context.tenant)"},{"line_number":248,"context_line":"    except exception.InvalidParameterValue as msg:"},{"line_number":249,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":250,"context_line":"            LOG.error(_LE(\"Error creating Cinder client when attaching \""},{"line_number":251,"context_line":"                          \"volumes to node %(node)s: %(error)s\"),"},{"line_number":252,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027error\u0027: msg})"},{"line_number":253,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":254,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":255,"context_line":"                 \u0027%(uuid)s. %(error)s\u0027) %"},{"line_number":256,"context_line":"               {\u0027error\u0027: e, \u0027uuid\u0027: node.uuid})"},{"line_number":257,"context_line":"        LOG.error(msg)"},{"line_number":258,"context_line":"        raise exception.StorageError(msg)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    connected \u003d []"},{"line_number":261,"context_line":"    for volume_id in volume_list:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_c3df860a","line":258,"range":{"start_line":245,"start_character":0,"end_line":258,"end_character":41},"updated":"2017-01-10 18:56:45.000000000","message":"This code is almost the same in L387-400, could we extract a method adding \u0027node\u0027 as parameter and its default value to None? When we pass the node as param, the node uuid will be added to the error message. :)","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4aa25556bca77828a80bdf652a32d6f1a1cca4b4","unresolved":false,"context_lines":[{"line_number":242,"context_line":"                 }]"},{"line_number":243,"context_line":"       \"\"\""},{"line_number":244,"context_line":"    node \u003d task.node"},{"line_number":245,"context_line":"    try:"},{"line_number":246,"context_line":"        client \u003d get_client(token\u003dtask.context.auth_token,"},{"line_number":247,"context_line":"                            tenant\u003dtask.context.tenant)"},{"line_number":248,"context_line":"    except exception.InvalidParameterValue as msg:"},{"line_number":249,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":250,"context_line":"            LOG.error(_LE(\"Error creating Cinder client when attaching \""},{"line_number":251,"context_line":"                          \"volumes to node %(node)s: %(error)s\"),"},{"line_number":252,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027error\u0027: msg})"},{"line_number":253,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":254,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":255,"context_line":"                 \u0027%(uuid)s. %(error)s\u0027) %"},{"line_number":256,"context_line":"               {\u0027error\u0027: e, \u0027uuid\u0027: node.uuid})"},{"line_number":257,"context_line":"        LOG.error(msg)"},{"line_number":258,"context_line":"        raise exception.StorageError(msg)"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    connected \u003d []"},{"line_number":261,"context_line":"    for volume_id in volume_list:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_2b5e6045","line":258,"range":{"start_line":245,"start_character":0,"end_line":258,"end_character":41},"in_reply_to":"ba5201f7_c3df860a","updated":"2017-01-11 00:17:18.000000000","message":"Done.","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"d6b738e67f358e43ba02237b05536c96b94ae482","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    connected \u003d []"},{"line_number":261,"context_line":"    for volume_id in volume_list:"},{"line_number":262,"context_line":"        try:"},{"line_number":263,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":264,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":265,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":266,"context_line":"                     \u0027%(node)s: %(error)s\u0027),"},{"line_number":267,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":268,"context_line":"            LOG.error(msg)"},{"line_number":269,"context_line":"            raise exception.StorageError(msg)"},{"line_number":270,"context_line":"        if is_volume_attached(task.node, volume):"},{"line_number":271,"context_line":"            msg \u003d (\u0027Volume %(vol_id)s is already attached to node \u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_4eb9fd2d","line":268,"range":{"start_line":262,"start_character":0,"end_line":268,"end_character":26},"updated":"2017-01-10 18:56:45.000000000","message":"nit: What about extract this in a \u0027get_glance_volume(id)\u0027?","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4aa25556bca77828a80bdf652a32d6f1a1cca4b4","unresolved":false,"context_lines":[{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    connected \u003d []"},{"line_number":261,"context_line":"    for volume_id in volume_list:"},{"line_number":262,"context_line":"        try:"},{"line_number":263,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":264,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":265,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":266,"context_line":"                     \u0027%(node)s: %(error)s\u0027),"},{"line_number":267,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":268,"context_line":"            LOG.error(msg)"},{"line_number":269,"context_line":"            raise exception.StorageError(msg)"},{"line_number":270,"context_line":"        if is_volume_attached(task.node, volume):"},{"line_number":271,"context_line":"            msg \u003d (\u0027Volume %(vol_id)s is already attached to node \u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_460e3933","line":268,"range":{"start_line":262,"start_character":0,"end_line":268,"end_character":26},"in_reply_to":"ba5201f7_4eb9fd2d","updated":"2017-01-11 00:17:18.000000000","message":"Perhaps, see note on the next related comment below.","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"d6b738e67f358e43ba02237b05536c96b94ae482","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":280,"context_line":"            msg \u003d (_(\u0027Could not reserve volume %(vol_id)s for %(node)s: \u0027"},{"line_number":281,"context_line":"                     \u0027%(error)s)\u0027) %"},{"line_number":282,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: \u0027make e\u0027})"},{"line_number":283,"context_line":"            LOG.error(msg)"},{"line_number":284,"context_line":"            raise exception.StorageError(msg)"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_a3bb6274","line":282,"range":{"start_line":282,"start_character":70,"end_line":282,"end_character":76},"updated":"2017-01-10 18:56:45.000000000","message":"?","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"b838ca3e37ff720c93613f8fd6b6cd20bc7d20e6","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":280,"context_line":"            msg \u003d (_(\u0027Could not reserve volume %(vol_id)s for %(node)s: \u0027"},{"line_number":281,"context_line":"                     \u0027%(error)s)\u0027) %"},{"line_number":282,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: \u0027make e\u0027})"},{"line_number":283,"context_line":"            LOG.error(msg)"},{"line_number":284,"context_line":"            raise exception.StorageError(msg)"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_a47c45b6","line":282,"range":{"start_line":282,"start_character":70,"end_line":282,"end_character":76},"in_reply_to":"ba5201f7_a3bb6274","updated":"2017-01-10 21:23:12.000000000","message":"doh!","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"d6b738e67f358e43ba02237b05536c96b94ae482","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            # been completed, which moves the volume to the"},{"line_number":325,"context_line":"            # \u0027attached\u0027 state. This action also sets a mountpoint"},{"line_number":326,"context_line":"            # for the volume, if known."},{"line_number":327,"context_line":"            client.volumes.attach(volume_id, instance_uuid, mountpoint)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"            # Set metadata to assist a user in volume identification"},{"line_number":330,"context_line":"            client.volumes.set_metadata("}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_835d7e17","line":327,"range":{"start_line":327,"start_character":12,"end_line":327,"end_character":71},"updated":"2017-01-10 18:56:45.000000000","message":"What if the attach raise an exception? We may think that the error was when setting the metadata but actually the error was when attaching. Better separate in two try/except blocks. :)","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4aa25556bca77828a80bdf652a32d6f1a1cca4b4","unresolved":false,"context_lines":[{"line_number":324,"context_line":"            # been completed, which moves the volume to the"},{"line_number":325,"context_line":"            # \u0027attached\u0027 state. This action also sets a mountpoint"},{"line_number":326,"context_line":"            # for the volume, if known."},{"line_number":327,"context_line":"            client.volumes.attach(volume_id, instance_uuid, mountpoint)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"            # Set metadata to assist a user in volume identification"},{"line_number":330,"context_line":"            client.volumes.set_metadata("}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_2baf40e4","line":327,"range":{"start_line":327,"start_character":12,"end_line":327,"end_character":71},"in_reply_to":"ba5201f7_835d7e17","updated":"2017-01-11 00:17:18.000000000","message":"So cinderism.  initialize_connection is actually the attachment step.  This is simply \"We\u0027re done!\" information for the cinder API.\n\nI\u0027ll break it apart even though this is purely metadata... and make the testing way more complex :(","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"d6b738e67f358e43ba02237b05536c96b94ae482","unresolved":false,"context_lines":[{"line_number":400,"context_line":"    # Raise an exception if we did not get a list"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    for volume_id in volume_list:"},{"line_number":403,"context_line":"        try:"},{"line_number":404,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":405,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":406,"context_line":"            msg \u003d (_LE(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":407,"context_line":"                       \u0027node %(node)s. %(error)s\u0027) %"},{"line_number":408,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":409,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":410,"context_line":"            # If we do not raise an exception, we should move on to"},{"line_number":411,"context_line":"            # the next volume since the volume could have been deleted"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_2e3cb9be","line":408,"range":{"start_line":403,"start_character":0,"end_line":408,"end_character":72},"updated":"2017-01-10 18:56:45.000000000","message":"The new \u0027get_glance_volume\u0027 could be used here. :)","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4aa25556bca77828a80bdf652a32d6f1a1cca4b4","unresolved":false,"context_lines":[{"line_number":400,"context_line":"    # Raise an exception if we did not get a list"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"    for volume_id in volume_list:"},{"line_number":403,"context_line":"        try:"},{"line_number":404,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":405,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":406,"context_line":"            msg \u003d (_LE(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":407,"context_line":"                       \u0027node %(node)s. %(error)s\u0027) %"},{"line_number":408,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":409,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":410,"context_line":"            # If we do not raise an exception, we should move on to"},{"line_number":411,"context_line":"            # the next volume since the volume could have been deleted"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_c6286988","line":408,"range":{"start_line":403,"start_character":0,"end_line":408,"end_character":72},"in_reply_to":"ba5201f7_2e3cb9be","updated":"2017-01-11 00:17:18.000000000","message":"Great possibility, although , the _handle_errors and continue below. :)  It seems like we would only remove a duplication of an error message.","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"d6b738e67f358e43ba02237b05536c96b94ae482","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        # Attempt to identify the attachment id value as we only"},{"line_number":422,"context_line":"        # want to remove the attachment record for the node, even"},{"line_number":423,"context_line":"        # though connector information"},{"line_number":424,"context_line":"        attachment_id \u003d _get_attachment_id(node, volume)"},{"line_number":425,"context_line":"        try:"},{"line_number":426,"context_line":"            client.volumes.begin_detaching(volume_id)"},{"line_number":427,"context_line":"        except cinder_exceptions.ClientException as e:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_e3080a2b","line":424,"range":{"start_line":424,"start_character":0,"end_line":424,"end_character":56},"updated":"2017-01-10 18:56:45.000000000","message":"Better move to L447","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4aa25556bca77828a80bdf652a32d6f1a1cca4b4","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        # Attempt to identify the attachment id value as we only"},{"line_number":422,"context_line":"        # want to remove the attachment record for the node, even"},{"line_number":423,"context_line":"        # though connector information"},{"line_number":424,"context_line":"        attachment_id \u003d _get_attachment_id(node, volume)"},{"line_number":425,"context_line":"        try:"},{"line_number":426,"context_line":"            client.volumes.begin_detaching(volume_id)"},{"line_number":427,"context_line":"        except cinder_exceptions.ClientException as e:"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_eb6d38cd","line":424,"range":{"start_line":424,"start_character":0,"end_line":424,"end_character":56},"in_reply_to":"ba5201f7_e3080a2b","updated":"2017-01-11 00:17:18.000000000","message":"Done","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":19072,"name":"Xavier","email":"marcusrafael@lsd.ufcg.edu.br","username":"marcusrafael"},"change_message_id":"d6b738e67f358e43ba02237b05536c96b94ae482","unresolved":false,"context_lines":[{"line_number":444,"context_line":"            continue"},{"line_number":445,"context_line":"        try:"},{"line_number":446,"context_line":"            # Update the API attachment record"},{"line_number":447,"context_line":"            client.volumes.detach(volume_id, attachment_id)"},{"line_number":448,"context_line":"            # Set metadata to assist in volume identification."},{"line_number":449,"context_line":"            client.volumes.set_metadata("},{"line_number":450,"context_line":"                volume_id,"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_634b3a5a","line":447,"range":{"start_line":447,"start_character":12,"end_line":447,"end_character":59},"updated":"2017-01-10 18:56:45.000000000","message":"ditto about separate try/except blocks.","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4aa25556bca77828a80bdf652a32d6f1a1cca4b4","unresolved":false,"context_lines":[{"line_number":444,"context_line":"            continue"},{"line_number":445,"context_line":"        try:"},{"line_number":446,"context_line":"            # Update the API attachment record"},{"line_number":447,"context_line":"            client.volumes.detach(volume_id, attachment_id)"},{"line_number":448,"context_line":"            # Set metadata to assist in volume identification."},{"line_number":449,"context_line":"            client.volumes.set_metadata("},{"line_number":450,"context_line":"                volume_id,"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba5201f7_f043636a","line":447,"range":{"start_line":447,"start_character":12,"end_line":447,"end_character":59},"in_reply_to":"ba5201f7_634b3a5a","updated":"2017-01-11 00:17:18.000000000","message":"Going in reverse, so this is the first I\u0027ve looked at.  So the volume is actually detached here.  I\u0027ll split it apart but I\u0027ll specific it as actual detachment completion.","commit_id":"ecc75527d9be7de46e641c7346d658164e66cbf8"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # python-cinderclient does not permit a user to define"},{"line_number":70,"context_line":"        # an auth dict for things that are not session based."},{"line_number":71,"context_line":"        # NOTE(TheJulia): Per discussion with a few cinder cores,"},{"line_number":72,"context_line":"        # They are unsure if noauth even works server side. :("},{"line_number":73,"context_line":"        params.update({\u0027auth_plugin\u0027: \u0027admin_token\u0027,"},{"line_number":74,"context_line":"                       \u0027auth_system\u0027: \u0027noauth\u0027,"},{"line_number":75,"context_line":"                       \u0027bypass_url\u0027: CONF.cinder.url})"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_23b744d9","line":72,"updated":"2017-01-11 14:43:20.000000000","message":"could you please clarify it and/or move this code to a separate patch? I\u0027d prefer we don\u0027t commit to something we\u0027re so unsure about..","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # python-cinderclient does not permit a user to define"},{"line_number":70,"context_line":"        # an auth dict for things that are not session based."},{"line_number":71,"context_line":"        # NOTE(TheJulia): Per discussion with a few cinder cores,"},{"line_number":72,"context_line":"        # They are unsure if noauth even works server side. :("},{"line_number":73,"context_line":"        params.update({\u0027auth_plugin\u0027: \u0027admin_token\u0027,"},{"line_number":74,"context_line":"                       \u0027auth_system\u0027: \u0027noauth\u0027,"},{"line_number":75,"context_line":"                       \u0027bypass_url\u0027: CONF.cinder.url})"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_d400ec36","line":72,"in_reply_to":"ba5201f7_23b744d9","updated":"2017-01-11 18:12:25.000000000","message":"I spent the morning looking deep into python-cinderclient.  There are just too many assumptions built around noauth.  If we were doing strait rest to the API, it wouldn\u0027t really be a problem, but using the library it is.","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    :param volume: The dictionary representing the volume from cinder."},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    :returns: Boolean indicating if the volume is attached."},{"line_number":127,"context_line":"    :raises: StorageError"},{"line_number":128,"context_line":"    \"\"\""},{"line_number":129,"context_line":"    try:"},{"line_number":130,"context_line":"        if volume[\u0027attachments\u0027] is not None:"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_43bc48bb","line":127,"updated":"2017-01-11 14:43:20.000000000","message":"please add when it\u0027s raised","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":124,"context_line":"    :param volume: The dictionary representing the volume from cinder."},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    :returns: Boolean indicating if the volume is attached."},{"line_number":127,"context_line":"    :raises: StorageError"},{"line_number":128,"context_line":"    \"\"\""},{"line_number":129,"context_line":"    try:"},{"line_number":130,"context_line":"        if volume[\u0027attachments\u0027] is not None:"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_f1db377a","line":127,"in_reply_to":"ba5201f7_43bc48bb","updated":"2017-01-11 18:12:25.000000000","message":"Done","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    :raises: StorageError"},{"line_number":128,"context_line":"    \"\"\""},{"line_number":129,"context_line":"    try:"},{"line_number":130,"context_line":"        if volume[\u0027attachments\u0027] is not None:"},{"line_number":131,"context_line":"            for attachment in volume[\u0027attachments\u0027]:"},{"line_number":132,"context_line":"                if \u0027server_id\u0027 in attachment:"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_63adcc83","line":130,"updated":"2017-01-11 14:43:20.000000000","message":"so, if \u0027attachments\u0027 key is missing, we raise StorageError, but if it\u0027s not, we merely return False. Is it really what we expect to happen?\n\nalso we can reduce indentation and the scope of try..except block here a bit:\n\n try:\n   if not volume[\u0027attachments\u0027]:\n     return False\n except KeyError:\n   #...\n\n for attachment in volume[\u0027attachments\u0027]:","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":127,"context_line":"    :raises: StorageError"},{"line_number":128,"context_line":"    \"\"\""},{"line_number":129,"context_line":"    try:"},{"line_number":130,"context_line":"        if volume[\u0027attachments\u0027] is not None:"},{"line_number":131,"context_line":"            for attachment in volume[\u0027attachments\u0027]:"},{"line_number":132,"context_line":"                if \u0027server_id\u0027 in attachment:"},{"line_number":133,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_b55fe23f","line":130,"in_reply_to":"ba5201f7_63adcc83","updated":"2017-01-11 18:12:25.000000000","message":"It would be the difference between bad data and no data.","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    except KeyError:"},{"line_number":140,"context_line":"        if volume.get(\u0027id\u0027):"},{"line_number":141,"context_line":"            msg \u003d (_(\u0027Attachment data not present in \u0027"},{"line_number":142,"context_line":"                     \u0027cinder volume %(vol_id)s.\u0027) %"},{"line_number":143,"context_line":"                   {\u0027vol_id\u0027: volume[\u0027id\u0027]})"},{"line_number":144,"context_line":"        else:"},{"line_number":145,"context_line":"            msg \u003d _(\u0027No volume found. Unable to identify attachment status.\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_83b2b0e3","line":142,"updated":"2017-01-11 14:43:20.000000000","message":"nit: maybe add node[\u0027uuid\u0027] to the error message","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    except KeyError:"},{"line_number":140,"context_line":"        if volume.get(\u0027id\u0027):"},{"line_number":141,"context_line":"            msg \u003d (_(\u0027Attachment data not present in \u0027"},{"line_number":142,"context_line":"                     \u0027cinder volume %(vol_id)s.\u0027) %"},{"line_number":143,"context_line":"                   {\u0027vol_id\u0027: volume[\u0027id\u0027]})"},{"line_number":144,"context_line":"        else:"},{"line_number":145,"context_line":"            msg \u003d _(\u0027No volume found. Unable to identify attachment status.\u0027)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_db8ad4be","line":142,"in_reply_to":"ba5201f7_83b2b0e3","updated":"2017-01-11 18:12:25.000000000","message":"Done","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                     \u0027cinder volume %(vol_id)s.\u0027) %"},{"line_number":143,"context_line":"                   {\u0027vol_id\u0027: volume[\u0027id\u0027]})"},{"line_number":144,"context_line":"        else:"},{"line_number":145,"context_line":"            msg \u003d _(\u0027No volume found. Unable to identify attachment status.\u0027)"},{"line_number":146,"context_line":"        raise exception.StorageError(msg)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_a3cb3452","line":145,"updated":"2017-01-11 14:43:20.000000000","message":"is it a realistic case that volume has no ID?","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":142,"context_line":"                     \u0027cinder volume %(vol_id)s.\u0027) %"},{"line_number":143,"context_line":"                   {\u0027vol_id\u0027: volume[\u0027id\u0027]})"},{"line_number":144,"context_line":"        else:"},{"line_number":145,"context_line":"            msg \u003d _(\u0027No volume found. Unable to identify attachment status.\u0027)"},{"line_number":146,"context_line":"        raise exception.StorageError(msg)"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_359692f0","line":145,"in_reply_to":"ba5201f7_a3cb3452","updated":"2017-01-11 18:12:25.000000000","message":"Rather unlikely, I\u0027ll revise.","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                    return attachment[\u0027id\u0027]"},{"line_number":160,"context_line":"    except KeyError as e:"},{"line_number":161,"context_line":"        raise exception.StorageError(_(\u0027Invalid attachment data provided. \u0027"},{"line_number":162,"context_line":"                                       \u0027Missing: %(key)s\u0027) % {\u0027key\u0027: str(e)})"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"def _create_metadata_dictionary(node, action):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_c3c83858","line":162,"updated":"2017-01-11 14:43:20.000000000","message":"str() is redundant, it\u0027s done automatically by %s","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                    return attachment[\u0027id\u0027]"},{"line_number":160,"context_line":"    except KeyError as e:"},{"line_number":161,"context_line":"        raise exception.StorageError(_(\u0027Invalid attachment data provided. \u0027"},{"line_number":162,"context_line":"                                       \u0027Missing: %(key)s\u0027) % {\u0027key\u0027: str(e)})"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"def _create_metadata_dictionary(node, action):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_fbaeb82c","line":162,"in_reply_to":"ba5201f7_c3c83858","updated":"2017-01-11 18:12:25.000000000","message":"Done","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":168,"context_line":"       :param node: Object representing a node"},{"line_number":169,"context_line":"       :param action: String value representing the last action"},{"line_number":170,"context_line":"    \"\"\""},{"line_number":171,"context_line":"    label \u003d (\"ironic_node_%s\" % node.uuid)"},{"line_number":172,"context_line":"    return {"},{"line_number":173,"context_line":"        label: {"},{"line_number":174,"context_line":"            \u0027instance_uuid\u0027: node.instance_uuid,"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_e3c1bc30","line":171,"updated":"2017-01-11 14:43:20.000000000","message":"nit: redundant brackets","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":168,"context_line":"       :param node: Object representing a node"},{"line_number":169,"context_line":"       :param action: String value representing the last action"},{"line_number":170,"context_line":"    \"\"\""},{"line_number":171,"context_line":"    label \u003d (\"ironic_node_%s\" % node.uuid)"},{"line_number":172,"context_line":"    return {"},{"line_number":173,"context_line":"        label: {"},{"line_number":174,"context_line":"            \u0027instance_uuid\u0027: node.instance_uuid,"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_7b500833","line":171,"in_reply_to":"ba5201f7_e3c1bc30","updated":"2017-01-11 18:12:25.000000000","message":"Done","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":277,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":278,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":279,"context_line":"                     \u0027%(node)s: %(error)s\u0027),"},{"line_number":280,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":281,"context_line":"            LOG.error(msg)"},{"line_number":282,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_03bfa0aa","line":279,"updated":"2017-01-11 14:43:20.000000000","message":", -\u003e %","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":276,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":277,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":278,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":279,"context_line":"                     \u0027%(node)s: %(error)s\u0027),"},{"line_number":280,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":281,"context_line":"            LOG.error(msg)"},{"line_number":282,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_5b326411","line":279,"in_reply_to":"ba5201f7_03bfa0aa","updated":"2017-01-11 18:12:25.000000000","message":"Done","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            msg \u003d (\u0027Volume %(vol_id)s is already attached to node \u0027"},{"line_number":285,"context_line":"                   \u0027%(uuid)s. Skipping attachment.\u0027 %"},{"line_number":286,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":287,"context_line":"            LOG.debug(msg)"},{"line_number":288,"context_line":"            continue"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_23de6411","line":287,"updated":"2017-01-11 14:43:20.000000000","message":"msg is redundant here, just pass 2 arguments to LOG.debug (bonus point for not doing % in this case)","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            msg \u003d (\u0027Volume %(vol_id)s is already attached to node \u0027"},{"line_number":285,"context_line":"                   \u0027%(uuid)s. Skipping attachment.\u0027 %"},{"line_number":286,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":287,"context_line":"            LOG.debug(msg)"},{"line_number":288,"context_line":"            continue"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_9b384cf0","line":287,"in_reply_to":"ba5201f7_23de6411","updated":"2017-01-11 18:12:25.000000000","message":"Done","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":357,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume metadata for \u0027"},{"line_number":358,"context_line":"                            \u0027volume %(vol_id)s. %(err)s \u0027),"},{"line_number":359,"context_line":"                        {\u0027vol_id\u0027: volume_id, \u0027err\u0027: e})"},{"line_number":360,"context_line":"    return connected"},{"line_number":361,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_43e368d9","line":358,"updated":"2017-01-11 14:43:20.000000000","message":"nit: . -\u003e :","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":357,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume metadata for \u0027"},{"line_number":358,"context_line":"                            \u0027volume %(vol_id)s. %(err)s \u0027),"},{"line_number":359,"context_line":"                        {\u0027vol_id\u0027: volume_id, \u0027err\u0027: e})"},{"line_number":360,"context_line":"    return connected"},{"line_number":361,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_1b045c16","line":358,"in_reply_to":"ba5201f7_43e368d9","updated":"2017-01-11 18:12:25.000000000","message":"Done","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":394,"context_line":""},{"line_number":395,"context_line":"       :param allow_errors: Boolean value governing if errors are returned"},{"line_number":396,"context_line":"                            are treated as exceptions. Default False."},{"line_number":397,"context_line":"       :raises: NoneType If the supplied volume_list is not a list."},{"line_number":398,"context_line":"       :raises: StorageError"},{"line_number":399,"context_line":"    \"\"\""},{"line_number":400,"context_line":"    def _handle_errors(allow_errors, msg):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_63e4ecdf","line":397,"updated":"2017-01-11 14:43:20.000000000","message":"NoneType is not an exception class, TypeError maybe? iterating over non-sequence raises TypeError. also s/list/sequence/","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":394,"context_line":""},{"line_number":395,"context_line":"       :param allow_errors: Boolean value governing if errors are returned"},{"line_number":396,"context_line":"                            are treated as exceptions. Default False."},{"line_number":397,"context_line":"       :raises: NoneType If the supplied volume_list is not a list."},{"line_number":398,"context_line":"       :raises: StorageError"},{"line_number":399,"context_line":"    \"\"\""},{"line_number":400,"context_line":"    def _handle_errors(allow_errors, msg):"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_d197138e","line":397,"in_reply_to":"ba5201f7_63e4ecdf","updated":"2017-01-11 18:12:25.000000000","message":"Done","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        try:"},{"line_number":412,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":413,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":414,"context_line":"            msg \u003d (_LE(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":415,"context_line":"                       \u0027node %(node)s. %(error)s\u0027) %"},{"line_number":416,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":417,"context_line":"            _handle_errors(allow_errors, msg)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_83e9d0b9","line":414,"updated":"2017-01-11 14:43:20.000000000","message":"s/LE// as it may propagate to a user","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":411,"context_line":"        try:"},{"line_number":412,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":413,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":414,"context_line":"            msg \u003d (_LE(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":415,"context_line":"                       \u0027node %(node)s. %(error)s\u0027) %"},{"line_number":416,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":417,"context_line":"            _handle_errors(allow_errors, msg)"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_96a2e1fa","line":414,"in_reply_to":"ba5201f7_83e9d0b9","updated":"2017-01-11 18:12:25.000000000","message":"Done","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"a4b065d61d29eeabd045fbd34621a2e0b0802db5","unresolved":false,"context_lines":[{"line_number":423,"context_line":"        if not is_volume_attached(task, volume):"},{"line_number":424,"context_line":"            msg \u003d (\u0027Volume %(vol_id)s is already detached from node \u0027"},{"line_number":425,"context_line":"                   \u0027%(uuid)s. Skipping attachment.\u0027 %"},{"line_number":426,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":427,"context_line":"            LOG.debug(msg)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_a3d254fe","line":426,"updated":"2017-01-11 14:43:20.000000000","message":"msg is redundant here, you can just pass 2 arguments to LOG.debug","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"4e88e54c9babd087714750f4df88280409dbf51e","unresolved":false,"context_lines":[{"line_number":423,"context_line":"        if not is_volume_attached(task, volume):"},{"line_number":424,"context_line":"            msg \u003d (\u0027Volume %(vol_id)s is already detached from node \u0027"},{"line_number":425,"context_line":"                   \u0027%(uuid)s. Skipping attachment.\u0027 %"},{"line_number":426,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":427,"context_line":"            LOG.debug(msg)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba5201f7_d6c5498e","line":426,"in_reply_to":"ba5201f7_a3d254fe","updated":"2017-01-11 18:12:25.000000000","message":"Done","commit_id":"b17bbbc18883bf20035c1f0f411d69a02173e892"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"3aa26f85145aa0f39f3545405523dc0079ec19af","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"       :param token: A requestor token, if applicable. Default: None"},{"line_number":49,"context_line":"       :param tenant: The requestor tenant ID. Default: None"},{"line_number":50,"context_line":"       :raises: InvalidParameterValue If noauth is enabled"},{"line_number":51,"context_line":"                and a url for the client to connect to is"},{"line_number":52,"context_line":"                not defined."},{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":"    params \u003d {"},{"line_number":55,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"}],"source_content_type":"text/x-python","patch_set":24,"id":"ba5201f7_1c7e0819","line":52,"range":{"start_line":50,"start_character":38,"end_line":52,"end_character":28},"updated":"2017-01-11 22:40:07.000000000","message":"This is not needed as noauth is no longer a valid config option.","commit_id":"cae7acf065e58e5e1c16d65553ed3231712a61a4"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"3aa26f85145aa0f39f3545405523dc0079ec19af","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                params[\u0027auth_url\u0027] \u003d keystone.get_service_url("},{"line_number":83,"context_line":"                    session, service_type\u003d\u0027keystone\u0027)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        if CONF.keystone.region_name is not None:"},{"line_number":86,"context_line":"            params[\u0027region_name\u0027] \u003d CONF.keystone.region_name"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    return client.Client(**params)"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"ba5201f7_1c56085c","line":86,"range":{"start_line":85,"start_character":8,"end_line":86,"end_character":61},"updated":"2017-01-11 22:40:07.000000000","message":"is this needed? lines 71-72 seem to do the same thing.","commit_id":"cae7acf065e58e5e1c16d65553ed3231712a61a4"},{"author":{"_account_id":5805,"name":"Chris Krelle","email":"nobodycam@gmail.com","username":"nobodycam"},"change_message_id":"73a26718c127c71b656a2d070c66d7c665adb6d6","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    \"\"\"Obtain cinder client and return it for use."},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    :returns: A cinder client."},{"line_number":159,"context_line":"    :raises: InvalidParamterValue If the client configuration is invalid."},{"line_number":160,"context_line":"    :raises: StorageError If an exception is encountered creating the client."},{"line_number":161,"context_line":"    \"\"\""},{"line_number":162,"context_line":"    node \u003d task.node"}],"source_content_type":"text/x-python","patch_set":25,"id":"ba5201f7_af3780fd","line":159,"range":{"start_line":159,"start_character":4,"end_line":159,"end_character":73},"updated":"2017-01-11 22:52:00.000000000","message":"nit: this line not needed.","commit_id":"2381035892199c7dbd30c6a6b9aef5ffd3bafaa9"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"79ce676249a63fc548102fa198ad54fa5244a418","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"AVAILABLE \u003d \u0027available\u0027"},{"line_number":30,"context_line":"IN_USE \u003d \u0027in-use\u0027"},{"line_number":31,"context_line":"# TODO(TheJulia) What if mutli-attach, and attaching...."},{"line_number":32,"context_line":"# That technically shouldn\u0027t be a standard configuration,"},{"line_number":33,"context_line":"# but if someone wanted a quorum volume... that is the way"},{"line_number":34,"context_line":"# they could do it I guess."}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_194c459d","line":31,"updated":"2017-01-17 16:38:40.000000000","message":"nit: typo in \"multi\". also I\u0027d expand this comment to a proper actionable todo or remove it","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"79ce676249a63fc548102fa198ad54fa5244a418","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    # filter, the python client library is centered around"},{"line_number":59,"context_line":"    # keystone, and as such is impractical to attempt to support"},{"line_number":60,"context_line":"    # without changes to the mechanisms with-in the client library."},{"line_number":61,"context_line":"    if CONF.cinder.auth_strategy \u003d\u003d \u0027keystone\u0027:"},{"line_number":62,"context_line":"        # If a URL is provided for cinder, we will pass along"},{"line_number":63,"context_line":"        # the URL to python-cinderclient. Otherwise the library"},{"line_number":64,"context_line":"        # handles keystone url autodetection."}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_39510137","line":61,"updated":"2017-01-17 16:38:40.000000000","message":"this \"if\" is currently redundant","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    # filter, the python client library is centered around"},{"line_number":59,"context_line":"    # keystone, and as such is impractical to attempt to support"},{"line_number":60,"context_line":"    # without changes to the mechanisms with-in the client library."},{"line_number":61,"context_line":"    if CONF.cinder.auth_strategy \u003d\u003d \u0027keystone\u0027:"},{"line_number":62,"context_line":"        # If a URL is provided for cinder, we will pass along"},{"line_number":63,"context_line":"        # the URL to python-cinderclient. Otherwise the library"},{"line_number":64,"context_line":"        # handles keystone url autodetection."}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_6b63261b","line":61,"in_reply_to":"7a3c09a3_39510137","updated":"2017-01-19 22:28:31.000000000","message":"Removed, and noted that we don\u0027t have noauth support in the code with the bug link.","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7ca46c8e907411864a35e19eb9f290748b7bf672","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    Returns true if cinder shows the volume as presently attached."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    :param node: The dictonary representing the node."},{"line_number":102,"context_line":"    :param volume: The dictionary representing the volume from cinder."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    :returns: Boolean indicating if the volume is attached."}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_7d28ea86","line":101,"updated":"2017-01-17 10:51:43.000000000","message":"Should this be a node object ?","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    Returns true if cinder shows the volume as presently attached."},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    :param node: The dictonary representing the node."},{"line_number":102,"context_line":"    :param volume: The dictionary representing the volume from cinder."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    :returns: Boolean indicating if the volume is attached."}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_8b6852f7","line":101,"in_reply_to":"7a3c09a3_7d28ea86","updated":"2017-01-19 22:28:31.000000000","message":"Yes, it should be, fixed.","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"79ce676249a63fc548102fa198ad54fa5244a418","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                    if attachment[\u0027server_id\u0027] \u003d\u003d node[\u0027uuid\u0027]:"},{"line_number":115,"context_line":"                        return True"},{"line_number":116,"context_line":"        return False"},{"line_number":117,"context_line":"    except KeyError:"},{"line_number":118,"context_line":"        msg \u003d (_(\u0027Attachment data not present in cinder volume \u0027"},{"line_number":119,"context_line":"                 \u0027%(vol_id)s. Unable to determine attachment \u0027"},{"line_number":120,"context_line":"                 \u0027status for node %(uuid)s.\u0027) %"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_59424d69","line":117,"updated":"2017-01-17 16:38:40.000000000","message":"I\u0027d still limit this KeyError to only the part which we expect to raise, namely\n\n try:\n   attachments \u003d volume[\u0027attachments\u0027]\n except KeyError:\n   ..\n\n for attachment in attachments:\n   ...","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":114,"context_line":"                    if attachment[\u0027server_id\u0027] \u003d\u003d node[\u0027uuid\u0027]:"},{"line_number":115,"context_line":"                        return True"},{"line_number":116,"context_line":"        return False"},{"line_number":117,"context_line":"    except KeyError:"},{"line_number":118,"context_line":"        msg \u003d (_(\u0027Attachment data not present in cinder volume \u0027"},{"line_number":119,"context_line":"                 \u0027%(vol_id)s. Unable to determine attachment \u0027"},{"line_number":120,"context_line":"                 \u0027status for node %(uuid)s.\u0027) %"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_9e7c1274","line":117,"in_reply_to":"7a3c09a3_59424d69","updated":"2017-01-19 22:28:31.000000000","message":"Attachments should exist, but be an empty dictionary if there are no attachments.  The keyerror would be the contents of attachment.   I think I did it as handling if we got some sort of bogus data, given that any bogus data should be a hard failure.","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7ca46c8e907411864a35e19eb9f290748b7bf672","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"def _get_attachment_id(node, volume):"},{"line_number":126,"context_line":"    \"\"\"Return the attachment ID for a node to a volume\"\"\""},{"line_number":127,"context_line":"    # NOTE(TheJulia): This is under the belief that there should be a single"},{"line_number":128,"context_line":"    # attachment PER node that represents all possible attachment information"},{"line_number":129,"context_line":"    # as multiple types can be submitted in a single request."}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_3d8f4276","line":126,"updated":"2017-01-17 10:51:43.000000000","message":"nit: add the parameters to the docstring","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":123,"context_line":""},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"def _get_attachment_id(node, volume):"},{"line_number":126,"context_line":"    \"\"\"Return the attachment ID for a node to a volume\"\"\""},{"line_number":127,"context_line":"    # NOTE(TheJulia): This is under the belief that there should be a single"},{"line_number":128,"context_line":"    # attachment PER node that represents all possible attachment information"},{"line_number":129,"context_line":"    # as multiple types can be submitted in a single request."}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_fea0b692","line":126,"in_reply_to":"7a3c09a3_3d8f4276","updated":"2017-01-19 22:28:31.000000000","message":"Done","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"79ce676249a63fc548102fa198ad54fa5244a418","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                if (attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid or"},{"line_number":134,"context_line":"                        attachment[\u0027server_id\u0027] \u003d\u003d node.uuid):"},{"line_number":135,"context_line":"                    return attachment[\u0027id\u0027]"},{"line_number":136,"context_line":"    except KeyError as e:"},{"line_number":137,"context_line":"        raise exception.StorageError(_(\u0027Invalid attachment data provided. \u0027"},{"line_number":138,"context_line":"                                       \u0027Missing: %(key)s\u0027) % {\u0027key\u0027: e})"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_79470977","line":136,"updated":"2017-01-17 16:38:40.000000000","message":"ditto, though it\u0027s not clear to me if you\u0027re handling KeyError from volume[\u0027attachments\u0027], from attachment[\u0027server_id\u0027] or both","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":133,"context_line":"                if (attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid or"},{"line_number":134,"context_line":"                        attachment[\u0027server_id\u0027] \u003d\u003d node.uuid):"},{"line_number":135,"context_line":"                    return attachment[\u0027id\u0027]"},{"line_number":136,"context_line":"    except KeyError as e:"},{"line_number":137,"context_line":"        raise exception.StorageError(_(\u0027Invalid attachment data provided. \u0027"},{"line_number":138,"context_line":"                                       \u0027Missing: %(key)s\u0027) % {\u0027key\u0027: e})"},{"line_number":139,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_dea3fa9c","line":136,"in_reply_to":"7a3c09a3_79470977","updated":"2017-01-19 22:28:31.000000000","message":"It is for attachment, since the presence of the key is checked.  Changed to wrap only the attachment.","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7ca46c8e907411864a35e19eb9f290748b7bf672","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    node \u003d task.node"},{"line_number":162,"context_line":"    try:"},{"line_number":163,"context_line":"        client \u003d get_client(token\u003dtask.context.auth_token,"},{"line_number":164,"context_line":"                            tenant\u003dtask.context.tenant)"},{"line_number":165,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":166,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":167,"context_line":"                 \u0027%(uuid)s. %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_3df022c9","line":164,"updated":"2017-01-17 10:51:43.000000000","message":"nit: return get_client(...)","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":161,"context_line":"    node \u003d task.node"},{"line_number":162,"context_line":"    try:"},{"line_number":163,"context_line":"        client \u003d get_client(token\u003dtask.context.auth_token,"},{"line_number":164,"context_line":"                            tenant\u003dtask.context.tenant)"},{"line_number":165,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":166,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":167,"context_line":"                 \u0027%(uuid)s. %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_2ba03e9f","line":164,"in_reply_to":"7a3c09a3_3df022c9","updated":"2017-01-19 22:28:31.000000000","message":"Done","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"79ce676249a63fc548102fa198ad54fa5244a418","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                            tenant\u003dtask.context.tenant)"},{"line_number":165,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":166,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":167,"context_line":"                 \u0027%(uuid)s. %(error)s\u0027) %"},{"line_number":168,"context_line":"               {\u0027error\u0027: e, \u0027uuid\u0027: node.uuid})"},{"line_number":169,"context_line":"        LOG.error(msg)"},{"line_number":170,"context_line":"        raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_99603503","line":167,"updated":"2017-01-17 16:38:40.000000000","message":"nit: . -\u003e :","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                            tenant\u003dtask.context.tenant)"},{"line_number":165,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":166,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":167,"context_line":"                 \u0027%(uuid)s. %(error)s\u0027) %"},{"line_number":168,"context_line":"               {\u0027error\u0027: e, \u0027uuid\u0027: node.uuid})"},{"line_number":169,"context_line":"        LOG.error(msg)"},{"line_number":170,"context_line":"        raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_ab826efe","line":167,"in_reply_to":"7a3c09a3_99603503","updated":"2017-01-19 22:28:31.000000000","message":"Done","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7ca46c8e907411864a35e19eb9f290748b7bf672","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        else:"},{"line_number":300,"context_line":"            instance_uuid \u003d node.uuid"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        # NOTE(TheJulia): We have no way to know what the mount point"},{"line_number":303,"context_line":"        # inside the host is going to be, so we shall not provide"},{"line_number":304,"context_line":"        # a mountpoint value"},{"line_number":305,"context_line":"        mountpoint \u003d None"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        try:"},{"line_number":308,"context_line":"            # NOTE(TheJulia): The final step of the cinder volume"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_bdcfb227","line":305,"range":{"start_line":302,"start_character":0,"end_line":305,"end_character":25},"updated":"2017-01-17 10:51:43.000000000","message":"Maybe not having this in a variable then ?\n\nJust append this NOTE to the NOTE at L308 and pass None directly to the attach() method.","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":299,"context_line":"        else:"},{"line_number":300,"context_line":"            instance_uuid \u003d node.uuid"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        # NOTE(TheJulia): We have no way to know what the mount point"},{"line_number":303,"context_line":"        # inside the host is going to be, so we shall not provide"},{"line_number":304,"context_line":"        # a mountpoint value"},{"line_number":305,"context_line":"        mountpoint \u003d None"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        try:"},{"line_number":308,"context_line":"            # NOTE(TheJulia): The final step of the cinder volume"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_4bc66a68","line":305,"range":{"start_line":302,"start_character":0,"end_line":305,"end_character":25},"in_reply_to":"7a3c09a3_bdcfb227","updated":"2017-01-19 22:28:31.000000000","message":"Done.  I re-wrote the appended text to the node on line 313 so it flows together.","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"79ce676249a63fc548102fa198ad54fa5244a418","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":317,"context_line":"            msg \u003d (_(\u0027Could not inform cinder that the attachment for \u0027"},{"line_number":318,"context_line":"                     \u0027volume %(vol_id)s for node %(node)s has been \u0027"},{"line_number":319,"context_line":"                     \u0027completed. %(error)s\u0027) %"},{"line_number":320,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":321,"context_line":"            LOG.error(msg)"},{"line_number":322,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_b95df148","line":319,"updated":"2017-01-17 16:38:40.000000000","message":"nit: . -\u003e :","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":316,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":317,"context_line":"            msg \u003d (_(\u0027Could not inform cinder that the attachment for \u0027"},{"line_number":318,"context_line":"                     \u0027volume %(vol_id)s for node %(node)s has been \u0027"},{"line_number":319,"context_line":"                     \u0027completed. %(error)s\u0027) %"},{"line_number":320,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":321,"context_line":"            LOG.error(msg)"},{"line_number":322,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_8b0a12d1","line":319,"in_reply_to":"7a3c09a3_b95df148","updated":"2017-01-19 22:28:31.000000000","message":"Done","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"79ce676249a63fc548102fa198ad54fa5244a418","unresolved":false,"context_lines":[{"line_number":337,"context_line":"def detach_volumes(task,"},{"line_number":338,"context_line":"                   volume_list,"},{"line_number":339,"context_line":"                   connector,"},{"line_number":340,"context_line":"                   allow_errors\u003dFalse):"},{"line_number":341,"context_line":"    \"\"\"Detach a list of volumes from a provided connector detail."},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"       Enumerates through a provided list of volumes and issues"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_d9563d29","line":340,"updated":"2017-01-17 16:38:40.000000000","message":"nit: I wonder why put all params on separate lines","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":337,"context_line":"def detach_volumes(task,"},{"line_number":338,"context_line":"                   volume_list,"},{"line_number":339,"context_line":"                   connector,"},{"line_number":340,"context_line":"                   allow_errors\u003dFalse):"},{"line_number":341,"context_line":"    \"\"\"Detach a list of volumes from a provided connector detail."},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"       Enumerates through a provided list of volumes and issues"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_eb72b67b","line":340,"in_reply_to":"7a3c09a3_d9563d29","updated":"2017-01-19 22:28:31.000000000","message":"No idea why I did that....  Changed to one line.","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"79ce676249a63fc548102fa198ad54fa5244a418","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":387,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":388,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":389,"context_line":"                     \u0027node %(node)s. %(error)s\u0027) %"},{"line_number":390,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":391,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":392,"context_line":"            # If we do not raise an exception, we should move on to"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_f953f936","line":389,"updated":"2017-01-17 16:38:40.000000000","message":"nit: . -\u003e :","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":387,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":388,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":389,"context_line":"                     \u0027node %(node)s. %(error)s\u0027) %"},{"line_number":390,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":391,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":392,"context_line":"            # If we do not raise an exception, we should move on to"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_eb4b9629","line":389,"in_reply_to":"7a3c09a3_f953f936","updated":"2017-01-19 22:28:31.000000000","message":"Done","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"79ce676249a63fc548102fa198ad54fa5244a418","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            # before we we\u0027re attempting to power off the node."},{"line_number":395,"context_line":"            continue"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        if not is_volume_attached(task, volume):"},{"line_number":398,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already detached from node \u0027"},{"line_number":399,"context_line":"                      \u0027%(uuid)s. Skipping attachment.\u0027,"},{"line_number":400,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_19336515","line":397,"updated":"2017-01-17 16:38:40.000000000","message":"even more: it should be a node as a dict","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7ca46c8e907411864a35e19eb9f290748b7bf672","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            # before we we\u0027re attempting to power off the node."},{"line_number":395,"context_line":"            continue"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        if not is_volume_attached(task, volume):"},{"line_number":398,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already detached from node \u0027"},{"line_number":399,"context_line":"                      \u0027%(uuid)s. Skipping attachment.\u0027,"},{"line_number":400,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_fd6a1ab2","line":397,"range":{"start_line":397,"start_character":34,"end_line":397,"end_character":38},"updated":"2017-01-17 10:51:43.000000000","message":"this parameter should be a node and not a task","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":394,"context_line":"            # before we we\u0027re attempting to power off the node."},{"line_number":395,"context_line":"            continue"},{"line_number":396,"context_line":""},{"line_number":397,"context_line":"        if not is_volume_attached(task, volume):"},{"line_number":398,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already detached from node \u0027"},{"line_number":399,"context_line":"                      \u0027%(uuid)s. Skipping attachment.\u0027,"},{"line_number":400,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_4bbcaa05","line":397,"in_reply_to":"7a3c09a3_19336515","updated":"2017-01-19 22:28:31.000000000","message":"doh!  Great catch.  Fixing.","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"79ce676249a63fc548102fa198ad54fa5244a418","unresolved":false,"context_lines":[{"line_number":411,"context_line":"            client.volumes.terminate_connection(volume_id, connector)"},{"line_number":412,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":413,"context_line":"            msg \u003d (_(\u0027Could not detach volume %(vol_id)s \u0027"},{"line_number":414,"context_line":"                     \u0027from node %(node)s. %(error)s\u0027) %"},{"line_number":415,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":416,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":417,"context_line":"            # Skip proceeding with this method if we\u0027re not raising"}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_393821ef","line":414,"updated":"2017-01-17 16:38:40.000000000","message":"nit: . -\u003e :","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":411,"context_line":"            client.volumes.terminate_connection(volume_id, connector)"},{"line_number":412,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":413,"context_line":"            msg \u003d (_(\u0027Could not detach volume %(vol_id)s \u0027"},{"line_number":414,"context_line":"                     \u0027from node %(node)s. %(error)s\u0027) %"},{"line_number":415,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":416,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":417,"context_line":"            # Skip proceeding with this method if we\u0027re not raising"}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_6b74069c","line":414,"in_reply_to":"7a3c09a3_393821ef","updated":"2017-01-19 22:28:31.000000000","message":"Done","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"14614018042f5198ccc66149f01d4e61f91a4d62","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"AVAILABLE \u003d \u0027available\u0027"},{"line_number":30,"context_line":"IN_USE \u003d \u0027in-use\u0027"},{"line_number":31,"context_line":"# TODO(TheJulia) What if mutli-attach, and attaching...."},{"line_number":32,"context_line":"# That technically shouldn\u0027t be a standard configuration,"},{"line_number":33,"context_line":"# but if someone wanted a quorum volume... that is the way"},{"line_number":34,"context_line":"# they could do it I guess."}],"source_content_type":"text/x-python","patch_set":30,"id":"5a3905b3_af5b3186","line":31,"updated":"2017-01-20 14:27:21.000000000","message":"nit on patchset 29","commit_id":"53125da8d20cf7a9ae2faff19377c1fd319474ac"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"14614018042f5198ccc66149f01d4e61f91a4d62","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    for attachment in attachments:"},{"line_number":147,"context_line":"        if \u0027server_id\u0027 in attachment:"},{"line_number":148,"context_line":"            if (attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid or"},{"line_number":149,"context_line":"                    attachment[\u0027server_id\u0027] \u003d\u003d node.uuid):"},{"line_number":150,"context_line":"                return attachment[\u0027id\u0027]"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"5a3905b3_cf5ebd75","line":149,"updated":"2017-01-20 14:27:21.000000000","message":"nit: attachment[\u0027server_id\u0027] in (node.instance_uuid, node.uuid)","commit_id":"53125da8d20cf7a9ae2faff19377c1fd319474ac"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"AVAILABLE \u003d \u0027available\u0027"},{"line_number":30,"context_line":"IN_USE \u003d \u0027in-use\u0027"},{"line_number":31,"context_line":"# TODO(TheJulia) What if mutli-attach, and attaching...."},{"line_number":32,"context_line":"# That technically shouldn\u0027t be a standard configuration,"},{"line_number":33,"context_line":"# but if someone wanted a quorum volume... that is the way"},{"line_number":34,"context_line":"# they could do it I guess."}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_ae800c8c","line":31,"updated":"2017-02-01 00:16:53.000000000","message":"I don\u0027t think I understand this comment :(","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":"AVAILABLE \u003d \u0027available\u0027"},{"line_number":30,"context_line":"IN_USE \u003d \u0027in-use\u0027"},{"line_number":31,"context_line":"# TODO(TheJulia) What if mutli-attach, and attaching...."},{"line_number":32,"context_line":"# That technically shouldn\u0027t be a standard configuration,"},{"line_number":33,"context_line":"# but if someone wanted a quorum volume... that is the way"},{"line_number":34,"context_line":"# they could do it I guess."}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_483c5ee2","line":31,"in_reply_to":"3a461143_ae800c8c","updated":"2017-02-13 20:13:44.000000000","message":"Ahh, yeah, That was to myself more than anything since I expected to iterate on it at some point later to support multi-attach.  Less so expecting to do that now.","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":29,"context_line":"AVAILABLE \u003d \u0027available\u0027"},{"line_number":30,"context_line":"IN_USE \u003d \u0027in-use\u0027"},{"line_number":31,"context_line":"# TODO(TheJulia) What if mutli-attach, and attaching...."},{"line_number":32,"context_line":"# That technically shouldn\u0027t be a standard configuration,"},{"line_number":33,"context_line":"# but if someone wanted a quorum volume... that is the way"},{"line_number":34,"context_line":"# they could do it I guess."},{"line_number":35,"context_line":"_CINDER_SESSION \u003d None"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_0e504031","line":32,"updated":"2017-02-01 00:16:53.000000000","message":"Does this comment mean that an already existing session can be set here? I think it is not very clear and \u0027...\u0027 makes it even less descriptive","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":29,"context_line":"AVAILABLE \u003d \u0027available\u0027"},{"line_number":30,"context_line":"IN_USE \u003d \u0027in-use\u0027"},{"line_number":31,"context_line":"# TODO(TheJulia) What if mutli-attach, and attaching...."},{"line_number":32,"context_line":"# That technically shouldn\u0027t be a standard configuration,"},{"line_number":33,"context_line":"# but if someone wanted a quorum volume... that is the way"},{"line_number":34,"context_line":"# they could do it I guess."},{"line_number":35,"context_line":"_CINDER_SESSION \u003d None"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_08198688","line":32,"in_reply_to":"3a461143_0e504031","updated":"2017-02-13 20:13:44.000000000","message":"I\u0027ll re-write this to fill in the context.","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    \"\"\"Get a cinder client connection"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"       :param token: A requestor token, if applicable. Default: None"},{"line_number":49,"context_line":"       :param tenant: The requestor tenant ID. Default: None"},{"line_number":50,"context_line":"    \"\"\""},{"line_number":51,"context_line":"    params \u003d {"},{"line_number":52,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_2e3a5ce7","line":49,"updated":"2017-02-01 00:16:53.000000000","message":"any exceptions raised? e.g. when creating client?","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    \"\"\"Get a cinder client connection"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"       :param token: A requestor token, if applicable. Default: None"},{"line_number":49,"context_line":"       :param tenant: The requestor tenant ID. Default: None"},{"line_number":50,"context_line":"    \"\"\""},{"line_number":51,"context_line":"    params \u003d {"},{"line_number":52,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_5a8185c2","line":49,"in_reply_to":"3a461143_2e3a5ce7","updated":"2017-02-13 20:13:44.000000000","message":"Largely those would be keystone related and glancing around the codebase we\u0027re not denoting them specifically when creating api clients.  If we were not using sessions, as in we were supporting noauth, we would definitely have things that we could raise easily.","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    :param volume: The dictionary representing the volume from cinder."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    :returns: Boolean indicating if the volume is attached."},{"line_number":105,"context_line":"    :raises: StorageError If invalid data is recieved where an"},{"line_number":106,"context_line":"                          attachment unable to be checked."},{"line_number":107,"context_line":"    \"\"\""},{"line_number":108,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_a98f2673","line":105,"updated":"2017-02-01 00:16:53.000000000","message":"recieved/received\nwhere/when?\nattachment/attachment status?\nchecked/determined?","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    :param volume: The dictionary representing the volume from cinder."},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    :returns: Boolean indicating if the volume is attached."},{"line_number":105,"context_line":"    :raises: StorageError If invalid data is recieved where an"},{"line_number":106,"context_line":"                          attachment unable to be checked."},{"line_number":107,"context_line":"    \"\"\""},{"line_number":108,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_5acfc528","line":105,"in_reply_to":"3a461143_a98f2673","updated":"2017-02-13 20:13:44.000000000","message":"Done","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    try:"},{"line_number":109,"context_line":"        attachments \u003d volume[\u0027attachments\u0027]"},{"line_number":110,"context_line":"    except KeyError:"},{"line_number":111,"context_line":"        msg \u003d (_(\u0027Attachment data not present in cinder volume \u0027"},{"line_number":112,"context_line":"                 \u0027%(vol_id)s. Unable to determine attachment \u0027"},{"line_number":113,"context_line":"                 \u0027status for node %(uuid)s.\u0027) %"},{"line_number":114,"context_line":"               {\u0027vol_id\u0027: volume[\u0027id\u0027], \u0027uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_09a11af8","line":111,"updated":"2017-02-01 00:16:53.000000000","message":"I don\u0027t see a reason for declaring this message as a variable instead of using inline. \nMaybe there was an idea to log it?","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    try:"},{"line_number":109,"context_line":"        attachments \u003d volume[\u0027attachments\u0027]"},{"line_number":110,"context_line":"    except KeyError:"},{"line_number":111,"context_line":"        msg \u003d (_(\u0027Attachment data not present in cinder volume \u0027"},{"line_number":112,"context_line":"                 \u0027%(vol_id)s. Unable to determine attachment \u0027"},{"line_number":113,"context_line":"                 \u0027status for node %(uuid)s.\u0027) %"},{"line_number":114,"context_line":"               {\u0027vol_id\u0027: volume[\u0027id\u0027], \u0027uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_fa8eb9ce","line":111,"in_reply_to":"3a461143_09a11af8","updated":"2017-02-13 20:13:44.000000000","message":"Largely style repetition, but I think we should be logging this as well.","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    :raises: StorageError If invalid volume data lacking attachments"},{"line_number":134,"context_line":"                          is provided."},{"line_number":135,"context_line":"    :returns: The id value representing the attachment in cinder if"},{"line_number":136,"context_line":"               present."},{"line_number":137,"context_line":"    \"\"\""},{"line_number":138,"context_line":"    # NOTE(TheJulia): This is under the belief that there should be a single"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_694e1e3c","line":135,"updated":"2017-02-01 00:16:53.000000000","message":"id/ID\nMaybe reformat so it says that it returns e.g:\nID of attachment in cinder, if present","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    :raises: StorageError If invalid volume data lacking attachments"},{"line_number":134,"context_line":"                          is provided."},{"line_number":135,"context_line":"    :returns: The id value representing the attachment in cinder if"},{"line_number":136,"context_line":"               present."},{"line_number":137,"context_line":"    \"\"\""},{"line_number":138,"context_line":"    # NOTE(TheJulia): This is under the belief that there should be a single"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_5a10a559","line":135,"in_reply_to":"3a461143_694e1e3c","updated":"2017-02-13 20:13:44.000000000","message":"Done","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    :returns: The id value representing the attachment in cinder if"},{"line_number":136,"context_line":"               present."},{"line_number":137,"context_line":"    \"\"\""},{"line_number":138,"context_line":"    # NOTE(TheJulia): This is under the belief that there should be a single"},{"line_number":139,"context_line":"    # attachment PER node that represents all possible attachment information"},{"line_number":140,"context_line":"    # as multiple types can be submitted in a single request."},{"line_number":141,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_e9d20e5b","line":138,"updated":"2017-02-01 00:16:53.000000000","message":"should be/is","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":135,"context_line":"    :returns: The id value representing the attachment in cinder if"},{"line_number":136,"context_line":"               present."},{"line_number":137,"context_line":"    \"\"\""},{"line_number":138,"context_line":"    # NOTE(TheJulia): This is under the belief that there should be a single"},{"line_number":139,"context_line":"    # attachment PER node that represents all possible attachment information"},{"line_number":140,"context_line":"    # as multiple types can be submitted in a single request."},{"line_number":141,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_3d54cbfd","line":138,"in_reply_to":"3a461143_e9d20e5b","updated":"2017-02-13 20:13:44.000000000","message":"Ahh, much better, thank you!","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":136,"context_line":"               present."},{"line_number":137,"context_line":"    \"\"\""},{"line_number":138,"context_line":"    # NOTE(TheJulia): This is under the belief that there should be a single"},{"line_number":139,"context_line":"    # attachment PER node that represents all possible attachment information"},{"line_number":140,"context_line":"    # as multiple types can be submitted in a single request."},{"line_number":141,"context_line":"    try:"},{"line_number":142,"context_line":"        attachments \u003d volume[\u0027attachments\u0027]"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_89498a33","line":139,"updated":"2017-02-01 00:16:53.000000000","message":"PER/per?","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":136,"context_line":"               present."},{"line_number":137,"context_line":"    \"\"\""},{"line_number":138,"context_line":"    # NOTE(TheJulia): This is under the belief that there should be a single"},{"line_number":139,"context_line":"    # attachment PER node that represents all possible attachment information"},{"line_number":140,"context_line":"    # as multiple types can be submitted in a single request."},{"line_number":141,"context_line":"    try:"},{"line_number":142,"context_line":"        attachments \u003d volume[\u0027attachments\u0027]"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_dd1baf71","line":139,"in_reply_to":"3a461143_89498a33","updated":"2017-02-13 20:13:44.000000000","message":"Eh, just me emphasizing.  Fixed.","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":178,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":179,"context_line":"                 \u0027%(uuid)s: %(error)s\u0027) %"},{"line_number":180,"context_line":"               {\u0027error\u0027: e, \u0027uuid\u0027: node.uuid})"},{"line_number":181,"context_line":"        LOG.error(msg)"},{"line_number":182,"context_line":"        raise exception.StorageError(msg)"},{"line_number":183,"context_line":"    except Exception as msg:"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_69753e62","line":180,"updated":"2017-02-01 00:16:53.000000000","message":"total nit, but shouldn\u0027t values in dict be in the same order as they\u0027re used?","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":178,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":179,"context_line":"                 \u0027%(uuid)s: %(error)s\u0027) %"},{"line_number":180,"context_line":"               {\u0027error\u0027: e, \u0027uuid\u0027: node.uuid})"},{"line_number":181,"context_line":"        LOG.error(msg)"},{"line_number":182,"context_line":"        raise exception.StorageError(msg)"},{"line_number":183,"context_line":"    except Exception as msg:"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_7d71e3a7","line":180,"in_reply_to":"3a461143_69753e62","updated":"2017-02-13 20:13:44.000000000","message":"Done","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":226,"context_line":"       :raises: StorageError If storage subsystem exception is raised."},{"line_number":227,"context_line":"       :raises: TypeError If the supplied volume_list is not a list."},{"line_number":228,"context_line":"       :returns: List of connected volumes. The returned list can be"},{"line_number":229,"context_line":"                 relatively consistent depending on the end storage"},{"line_number":230,"context_line":"                 driver that the volume is configured for, however"},{"line_number":231,"context_line":"                 the \u0027driver_volume_type\u0027 key should not be relied upon"},{"line_number":232,"context_line":"                 as it is a free-form value returned by the driver."}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_89f7cad1","line":229,"updated":"2017-02-01 00:16:53.000000000","message":"This seems so long... maybe docs are better place?","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":226,"context_line":"       :raises: StorageError If storage subsystem exception is raised."},{"line_number":227,"context_line":"       :raises: TypeError If the supplied volume_list is not a list."},{"line_number":228,"context_line":"       :returns: List of connected volumes. The returned list can be"},{"line_number":229,"context_line":"                 relatively consistent depending on the end storage"},{"line_number":230,"context_line":"                 driver that the volume is configured for, however"},{"line_number":231,"context_line":"                 the \u0027driver_volume_type\u0027 key should not be relied upon"},{"line_number":232,"context_line":"                 as it is a free-form value returned by the driver."}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_1d0707cb","line":229,"in_reply_to":"3a461143_89f7cad1","updated":"2017-02-13 20:13:44.000000000","message":"Well, this is the internal method level documentation in a sense.","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        try:"},{"line_number":408,"context_line":"            client.volumes.begin_detaching(volume_id)"},{"line_number":409,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":410,"context_line":"            msg \u003d (_(\u0027Could not request detach for volume %(vol_id)s \u0027"},{"line_number":411,"context_line":"                     \u0027from cinder for node %(node)s. %(error)s\u0027) %"},{"line_number":412,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":413,"context_line":"            _handle_errors(allow_errors, msg)"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_69237e56","line":410,"updated":"2017-02-01 00:16:53.000000000","message":"ditto about declaring message","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        try:"},{"line_number":408,"context_line":"            client.volumes.begin_detaching(volume_id)"},{"line_number":409,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":410,"context_line":"            msg \u003d (_(\u0027Could not request detach for volume %(vol_id)s \u0027"},{"line_number":411,"context_line":"                     \u0027from cinder for node %(node)s. %(error)s\u0027) %"},{"line_number":412,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":413,"context_line":"            _handle_errors(allow_errors, msg)"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_9d9857c2","line":410,"in_reply_to":"3a461143_69237e56","updated":"2017-02-13 20:13:44.000000000","message":"Totally pattern.  I really think it is more readable since there is the method handling errors.  I can change it if others are in agreement.","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"fec3918dcf2ffc053777b9211c7a5e457cb60c76","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            params[\u0027proxy_tenant_id\u0027] \u003d tenant"},{"line_number":81,"context_line":"        if \u0027bypass_url\u0027 not in params:"},{"line_number":82,"context_line":"            params[\u0027auth_url\u0027] \u003d keystone.get_service_url("},{"line_number":83,"context_line":"                session, service_type\u003d\u0027keystone\u0027)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    return client.Client(**params)"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_5c8e9dd0","line":83,"range":{"start_line":83,"start_character":38,"end_line":83,"end_character":48},"updated":"2017-02-15 09:21:42.000000000","message":"service_type should be \u0027identity\u0027.","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a9820e96377dee2bcc0bf861fa53d3b22daed803","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            params[\u0027proxy_tenant_id\u0027] \u003d tenant"},{"line_number":81,"context_line":"        if \u0027bypass_url\u0027 not in params:"},{"line_number":82,"context_line":"            params[\u0027auth_url\u0027] \u003d keystone.get_service_url("},{"line_number":83,"context_line":"                session, service_type\u003d\u0027keystone\u0027)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    return client.Client(**params)"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_816b30b6","line":83,"range":{"start_line":83,"start_character":38,"end_line":83,"end_character":48},"in_reply_to":"fa31d9ce_5c8e9dd0","updated":"2017-02-15 18:28:14.000000000","message":"Done","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"fec3918dcf2ffc053777b9211c7a5e457cb60c76","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        if \u0027bypass_url\u0027 not in params:"},{"line_number":82,"context_line":"            params[\u0027auth_url\u0027] \u003d keystone.get_service_url("},{"line_number":83,"context_line":"                session, service_type\u003d\u0027keystone\u0027)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    return client.Client(**params)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_f8df5637","line":84,"updated":"2017-02-15 09:21:42.000000000","message":"There seems to be a few problems for using cinderclient with a proxy token although I\u0027m not sure which to fix, ironic or cinder.\n\nproxy_token will be seen here[1] in cinderclient.\nThis authenticate method[2] requires auth_url to get keystone API version even if bypass_url is passed. Some credential information seems to be required here[3].\n\n[1] https://github.com/openstack/python-cinderclient/blob/master/cinderclient/client.py#L541\n[2] https://github.com/openstack/python-cinderclient/blob/master/cinderclient/client.py#L513\n[3] https://github.com/openstack/python-cinderclient/blob/master/cinderclient/client.py#L533-L536","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a9820e96377dee2bcc0bf861fa53d3b22daed803","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        if \u0027bypass_url\u0027 not in params:"},{"line_number":82,"context_line":"            params[\u0027auth_url\u0027] \u003d keystone.get_service_url("},{"line_number":83,"context_line":"                session, service_type\u003d\u0027keystone\u0027)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    return client.Client(**params)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_416db8ca","line":84,"in_reply_to":"fa31d9ce_f8df5637","updated":"2017-02-15 18:28:14.000000000","message":"I think the word \"headache\" summarizes client library authentication code.\n\nEven if bypass_url is defined, it makes sense to need auth_url to be able to handle token revalidation in the client... which is another headache.  The missing part is that we should offer it forth.  I knew something was wrong when I was last revising this code :(  I\u0027m moving auth_url up to be top called in general if it is not a session based request.","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"fec3918dcf2ffc053777b9211c7a5e457cb60c76","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                          determined."},{"line_number":111,"context_line":"    \"\"\""},{"line_number":112,"context_line":"    try:"},{"line_number":113,"context_line":"        attachments \u003d volume[\u0027attachments\u0027]"},{"line_number":114,"context_line":"    except KeyError:"},{"line_number":115,"context_line":"        msg \u003d (_(\u0027Attachment data not present in cinder volume \u0027"},{"line_number":116,"context_line":"                 \u0027%(vol_id)s. Unable to determine attachment \u0027"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_c86bd2ef","line":113,"range":{"start_line":113,"start_character":22,"end_line":113,"end_character":43},"updated":"2017-02-15 09:21:42.000000000","message":"Volume is not a dictionary. We need to use volume.attachments instead.","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                          determined."},{"line_number":111,"context_line":"    \"\"\""},{"line_number":112,"context_line":"    try:"},{"line_number":113,"context_line":"        attachments \u003d volume[\u0027attachments\u0027]"},{"line_number":114,"context_line":"    except KeyError:"},{"line_number":115,"context_line":"        msg \u003d (_(\u0027Attachment data not present in cinder volume \u0027"},{"line_number":116,"context_line":"                 \u0027%(vol_id)s. Unable to determine attachment \u0027"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_5e8599cc","line":113,"range":{"start_line":113,"start_character":22,"end_line":113,"end_character":43},"in_reply_to":"fa31d9ce_c86bd2ef","updated":"2017-02-15 16:19:09.000000000","message":"+1","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a9820e96377dee2bcc0bf861fa53d3b22daed803","unresolved":false,"context_lines":[{"line_number":110,"context_line":"                          determined."},{"line_number":111,"context_line":"    \"\"\""},{"line_number":112,"context_line":"    try:"},{"line_number":113,"context_line":"        attachments \u003d volume[\u0027attachments\u0027]"},{"line_number":114,"context_line":"    except KeyError:"},{"line_number":115,"context_line":"        msg \u003d (_(\u0027Attachment data not present in cinder volume \u0027"},{"line_number":116,"context_line":"                 \u0027%(vol_id)s. Unable to determine attachment \u0027"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_6111dc03","line":113,"range":{"start_line":113,"start_character":22,"end_line":113,"end_character":43},"in_reply_to":"fa31d9ce_c86bd2ef","updated":"2017-02-15 18:28:14.000000000","message":"Done","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    if attachments is not None:"},{"line_number":123,"context_line":"        for attachment in attachments:"},{"line_number":124,"context_line":"            if \u0027server_id\u0027 in attachment:"},{"line_number":125,"context_line":"                if attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid:"},{"line_number":126,"context_line":"                    return True"},{"line_number":127,"context_line":"                if attachment[\u0027server_id\u0027] \u003d\u003d node.uuid:"},{"line_number":128,"context_line":"                    return True"},{"line_number":129,"context_line":"    return False"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_be577524","line":128,"range":{"start_line":125,"start_character":16,"end_line":128,"end_character":31},"updated":"2017-02-15 16:19:09.000000000","message":"These two if conditions can be condensed into one line, like:\nif any( [attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid, attachment[\u0027server_id\u0027] \u003d\u003d node.uuid] ):\n    return True\nOr similar to what you have done from line 151 to 155.","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a9820e96377dee2bcc0bf861fa53d3b22daed803","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    if attachments is not None:"},{"line_number":123,"context_line":"        for attachment in attachments:"},{"line_number":124,"context_line":"            if \u0027server_id\u0027 in attachment:"},{"line_number":125,"context_line":"                if attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid:"},{"line_number":126,"context_line":"                    return True"},{"line_number":127,"context_line":"                if attachment[\u0027server_id\u0027] \u003d\u003d node.uuid:"},{"line_number":128,"context_line":"                    return True"},{"line_number":129,"context_line":"    return False"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_53402a07","line":128,"range":{"start_line":125,"start_character":16,"end_line":128,"end_character":31},"in_reply_to":"fa31d9ce_be577524","updated":"2017-02-15 18:28:14.000000000","message":"Done","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    connected \u003d []"},{"line_number":265,"context_line":"    for volume_id in volume_list:"},{"line_number":266,"context_line":"        try:"},{"line_number":267,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":268,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":269,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":270,"context_line":"                     \u0027%(uuid)s: %(error)s\u0027) %"},{"line_number":271,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":272,"context_line":"            LOG.error(msg)"},{"line_number":273,"context_line":"            raise exception.StorageError(msg)"},{"line_number":274,"context_line":"        if is_volume_attached(node, volume):"},{"line_number":275,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already attached to node \u0027"},{"line_number":276,"context_line":"                      \u0027%(uuid)s. Skipping attachment.\u0027,"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_e166acb9","line":273,"range":{"start_line":266,"start_character":8,"end_line":273,"end_character":45},"updated":"2017-02-15 16:19:09.000000000","message":"Can we break these try catch implementations in a different method and call it from attach volumes? I think this is how cinder does it, but we can make it less cluttered. That would simplify the unit tests in test_cinder.py as well","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a9820e96377dee2bcc0bf861fa53d3b22daed803","unresolved":false,"context_lines":[{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    connected \u003d []"},{"line_number":265,"context_line":"    for volume_id in volume_list:"},{"line_number":266,"context_line":"        try:"},{"line_number":267,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":268,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":269,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":270,"context_line":"                     \u0027%(uuid)s: %(error)s\u0027) %"},{"line_number":271,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":272,"context_line":"            LOG.error(msg)"},{"line_number":273,"context_line":"            raise exception.StorageError(msg)"},{"line_number":274,"context_line":"        if is_volume_attached(node, volume):"},{"line_number":275,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already attached to node \u0027"},{"line_number":276,"context_line":"                      \u0027%(uuid)s. Skipping attachment.\u0027,"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_73dfee39","line":273,"range":{"start_line":266,"start_character":8,"end_line":273,"end_character":45},"in_reply_to":"fa31d9ce_e166acb9","updated":"2017-02-15 18:28:14.000000000","message":"I agree it would partially simplify the unit tests, although at the same time we would have to add additional unit tests, and we would generally have to keep similar tests in place to test all the way through the main method.\n\nThat being said, I feel like that is an optimization that we can do later.","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":278,"context_line":"            continue"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"        try:"},{"line_number":281,"context_line":"            client.volumes.reserve(volume_id)"},{"line_number":282,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":283,"context_line":"            msg \u003d (_(\u0027Could not reserve volume %(vol_id)s for %(node)s: \u0027"},{"line_number":284,"context_line":"                     \u0027%(error)s)\u0027) %"},{"line_number":285,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":286,"context_line":"            LOG.error(msg)"},{"line_number":287,"context_line":"            raise exception.StorageError(msg)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        try:"},{"line_number":290,"context_line":"            # Provide connector information to cinder"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_a1ccb489","line":287,"range":{"start_line":280,"start_character":8,"end_line":287,"end_character":45},"updated":"2017-02-15 16:19:09.000000000","message":"Same comment as above","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            LOG.error(msg)"},{"line_number":287,"context_line":"            raise exception.StorageError(msg)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        try:"},{"line_number":290,"context_line":"            # Provide connector information to cinder"},{"line_number":291,"context_line":"            connection \u003d client.volumes.initialize_connection(volume_id,"},{"line_number":292,"context_line":"                                                              connector)"},{"line_number":293,"context_line":"            if \u0027volume_id\u0027 not in connection[\u0027data\u0027]:"},{"line_number":294,"context_line":"                connection[\u0027data\u0027][\u0027volume_id\u0027] \u003d volume_id"},{"line_number":295,"context_line":"            connected.append(connection)"},{"line_number":296,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume[\u0027uuid\u0027]"},{"line_number":297,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":298,"context_line":"            msg \u003d (_(\u0027Could not initialize storage attachment for \u0027"},{"line_number":299,"context_line":"                     \u0027volume %(vol_id)s to node %(node)s: %(error)s\u0027) %"},{"line_number":300,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":301,"context_line":"            LOG.error(msg)"},{"line_number":302,"context_line":"            try:"},{"line_number":303,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":304,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":305,"context_line":"                LOG.error(_LE(\"Failed to remove reservation for \""},{"line_number":306,"context_line":"                              \"volume %s\"), volume_id)"},{"line_number":307,"context_line":"            raise exception.StorageError(msg)"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"        LOG.info(_LI(\u0027Successfully initialized volume %(vol_id) for \u0027"},{"line_number":310,"context_line":"                     \u0027node %(node)s.\u0027),"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_c19e0862","line":307,"range":{"start_line":289,"start_character":7,"end_line":307,"end_character":45},"updated":"2017-02-15 16:19:09.000000000","message":"Same comment as above","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":315,"context_line":"        else:"},{"line_number":316,"context_line":"            instance_uuid \u003d node.uuid"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"        try:"},{"line_number":319,"context_line":"            # NOTE(TheJulia): The final step of the cinder volume"},{"line_number":320,"context_line":"            # attachment process involves updating the volume"},{"line_number":321,"context_line":"            # database record to indicate that the attachment has"},{"line_number":322,"context_line":"            # been completed, which moves the volume to the"},{"line_number":323,"context_line":"            # \u0027attached\u0027 state. This action also sets a mountpoint"},{"line_number":324,"context_line":"            # for the volume, if known. In our use case, there is"},{"line_number":325,"context_line":"            # no way for us to know what the mountpoint inside of"},{"line_number":326,"context_line":"            # the operating system, thus we send None."},{"line_number":327,"context_line":"            client.volumes.attach(volume_id, instance_uuid, None)"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":330,"context_line":"            msg \u003d (_(\u0027Could not inform cinder that the attachment for \u0027"},{"line_number":331,"context_line":"                     \u0027volume %(vol_id)s for node %(node)s has been \u0027"},{"line_number":332,"context_line":"                     \u0027completed: %(error)s\u0027) %"},{"line_number":333,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":334,"context_line":"            LOG.error(msg)"},{"line_number":335,"context_line":"            raise exception.StorageError(msg)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        try:"},{"line_number":338,"context_line":"            # Set metadata to assist a user in volume identification"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_018bc01f","line":335,"range":{"start_line":318,"start_character":8,"end_line":335,"end_character":45},"updated":"2017-02-15 16:19:09.000000000","message":"Same comment as above","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":334,"context_line":"            LOG.error(msg)"},{"line_number":335,"context_line":"            raise exception.StorageError(msg)"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        try:"},{"line_number":338,"context_line":"            # Set metadata to assist a user in volume identification"},{"line_number":339,"context_line":"            client.volumes.set_metadata("},{"line_number":340,"context_line":"                volume_id,"},{"line_number":341,"context_line":"                _create_metadata_dictionary(node, \u0027attached\u0027))"},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":344,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume metadata for \u0027"},{"line_number":345,"context_line":"                            \u0027volume %(vol_id)s; %(err)s \u0027),"},{"line_number":346,"context_line":"                        {\u0027vol_id\u0027: volume_id, \u0027err\u0027: e})"},{"line_number":347,"context_line":"    return connected"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_817fb013","line":346,"range":{"start_line":337,"start_character":0,"end_line":346,"end_character":56},"updated":"2017-02-15 16:19:09.000000000","message":"Same comment as above","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":392,"context_line":"    node \u003d task.node"},{"line_number":393,"context_line":""},{"line_number":394,"context_line":"    for volume_id in volume_list:"},{"line_number":395,"context_line":"        try:"},{"line_number":396,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":397,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":398,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":399,"context_line":"                     \u0027node %(node)s: %(error)s\u0027) %"},{"line_number":400,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":401,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":402,"context_line":"            # If we do not raise an exception, we should move on to"},{"line_number":403,"context_line":"            # the next volume since the volume could have been deleted"},{"line_number":404,"context_line":"            # before we we\u0027re attempting to power off the node."},{"line_number":405,"context_line":"            continue"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        if not is_volume_attached(node, volume):"},{"line_number":408,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already detached from node \u0027"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_e1a78ca4","line":405,"range":{"start_line":395,"start_character":8,"end_line":405,"end_character":20},"updated":"2017-02-15 16:19:09.000000000","message":"Same comment as above","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":409,"context_line":"                      \u0027%(uuid)s: Skipping attachment.\u0027,"},{"line_number":410,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        try:"},{"line_number":413,"context_line":"            client.volumes.begin_detaching(volume_id)"},{"line_number":414,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":415,"context_line":"            msg \u003d (_(\u0027Could not request detach for volume %(vol_id)s \u0027"},{"line_number":416,"context_line":"                     \u0027from cinder for node %(node)s. %(error)s\u0027) %"},{"line_number":417,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":418,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":419,"context_line":"        try:"},{"line_number":420,"context_line":"            # Remove the attachment"},{"line_number":421,"context_line":"            client.volumes.terminate_connection(volume_id, connector)"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_81cdf067","line":418,"range":{"start_line":412,"start_character":8,"end_line":418,"end_character":45},"updated":"2017-02-15 16:19:09.000000000","message":"Same comment as above","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":416,"context_line":"                     \u0027from cinder for node %(node)s. %(error)s\u0027) %"},{"line_number":417,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":418,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":419,"context_line":"        try:"},{"line_number":420,"context_line":"            # Remove the attachment"},{"line_number":421,"context_line":"            client.volumes.terminate_connection(volume_id, connector)"},{"line_number":422,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":423,"context_line":"            msg \u003d (_(\u0027Could not detach volume %(vol_id)s \u0027"},{"line_number":424,"context_line":"                     \u0027from node %(node)s: %(error)s\u0027) %"},{"line_number":425,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":426,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":427,"context_line":"            # Skip proceeding with this method if we\u0027re not raising"},{"line_number":428,"context_line":"            # errors. This will leave the volume in the detaching"},{"line_number":429,"context_line":"            # state, but in that case something very unexpected"},{"line_number":430,"context_line":"            # has occured."},{"line_number":431,"context_line":"            continue"},{"line_number":432,"context_line":"        try:"},{"line_number":433,"context_line":"            # Attempt to identify the attachment id value to provide"},{"line_number":434,"context_line":"            # accessible relationship data to leave in the cinder API"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_e1beacac","line":431,"range":{"start_line":419,"start_character":7,"end_line":431,"end_character":20},"updated":"2017-02-15 16:19:09.000000000","message":"Same comment as above","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":429,"context_line":"            # state, but in that case something very unexpected"},{"line_number":430,"context_line":"            # has occured."},{"line_number":431,"context_line":"            continue"},{"line_number":432,"context_line":"        try:"},{"line_number":433,"context_line":"            # Attempt to identify the attachment id value to provide"},{"line_number":434,"context_line":"            # accessible relationship data to leave in the cinder API"},{"line_number":435,"context_line":"            # to enable reconsiliation."},{"line_number":436,"context_line":"            attachment_id \u003d _get_attachment_id(node, volume)"},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"            # Update the API attachment record"},{"line_number":439,"context_line":"            client.volumes.detach(volume_id, attachment_id)"},{"line_number":440,"context_line":""},{"line_number":441,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":442,"context_line":"            msg \u003d (_(\u0027Could not inform cinder that the detachment for \u0027"},{"line_number":443,"context_line":"                     \u0027volume %(vol_id)s from node %(node)s has been \u0027"},{"line_number":444,"context_line":"                     \u0027completed: %(error)s\u0027) %"},{"line_number":445,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":446,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"        try:"},{"line_number":449,"context_line":"            # Set metadata to assist in volume identification."}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_21e364da","line":446,"range":{"start_line":432,"start_character":8,"end_line":446,"end_character":45},"updated":"2017-02-15 16:19:09.000000000","message":"Same comment as above","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11878,"name":"Rushil Chugh","email":"rushil.chugh@gmail.com","username":"rushil"},"change_message_id":"f0074beb7d9e5ea7fc22bfebea1b53ab1ffd2c94","unresolved":false,"context_lines":[{"line_number":445,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":446,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":447,"context_line":""},{"line_number":448,"context_line":"        try:"},{"line_number":449,"context_line":"            # Set metadata to assist in volume identification."},{"line_number":450,"context_line":"            client.volumes.set_metadata("},{"line_number":451,"context_line":"                volume_id,"},{"line_number":452,"context_line":"                _create_metadata_dictionary(node, \u0027detached\u0027))"},{"line_number":453,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":454,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume %(vol_id)s metadata \u0027"},{"line_number":455,"context_line":"                            \u0027for node %(node)s: %(error)s \u0027),"},{"line_number":456,"context_line":"                        {\u0027vol_id\u0027: volume_id,"},{"line_number":457,"context_line":"                         \u0027uuid\u0027: node.uuid,"},{"line_number":458,"context_line":"                         \u0027error\u0027: e})"}],"source_content_type":"text/x-python","patch_set":35,"id":"fa31d9ce_61e9dcb6","line":458,"range":{"start_line":448,"start_character":8,"end_line":458,"end_character":37},"updated":"2017-02-15 16:19:09.000000000","message":"Same comment as above","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4074678299619fb8f279f76b4c8d305edd2a40fb","unresolved":false,"context_lines":[{"line_number":31,"context_line":"# TODO(TheJulia) At some point we should consider the case"},{"line_number":32,"context_line":"# of someone attempting to attach a volume that supports multiple"},{"line_number":33,"context_line":"# attachments. That volume can be in any state along the process"},{"line_number":34,"context_line":"# and could still be valid for attaachments. The likely case would"},{"line_number":35,"context_line":"# be a quorum drive or a shared cluster filesystem where multiple"},{"line_number":36,"context_line":"# distinct nodes may be attempting to interact with the same volume."},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"fa31d9ce_74a6f1ae","line":34,"updated":"2017-02-15 23:13:19.000000000","message":"nit: s/attaachments/attachments/","commit_id":"9bb30882d2939b075c3e0f379f3d22d673c3aef2"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"5fa2441ff19a8eca560c5bc85ae9cae7017509e3","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    # attachment for each node that represents all possible attachment"},{"line_number":132,"context_line":"    # information as multiple types can be submitted in a single request."},{"line_number":133,"context_line":"    try:"},{"line_number":134,"context_line":"        attachments \u003d volume[\u0027attachments\u0027]"},{"line_number":135,"context_line":"    except KeyError as e:"},{"line_number":136,"context_line":"        raise exception.StorageError(_(\u0027Invalid attachment data provided. \u0027"},{"line_number":137,"context_line":"                                       \u0027Missing: %(key)s\u0027) % {\u0027key\u0027: e})"}],"source_content_type":"text/x-python","patch_set":37,"id":"da36d5c6_0bc2bd33","line":134,"range":{"start_line":134,"start_character":22,"end_line":134,"end_character":43},"updated":"2017-02-20 15:26:42.000000000","message":"It needs to be volume.attachments.","commit_id":"966088ff23828bc7dc0a6df36392a5ccf1e85593"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bacb709ed407fc29c19187f814328c13c9acb208","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    # attachment for each node that represents all possible attachment"},{"line_number":132,"context_line":"    # information as multiple types can be submitted in a single request."},{"line_number":133,"context_line":"    try:"},{"line_number":134,"context_line":"        attachments \u003d volume[\u0027attachments\u0027]"},{"line_number":135,"context_line":"    except KeyError as e:"},{"line_number":136,"context_line":"        raise exception.StorageError(_(\u0027Invalid attachment data provided. \u0027"},{"line_number":137,"context_line":"                                       \u0027Missing: %(key)s\u0027) % {\u0027key\u0027: e})"}],"source_content_type":"text/x-python","patch_set":37,"id":"da36d5c6_483d69ba","line":134,"range":{"start_line":134,"start_character":22,"end_line":134,"end_character":43},"in_reply_to":"da36d5c6_0bc2bd33","updated":"2017-02-21 16:48:22.000000000","message":"Great catch, thank you, will fix shortly.","commit_id":"966088ff23828bc7dc0a6df36392a5ccf1e85593"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"5fa2441ff19a8eca560c5bc85ae9cae7017509e3","unresolved":false,"context_lines":[{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        if not is_volume_attached(node, volume):"},{"line_number":395,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already detached from node \u0027"},{"line_number":396,"context_line":"                      \u0027%(uuid)s: Skipping attachment.\u0027,"},{"line_number":397,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":37,"id":"da36d5c6_0bd9dd21","line":396,"range":{"start_line":396,"start_character":42,"end_line":396,"end_character":52},"updated":"2017-02-20 15:26:42.000000000","message":"detachment","commit_id":"966088ff23828bc7dc0a6df36392a5ccf1e85593"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bacb709ed407fc29c19187f814328c13c9acb208","unresolved":false,"context_lines":[{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        if not is_volume_attached(node, volume):"},{"line_number":395,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already detached from node \u0027"},{"line_number":396,"context_line":"                      \u0027%(uuid)s: Skipping attachment.\u0027,"},{"line_number":397,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":37,"id":"da36d5c6_0548bc86","line":396,"range":{"start_line":396,"start_character":42,"end_line":396,"end_character":52},"in_reply_to":"da36d5c6_0bd9dd21","updated":"2017-02-21 16:48:22.000000000","message":"Done","commit_id":"966088ff23828bc7dc0a6df36392a5ccf1e85593"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"5fa2441ff19a8eca560c5bc85ae9cae7017509e3","unresolved":false,"context_lines":[{"line_number":395,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already detached from node \u0027"},{"line_number":396,"context_line":"                      \u0027%(uuid)s: Skipping attachment.\u0027,"},{"line_number":397,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        try:"},{"line_number":400,"context_line":"            client.volumes.begin_detaching(volume_id)"},{"line_number":401,"context_line":"        except cinder_exceptions.ClientException as e:"}],"source_content_type":"text/x-python","patch_set":37,"id":"da36d5c6_ebf2c999","line":398,"updated":"2017-02-20 15:26:42.000000000","message":"\u0027continue\u0027 is necessary for skipping.","commit_id":"966088ff23828bc7dc0a6df36392a5ccf1e85593"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bacb709ed407fc29c19187f814328c13c9acb208","unresolved":false,"context_lines":[{"line_number":395,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already detached from node \u0027"},{"line_number":396,"context_line":"                      \u0027%(uuid)s: Skipping attachment.\u0027,"},{"line_number":397,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        try:"},{"line_number":400,"context_line":"            client.volumes.begin_detaching(volume_id)"},{"line_number":401,"context_line":"        except cinder_exceptions.ClientException as e:"}],"source_content_type":"text/x-python","patch_set":37,"id":"da36d5c6_a54a9081","line":398,"in_reply_to":"da36d5c6_ebf2c999","updated":"2017-02-21 16:48:22.000000000","message":"Great catch, thank you.","commit_id":"966088ff23828bc7dc0a6df36392a5ccf1e85593"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"5fa2441ff19a8eca560c5bc85ae9cae7017509e3","unresolved":false,"context_lines":[{"line_number":441,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume %(vol_id)s metadata \u0027"},{"line_number":442,"context_line":"                            \u0027for node %(node)s: %(error)s \u0027),"},{"line_number":443,"context_line":"                        {\u0027vol_id\u0027: volume_id,"},{"line_number":444,"context_line":"                         \u0027uuid\u0027: node.uuid,"},{"line_number":445,"context_line":"                         \u0027error\u0027: e})"}],"source_content_type":"text/x-python","patch_set":37,"id":"da36d5c6_8b9ead54","line":444,"range":{"start_line":444,"start_character":26,"end_line":444,"end_character":30},"updated":"2017-02-20 15:26:42.000000000","message":"The key name should be \u0027node\u0027.","commit_id":"966088ff23828bc7dc0a6df36392a5ccf1e85593"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bacb709ed407fc29c19187f814328c13c9acb208","unresolved":false,"context_lines":[{"line_number":441,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume %(vol_id)s metadata \u0027"},{"line_number":442,"context_line":"                            \u0027for node %(node)s: %(error)s \u0027),"},{"line_number":443,"context_line":"                        {\u0027vol_id\u0027: volume_id,"},{"line_number":444,"context_line":"                         \u0027uuid\u0027: node.uuid,"},{"line_number":445,"context_line":"                         \u0027error\u0027: e})"}],"source_content_type":"text/x-python","patch_set":37,"id":"da36d5c6_c598641e","line":444,"range":{"start_line":444,"start_character":26,"end_line":444,"end_character":30},"in_reply_to":"da36d5c6_8b9ead54","updated":"2017-02-21 16:48:22.000000000","message":"great catch!","commit_id":"966088ff23828bc7dc0a6df36392a5ccf1e85593"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8fee760d0d7a2175d900e4601ffab213f3a5c7f3","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    if attachments is not None:"},{"line_number":111,"context_line":"        for attachment in attachments:"},{"line_number":112,"context_line":"            if \u0027server_id\u0027 in attachment:"},{"line_number":113,"context_line":"                if (attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid or"},{"line_number":114,"context_line":"                        attachment[\u0027server_id\u0027] \u003d\u003d node.uuid):"},{"line_number":115,"context_line":"                    return True"},{"line_number":116,"context_line":"    return False"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"ba2be162_d3093a33","line":114,"range":{"start_line":113,"start_character":15,"end_line":114,"end_character":60},"updated":"2017-03-01 08:38:45.000000000","message":"nit:\nif (attachment[\u0027server_id\u0027] in \n       (node.instance_uuid, node.uuid)):\n    return True","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"724ea252eda9bc8deaa3308b0f3cc41c523e61d7","unresolved":false,"context_lines":[{"line_number":110,"context_line":"    if attachments is not None:"},{"line_number":111,"context_line":"        for attachment in attachments:"},{"line_number":112,"context_line":"            if \u0027server_id\u0027 in attachment:"},{"line_number":113,"context_line":"                if (attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid or"},{"line_number":114,"context_line":"                        attachment[\u0027server_id\u0027] \u003d\u003d node.uuid):"},{"line_number":115,"context_line":"                    return True"},{"line_number":116,"context_line":"    return False"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"9a30ddce_328829c5","line":114,"range":{"start_line":113,"start_character":15,"end_line":114,"end_character":60},"in_reply_to":"ba2be162_d3093a33","updated":"2017-03-11 00:14:27.000000000","message":"Done","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"91b03285c42f7e2aa9e14fcd0930d4dbe4888f82","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    # NOTE(TheJulia): This is under the belief that there is a single"},{"line_number":129,"context_line":"    # attachment for each node that represents all possible attachment"},{"line_number":130,"context_line":"    # information as multiple types can be submitted in a single request."},{"line_number":131,"context_line":"    attachments \u003d volume.attachments"},{"line_number":132,"context_line":"    for attachment in attachments:"},{"line_number":133,"context_line":"        if \u0027server_id\u0027 in attachment:"},{"line_number":134,"context_line":"            if (attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid or"}],"source_content_type":"text/x-python","patch_set":40,"id":"da36d5c6_9811ee5f","line":131,"updated":"2017-02-24 20:52:07.000000000","message":"if it\u0027s accessible this way, I believe it\u0027s an object, not a dict? If so, ln 123 should be updated.","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"724ea252eda9bc8deaa3308b0f3cc41c523e61d7","unresolved":false,"context_lines":[{"line_number":128,"context_line":"    # NOTE(TheJulia): This is under the belief that there is a single"},{"line_number":129,"context_line":"    # attachment for each node that represents all possible attachment"},{"line_number":130,"context_line":"    # information as multiple types can be submitted in a single request."},{"line_number":131,"context_line":"    attachments \u003d volume.attachments"},{"line_number":132,"context_line":"    for attachment in attachments:"},{"line_number":133,"context_line":"        if \u0027server_id\u0027 in attachment:"},{"line_number":134,"context_line":"            if (attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid or"}],"source_content_type":"text/x-python","patch_set":40,"id":"9a30ddce_5293ddf9","line":131,"in_reply_to":"da36d5c6_9811ee5f","updated":"2017-03-11 00:14:27.000000000","message":"Done","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8fee760d0d7a2175d900e4601ffab213f3a5c7f3","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    attachments \u003d volume.attachments"},{"line_number":132,"context_line":"    for attachment in attachments:"},{"line_number":133,"context_line":"        if \u0027server_id\u0027 in attachment:"},{"line_number":134,"context_line":"            if (attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid or"},{"line_number":135,"context_line":"                    attachment[\u0027server_id\u0027] \u003d\u003d node.uuid):"},{"line_number":136,"context_line":"                return attachment[\u0027id\u0027]"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"ba2be162_edaae118","line":134,"range":{"start_line":134,"start_character":43,"end_line":134,"end_character":61},"updated":"2017-03-01 08:38:45.000000000","message":"nit:\nif (attachment[\u0027server_id\u0027] in \n       (node.instance_uuid, node.uuid)):\n    return attachment[\u0027id\u0027]","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"724ea252eda9bc8deaa3308b0f3cc41c523e61d7","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    attachments \u003d volume.attachments"},{"line_number":132,"context_line":"    for attachment in attachments:"},{"line_number":133,"context_line":"        if \u0027server_id\u0027 in attachment:"},{"line_number":134,"context_line":"            if (attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid or"},{"line_number":135,"context_line":"                    attachment[\u0027server_id\u0027] \u003d\u003d node.uuid):"},{"line_number":136,"context_line":"                return attachment[\u0027id\u0027]"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"9a30ddce_92663528","line":134,"range":{"start_line":134,"start_character":43,"end_line":134,"end_character":61},"in_reply_to":"ba2be162_edaae118","updated":"2017-03-11 00:14:27.000000000","message":"Done","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"64f90697e1029c1bc2e49ebe6d3949fbf658e812","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        if \u0027server_id\u0027 in attachment:"},{"line_number":134,"context_line":"            if (attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid or"},{"line_number":135,"context_line":"                    attachment[\u0027server_id\u0027] \u003d\u003d node.uuid):"},{"line_number":136,"context_line":"                return attachment[\u0027id\u0027]"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"def _create_metadata_dictionary(node, action):"}],"source_content_type":"text/x-python","patch_set":40,"id":"da36d5c6_328556ad","line":136,"range":{"start_line":136,"start_character":35,"end_line":136,"end_character":37},"updated":"2017-02-27 16:46:06.000000000","message":"attachment_id","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"724ea252eda9bc8deaa3308b0f3cc41c523e61d7","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        if \u0027server_id\u0027 in attachment:"},{"line_number":134,"context_line":"            if (attachment[\u0027server_id\u0027] \u003d\u003d node.instance_uuid or"},{"line_number":135,"context_line":"                    attachment[\u0027server_id\u0027] \u003d\u003d node.uuid):"},{"line_number":136,"context_line":"                return attachment[\u0027id\u0027]"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"def _create_metadata_dictionary(node, action):"}],"source_content_type":"text/x-python","patch_set":40,"id":"9a30ddce_3402d40a","line":136,"range":{"start_line":136,"start_character":35,"end_line":136,"end_character":37},"in_reply_to":"da36d5c6_328556ad","updated":"2017-03-11 00:14:27.000000000","message":"Done","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8fee760d0d7a2175d900e4601ffab213f3a5c7f3","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":165,"context_line":"                 \u0027%(uuid)s: %(error)s\u0027) %"},{"line_number":166,"context_line":"               {\u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":167,"context_line":"        LOG.error(msg)"},{"line_number":168,"context_line":"        raise exception.StorageError(msg)"},{"line_number":169,"context_line":"    except Exception as msg:"},{"line_number":170,"context_line":"        with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba2be162_9ecfc9af","line":167,"range":{"start_line":167,"start_character":8,"end_line":167,"end_character":17},"updated":"2017-03-01 08:38:45.000000000","message":"Should it be LOG.exception?","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e5053b4852734523f84fae311c8a16e464fe08d6","unresolved":false,"context_lines":[{"line_number":164,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":165,"context_line":"                 \u0027%(uuid)s: %(error)s\u0027) %"},{"line_number":166,"context_line":"               {\u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":167,"context_line":"        LOG.error(msg)"},{"line_number":168,"context_line":"        raise exception.StorageError(msg)"},{"line_number":169,"context_line":"    except Exception as msg:"},{"line_number":170,"context_line":"        with excutils.save_and_reraise_exception():"}],"source_content_type":"text/x-python","patch_set":40,"id":"9a30ddce_7e9f2cb4","line":167,"range":{"start_line":167,"start_character":8,"end_line":167,"end_character":17},"in_reply_to":"ba2be162_9ecfc9af","updated":"2017-03-09 00:18:02.000000000","message":"I believe this is done this way to raise exception of type StorageError rather than ClientException","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e5053b4852734523f84fae311c8a16e464fe08d6","unresolved":false,"context_lines":[{"line_number":166,"context_line":"               {\u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":167,"context_line":"        LOG.error(msg)"},{"line_number":168,"context_line":"        raise exception.StorageError(msg)"},{"line_number":169,"context_line":"    except Exception as msg:"},{"line_number":170,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":171,"context_line":"            LOG.error(_LE(\"Error creating cinder client for node \""},{"line_number":172,"context_line":"                          \"%(node)s: %(error)s\"),"}],"source_content_type":"text/x-python","patch_set":40,"id":"9a30ddce_9e6f80c4","line":169,"updated":"2017-03-09 00:18:02.000000000","message":"I\u0027d prefer\ns/msg/err/","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8fee760d0d7a2175d900e4601ffab213f3a5c7f3","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        raise exception.StorageError(msg)"},{"line_number":169,"context_line":"    except Exception as msg:"},{"line_number":170,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":171,"context_line":"            LOG.error(_LE(\"Error creating cinder client for node \""},{"line_number":172,"context_line":"                          \"%(node)s: %(error)s\"),"},{"line_number":173,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027error\u0027: msg})"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"ba2be162_3ed09d53","line":171,"range":{"start_line":171,"start_character":12,"end_line":171,"end_character":21},"updated":"2017-03-01 08:38:45.000000000","message":"Should it be LOG.exception?","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8fee760d0d7a2175d900e4601ffab213f3a5c7f3","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":251,"context_line":"                     \u0027%(uuid)s: %(error)s\u0027) %"},{"line_number":252,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":253,"context_line":"            LOG.error(msg)"},{"line_number":254,"context_line":"            raise exception.StorageError(msg)"},{"line_number":255,"context_line":"        if is_volume_attached(node, volume):"},{"line_number":256,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already attached to node \u0027"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba2be162_3eba5de2","line":253,"range":{"start_line":253,"start_character":12,"end_line":253,"end_character":21},"updated":"2017-03-01 08:38:45.000000000","message":"ditto","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"724ea252eda9bc8deaa3308b0f3cc41c523e61d7","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":251,"context_line":"                     \u0027%(uuid)s: %(error)s\u0027) %"},{"line_number":252,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":253,"context_line":"            LOG.error(msg)"},{"line_number":254,"context_line":"            raise exception.StorageError(msg)"},{"line_number":255,"context_line":"        if is_volume_attached(node, volume):"},{"line_number":256,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already attached to node \u0027"}],"source_content_type":"text/x-python","patch_set":40,"id":"9a30ddce_4d6260d9","line":253,"range":{"start_line":253,"start_character":12,"end_line":253,"end_character":21},"in_reply_to":"ba2be162_3eba5de2","updated":"2017-03-11 00:14:27.000000000","message":"Here it also looks like throwing more specific exc type","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8fee760d0d7a2175d900e4601ffab213f3a5c7f3","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            if \u0027volume_id\u0027 not in connection[\u0027data\u0027]:"},{"line_number":275,"context_line":"                connection[\u0027data\u0027][\u0027volume_id\u0027] \u003d volume_id"},{"line_number":276,"context_line":"            connected.append(connection)"},{"line_number":277,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"},{"line_number":278,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":279,"context_line":"            msg \u003d (_(\u0027Could not initialize storage attachment for \u0027"},{"line_number":280,"context_line":"                     \u0027volume %(vol_id)s to node %(node)s: %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba2be162_de230104","line":277,"updated":"2017-03-01 08:38:45.000000000","message":"L277 should be before L276.","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"724ea252eda9bc8deaa3308b0f3cc41c523e61d7","unresolved":false,"context_lines":[{"line_number":274,"context_line":"            if \u0027volume_id\u0027 not in connection[\u0027data\u0027]:"},{"line_number":275,"context_line":"                connection[\u0027data\u0027][\u0027volume_id\u0027] \u003d volume_id"},{"line_number":276,"context_line":"            connected.append(connection)"},{"line_number":277,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"},{"line_number":278,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":279,"context_line":"            msg \u003d (_(\u0027Could not initialize storage attachment for \u0027"},{"line_number":280,"context_line":"                     \u0027volume %(vol_id)s to node %(node)s: %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":40,"id":"9a30ddce_0db30851","line":277,"in_reply_to":"ba2be162_de230104","updated":"2017-03-11 00:14:27.000000000","message":"it doesn\u0027t matter. Appended objects are not copied, but referenced. Change in ln 277 will also change what\u0027s in connected array","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8fee760d0d7a2175d900e4601ffab213f3a5c7f3","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":285,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":286,"context_line":"                LOG.error(_LE(\"Failed to remove reservation for \""},{"line_number":287,"context_line":"                              \"volume %s\"), volume_id)"},{"line_number":288,"context_line":"            raise exception.StorageError(msg)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        LOG.info(_LI(\u0027Successfully initialized volume %(vol_id) for \u0027"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba2be162_193213f2","line":287,"range":{"start_line":287,"start_character":31,"end_line":287,"end_character":40},"updated":"2017-03-01 08:38:45.000000000","message":"Also add node uuid in the message","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"724ea252eda9bc8deaa3308b0f3cc41c523e61d7","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":285,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":286,"context_line":"                LOG.error(_LE(\"Failed to remove reservation for \""},{"line_number":287,"context_line":"                              \"volume %s\"), volume_id)"},{"line_number":288,"context_line":"            raise exception.StorageError(msg)"},{"line_number":289,"context_line":""},{"line_number":290,"context_line":"        LOG.info(_LI(\u0027Successfully initialized volume %(vol_id) for \u0027"}],"source_content_type":"text/x-python","patch_set":40,"id":"9a30ddce_0dd22828","line":287,"range":{"start_line":287,"start_character":31,"end_line":287,"end_character":40},"in_reply_to":"ba2be162_193213f2","updated":"2017-03-11 00:14:27.000000000","message":"Done","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8fee760d0d7a2175d900e4601ffab213f3a5c7f3","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                _create_metadata_dictionary(node, \u0027attached\u0027))"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":325,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume metadata for \u0027"},{"line_number":326,"context_line":"                            \u0027volume %(vol_id)s; %(err)s \u0027),"},{"line_number":327,"context_line":"                        {\u0027vol_id\u0027: volume_id, \u0027err\u0027: e})"},{"line_number":328,"context_line":"    return connected"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba2be162_59a00bf5","line":325,"range":{"start_line":325,"start_character":53,"end_line":325,"end_character":65},"updated":"2017-03-01 08:38:45.000000000","message":"Also add node uuid in the message","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"724ea252eda9bc8deaa3308b0f3cc41c523e61d7","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                _create_metadata_dictionary(node, \u0027attached\u0027))"},{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":325,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume metadata for \u0027"},{"line_number":326,"context_line":"                            \u0027volume %(vol_id)s; %(err)s \u0027),"},{"line_number":327,"context_line":"                        {\u0027vol_id\u0027: volume_id, \u0027err\u0027: e})"},{"line_number":328,"context_line":"    return connected"}],"source_content_type":"text/x-python","patch_set":40,"id":"9a30ddce_cd0e50e4","line":325,"range":{"start_line":325,"start_character":53,"end_line":325,"end_character":65},"in_reply_to":"ba2be162_59a00bf5","updated":"2017-03-11 00:14:27.000000000","message":"Done","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"8fee760d0d7a2175d900e4601ffab213f3a5c7f3","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            continue"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        if not is_volume_attached(node, volume):"},{"line_number":389,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already detached from node \u0027"},{"line_number":390,"context_line":"                      \u0027%(uuid)s: Skipping detachment.\u0027,"},{"line_number":391,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":392,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":40,"id":"ba2be162_79f30f0b","line":389,"range":{"start_line":389,"start_character":44,"end_line":389,"end_character":60},"updated":"2017-03-01 08:38:45.000000000","message":"May be this can be re-worded as:\ns/ \u0027already detached\u0027/ \u0027not attached\u0027/","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"724ea252eda9bc8deaa3308b0f3cc41c523e61d7","unresolved":false,"context_lines":[{"line_number":386,"context_line":"            continue"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        if not is_volume_attached(node, volume):"},{"line_number":389,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already detached from node \u0027"},{"line_number":390,"context_line":"                      \u0027%(uuid)s: Skipping detachment.\u0027,"},{"line_number":391,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":392,"context_line":"            continue"}],"source_content_type":"text/x-python","patch_set":40,"id":"9a30ddce_6d9ac46f","line":389,"range":{"start_line":389,"start_character":44,"end_line":389,"end_character":60},"in_reply_to":"ba2be162_79f30f0b","updated":"2017-03-11 00:14:27.000000000","message":"Done","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"91b03285c42f7e2aa9e14fcd0930d4dbe4888f82","unresolved":false,"context_lines":[{"line_number":392,"context_line":"            continue"},{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        try:"},{"line_number":395,"context_line":"            client.volumes.begin_detaching(volume_id)"},{"line_number":396,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":397,"context_line":"            msg \u003d (_(\u0027Could not request detach for volume %(vol_id)s \u0027"},{"line_number":398,"context_line":"                     \u0027from cinder for node %(node)s. %(error)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":40,"id":"da36d5c6_5bd3f05f","line":395,"updated":"2017-02-24 20:52:07.000000000","message":"maybe a unit test to test the case found by Hironori? That will check how many times begin detaching was called when some items in volume_list are already detached and some not?","commit_id":"284bdd2806534d09a61547a496a9ae4d222cc03e"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"9fd1cff26ad7d24c9532fb721fa9fd0ee38dc4c2","unresolved":false,"context_lines":[{"line_number":255,"context_line":"                      \u0027%(uuid)s. Skipping attachment.\u0027,"},{"line_number":256,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"},{"line_number":257,"context_line":"            connection \u003d {\u0027data\u0027: {\u0027ironic_volume_uuid\u0027: volume.uuid,"},{"line_number":258,"context_line":"                                   \u0027volume_id\u0027: volume_id}}"},{"line_number":259,"context_line":"            connected.append(connection)"},{"line_number":260,"context_line":"            continue"},{"line_number":261,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"3a1ff146_5f51ec61","line":258,"updated":"2017-03-14 18:01:27.000000000","message":"After discussion with Julia, we agreed that this function should return also already attached volumes.\nAt first I wanted to return only volume_ids, but conncetion[\u0027data\u0027] is   later saved as volume target\u0027s properties.","commit_id":"c4b001beab57495d605e016d531c746931f8d6ed"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"d601fc4caf032d96bbddaa815d97bd084d301050","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    \"\"\""},{"line_number":156,"context_line":"    node \u003d task.node"},{"line_number":157,"context_line":"    try:"},{"line_number":158,"context_line":"        return get_client(token\u003dtask.context.auth_token,"},{"line_number":159,"context_line":"                          tenant\u003dtask.context.tenant)"},{"line_number":160,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":161,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"}],"source_content_type":"text/x-python","patch_set":44,"id":"3a1ff146_21aeab85","line":158,"range":{"start_line":158,"start_character":26,"end_line":158,"end_character":55},"updated":"2017-03-15 16:01:01.000000000","message":"Better do not use token from context, client can be instantiated with session. Token from context can be expired in the near future and it can not be present for periodical task.","commit_id":"99857718e3e85929ccc508f5e4464a5623e72829"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"9158d3241ae62d1bed561386765afe76cdcbbd84","unresolved":false,"context_lines":[{"line_number":155,"context_line":"    \"\"\""},{"line_number":156,"context_line":"    node \u003d task.node"},{"line_number":157,"context_line":"    try:"},{"line_number":158,"context_line":"        return get_client(token\u003dtask.context.auth_token,"},{"line_number":159,"context_line":"                          tenant\u003dtask.context.tenant)"},{"line_number":160,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":161,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"}],"source_content_type":"text/x-python","patch_set":44,"id":"3a1ff146_30c6ef67","line":158,"range":{"start_line":158,"start_character":26,"end_line":158,"end_character":55},"in_reply_to":"3a1ff146_21aeab85","updated":"2017-03-15 17:21:02.000000000","message":"Done","commit_id":"99857718e3e85929ccc508f5e4464a5623e72829"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"d601fc4caf032d96bbddaa815d97bd084d301050","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                     \u0027node %(node)s.\u0027),"},{"line_number":299,"context_line":"                 {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        if node.instance_uuid is not None:"},{"line_number":302,"context_line":"            instance_uuid \u003d node.instance_uuid"},{"line_number":303,"context_line":"        else:"},{"line_number":304,"context_line":"            instance_uuid \u003d node.uuid"}],"source_content_type":"text/x-python","patch_set":44,"id":"3a1ff146_81683ff7","line":301,"updated":"2017-03-15 16:01:01.000000000","message":"nit: instance_uuid \u003d node.instance_uuid or node.uuid","commit_id":"99857718e3e85929ccc508f5e4464a5623e72829"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"9158d3241ae62d1bed561386765afe76cdcbbd84","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                     \u0027node %(node)s.\u0027),"},{"line_number":299,"context_line":"                 {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        if node.instance_uuid is not None:"},{"line_number":302,"context_line":"            instance_uuid \u003d node.instance_uuid"},{"line_number":303,"context_line":"        else:"},{"line_number":304,"context_line":"            instance_uuid \u003d node.uuid"}],"source_content_type":"text/x-python","patch_set":44,"id":"3a1ff146_b0b01ff6","line":301,"in_reply_to":"3a1ff146_81683ff7","updated":"2017-03-15 17:21:02.000000000","message":"Done","commit_id":"99857718e3e85929ccc508f5e4464a5623e72829"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"d601fc4caf032d96bbddaa815d97bd084d301050","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":332,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume metadata for volume \u0027"},{"line_number":333,"context_line":"                            \u0027%(vol_id)s for node %(node)s: %(err)s \u0027),"},{"line_number":334,"context_line":"                        {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":335,"context_line":"    return connected"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"3a1ff146_a46e29c7","line":334,"updated":"2017-03-15 16:01:01.000000000","message":"Dumb question: no rollback operation like \"unreserve\" is needed for possible errors in l306-329?","commit_id":"99857718e3e85929ccc508f5e4464a5623e72829"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"9158d3241ae62d1bed561386765afe76cdcbbd84","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":332,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume metadata for volume \u0027"},{"line_number":333,"context_line":"                            \u0027%(vol_id)s for node %(node)s: %(err)s \u0027),"},{"line_number":334,"context_line":"                        {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":335,"context_line":"    return connected"},{"line_number":336,"context_line":""},{"line_number":337,"context_line":""}],"source_content_type":"text/x-python","patch_set":44,"id":"3a1ff146_90e7a3e3","line":334,"in_reply_to":"3a1ff146_a46e29c7","updated":"2017-03-15 17:21:02.000000000","message":"Good question! At this stage, volume was already successfully attached. The thing that fails here is updating cinder records. In my opinion it shouldn\u0027t result in rollback of volume attachment, but let\u0027s see what other people think :)","commit_id":"99857718e3e85929ccc508f5e4464a5623e72829"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"ef53f7e2223e7dd1f820ed46f74b4b225e38fbb9","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    if token is None:"},{"line_number":77,"context_line":"        params[\u0027session\u0027] \u003d session"},{"line_number":78,"context_line":"    else:"},{"line_number":79,"context_line":"        params[\u0027proxy_token\u0027] \u003d token"},{"line_number":80,"context_line":"        if tenant is not None:"},{"line_number":81,"context_line":"            params[\u0027proxy_tenant_id\u0027] \u003d tenant"},{"line_number":82,"context_line":"        params[\u0027auth_url\u0027] \u003d keystone.get_service_url("}],"source_content_type":"text/x-python","patch_set":45,"id":"3a1ff146_24fa20be","line":79,"updated":"2017-03-16 06:59:50.000000000","message":"It would be better not to use proxy_token. proxy_token is deprecated in Nova[1][2]. It also will be deprecated in Cinder and it doesn\u0027t seem to work well with this patch.\n\nFor using requestor token, it would be better to create an AuthPlugin object from context and pass it to Cinder client with a session like Nova[3].\n\n[1] http://lists.openstack.org/pipermail/openstack-dev/2016-October/106098.html\n[2] https://review.openstack.org/#/c/408703/\n[3] https://github.com/openstack/nova/blob/d83386524b07cf9da038dae4d487f6a234918e6c/nova/volume/cinder.py#L69","commit_id":"796e433a6d5ae3e574e9a40f012929c48d912efa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"53c4493ec9232623f93cfe9c4bc300c7b01a6af2","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    session \u003d _get_cinder_session()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    if token is None:"},{"line_number":77,"context_line":"        params[\u0027session\u0027] \u003d session"},{"line_number":78,"context_line":"    else:"},{"line_number":79,"context_line":"        params[\u0027proxy_token\u0027] \u003d token"},{"line_number":80,"context_line":"        if tenant is not None:"},{"line_number":81,"context_line":"            params[\u0027proxy_tenant_id\u0027] \u003d tenant"},{"line_number":82,"context_line":"        params[\u0027auth_url\u0027] \u003d keystone.get_service_url("}],"source_content_type":"text/x-python","patch_set":45,"id":"3a1ff146_2523e806","line":79,"range":{"start_line":76,"start_character":0,"end_line":79,"end_character":37},"updated":"2017-03-16 15:08:20.000000000","message":"So this should just become a single line\n    params[\u0027session\u0027] \u003d session","commit_id":"796e433a6d5ae3e574e9a40f012929c48d912efa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"53c4493ec9232623f93cfe9c4bc300c7b01a6af2","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    if token is None:"},{"line_number":77,"context_line":"        params[\u0027session\u0027] \u003d session"},{"line_number":78,"context_line":"    else:"},{"line_number":79,"context_line":"        params[\u0027proxy_token\u0027] \u003d token"},{"line_number":80,"context_line":"        if tenant is not None:"},{"line_number":81,"context_line":"            params[\u0027proxy_tenant_id\u0027] \u003d tenant"},{"line_number":82,"context_line":"        params[\u0027auth_url\u0027] \u003d keystone.get_service_url("}],"source_content_type":"text/x-python","patch_set":45,"id":"3a1ff146_852c9c03","line":79,"in_reply_to":"3a1ff146_24fa20be","updated":"2017-03-16 15:08:20.000000000","message":"I guess it would be okay to remove in this case.  We did something similar with the neutron client initialization because it was raising some odd behavior, and port binding in that case actually requires admin privileges in neutron.","commit_id":"796e433a6d5ae3e574e9a40f012929c48d912efa"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"53c4493ec9232623f93cfe9c4bc300c7b01a6af2","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        params[\u0027session\u0027] \u003d session"},{"line_number":78,"context_line":"    else:"},{"line_number":79,"context_line":"        params[\u0027proxy_token\u0027] \u003d token"},{"line_number":80,"context_line":"        if tenant is not None:"},{"line_number":81,"context_line":"            params[\u0027proxy_tenant_id\u0027] \u003d tenant"},{"line_number":82,"context_line":"        params[\u0027auth_url\u0027] \u003d keystone.get_service_url("},{"line_number":83,"context_line":"            session, service_type\u003d\u0027identity\u0027)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":45,"id":"3a1ff146_4522a401","line":81,"range":{"start_line":80,"start_character":0,"end_line":81,"end_character":46},"updated":"2017-03-16 15:08:20.000000000","message":"We should nuke this as well.","commit_id":"796e433a6d5ae3e574e9a40f012929c48d912efa"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"f8561dddf1fade5233408bd2d1a89c9c3147e1ce","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development Company LP."},{"line_number":2,"context_line":"# Copyright 2017 IBM Corp"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_c0e89f19","line":1,"updated":"2017-03-16 21:41:08.000000000","message":"Should this module be converted into a class? Like SwiftAPI in ironic/common/swift.py.","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development Company LP."},{"line_number":2,"context_line":"# Copyright 2017 IBM Corp"},{"line_number":3,"context_line":"# Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"# not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_fbc9caad","line":1,"in_reply_to":"1a1ced50_c0e89f19","updated":"2017-03-16 22:40:34.000000000","message":"This is done similarly to ironic/common/neutron.py\nBeside session (which is global for swift anyway) there are no class variables, so I don\u0027t see the idea of refactoring it into class as something useful. WDYT?","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ac65f5989d3ab241484804b635d5646ef99c95d8","unresolved":false,"context_lines":[{"line_number":48,"context_line":"def get_client():"},{"line_number":49,"context_line":"    \"\"\"Get a cinder client connection"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"       :param token: A requestor token, if applicable. Default: None"},{"line_number":52,"context_line":"       :param tenant: The requestor tenant ID. Default: None"},{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":"    params \u003d {"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_c58c3138","line":51,"updated":"2017-03-16 21:19:35.000000000","message":"I don\u0027t see any arguments to this function.","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":48,"context_line":"def get_client():"},{"line_number":49,"context_line":"    \"\"\"Get a cinder client connection"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"       :param token: A requestor token, if applicable. Default: None"},{"line_number":52,"context_line":"       :param tenant: The requestor tenant ID. Default: None"},{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":"    params \u003d {"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_e0be7bd3","line":51,"in_reply_to":"1a1ced50_c58c3138","updated":"2017-03-16 22:40:34.000000000","message":"Done","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ac65f5989d3ab241484804b635d5646ef99c95d8","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    \"\"\"Get a cinder client connection"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"       :param token: A requestor token, if applicable. Default: None"},{"line_number":52,"context_line":"       :param tenant: The requestor tenant ID. Default: None"},{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":"    params \u003d {"},{"line_number":55,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_45920159","line":52,"updated":"2017-03-16 21:19:35.000000000","message":"Document the return value please","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"f8561dddf1fade5233408bd2d1a89c9c3147e1ce","unresolved":false,"context_lines":[{"line_number":48,"context_line":"def get_client():"},{"line_number":49,"context_line":"    \"\"\"Get a cinder client connection"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"       :param token: A requestor token, if applicable. Default: None"},{"line_number":52,"context_line":"       :param tenant: The requestor tenant ID. Default: None"},{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":"    params \u003d {"},{"line_number":55,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_a55f3574","line":52,"range":{"start_line":51,"start_character":0,"end_line":52,"end_character":60},"updated":"2017-03-16 21:41:08.000000000","message":"get_client is not receiving parameters.","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    \"\"\"Get a cinder client connection"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"       :param token: A requestor token, if applicable. Default: None"},{"line_number":52,"context_line":"       :param tenant: The requestor tenant ID. Default: None"},{"line_number":53,"context_line":"    \"\"\""},{"line_number":54,"context_line":"    params \u003d {"},{"line_number":55,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_00b477f0","line":52,"in_reply_to":"1a1ced50_45920159","updated":"2017-03-16 22:40:34.000000000","message":"Done","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"f8561dddf1fade5233408bd2d1a89c9c3147e1ce","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    if CONF.keystone.region_name is not None:"},{"line_number":72,"context_line":"        params[\u0027region_name\u0027] \u003d CONF.keystone.region_name"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    session \u003d _get_cinder_session()"},{"line_number":75,"context_line":"    params[\u0027session\u0027] \u003d session"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    return client.Client(**params)"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_e5d04dcc","line":75,"range":{"start_line":74,"start_character":0,"end_line":75,"end_character":31},"updated":"2017-03-16 21:41:08.000000000","message":"Why not:\nparams[\u0027session\u0027] \u003d _get_cinder_session()","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    if CONF.keystone.region_name is not None:"},{"line_number":72,"context_line":"        params[\u0027region_name\u0027] \u003d CONF.keystone.region_name"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    session \u003d _get_cinder_session()"},{"line_number":75,"context_line":"    params[\u0027session\u0027] \u003d session"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    return client.Client(**params)"},{"line_number":78,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_5bc1fe7f","line":75,"range":{"start_line":74,"start_character":0,"end_line":75,"end_character":31},"in_reply_to":"1a1ced50_e5d04dcc","updated":"2017-03-16 22:40:34.000000000","message":"Done","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"f8561dddf1fade5233408bd2d1a89c9c3147e1ce","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    if attachments is not None:"},{"line_number":103,"context_line":"        for attachment in attachments:"},{"line_number":104,"context_line":"            if attachment.get(\u0027server_id\u0027) in (node.instance_uuid, node.uuid):"},{"line_number":105,"context_line":"                    return True"},{"line_number":106,"context_line":"    return False"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_452201bb","line":105,"range":{"start_line":105,"start_character":0,"end_line":105,"end_character":31},"updated":"2017-03-16 21:41:08.000000000","message":"This seems to have an extra indentation level.","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    if attachments is not None:"},{"line_number":103,"context_line":"        for attachment in attachments:"},{"line_number":104,"context_line":"            if attachment.get(\u0027server_id\u0027) in (node.instance_uuid, node.uuid):"},{"line_number":105,"context_line":"                    return True"},{"line_number":106,"context_line":"    return False"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":""}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_1b46a623","line":105,"range":{"start_line":105,"start_character":0,"end_line":105,"end_character":31},"in_reply_to":"1a1ced50_452201bb","updated":"2017-03-16 22:40:34.000000000","message":"Done","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ac65f5989d3ab241484804b635d5646ef99c95d8","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    :param volume: The object representing the volume from cinder."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    :returns: The UUID of the attachment in cinder, if"},{"line_number":116,"context_line":"              present."},{"line_number":117,"context_line":"    \"\"\""},{"line_number":118,"context_line":"    # NOTE(TheJulia): This is under the belief that there is a single"},{"line_number":119,"context_line":"    # attachment for each node that represents all possible attachment"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_65ad3d88","line":116,"updated":"2017-03-16 21:19:35.000000000","message":"or None if not present","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    :param volume: The object representing the volume from cinder."},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    :returns: The UUID of the attachment in cinder, if"},{"line_number":116,"context_line":"              present."},{"line_number":117,"context_line":"    \"\"\""},{"line_number":118,"context_line":"    # NOTE(TheJulia): This is under the belief that there is a single"},{"line_number":119,"context_line":"    # attachment for each node that represents all possible attachment"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_c0b97fee","line":116,"in_reply_to":"1a1ced50_65ad3d88","updated":"2017-03-16 22:40:34.000000000","message":"isn\u0027t that obvious?","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"f8561dddf1fade5233408bd2d1a89c9c3147e1ce","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"def _create_metadata_dictionary(node, action):"},{"line_number":129,"context_line":"    \"\"\"Create a metadata dictonary utilizing the node UUID."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"       :param node: Object representing a node"},{"line_number":132,"context_line":"       :param action: String value representing the last action"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_e0d4bb48","line":129,"updated":"2017-03-16 21:41:08.000000000","message":"s/dictonary/dictionary","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":126,"context_line":""},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"def _create_metadata_dictionary(node, action):"},{"line_number":129,"context_line":"    \"\"\"Create a metadata dictonary utilizing the node UUID."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"       :param node: Object representing a node"},{"line_number":132,"context_line":"       :param action: String value representing the last action"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_7b55dac4","line":129,"in_reply_to":"1a1ced50_e0d4bb48","updated":"2017-03-16 22:40:34.000000000","message":"Done","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ac65f5989d3ab241484804b635d5646ef99c95d8","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    \"\"\"Create a metadata dictonary utilizing the node UUID."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"       :param node: Object representing a node"},{"line_number":132,"context_line":"       :param action: String value representing the last action"},{"line_number":133,"context_line":"    \"\"\""},{"line_number":134,"context_line":"    label \u003d \"ironic_node_%s\" % node.uuid"},{"line_number":135,"context_line":"    return {"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_25ca6550","line":132,"updated":"2017-03-16 21:19:35.000000000","message":"Document return value please.","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    \"\"\"Create a metadata dictonary utilizing the node UUID."},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"       :param node: Object representing a node"},{"line_number":132,"context_line":"       :param action: String value representing the last action"},{"line_number":133,"context_line":"    \"\"\""},{"line_number":134,"context_line":"    label \u003d \"ironic_node_%s\" % node.uuid"},{"line_number":135,"context_line":"    return {"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_8076a73c","line":132,"in_reply_to":"1a1ced50_25ca6550","updated":"2017-03-16 22:40:34.000000000","message":"Done","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ac65f5989d3ab241484804b635d5646ef99c95d8","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    \"\"\"Obtain cinder client and return it for use."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    :returns: A cinder client."},{"line_number":146,"context_line":"    :raises: StorageError If an exception is encountered creating the client."},{"line_number":147,"context_line":"    \"\"\""},{"line_number":148,"context_line":"    node \u003d task.node"},{"line_number":149,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_a503b575","line":146,"updated":"2017-03-16 21:19:35.000000000","message":"Document return value please.","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    \"\"\"Obtain cinder client and return it for use."},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    :returns: A cinder client."},{"line_number":146,"context_line":"    :raises: StorageError If an exception is encountered creating the client."},{"line_number":147,"context_line":"    \"\"\""},{"line_number":148,"context_line":"    node \u003d task.node"},{"line_number":149,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_e093db4d","line":146,"in_reply_to":"1a1ced50_a503b575","updated":"2017-03-16 22:40:34.000000000","message":"it\u0027s already there :)","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ac65f5989d3ab241484804b635d5646ef99c95d8","unresolved":false,"context_lines":[{"line_number":357,"context_line":"       :raises: TypeError If the supplied volume_list is not a sequence."},{"line_number":358,"context_line":"       :raises: StorageError"},{"line_number":359,"context_line":"    \"\"\""},{"line_number":360,"context_line":"    def _handle_errors(allow_errors, msg):"},{"line_number":361,"context_line":"        if allow_errors:"},{"line_number":362,"context_line":"            LOG.warning(msg)"},{"line_number":363,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_c516f1a6","line":360,"updated":"2017-03-16 21:19:35.000000000","message":"nit: Don\u0027t need to pass \u0027allow_errors\u0027 as this is a closure function and has access to allow_errors.\n\nPassing \u0027msg\u0027 is good though :)","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":357,"context_line":"       :raises: TypeError If the supplied volume_list is not a sequence."},{"line_number":358,"context_line":"       :raises: StorageError"},{"line_number":359,"context_line":"    \"\"\""},{"line_number":360,"context_line":"    def _handle_errors(allow_errors, msg):"},{"line_number":361,"context_line":"        if allow_errors:"},{"line_number":362,"context_line":"            LOG.warning(msg)"},{"line_number":363,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_5bcbbe72","line":360,"in_reply_to":"1a1ced50_c516f1a6","updated":"2017-03-16 22:40:34.000000000","message":"Done","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ac65f5989d3ab241484804b635d5646ef99c95d8","unresolved":false,"context_lines":[{"line_number":392,"context_line":"            msg \u003d (_(\u0027Could not request detach for volume %(vol_id)s \u0027"},{"line_number":393,"context_line":"                     \u0027from cinder for node %(node)s. %(error)s\u0027) %"},{"line_number":394,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":395,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":396,"context_line":"        try:"},{"line_number":397,"context_line":"            # Remove the attachment"},{"line_number":398,"context_line":"            client.volumes.terminate_connection(volume_id, connector)"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_055f2973","line":395,"updated":"2017-03-16 21:19:35.000000000","message":"Might be nice to mention that if allowing_errors will continue. I\u0027m assuming that is intentional and not a forgotten continue statement.","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":392,"context_line":"            msg \u003d (_(\u0027Could not request detach for volume %(vol_id)s \u0027"},{"line_number":393,"context_line":"                     \u0027from cinder for node %(node)s. %(error)s\u0027) %"},{"line_number":394,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":395,"context_line":"            _handle_errors(allow_errors, msg)"},{"line_number":396,"context_line":"        try:"},{"line_number":397,"context_line":"            # Remove the attachment"},{"line_number":398,"context_line":"            client.volumes.terminate_connection(volume_id, connector)"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_3b77e2d5","line":395,"in_reply_to":"1a1ced50_055f2973","updated":"2017-03-16 22:40:34.000000000","message":"Done","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ac65f5989d3ab241484804b635d5646ef99c95d8","unresolved":false,"context_lines":[{"line_number":410,"context_line":"            # Attempt to identify the attachment id value to provide"},{"line_number":411,"context_line":"            # accessible relationship data to leave in the cinder API"},{"line_number":412,"context_line":"            # to enable reconsiliation."},{"line_number":413,"context_line":"            attachment_id \u003d _get_attachment_id(node, volume)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"            # Update the API attachment record"},{"line_number":416,"context_line":"            client.volumes.detach(volume_id, attachment_id)"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_65fc5d3f","line":413,"updated":"2017-03-16 21:19:35.000000000","message":"Can this raise a cinder exception? If not, I think better to have it outside of the try block","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":410,"context_line":"            # Attempt to identify the attachment id value to provide"},{"line_number":411,"context_line":"            # accessible relationship data to leave in the cinder API"},{"line_number":412,"context_line":"            # to enable reconsiliation."},{"line_number":413,"context_line":"            attachment_id \u003d _get_attachment_id(node, volume)"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"            # Update the API attachment record"},{"line_number":416,"context_line":"            client.volumes.detach(volume_id, attachment_id)"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_40dbcfed","line":413,"in_reply_to":"1a1ced50_65fc5d3f","updated":"2017-03-16 22:40:34.000000000","message":"Done","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"ac65f5989d3ab241484804b635d5646ef99c95d8","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                volume_id,"},{"line_number":429,"context_line":"                _create_metadata_dictionary(node, \u0027detached\u0027))"},{"line_number":430,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":431,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume %(vol_id)s metadata \u0027"},{"line_number":432,"context_line":"                            \u0027for node %(node)s: %(error)s \u0027),"},{"line_number":433,"context_line":"                        {\u0027vol_id\u0027: volume_id,"},{"line_number":434,"context_line":"                         \u0027node\u0027: node.uuid,"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_c5999121","line":431,"updated":"2017-03-16 21:19:35.000000000","message":"Why not use _handle_errors() ?","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"684d6c661de8d4d4485e6c63e7d9a939b9bbcbd6","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                volume_id,"},{"line_number":429,"context_line":"                _create_metadata_dictionary(node, \u0027detached\u0027))"},{"line_number":430,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":431,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume %(vol_id)s metadata \u0027"},{"line_number":432,"context_line":"                            \u0027for node %(node)s: %(error)s \u0027),"},{"line_number":433,"context_line":"                        {\u0027vol_id\u0027: volume_id,"},{"line_number":434,"context_line":"                         \u0027node\u0027: node.uuid,"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_55f9cac7","line":431,"in_reply_to":"1a1ced50_a0f9e34f","updated":"2017-03-17 00:43:09.000000000","message":"Makes sense","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":428,"context_line":"                volume_id,"},{"line_number":429,"context_line":"                _create_metadata_dictionary(node, \u0027detached\u0027))"},{"line_number":430,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":431,"context_line":"            LOG.warning(_LW(\u0027Failed to update volume %(vol_id)s metadata \u0027"},{"line_number":432,"context_line":"                            \u0027for node %(node)s: %(error)s \u0027),"},{"line_number":433,"context_line":"                        {\u0027vol_id\u0027: volume_id,"},{"line_number":434,"context_line":"                         \u0027node\u0027: node.uuid,"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_a0f9e34f","line":431,"in_reply_to":"1a1ced50_c5999121","updated":"2017-03-16 22:40:34.000000000","message":"I think that\u0027s because metadata does not impact the whole attach/detach process. It\u0027s just something that is useful to identify volume, but shouldn\u0027t fail this function even if errors are not allowed. I may be wrong though :)","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6faf7f72edfd0132b018fcc456ee8b49b95572ad","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def _init_client_for_operations(task):"},{"line_number":142,"context_line":"    \"\"\"Obtain cinder client and return it for use."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    :returns: A cinder client."},{"line_number":145,"context_line":"    :raises: StorageError If an exception is encountered creating the client."},{"line_number":146,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":47,"id":"1a1ced50_956c229e","line":143,"updated":"2017-03-17 00:42:53.000000000","message":"Document \u0027task\u0027 please\n\n :param task: TaskManager instance representing the operation.","commit_id":"a294b145ec7b66a4d708fead9f5b4b0f7cd8844d"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"26affa1d0d03ced2e83edcae041011b265c55b5c","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"def _init_client_for_operations(task):"},{"line_number":142,"context_line":"    \"\"\"Obtain cinder client and return it for use."},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    :returns: A cinder client."},{"line_number":145,"context_line":"    :raises: StorageError If an exception is encountered creating the client."},{"line_number":146,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":47,"id":"1a1ced50_9f96e292","line":143,"in_reply_to":"1a1ced50_956c229e","updated":"2017-03-17 17:36:05.000000000","message":"Done","commit_id":"a294b145ec7b66a4d708fead9f5b4b0f7cd8844d"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ff2f67150c4b4897abf34866ab221fa4c680046e","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import datetime"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from cinderclient import exceptions as cinder_exceptions"},{"line_number":18,"context_line":"from cinderclient.v2 import client as client"},{"line_number":19,"context_line":"from oslo_log import log"},{"line_number":20,"context_line":"from oslo_utils import excutils"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_2972f2ad","line":18,"updated":"2017-03-20 12:01:25.000000000","message":"Is there an intent to use v3 at some point? Maybe we need a wrapper that will enable selecting the client, based on the version that was requested by the developer?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import datetime"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from cinderclient import exceptions as cinder_exceptions"},{"line_number":18,"context_line":"from cinderclient.v2 import client as client"},{"line_number":19,"context_line":"from oslo_log import log"},{"line_number":20,"context_line":"from oslo_utils import excutils"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_84a6560e","line":18,"in_reply_to":"1a1ced50_0c48d22c","updated":"2017-03-20 23:40:30.000000000","message":"Bumped to v3. Good catch :)","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"63ccd26c5c6b74ca7cd8d652129e4e30a0677fff","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import datetime"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from cinderclient import exceptions as cinder_exceptions"},{"line_number":18,"context_line":"from cinderclient.v2 import client as client"},{"line_number":19,"context_line":"from oslo_log import log"},{"line_number":20,"context_line":"from oslo_utils import excutils"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_0c48d22c","line":18,"in_reply_to":"1a1ced50_2972f2ad","updated":"2017-03-20 18:36:12.000000000","message":"It looks like v2 is deprecated, from a quick look at the docs: https://developer.openstack.org/api-ref/block-storage/\n\nAt a minimum, I think we ought to default to the non-deprecated (v3) version","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"198dfde89c5c892b7e331d0b82efcdd96c9c13c4","unresolved":false,"context_lines":[{"line_number":15,"context_line":"import datetime"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from cinderclient import exceptions as cinder_exceptions"},{"line_number":18,"context_line":"from cinderclient.v2 import client as client"},{"line_number":19,"context_line":"from oslo_log import log"},{"line_number":20,"context_line":"from oslo_utils import excutils"},{"line_number":21,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_167e14ae","line":18,"in_reply_to":"1a1ced50_84a6560e","updated":"2017-03-21 01:11:06.000000000","message":"Thanks!  V2 pointed to V3, and some shuffling since.  V3 would be good.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":38,"context_line":"_CINDER_SESSION \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def _get_cinder_session():"},{"line_number":42,"context_line":"    global _CINDER_SESSION"},{"line_number":43,"context_line":"    if not _CINDER_SESSION:"},{"line_number":44,"context_line":"        _CINDER_SESSION \u003d keystone.get_session(\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_1cf75bd4","line":41,"updated":"2017-03-17 19:25:12.000000000","message":"Is there a unit test for this function?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":38,"context_line":"_CINDER_SESSION \u003d None"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def _get_cinder_session():"},{"line_number":42,"context_line":"    global _CINDER_SESSION"},{"line_number":43,"context_line":"    if not _CINDER_SESSION:"},{"line_number":44,"context_line":"        _CINDER_SESSION \u003d keystone.get_session(\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_84ff3666","line":41,"in_reply_to":"1a1ced50_1cf75bd4","updated":"2017-03-20 23:40:30.000000000","message":"there is now :)","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ff2f67150c4b4897abf34866ab221fa4c680046e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    :returns: A cinder client."},{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":"    params \u003d {"},{"line_number":54,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"},{"line_number":55,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":56,"context_line":"        \u0027insecure\u0027: CONF.keystone_authtoken.insecure,"},{"line_number":57,"context_line":"        \u0027cacert\u0027: CONF.keystone_authtoken.certfile,"},{"line_number":58,"context_line":"    }"},{"line_number":59,"context_line":"    # NOTE(TheJulia): While the cinder API has a noauth"},{"line_number":60,"context_line":"    # filter, the python client library is centered around"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_f93a91cc","line":57,"range":{"start_line":54,"start_character":8,"end_line":57,"end_character":51},"updated":"2017-03-20 12:01:25.000000000","message":"These are already registered by keystoneauth here https://github.com/openstack/keystoneauth/blob/edeb84715c80c5299c0f78c872d6507d9093ad82/keystoneauth1/loading/session.py#L164-L181, why use the deprecated ones in case of insecure and cacert, and a custom one in case of timeout?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"198dfde89c5c892b7e331d0b82efcdd96c9c13c4","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"},{"line_number":55,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":56,"context_line":"        \u0027insecure\u0027: CONF.keystone_authtoken.insecure,"},{"line_number":57,"context_line":"        \u0027cacert\u0027: CONF.keystone_authtoken.certfile,"},{"line_number":58,"context_line":"    }"},{"line_number":59,"context_line":"    # NOTE(TheJulia): While the cinder API has a noauth"},{"line_number":60,"context_line":"    # filter, the python client library is centered around"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_4a03800d","line":57,"in_reply_to":"1a1ced50_cacf757d","updated":"2017-03-21 01:11:06.000000000","message":"What joanna said :). We naturally shouldn\u0027t have depreciated ones, but we should  have appropriate knobs for connection timeout/retries/etc.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    :returns: A cinder client."},{"line_number":52,"context_line":"    \"\"\""},{"line_number":53,"context_line":"    params \u003d {"},{"line_number":54,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"},{"line_number":55,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":56,"context_line":"        \u0027insecure\u0027: CONF.keystone_authtoken.insecure,"},{"line_number":57,"context_line":"        \u0027cacert\u0027: CONF.keystone_authtoken.certfile,"},{"line_number":58,"context_line":"    }"},{"line_number":59,"context_line":"    # NOTE(TheJulia): While the cinder API has a noauth"},{"line_number":60,"context_line":"    # filter, the python client library is centered around"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_cacf757d","line":57,"range":{"start_line":54,"start_character":8,"end_line":57,"end_character":51},"in_reply_to":"1a1ced50_f93a91cc","updated":"2017-03-20 23:40:30.000000000","message":"custom timeout allows operators to set timeout specifically for cinder...\nwrt to keystone ones - I\u0027m not sure about it, this client was based on how neutron client is implemented, and actually neutron uses CONF.neutron.certfile, however there\u0027s no trace of certfile option in neutron config section. If you\u0027re sure what is the proper way to handle these params, please let me know. I suspect a bug for neutron should be filed too...","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ff2f67150c4b4897abf34866ab221fa4c680046e","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    \"\"\""},{"line_number":85,"context_line":"    return (volume.status \u003d\u003d AVAILABLE or"},{"line_number":86,"context_line":"            (volume.status \u003d\u003d IN_USE and"},{"line_number":87,"context_line":"                volume.multiattach))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def is_volume_attached(node, volume):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_7254d420","line":87,"updated":"2017-03-20 12:01:25.000000000","message":"Is there some limit of number of attachments? Or we just ignore it for now?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    \"\"\""},{"line_number":85,"context_line":"    return (volume.status \u003d\u003d AVAILABLE or"},{"line_number":86,"context_line":"            (volume.status \u003d\u003d IN_USE and"},{"line_number":87,"context_line":"                volume.multiattach))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def is_volume_attached(node, volume):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_e1853cad","line":87,"in_reply_to":"1a1ced50_7254d420","updated":"2017-03-20 23:40:30.000000000","message":"For now it\u0027s ignored.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"198dfde89c5c892b7e331d0b82efcdd96c9c13c4","unresolved":false,"context_lines":[{"line_number":84,"context_line":"    \"\"\""},{"line_number":85,"context_line":"    return (volume.status \u003d\u003d AVAILABLE or"},{"line_number":86,"context_line":"            (volume.status \u003d\u003d IN_USE and"},{"line_number":87,"context_line":"                volume.multiattach))"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"def is_volume_attached(node, volume):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_ea634cda","line":87,"in_reply_to":"1a1ced50_7254d420","updated":"2017-03-21 01:11:06.000000000","message":"I _think_ the subsystem limit in the kernel is 4096....  but can also be storage system specific.  Some are limited to 250-something targets.  Tl;dr I think we should just ignore it, since we can\u0027t know what the limit is.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ff2f67150c4b4897abf34866ab221fa4c680046e","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        label: {"},{"line_number":138,"context_line":"            \u0027instance_uuid\u0027: node.instance_uuid,"},{"line_number":139,"context_line":"            \u0027last_seen\u0027: datetime.datetime.utcnow().isoformat(),"},{"line_number":140,"context_line":"            \u0027last_action\u0027: action}}"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"def _init_client_for_operations(task):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_a95182da","line":140,"updated":"2017-03-20 12:01:25.000000000","message":"can we infer it from the current volume status? Or it\u0027s not always the case?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"198dfde89c5c892b7e331d0b82efcdd96c9c13c4","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        label: {"},{"line_number":138,"context_line":"            \u0027instance_uuid\u0027: node.instance_uuid,"},{"line_number":139,"context_line":"            \u0027last_seen\u0027: datetime.datetime.utcnow().isoformat(),"},{"line_number":140,"context_line":"            \u0027last_action\u0027: action}}"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"def _init_client_for_operations(task):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_4a862066","line":140,"in_reply_to":"1a1ced50_75274264","updated":"2017-03-21 01:11:06.000000000","message":"This is largely for human reconsillation and last access tracking. The only other tracking data is an instance_uuid, but there many not be an instance uuid in stand_alone mode.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        label: {"},{"line_number":138,"context_line":"            \u0027instance_uuid\u0027: node.instance_uuid,"},{"line_number":139,"context_line":"            \u0027last_seen\u0027: datetime.datetime.utcnow().isoformat(),"},{"line_number":140,"context_line":"            \u0027last_action\u0027: action}}"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"def _init_client_for_operations(task):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_75274264","line":140,"in_reply_to":"1a1ced50_a95182da","updated":"2017-03-20 23:40:30.000000000","message":"I\u0027m not sure. Julia, any thoughts?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ff2f67150c4b4897abf34866ab221fa4c680046e","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    try:"},{"line_number":153,"context_line":"        return get_client()"},{"line_number":154,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":155,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":156,"context_line":"                 \u0027%(uuid)s: %(error)s\u0027) %"},{"line_number":157,"context_line":"               {\u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":158,"context_line":"        LOG.error(msg)"},{"line_number":159,"context_line":"        raise exception.StorageError(msg)"},{"line_number":160,"context_line":"    except Exception as e:"},{"line_number":161,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":162,"context_line":"            LOG.error(_LE(\"Error creating cinder client for node \""},{"line_number":163,"context_line":"                          \"%(node)s: %(error)s\"),"},{"line_number":164,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def attach_volumes(task, volume_list, connector):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_066fe5c5","line":164,"range":{"start_line":155,"start_character":8,"end_line":164,"end_character":54},"updated":"2017-03-20 12:01:25.000000000","message":"Is there any difference in those two exceptions? Why not always do LOG.error with raising StorageError from the except block? So that we don\u0027t raise non-ironic exceptions.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":152,"context_line":"    try:"},{"line_number":153,"context_line":"        return get_client()"},{"line_number":154,"context_line":"    except cinder_exceptions.ClientException as e:"},{"line_number":155,"context_line":"        msg \u003d (_(\u0027Could not initialize cinder client for node \u0027"},{"line_number":156,"context_line":"                 \u0027%(uuid)s: %(error)s\u0027) %"},{"line_number":157,"context_line":"               {\u0027uuid\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":158,"context_line":"        LOG.error(msg)"},{"line_number":159,"context_line":"        raise exception.StorageError(msg)"},{"line_number":160,"context_line":"    except Exception as e:"},{"line_number":161,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":162,"context_line":"            LOG.error(_LE(\"Error creating cinder client for node \""},{"line_number":163,"context_line":"                          \"%(node)s: %(error)s\"),"},{"line_number":164,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def attach_volumes(task, volume_list, connector):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_2aef29b1","line":164,"range":{"start_line":155,"start_character":8,"end_line":164,"end_character":54},"in_reply_to":"1a1ced50_066fe5c5","updated":"2017-03-20 23:40:30.000000000","message":"I guess the idea was to differentiate config-related exception ConfigInvalid, but as it\u0027s still cinder-related, I think it\u0027s a good idea to always throw StorageError.\nDone.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"198dfde89c5c892b7e331d0b82efcdd96c9c13c4","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        with excutils.save_and_reraise_exception():"},{"line_number":162,"context_line":"            LOG.error(_LE(\"Error creating cinder client for node \""},{"line_number":163,"context_line":"                          \"%(node)s: %(error)s\"),"},{"line_number":164,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def attach_volumes(task, volume_list, connector):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_4a3b809c","line":164,"in_reply_to":"1a1ced50_2aef29b1","updated":"2017-03-21 01:11:06.000000000","message":"The idea was exactly what Joanna states.  I\u0027m fine with just throwing StorageError. I feel like there was a good reason to do this, but it is not obvious to me at this point.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8c3224a0e88e9867d8c313edaaca98cbd11d9a64","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def attach_volumes(task, volume_list, connector):"},{"line_number":168,"context_line":"    \"\"\"Attach volumes to a node."},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"       Enumerate through the provided list of volumes and attach the volumes"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_0d3f27b5","line":167,"range":{"start_line":167,"start_character":4,"end_line":167,"end_character":18},"updated":"2017-03-17 21:17:45.000000000","message":"Why is allow_errors not passed to this method?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def attach_volumes(task, volume_list, connector):"},{"line_number":168,"context_line":"    \"\"\"Attach volumes to a node."},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"       Enumerate through the provided list of volumes and attach the volumes"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_95b4bed1","line":167,"range":{"start_line":167,"start_character":4,"end_line":167,"end_character":18},"in_reply_to":"1a1ced50_0d3f27b5","updated":"2017-03-20 23:40:30.000000000","message":"We allow it in detach, because we don\u0027t care that much what happens with the volume that is not needed anymore. This action would result in boot failure, so it should always result in failure.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"198dfde89c5c892b7e331d0b82efcdd96c9c13c4","unresolved":false,"context_lines":[{"line_number":164,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"def attach_volumes(task, volume_list, connector):"},{"line_number":168,"context_line":"    \"\"\"Attach volumes to a node."},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"       Enumerate through the provided list of volumes and attach the volumes"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_ca47701b","line":167,"in_reply_to":"1a1ced50_95b4bed1","updated":"2017-03-21 01:11:06.000000000","message":"+1 to Joanna!","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"ff2f67150c4b4897abf34866ab221fa4c680046e","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            # NOTE(jtaryma): Actual connection info of already connected"},{"line_number":253,"context_line":"            # volume will be provided by nova. Adding this dictionary to"},{"line_number":254,"context_line":"            # \u0027connected\u0027 list so it contains also already connected volumes."},{"line_number":255,"context_line":"            connection \u003d {\u0027data\u0027: {\u0027ironic_volume_uuid\u0027: volume.uuid,"},{"line_number":256,"context_line":"                                   \u0027volume_id\u0027: volume_id},"},{"line_number":257,"context_line":"                          \u0027already_attached\u0027: True}"},{"line_number":258,"context_line":"            connected.append(connection)"},{"line_number":259,"context_line":"            continue"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_06ffe567","line":257,"range":{"start_line":255,"start_character":12,"end_line":257,"end_character":51},"updated":"2017-03-20 12:01:25.000000000","message":"This does not correspond to what is described as the return value.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":252,"context_line":"            # NOTE(jtaryma): Actual connection info of already connected"},{"line_number":253,"context_line":"            # volume will be provided by nova. Adding this dictionary to"},{"line_number":254,"context_line":"            # \u0027connected\u0027 list so it contains also already connected volumes."},{"line_number":255,"context_line":"            connection \u003d {\u0027data\u0027: {\u0027ironic_volume_uuid\u0027: volume.uuid,"},{"line_number":256,"context_line":"                                   \u0027volume_id\u0027: volume_id},"},{"line_number":257,"context_line":"                          \u0027already_attached\u0027: True}"},{"line_number":258,"context_line":"            connected.append(connection)"},{"line_number":259,"context_line":"            continue"},{"line_number":260,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_101a9c6e","line":257,"range":{"start_line":255,"start_character":12,"end_line":257,"end_character":51},"in_reply_to":"1a1ced50_06ffe567","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8c3224a0e88e9867d8c313edaaca98cbd11d9a64","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    return connected"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"def detach_volumes(task, volume_list, connector, allow_errors\u003dFalse):"},{"line_number":330,"context_line":"    \"\"\"Detach a list of volumes from a provided connector detail."},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"       Enumerates through a provided list of volumes and issues"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_a841a10d","line":329,"range":{"start_line":329,"start_character":49,"end_line":329,"end_character":61},"updated":"2017-03-17 21:17:45.000000000","message":"I am not 100% clear on why is this introduced? I see that places where _handle_error is used other than after \"begin_detaching\" the following steps are skipped.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"198dfde89c5c892b7e331d0b82efcdd96c9c13c4","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    return connected"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"def detach_volumes(task, volume_list, connector, allow_errors\u003dFalse):"},{"line_number":330,"context_line":"    \"\"\"Detach a list of volumes from a provided connector detail."},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"       Enumerates through a provided list of volumes and issues"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_ca1cd015","line":329,"in_reply_to":"1a1ced50_a841a10d","updated":"2017-03-21 01:11:06.000000000","message":"Are you asking why detach_volumes is introduced?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"6d6b9a509f456911d46de1219234765e2f18942e","unresolved":false,"context_lines":[{"line_number":326,"context_line":"    return connected"},{"line_number":327,"context_line":""},{"line_number":328,"context_line":""},{"line_number":329,"context_line":"def detach_volumes(task, volume_list, connector, allow_errors\u003dFalse):"},{"line_number":330,"context_line":"    \"\"\"Detach a list of volumes from a provided connector detail."},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"       Enumerates through a provided list of volumes and issues"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_cae0ec2b","line":329,"in_reply_to":"1a1ced50_ca1cd015","updated":"2017-03-22 22:40:52.000000000","message":"Nope, I meant idea of setting \u0027allow_errors\u003dFalse\u0027 because almost everywhere if errors are not raised then we are skipping the next steps, so why not set it to True by default? Joanna answered my other doubt of the reason of having this parameter :)","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8c3224a0e88e9867d8c313edaaca98cbd11d9a64","unresolved":false,"context_lines":[{"line_number":381,"context_line":"            _handle_errors(msg)"},{"line_number":382,"context_line":"            # If we do not raise an exception, we should move on to"},{"line_number":383,"context_line":"            # the next volume since the volume could have been deleted"},{"line_number":384,"context_line":"            # before we we\u0027re attempting to power off the node."},{"line_number":385,"context_line":"            continue"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        if not is_volume_attached(node, volume):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_ed4bab29","line":384,"range":{"start_line":384,"start_character":21,"end_line":384,"end_character":23},"updated":"2017-03-17 21:17:45.000000000","message":"nit:s/we//","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"8c3224a0e88e9867d8c313edaaca98cbd11d9a64","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                     \u0027volume %(vol_id)s from node %(node)s has been \u0027"},{"line_number":427,"context_line":"                     \u0027completed: %(error)s\u0027) %"},{"line_number":428,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":429,"context_line":"            _handle_errors(msg)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        try:"},{"line_number":432,"context_line":"            # Set metadata to assist in volume identification."}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_4d2d9fa6","line":429,"range":{"start_line":429,"start_character":13,"end_line":429,"end_character":31},"updated":"2017-03-17 21:17:45.000000000","message":"Shouldn\u0027t we skip setting of metadata if exception is not raised, otherwise there might be misleading information?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                     \u0027volume %(vol_id)s from node %(node)s has been \u0027"},{"line_number":427,"context_line":"                     \u0027completed: %(error)s\u0027) %"},{"line_number":428,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":429,"context_line":"            _handle_errors(msg)"},{"line_number":430,"context_line":""},{"line_number":431,"context_line":"        try:"},{"line_number":432,"context_line":"            # Set metadata to assist in volume identification."}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_d0aba4d4","line":429,"range":{"start_line":429,"start_character":13,"end_line":429,"end_character":31},"in_reply_to":"1a1ced50_4d2d9fa6","updated":"2017-03-20 23:40:30.000000000","message":"Done.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"74872107ea799fd1255fc613b144b306453daefe","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from oslo_log import log"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from ironic.common import exception"},{"line_number":22,"context_line":"from ironic.common.i18n import _, _LE, _LI, _LW"},{"line_number":23,"context_line":"from ironic.common import keystone"},{"line_number":24,"context_line":"from ironic.conf import CONF"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_e23ef1d8","line":22,"updated":"2017-03-21 16:44:59.000000000","message":"Let\u0027s get rid of all these except for \u0027_\u0027","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4173073bc23872990df91f88a17dc23aa4220bfb","unresolved":false,"context_lines":[{"line_number":19,"context_line":"from oslo_log import log"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"from ironic.common import exception"},{"line_number":22,"context_line":"from ironic.common.i18n import _, _LE, _LI, _LW"},{"line_number":23,"context_line":"from ironic.common import keystone"},{"line_number":24,"context_line":"from ironic.conf import CONF"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_739d71bb","line":22,"in_reply_to":"1a1ced50_e23ef1d8","updated":"2017-03-21 19:47:09.000000000","message":"Done","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"ac95a576dea7bbff19c6b8ba3496b8d658d57cd6","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    # along the URL to python-cinderclient. Otherwise the library"},{"line_number":65,"context_line":"    # handles keystone url autodetection."},{"line_number":66,"context_line":"    if CONF.cinder.url is not None:"},{"line_number":67,"context_line":"        params[\u0027bypass_url\u0027] \u003d CONF.cinder.url"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    if CONF.keystone.region_name is not None:"},{"line_number":70,"context_line":"        params[\u0027region_name\u0027] \u003d CONF.keystone.region_name"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_019239f6","line":67,"range":{"start_line":67,"start_character":15,"end_line":67,"end_character":26},"updated":"2017-03-21 12:53:24.000000000","message":"It should be \u0027endpoint_override\u0027 when we use a session.\n\u0027Bypass_url\u0027 is not used with a session.","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4173073bc23872990df91f88a17dc23aa4220bfb","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    # along the URL to python-cinderclient. Otherwise the library"},{"line_number":65,"context_line":"    # handles keystone url autodetection."},{"line_number":66,"context_line":"    if CONF.cinder.url is not None:"},{"line_number":67,"context_line":"        params[\u0027bypass_url\u0027] \u003d CONF.cinder.url"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    if CONF.keystone.region_name is not None:"},{"line_number":70,"context_line":"        params[\u0027region_name\u0027] \u003d CONF.keystone.region_name"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_a2d79949","line":67,"range":{"start_line":67,"start_character":15,"end_line":67,"end_character":26},"in_reply_to":"1a1ced50_019239f6","updated":"2017-03-21 19:47:09.000000000","message":"endpoint_override is not used in cinder. I believe this is a proper way","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"85abc386e184c83da8f6808e119229292048e8b2","unresolved":false,"context_lines":[{"line_number":295,"context_line":"            try:"},{"line_number":296,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":297,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":298,"context_line":"                LOG.error(_LE(\"Failed to remove reservation of volume\""},{"line_number":299,"context_line":"                              \"%(vol_id)s for node %(node)s\"),"},{"line_number":300,"context_line":"                          {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":301,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_7ed55ab7","line":298,"range":{"start_line":298,"start_character":69,"end_line":298,"end_character":70},"updated":"2017-03-21 04:52:43.000000000","message":"nit: add trailing space","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4173073bc23872990df91f88a17dc23aa4220bfb","unresolved":false,"context_lines":[{"line_number":295,"context_line":"            try:"},{"line_number":296,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":297,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":298,"context_line":"                LOG.error(_LE(\"Failed to remove reservation of volume\""},{"line_number":299,"context_line":"                              \"%(vol_id)s for node %(node)s\"),"},{"line_number":300,"context_line":"                          {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":301,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_fd7930c9","line":298,"range":{"start_line":298,"start_character":69,"end_line":298,"end_character":70},"in_reply_to":"1a1ced50_7ed55ab7","updated":"2017-03-21 19:47:09.000000000","message":"Done","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"85abc386e184c83da8f6808e119229292048e8b2","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        try:"},{"line_number":388,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":389,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":390,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":391,"context_line":"                     \u0027node %(node)s: %(error)s\u0027) %"},{"line_number":392,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":393,"context_line":"            _handle_errors(msg)"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_6d84d6d3","line":390,"range":{"start_line":390,"start_character":19,"end_line":390,"end_character":21},"updated":"2017-03-21 04:52:43.000000000","message":"Ideally _() should be used if we\u0027re raising an exception as in L381, but not when logging as in L378.","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4173073bc23872990df91f88a17dc23aa4220bfb","unresolved":false,"context_lines":[{"line_number":387,"context_line":"        try:"},{"line_number":388,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":389,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":390,"context_line":"            msg \u003d (_(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":391,"context_line":"                     \u0027node %(node)s: %(error)s\u0027) %"},{"line_number":392,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027error\u0027: e})"},{"line_number":393,"context_line":"            _handle_errors(msg)"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_3d80288b","line":390,"range":{"start_line":390,"start_character":19,"end_line":390,"end_character":21},"in_reply_to":"1a1ced50_6d84d6d3","updated":"2017-03-21 19:47:09.000000000","message":"Done","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"96b21ea36ba17f01d28cf435cba822c3ea1f5e3d","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    # along the URL to python-cinderclient. Otherwise the library"},{"line_number":65,"context_line":"    # handles keystone url autodetection."},{"line_number":66,"context_line":"    if CONF.cinder.url is not None:"},{"line_number":67,"context_line":"        params[\u0027bypass_url\u0027] \u003d CONF.cinder.url"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    if CONF.keystone.region_name is not None:"},{"line_number":70,"context_line":"        params[\u0027region_name\u0027] \u003d CONF.keystone.region_name"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a1ced50_ab676db5","line":67,"updated":"2017-03-21 19:53:40.000000000","message":"What about comment in patch set 49?","commit_id":"a7c476e7a5405e50b9433e882da9ae3608f0a6a7"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4a5696268e8e8d715d3eca2cfd9c5ca21935f0f3","unresolved":false,"context_lines":[{"line_number":64,"context_line":"    # along the URL to python-cinderclient. Otherwise the library"},{"line_number":65,"context_line":"    # handles keystone url autodetection."},{"line_number":66,"context_line":"    if CONF.cinder.url is not None:"},{"line_number":67,"context_line":"        params[\u0027bypass_url\u0027] \u003d CONF.cinder.url"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    if CONF.keystone.region_name is not None:"},{"line_number":70,"context_line":"        params[\u0027region_name\u0027] \u003d CONF.keystone.region_name"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a1ced50_71400435","line":67,"in_reply_to":"1a1ced50_ab676db5","updated":"2017-03-21 20:51:02.000000000","message":"replied in patchset 49. However I checked once again and looks like it\u0027s handled in http_client.\nDone","commit_id":"a7c476e7a5405e50b9433e882da9ae3608f0a6a7"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"8a118bb5a7ab5e13ae733119fa3af350611b45b7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    params \u003d {"},{"line_number":53,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"},{"line_number":54,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":55,"context_line":"        \u0027insecure\u0027: CONF.keystone_authtoken.insecure,"},{"line_number":56,"context_line":"        \u0027cacert\u0027: CONF.keystone_authtoken.certfile,"},{"line_number":57,"context_line":"    }"},{"line_number":58,"context_line":"    # NOTE(TheJulia): While the cinder API has a noauth"}],"source_content_type":"text/x-python","patch_set":51,"id":"1a1ced50_ca5c837f","line":55,"range":{"start_line":55,"start_character":20,"end_line":55,"end_character":43},"updated":"2017-03-22 13:54:33.000000000","message":"Any options in CONF.keystone_authtoken are for ironic-api only, and may not be available for ironic-conductor.","commit_id":"dc14eabac353f77772ed3bcbde92b9cfe4952063"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"9edc81403ca568bcf0dd2e492cceb8fbbcce4ef4","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    params \u003d {"},{"line_number":53,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"},{"line_number":54,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":55,"context_line":"        \u0027insecure\u0027: CONF.keystone_authtoken.insecure,"},{"line_number":56,"context_line":"        \u0027cacert\u0027: CONF.keystone_authtoken.certfile,"},{"line_number":57,"context_line":"    }"},{"line_number":58,"context_line":"    # NOTE(TheJulia): While the cinder API has a noauth"}],"source_content_type":"text/x-python","patch_set":51,"id":"1a1ced50_8a644bb9","line":55,"updated":"2017-03-22 13:47:49.000000000","message":"OK, so it seems that keystoneauth loads options dynamically based on auth_type you select in this section. To see all the options in the config sample, you\u0027ll need two more things - add cinder here https://github.com/openstack/ironic/blob/master/devstack/lib/ironic#L1001 and here https://github.com/openstack/ironic/blob/master/ironic/cmd/conductor.py#L38.\nI\u0027m not really sure about retries, but at least for insecure, cacert and timeout, you can already use the cinder section without adding them explicitly, as you already have add_auth_opts in conf/cinder.py (http://logs.openstack.org/89/448489/2/check/gate-tempest-dsvm-ironic-ipa-wholedisk-bios-pxe_snmp-tinyipa-ubuntu-xenial-nv/143dec5/logs/screen-ir-cond.txt.gz#_2017-03-22_10_56_27_356)","commit_id":"dc14eabac353f77772ed3bcbde92b9cfe4952063"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a30f8156dc86cc76bb073d3e3061922237388120","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    params \u003d {"},{"line_number":53,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout,"},{"line_number":54,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":55,"context_line":"        \u0027insecure\u0027: CONF.keystone_authtoken.insecure,"},{"line_number":56,"context_line":"        \u0027cacert\u0027: CONF.keystone_authtoken.certfile,"},{"line_number":57,"context_line":"    }"},{"line_number":58,"context_line":"    # NOTE(TheJulia): While the cinder API has a noauth"}],"source_content_type":"text/x-python","patch_set":51,"id":"1a1ced50_6182c8c9","line":55,"range":{"start_line":55,"start_character":20,"end_line":55,"end_character":43},"in_reply_to":"1a1ced50_ca5c837f","updated":"2017-03-22 18:24:46.000000000","message":"CONF.cinder.insecure and CONF.cinder.certfile used instead\nAuth options are already populated in cinder config group by auth.register_auth_opts(conf, \u0027cinder\u0027).","commit_id":"dc14eabac353f77772ed3bcbde92b9cfe4952063"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"# under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"import datetime"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from cinderclient import exceptions as cinder_exceptions"},{"line_number":18,"context_line":"from cinderclient.v3 import client as client"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_56e02bcd","line":15,"updated":"2017-03-22 20:16:42.000000000","message":"nit: You could use this if you prefer: https://docs.openstack.org/developer/oslo.utils/api/timeutils.html#oslo_utils.timeutils.utcnow\n\nThat would make mocking for tests easier (see test_cinder.py comment)","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    :returns: A cinder client."},{"line_number":51,"context_line":"    \"\"\""},{"line_number":52,"context_line":"    params \u003d {"},{"line_number":53,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout or CONF.cinder.timeout,"},{"line_number":54,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":55,"context_line":"        \u0027insecure\u0027: CONF.cinder.insecure,"},{"line_number":56,"context_line":"        \u0027cacert\u0027: CONF.cinder.certfile,"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_4766bc51","line":53,"range":{"start_line":53,"start_character":46,"end_line":53,"end_character":65},"updated":"2017-03-22 20:16:42.000000000","message":"Where does this come from? I only see [cinder]/url_timeout in the sample config.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    :returns: A cinder client."},{"line_number":51,"context_line":"    \"\"\""},{"line_number":52,"context_line":"    params \u003d {"},{"line_number":53,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout or CONF.cinder.timeout,"},{"line_number":54,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":55,"context_line":"        \u0027insecure\u0027: CONF.cinder.insecure,"},{"line_number":56,"context_line":"        \u0027cacert\u0027: CONF.cinder.certfile,"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_b614ff4c","line":53,"range":{"start_line":53,"start_character":46,"end_line":53,"end_character":65},"in_reply_to":"1a1ced50_4766bc51","updated":"2017-03-23 00:56:17.000000000","message":"timeout, certfile and insecure should come from auth section (appended in conf/cinder.py). I will regenerate the config and update the way of retrieving opts.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    params \u003d {"},{"line_number":53,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout or CONF.cinder.timeout,"},{"line_number":54,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":55,"context_line":"        \u0027insecure\u0027: CONF.cinder.insecure,"},{"line_number":56,"context_line":"        \u0027cacert\u0027: CONF.cinder.certfile,"},{"line_number":57,"context_line":"    }"},{"line_number":58,"context_line":"    # NOTE(TheJulia): While the cinder API has a noauth"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_27caa01b","line":55,"updated":"2017-03-22 20:16:42.000000000","message":"Where does this come from? I don\u0027t see [cinder]/insecure in the ironic sample config.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":53,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout or CONF.cinder.timeout,"},{"line_number":54,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":55,"context_line":"        \u0027insecure\u0027: CONF.cinder.insecure,"},{"line_number":56,"context_line":"        \u0027cacert\u0027: CONF.cinder.certfile,"},{"line_number":57,"context_line":"    }"},{"line_number":58,"context_line":"    # NOTE(TheJulia): While the cinder API has a noauth"},{"line_number":59,"context_line":"    # filter, the python client library is centered around"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_a7de90da","line":56,"updated":"2017-03-22 20:16:42.000000000","message":"Ditto here, I don\u0027t see certfile in the sample config","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        return get_client()"},{"line_number":153,"context_line":"    except Exception as e:"},{"line_number":154,"context_line":"        LOG.error("},{"line_number":155,"context_line":"            \u0027Could not initialize cinder client for node %(uuid)s: %(err)s\u0027,"},{"line_number":156,"context_line":"            {\u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":157,"context_line":"        raise exception.StorageError("},{"line_number":158,"context_line":"            _(\u0027Could not initialize cinder client for node %(uuid)s: %(err)s\u0027)"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_e705e813","line":155,"range":{"start_line":155,"start_character":12,"end_line":155,"end_character":75},"updated":"2017-03-22 20:16:42.000000000","message":"nit: you can reuse this string in L158","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        return get_client()"},{"line_number":153,"context_line":"    except Exception as e:"},{"line_number":154,"context_line":"        LOG.error("},{"line_number":155,"context_line":"            \u0027Could not initialize cinder client for node %(uuid)s: %(err)s\u0027,"},{"line_number":156,"context_line":"            {\u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":157,"context_line":"        raise exception.StorageError("},{"line_number":158,"context_line":"            _(\u0027Could not initialize cinder client for node %(uuid)s: %(err)s\u0027)"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_25e0d395","line":155,"range":{"start_line":155,"start_character":12,"end_line":155,"end_character":75},"in_reply_to":"1a1ced50_e705e813","updated":"2017-03-23 00:56:17.000000000","message":"Unfortunately this is not possible. Please see my email wrt translation removal to openstack mail list.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                 driver that the volume is configured for, however"},{"line_number":204,"context_line":"                 the \u0027driver_volume_type\u0027 key should not be relied upon"},{"line_number":205,"context_line":"                 as it is a free-form value returned by the driver."},{"line_number":206,"context_line":"                 The accompanying \u0027data\u0027 key contains the actual target"},{"line_number":207,"context_line":"                 details which will indicate either target WWNs and a LUN"},{"line_number":208,"context_line":"                 or a target portal and IQN. Again, each driver may return"},{"line_number":209,"context_line":"                 somewhat different data although the same keys are used"},{"line_number":210,"context_line":"                 if the target is FC or iSCSI, so any logic should be based"},{"line_number":211,"context_line":"                 upon the returned contents. For already attached  volumes,"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_829b4265","line":208,"range":{"start_line":206,"start_character":17,"end_line":208,"end_character":44},"updated":"2017-03-22 20:16:42.000000000","message":"nit: I think it\u0027d be nice if this docstring outlined what is always returned in \"data\". For example, volume_id and ironic_volume_id will always be there, if I\u0027m reading the below code correctly.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":203,"context_line":"                 driver that the volume is configured for, however"},{"line_number":204,"context_line":"                 the \u0027driver_volume_type\u0027 key should not be relied upon"},{"line_number":205,"context_line":"                 as it is a free-form value returned by the driver."},{"line_number":206,"context_line":"                 The accompanying \u0027data\u0027 key contains the actual target"},{"line_number":207,"context_line":"                 details which will indicate either target WWNs and a LUN"},{"line_number":208,"context_line":"                 or a target portal and IQN. Again, each driver may return"},{"line_number":209,"context_line":"                 somewhat different data although the same keys are used"},{"line_number":210,"context_line":"                 if the target is FC or iSCSI, so any logic should be based"},{"line_number":211,"context_line":"                 upon the returned contents. For already attached  volumes,"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_600ab98b","line":208,"range":{"start_line":206,"start_character":17,"end_line":208,"end_character":44},"in_reply_to":"1a1ced50_829b4265","updated":"2017-03-23 00:56:17.000000000","message":"Done","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                 or a target portal and IQN. Again, each driver may return"},{"line_number":209,"context_line":"                 somewhat different data although the same keys are used"},{"line_number":210,"context_line":"                 if the target is FC or iSCSI, so any logic should be based"},{"line_number":211,"context_line":"                 upon the returned contents. For already attached  volumes,"},{"line_number":212,"context_line":"                 the structure contains \u0027already_attached\u0027: True key-value"},{"line_number":213,"context_line":"                 pair. In such case, connection info for the node is already"},{"line_number":214,"context_line":"                 in the database, \u0027data\u0027 structure contains only basic"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_e24a3654","line":211,"range":{"start_line":211,"start_character":65,"end_line":211,"end_character":66},"updated":"2017-03-22 20:16:42.000000000","message":"nit: extra space","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":208,"context_line":"                 or a target portal and IQN. Again, each driver may return"},{"line_number":209,"context_line":"                 somewhat different data although the same keys are used"},{"line_number":210,"context_line":"                 if the target is FC or iSCSI, so any logic should be based"},{"line_number":211,"context_line":"                 upon the returned contents. For already attached  volumes,"},{"line_number":212,"context_line":"                 the structure contains \u0027already_attached\u0027: True key-value"},{"line_number":213,"context_line":"                 pair. In such case, connection info for the node is already"},{"line_number":214,"context_line":"                 in the database, \u0027data\u0027 structure contains only basic"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_a5468378","line":211,"range":{"start_line":211,"start_character":65,"end_line":211,"end_character":66},"in_reply_to":"1a1ced50_e24a3654","updated":"2017-03-23 00:56:17.000000000","message":"Done","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":254,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":255,"context_line":"            LOG.error("},{"line_number":256,"context_line":"                \u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":257,"context_line":"                \u0027%(uuid)s: %(err)s\u0027,"},{"line_number":258,"context_line":"                {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":259,"context_line":"            raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_c2ad3aea","line":256,"updated":"2017-03-22 20:16:42.000000000","message":"nit: this string can be reused on L260","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":254,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":255,"context_line":"            LOG.error("},{"line_number":256,"context_line":"                \u0027Could not get volume %(vol_id)s from cinder for node \u0027"},{"line_number":257,"context_line":"                \u0027%(uuid)s: %(err)s\u0027,"},{"line_number":258,"context_line":"                {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":259,"context_line":"            raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_25f7f359","line":256,"in_reply_to":"1a1ced50_c2ad3aea","updated":"2017-03-23 00:56:17.000000000","message":"ditto","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        try:"},{"line_number":278,"context_line":"            client.volumes.reserve(volume_id)"},{"line_number":279,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":280,"context_line":"            LOG.error(\u0027Could not reserve volume %(vol_id)s for node \u0027"},{"line_number":281,"context_line":"                      \u0027%(node)s: %(err)s)\u0027,"},{"line_number":282,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":283,"context_line":"            raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_c2e53a09","line":280,"updated":"2017-03-22 20:16:42.000000000","message":"nit: this string can be reused on L284","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        try:"},{"line_number":278,"context_line":"            client.volumes.reserve(volume_id)"},{"line_number":279,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":280,"context_line":"            LOG.error(\u0027Could not reserve volume %(vol_id)s for node \u0027"},{"line_number":281,"context_line":"                      \u0027%(node)s: %(err)s)\u0027,"},{"line_number":282,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":283,"context_line":"            raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_45986f1c","line":280,"in_reply_to":"1a1ced50_c2e53a09","updated":"2017-03-23 00:56:17.000000000","message":"ditto","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                LOG.error(\u0027Failed to remove reservation of volume \u0027"},{"line_number":305,"context_line":"                          \u0027%(vol_id)s for node %(node)s\u0027,"},{"line_number":306,"context_line":"                          {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":307,"context_line":"            raise exception.StorageError("},{"line_number":308,"context_line":"                _(\u0027Could not initialize storage attachment for volume \u0027"},{"line_number":309,"context_line":"                  \u0027%(vol_id)s to node %(node)s: %(err)s\u0027) %"},{"line_number":310,"context_line":"                {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_22344efa","line":307,"updated":"2017-03-22 20:16:42.000000000","message":"To be clear: we don\u0027t want to attempt to attach *any* remaining volumes after 1 failure?\n\nI\u0027m a bit concerned about discrepancies between failure behavior in the following cases:\n\nCase 1: User tries to attach 10 volumes, 9 succeed, 10th fails\n\nCase 2: User tries to attach 10 volumes, 4 succeed, 5th fails, so next 5 are not attempted\n\nCase 3: User tries to attach 10 volumes, first fails, so no more are attempted. If attempted 1 at a time, every odd volume fails.\n\nIn cases 1 and 2, there are lingering attachments that the user has to clean up, which is fine, but it may be difficult to figure out which set of volumes are problematic without attempting 1 at a time.\n\nIn case 3, if the user wants to attach any that will succeed (best effort), they\u0027ll have to do 1 at a time and check each individually.\n\nI think it might be better if we at least attempt to attach all of them (best effort), but please correct me if that\u0027s silly (or goes against the accepted spec) as I have not really used Cinder much.\n\nThen maybe have the caller deal with any failures (e.g. by surfacing the info to the API) by setting some \"failed\" key on the list of returned volume dicts.\n\nJust a suggestion - I will not be a primary consumer of the feature, so I\u0027d like to hear what others think.\n\nLooking below to the detach volume logic, maybe even have something like allow_errors as a parameter, so we could have both ways to handle failures.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":304,"context_line":"                LOG.error(\u0027Failed to remove reservation of volume \u0027"},{"line_number":305,"context_line":"                          \u0027%(vol_id)s for node %(node)s\u0027,"},{"line_number":306,"context_line":"                          {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":307,"context_line":"            raise exception.StorageError("},{"line_number":308,"context_line":"                _(\u0027Could not initialize storage attachment for volume \u0027"},{"line_number":309,"context_line":"                  \u0027%(vol_id)s to node %(node)s: %(err)s\u0027) %"},{"line_number":310,"context_line":"                {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_00fca53c","line":307,"in_reply_to":"1a1ced50_22344efa","updated":"2017-03-23 00:56:17.000000000","message":"This is a great question, Mario. \nThe same list of ids that was passed to attach can be passed to detach in order to perform cleanup (and I believe this is the proper way to do it in the driver in case of failure), so this shouldn\u0027t be an issue. Exception message contains info on failed volume, so it is possible to determine which volume failed from the user perspective.\nSince we want to boot from that volume, I believe there\u0027s no point in allowing errors as it may result in boot failure (please see my comment to previous patch). Providing user with a prosthesis of what he/she requested instead of failing to indicate that something is impossible also does not look good to me.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            # been completed, which moves the volume to the"},{"line_number":322,"context_line":"            # \u0027attached\u0027 state. This action also sets a mountpoint"},{"line_number":323,"context_line":"            # for the volume, if known. In our use case, there is"},{"line_number":324,"context_line":"            # no way for us to know what the mountpoint inside of"},{"line_number":325,"context_line":"            # the operating system, thus we send None."},{"line_number":326,"context_line":"            client.volumes.attach(volume_id, instance_uuid, None)"},{"line_number":327,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_e22eb6a3","line":324,"range":{"start_line":324,"start_character":45,"end_line":324,"end_character":56},"updated":"2017-03-22 20:16:42.000000000","message":"nit: s/mountpoint/mountpoint is","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":321,"context_line":"            # been completed, which moves the volume to the"},{"line_number":322,"context_line":"            # \u0027attached\u0027 state. This action also sets a mountpoint"},{"line_number":323,"context_line":"            # for the volume, if known. In our use case, there is"},{"line_number":324,"context_line":"            # no way for us to know what the mountpoint inside of"},{"line_number":325,"context_line":"            # the operating system, thus we send None."},{"line_number":326,"context_line":"            client.volumes.attach(volume_id, instance_uuid, None)"},{"line_number":327,"context_line":""}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_809ed504","line":324,"range":{"start_line":324,"start_character":45,"end_line":324,"end_character":56},"in_reply_to":"1a1ced50_e22eb6a3","updated":"2017-03-23 00:56:17.000000000","message":"Done","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":329,"context_line":"            LOG.error("},{"line_number":330,"context_line":"                \u0027Could not inform cinder that the attachment for volume \u0027"},{"line_number":331,"context_line":"                \u0027%(vol_id)s for node %(node)s has been completed: %(err)s\u0027,"},{"line_number":332,"context_line":"                {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":333,"context_line":"            raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_421eaa70","line":330,"updated":"2017-03-22 20:16:42.000000000","message":"nit: this string can be reused on L334","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":327,"context_line":""},{"line_number":328,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":329,"context_line":"            LOG.error("},{"line_number":330,"context_line":"                \u0027Could not inform cinder that the attachment for volume \u0027"},{"line_number":331,"context_line":"                \u0027%(vol_id)s for node %(node)s has been completed: %(err)s\u0027,"},{"line_number":332,"context_line":"                {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":333,"context_line":"            raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_c08c4ddc","line":330,"in_reply_to":"1a1ced50_421eaa70","updated":"2017-03-23 00:56:17.000000000","message":"ditto :(","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        try:"},{"line_number":398,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":399,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":400,"context_line":"            _handle_errors(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":401,"context_line":"                           \u0027node %(node)s: %(err)s\u0027 %"},{"line_number":402,"context_line":"                           {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e},"},{"line_number":403,"context_line":"                           _(\u0027Could not get volume %(vol_id)s from cinder for \u0027"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_56774b9f","line":400,"updated":"2017-03-22 20:16:42.000000000","message":"This string can be reused. Is there a reason for not reusing these that I\u0027m missing (maybe a limitation of the _() function)?\n\nI\u0027ll leave out other string reusability comments for the rest of the patch set.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        try:"},{"line_number":398,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":399,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":400,"context_line":"            _handle_errors(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":401,"context_line":"                           \u0027node %(node)s: %(err)s\u0027 %"},{"line_number":402,"context_line":"                           {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e},"},{"line_number":403,"context_line":"                           _(\u0027Could not get volume %(vol_id)s from cinder for \u0027"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_e08789b2","line":400,"in_reply_to":"1a1ced50_56774b9f","updated":"2017-03-23 00:56:17.000000000","message":"ditto :(","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"aba7d0852d4b23da97231fd3b30e149c72d5c3ec","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    try:"},{"line_number":152,"context_line":"        return get_client()"},{"line_number":153,"context_line":"    except Exception as e:"},{"line_number":154,"context_line":"        LOG.error("},{"line_number":155,"context_line":"            \u0027Could not initialize cinder client for node %(uuid)s: %(err)s\u0027,"},{"line_number":156,"context_line":"            {\u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":157,"context_line":"        raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":53,"id":"ffe62b97_5f467223","line":154,"updated":"2017-03-27 18:10:20.000000000","message":"I think the consensus in the email list was to translate the message and then use the translation in both the log message and when raising the exception.","commit_id":"83ab8b0261b8ba91c62901bb041f9d2bfbaa9925"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"aba7d0852d4b23da97231fd3b30e149c72d5c3ec","unresolved":false,"context_lines":[{"line_number":279,"context_line":"        try:"},{"line_number":280,"context_line":"            client.volumes.reserve(volume_id)"},{"line_number":281,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":282,"context_line":"            LOG.error(\u0027Could not reserve volume %(vol_id)s for node \u0027"},{"line_number":283,"context_line":"                      \u0027%(node)s: %(err)s)\u0027,"},{"line_number":284,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":285,"context_line":"            raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":53,"id":"ffe62b97_1f50ead3","line":282,"updated":"2017-03-27 18:10:20.000000000","message":"Same as L154","commit_id":"83ab8b0261b8ba91c62901bb041f9d2bfbaa9925"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"aba7d0852d4b23da97231fd3b30e149c72d5c3ec","unresolved":false,"context_lines":[{"line_number":303,"context_line":"            try:"},{"line_number":304,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":305,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":306,"context_line":"                LOG.error(\u0027Failed to remove reservation of volume \u0027"},{"line_number":307,"context_line":"                          \u0027%(vol_id)s for node %(node)s\u0027,"},{"line_number":308,"context_line":"                          {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":309,"context_line":"            raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":53,"id":"ffe62b97_ff60a6a7","line":306,"updated":"2017-03-27 18:10:20.000000000","message":"Same as L154","commit_id":"83ab8b0261b8ba91c62901bb041f9d2bfbaa9925"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"aba7d0852d4b23da97231fd3b30e149c72d5c3ec","unresolved":false,"context_lines":[{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":331,"context_line":"            LOG.error("},{"line_number":332,"context_line":"                \u0027Could not inform cinder that the attachment for volume \u0027"},{"line_number":333,"context_line":"                \u0027%(vol_id)s for node %(node)s has been completed: %(err)s\u0027,"},{"line_number":334,"context_line":"                {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":335,"context_line":"            raise exception.StorageError("}],"source_content_type":"text/x-python","patch_set":53,"id":"ffe62b97_9f5d1aeb","line":332,"updated":"2017-03-27 18:10:20.000000000","message":"Same as L154","commit_id":"83ab8b0261b8ba91c62901bb041f9d2bfbaa9925"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"a8fa82c6b0610ecf6eda1a9ffb5120e90726953b","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    :returns: A cinder client."},{"line_number":51,"context_line":"    \"\"\""},{"line_number":52,"context_line":"    params \u003d {"},{"line_number":53,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout or CONF.cinder.timeout,"},{"line_number":54,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":55,"context_line":"        \u0027insecure\u0027: CONF.cinder.insecure,"}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_520099ab","line":52,"updated":"2017-03-28 06:30:24.000000000","message":"We don\u0027t need to pass these parameters except for retries to cinderclient when we use a session. These parameters are loaded to the session when it is created[1][2].\n\n[1] https://github.com/openstack/ironic/blob/d10b102ba777f4989f641940ab6b95dd2b1e7d81/ironic/common/keystone.py#L80\n[2] https://github.com/openstack/keystoneauth/blob/2962d9d871225e92cf8c02219872a904fcdaed11/keystoneauth1/loading/session.py#L213","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"5773266dcc41da6605ddf272f235c5db5105f8ec","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    :returns: A cinder client."},{"line_number":51,"context_line":"    \"\"\""},{"line_number":52,"context_line":"    params \u003d {"},{"line_number":53,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout or CONF.cinder.timeout,"},{"line_number":54,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":55,"context_line":"        \u0027insecure\u0027: CONF.cinder.insecure,"}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_4e1a14cc","line":52,"in_reply_to":"ffe62b97_520099ab","updated":"2017-03-28 16:14:21.000000000","message":"Done","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"4accfac5adf6fcb79497717cf650e59cfb3ad9f8","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    \"\"\""},{"line_number":52,"context_line":"    params \u003d {"},{"line_number":53,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout or CONF.cinder.timeout,"},{"line_number":54,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":55,"context_line":"        \u0027insecure\u0027: CONF.cinder.insecure,"},{"line_number":56,"context_line":"        \u0027cacert\u0027: CONF.cinder.certfile,"},{"line_number":57,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_a911b354","line":54,"range":{"start_line":54,"start_character":9,"end_line":54,"end_character":16},"updated":"2017-03-28 07:41:20.000000000","message":"For retrying connection, we should pass \u0027connect_retries\u0027[1].\nIn SessionClient of cinderclient, \u0027retries\u0027 is used to retry only when quota is exceeded[2][3][4], which doesn\u0027t seem to happen in ironic use case.\n\n[1] https://github.com/openstack/keystoneauth/blob/edeb84715c80c5299c0f78c872d6507d9093ad82/keystoneauth1/session.py#L605\n[2] https://github.com/openstack/python-cinderclient/blob/48d7e3540ff88c571193617da53afd22dc3df345/cinderclient/client.py#L161\n[3] https://github.com/openstack/python-cinderclient/blob/48d7e3540ff88c571193617da53afd22dc3df345/cinderclient/exceptions.py#L175\n[4] https://github.com/openstack/cinder/blob/5d10ed5367a1d9ff4a7e3b9ffe2c033d77605299/cinder/exception.py#L591","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"5773266dcc41da6605ddf272f235c5db5105f8ec","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    \"\"\""},{"line_number":52,"context_line":"    params \u003d {"},{"line_number":53,"context_line":"        \u0027timeout\u0027: CONF.cinder.url_timeout or CONF.cinder.timeout,"},{"line_number":54,"context_line":"        \u0027retries\u0027: CONF.cinder.retries,"},{"line_number":55,"context_line":"        \u0027insecure\u0027: CONF.cinder.insecure,"},{"line_number":56,"context_line":"        \u0027cacert\u0027: CONF.cinder.certfile,"},{"line_number":57,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_c9b5fe33","line":54,"range":{"start_line":54,"start_character":9,"end_line":54,"end_character":16},"in_reply_to":"ffe62b97_a911b354","updated":"2017-03-28 16:14:21.000000000","message":"Done","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"a8fa82c6b0610ecf6eda1a9ffb5120e90726953b","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            try:"},{"line_number":297,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":298,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":299,"context_line":"                LOG.error(\u0027Failed to remove reservation of volume \u0027"},{"line_number":300,"context_line":"                          \u0027%(vol_id)s for node %(node)s\u0027,"},{"line_number":301,"context_line":"                          {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":302,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_cd11aa06","line":299,"updated":"2017-03-28 06:30:24.000000000","message":"Isn\u0027t it necessary to log a content of the exception?","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"5773266dcc41da6605ddf272f235c5db5105f8ec","unresolved":false,"context_lines":[{"line_number":296,"context_line":"            try:"},{"line_number":297,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":298,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":299,"context_line":"                LOG.error(\u0027Failed to remove reservation of volume \u0027"},{"line_number":300,"context_line":"                          \u0027%(vol_id)s for node %(node)s\u0027,"},{"line_number":301,"context_line":"                          {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":302,"context_line":"            raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_6934b293","line":299,"in_reply_to":"ffe62b97_cd11aa06","updated":"2017-03-28 16:14:21.000000000","message":"The logic here is that we can\u0027t initialize the connection, which is described in `msg`, then we try to perform a cleanup in a form of reservation removal, we inform that it wasn\u0027t successful in this log entry, and fail with `msg` as this is the actual root cause of a failure.","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"a8fa82c6b0610ecf6eda1a9ffb5120e90726953b","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":335,"context_line":"            LOG.warning(\u0027Failed to update volume metadata for volume \u0027"},{"line_number":336,"context_line":"                        \u0027%(vol_id)s for node %(node)s: %(err)s \u0027,"},{"line_number":337,"context_line":"                        {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":338,"context_line":"    return connected"},{"line_number":339,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_83a13197","line":336,"range":{"start_line":336,"start_character":62,"end_line":336,"end_character":63},"updated":"2017-03-28 06:30:24.000000000","message":"nit: extra space","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"5773266dcc41da6605ddf272f235c5db5105f8ec","unresolved":false,"context_lines":[{"line_number":333,"context_line":""},{"line_number":334,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":335,"context_line":"            LOG.warning(\u0027Failed to update volume metadata for volume \u0027"},{"line_number":336,"context_line":"                        \u0027%(vol_id)s for node %(node)s: %(err)s \u0027,"},{"line_number":337,"context_line":"                        {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":338,"context_line":"    return connected"},{"line_number":339,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_89ea560c","line":336,"range":{"start_line":336,"start_character":62,"end_line":336,"end_character":63},"in_reply_to":"ffe62b97_83a13197","updated":"2017-03-28 16:14:21.000000000","message":"Done","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"a8fa82c6b0610ecf6eda1a9ffb5120e90726953b","unresolved":false,"context_lines":[{"line_number":405,"context_line":"            client.volumes.begin_detaching(volume_id)"},{"line_number":406,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":407,"context_line":"            _handle_errors(_(\u0027Could not request detach for volume %(vol_id)s \u0027"},{"line_number":408,"context_line":"                             \u0027from cinder for node %(node)s. %(err)s\u0027) %"},{"line_number":409,"context_line":"                           {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e}"},{"line_number":410,"context_line":"                           )"},{"line_number":411,"context_line":"            # NOTE(jtaryma): This operation only updates the volume status, so"}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_c31059ab","line":408,"range":{"start_line":408,"start_character":59,"end_line":408,"end_character":60},"updated":"2017-03-28 06:30:24.000000000","message":"nit: \u0027:\u0027 would be better for consistency.","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"5773266dcc41da6605ddf272f235c5db5105f8ec","unresolved":false,"context_lines":[{"line_number":405,"context_line":"            client.volumes.begin_detaching(volume_id)"},{"line_number":406,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":407,"context_line":"            _handle_errors(_(\u0027Could not request detach for volume %(vol_id)s \u0027"},{"line_number":408,"context_line":"                             \u0027from cinder for node %(node)s. %(err)s\u0027) %"},{"line_number":409,"context_line":"                           {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e}"},{"line_number":410,"context_line":"                           )"},{"line_number":411,"context_line":"            # NOTE(jtaryma): This operation only updates the volume status, so"}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_e91fa205","line":408,"range":{"start_line":408,"start_character":59,"end_line":408,"end_character":60},"in_reply_to":"ffe62b97_c31059ab","updated":"2017-03-28 16:14:21.000000000","message":"Done","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"e7834c02e4ed6106b7113d62937d8475f4f8f406","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    :returns: Boolean if volume is available."},{"line_number":80,"context_line":"    \"\"\""},{"line_number":81,"context_line":"    return (volume.status \u003d\u003d AVAILABLE or"},{"line_number":82,"context_line":"            (volume.status \u003d\u003d IN_USE and"},{"line_number":83,"context_line":"                volume.multiattach))"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_717250af","line":82,"updated":"2017-03-28 20:25:49.000000000","message":"In TODO at L30 we say that going to support multiattach volumes at some point, and here we mark this volume as available it confusing.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    :returns: Boolean if volume is available."},{"line_number":80,"context_line":"    \"\"\""},{"line_number":81,"context_line":"    return (volume.status \u003d\u003d AVAILABLE or"},{"line_number":82,"context_line":"            (volume.status \u003d\u003d IN_USE and"},{"line_number":83,"context_line":"                volume.multiattach))"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_5c9be064","line":82,"in_reply_to":"ffe62b97_717250af","updated":"2017-03-28 21:48:14.000000000","message":"\u0027in-use\u0027 and \u0027available\u0027 are the only states that allow attach in case of multi-attach, so I\u0027m removing the comment since it\u0027s not valid anymore.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"e7834c02e4ed6106b7113d62937d8475f4f8f406","unresolved":false,"context_lines":[{"line_number":144,"context_line":"    :returns: A cinder client."},{"line_number":145,"context_line":"    :raises: StorageError If an exception is encountered creating the client."},{"line_number":146,"context_line":"    \"\"\""},{"line_number":147,"context_line":"    node \u003d task.node"},{"line_number":148,"context_line":"    try:"},{"line_number":149,"context_line":"        return get_client()"},{"line_number":150,"context_line":"    except Exception as e:"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_1152e4de","line":147,"updated":"2017-03-28 20:25:49.000000000","message":"we already may have a token here, might be reuse it? It shouldn\u0027t require admin operations right?","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":144,"context_line":"    :returns: A cinder client."},{"line_number":145,"context_line":"    :raises: StorageError If an exception is encountered creating the client."},{"line_number":146,"context_line":"    \"\"\""},{"line_number":147,"context_line":"    node \u003d task.node"},{"line_number":148,"context_line":"    try:"},{"line_number":149,"context_line":"        return get_client()"},{"line_number":150,"context_line":"    except Exception as e:"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_863eb588","line":147,"in_reply_to":"ffe62b97_1152e4de","updated":"2017-03-28 21:48:14.000000000","message":"I\u0027ll cite Yuriy\u0027s comment from patchset 44:\n\"Better do not use token from context, client can be instantiated with session. Token from context can be expired in the near future and it can not be present for periodical task.\"","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"e7834c02e4ed6106b7113d62937d8475f4f8f406","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                     \u0027%(uuid)s: %(err)s\u0027) %"},{"line_number":254,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":255,"context_line":"            LOG.error(msg)"},{"line_number":256,"context_line":"            raise exception.StorageError(msg)"},{"line_number":257,"context_line":"        if is_volume_attached(node, volume):"},{"line_number":258,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already attached to node \u0027"},{"line_number":259,"context_line":"                      \u0027%(uuid)s. Skipping attachment.\u0027,"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_837b4779","line":256,"updated":"2017-03-28 20:25:49.000000000","message":"so do we want to break attachment here? For example if we requested to attach 10 volumes, but failed on 1st it means that all volumes will not be attached. Might be still try to attach all volumes and warn about failed?","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"47e2afa4c4ed306f0ba41a194d5e72e32df40b26","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                     \u0027%(uuid)s: %(err)s\u0027) %"},{"line_number":254,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":255,"context_line":"            LOG.error(msg)"},{"line_number":256,"context_line":"            raise exception.StorageError(msg)"},{"line_number":257,"context_line":"        if is_volume_attached(node, volume):"},{"line_number":258,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already attached to node \u0027"},{"line_number":259,"context_line":"                      \u0027%(uuid)s. Skipping attachment.\u0027,"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_fcc2b433","line":256,"in_reply_to":"ffe62b97_837b4779","updated":"2017-03-28 21:48:51.000000000","message":"I think this is right, because we can\u0027t deploy the node as requested, so we fail it out.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                     \u0027%(uuid)s: %(err)s\u0027) %"},{"line_number":254,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":255,"context_line":"            LOG.error(msg)"},{"line_number":256,"context_line":"            raise exception.StorageError(msg)"},{"line_number":257,"context_line":"        if is_volume_attached(node, volume):"},{"line_number":258,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is already attached to node \u0027"},{"line_number":259,"context_line":"                      \u0027%(uuid)s. Skipping attachment.\u0027,"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_c606fdce","line":256,"in_reply_to":"ffe62b97_837b4779","updated":"2017-03-28 21:48:14.000000000","message":"We want to break attachment and let the driver do the cleanup. If one volume failed to attach it basically means that attachment failed and a node may not boot, so we fail fast here.\nMario asked about the same thing couple of patches ago, we discussed it in the meeting afterwards and the decision was to fail.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"e7834c02e4ed6106b7113d62937d8475f4f8f406","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            # Provide connector information to cinder"},{"line_number":282,"context_line":"            connection \u003d client.volumes.initialize_connection(volume_id,"},{"line_number":283,"context_line":"                                                              connector)"},{"line_number":284,"context_line":"            if \u0027volume_id\u0027 not in connection[\u0027data\u0027]:"},{"line_number":285,"context_line":"                connection[\u0027data\u0027][\u0027volume_id\u0027] \u003d volume_id"},{"line_number":286,"context_line":"            connected.append(connection)"},{"line_number":287,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_c3a26fae","line":284,"updated":"2017-03-28 20:25:49.000000000","message":"when this is possible?","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            # Provide connector information to cinder"},{"line_number":282,"context_line":"            connection \u003d client.volumes.initialize_connection(volume_id,"},{"line_number":283,"context_line":"                                                              connector)"},{"line_number":284,"context_line":"            if \u0027volume_id\u0027 not in connection[\u0027data\u0027]:"},{"line_number":285,"context_line":"                connection[\u0027data\u0027][\u0027volume_id\u0027] \u003d volume_id"},{"line_number":286,"context_line":"            connected.append(connection)"},{"line_number":287,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_66861116","line":284,"in_reply_to":"ffe62b97_c3a26fae","updated":"2017-03-28 21:48:14.000000000","message":"Contents of connection_info dict are driver-specific, so  volume_id is not necessarily in it. Hence we fill the fields that we know of.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"47e2afa4c4ed306f0ba41a194d5e72e32df40b26","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            if \u0027volume_id\u0027 not in connection[\u0027data\u0027]:"},{"line_number":285,"context_line":"                connection[\u0027data\u0027][\u0027volume_id\u0027] \u003d volume_id"},{"line_number":286,"context_line":"            connected.append(connection)"},{"line_number":287,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"},{"line_number":288,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":289,"context_line":"            msg \u003d (_(\u0027Could not initialize storage attachment for volume \u0027"},{"line_number":290,"context_line":"                     \u0027%(vol_id)s to node %(node)s: %(err)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_b9b9decc","line":287,"updated":"2017-03-28 21:48:51.000000000","message":"Wouldn\u0027t it make more sense to have this before the append() call? Maybe it doesn\u0027t matter, dunno.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"e7834c02e4ed6106b7113d62937d8475f4f8f406","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            if \u0027volume_id\u0027 not in connection[\u0027data\u0027]:"},{"line_number":285,"context_line":"                connection[\u0027data\u0027][\u0027volume_id\u0027] \u003d volume_id"},{"line_number":286,"context_line":"            connected.append(connection)"},{"line_number":287,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"},{"line_number":288,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":289,"context_line":"            msg \u003d (_(\u0027Could not initialize storage attachment for volume \u0027"},{"line_number":290,"context_line":"                     \u0027%(vol_id)s to node %(node)s: %(err)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_0375f731","line":287,"updated":"2017-03-28 20:25:49.000000000","message":"so we append connection in L286 and afterwards update it?","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":284,"context_line":"            if \u0027volume_id\u0027 not in connection[\u0027data\u0027]:"},{"line_number":285,"context_line":"                connection[\u0027data\u0027][\u0027volume_id\u0027] \u003d volume_id"},{"line_number":286,"context_line":"            connected.append(connection)"},{"line_number":287,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"},{"line_number":288,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":289,"context_line":"            msg \u003d (_(\u0027Could not initialize storage attachment for volume \u0027"},{"line_number":290,"context_line":"                     \u0027%(vol_id)s to node %(node)s: %(err)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_c62f1d3d","line":287,"in_reply_to":"ffe62b97_0375f731","updated":"2017-03-28 21:48:14.000000000","message":"yes. dicts are passed by reference so it doesn\u0027t matter where we update it.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b32b40e0b74c777a1e0fa84d7b67ef01a4b88264","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                             }"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"       :param allow_errors: Boolean value governing if errors are returned"},{"line_number":368,"context_line":"                            are treated as warnings instead of exceptions."},{"line_number":369,"context_line":"                            Default False."},{"line_number":370,"context_line":"       :raises: TypeError If the supplied volume_list is not a sequence."},{"line_number":371,"context_line":"       :raises: StorageError"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_7f5ea176","line":368,"range":{"start_line":368,"start_character":28,"end_line":368,"end_character":31},"updated":"2017-03-28 17:43:15.000000000","message":"and are  \n\n???","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                             }"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"       :param allow_errors: Boolean value governing if errors are returned"},{"line_number":368,"context_line":"                            are treated as warnings instead of exceptions."},{"line_number":369,"context_line":"                            Default False."},{"line_number":370,"context_line":"       :raises: TypeError If the supplied volume_list is not a sequence."},{"line_number":371,"context_line":"       :raises: StorageError"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_43e89fe0","line":368,"range":{"start_line":368,"start_character":28,"end_line":368,"end_character":31},"in_reply_to":"ffe62b97_56faa2bc","updated":"2017-03-28 21:48:14.000000000","message":"Done","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"6793887437426d1f7a068fca2c91153f6dd9b5a5","unresolved":false,"context_lines":[{"line_number":365,"context_line":"                             }"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"       :param allow_errors: Boolean value governing if errors are returned"},{"line_number":368,"context_line":"                            are treated as warnings instead of exceptions."},{"line_number":369,"context_line":"                            Default False."},{"line_number":370,"context_line":"       :raises: TypeError If the supplied volume_list is not a sequence."},{"line_number":371,"context_line":"       :raises: StorageError"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_56faa2bc","line":368,"range":{"start_line":368,"start_character":28,"end_line":368,"end_character":31},"in_reply_to":"ffe62b97_7f5ea176","updated":"2017-03-28 19:35:21.000000000","message":"+1","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"e7834c02e4ed6106b7113d62937d8475f4f8f406","unresolved":false,"context_lines":[{"line_number":383,"context_line":"    for volume_id in volume_list:"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":386,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":387,"context_line":"            _handle_errors(_(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":388,"context_line":"                             \u0027node %(node)s: %(err)s\u0027) %"},{"line_number":389,"context_line":"                           {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_43c77f97","line":386,"updated":"2017-03-28 20:25:49.000000000","message":"this exception is to generic, if we want to ignore already deleted volumes we need to:\n\nexcept cinder_client.NotFound:\n    LOG.warning ....\nexcept cinder_client.ClientException:\n    ...","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"47e2afa4c4ed306f0ba41a194d5e72e32df40b26","unresolved":false,"context_lines":[{"line_number":383,"context_line":"    for volume_id in volume_list:"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":386,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":387,"context_line":"            _handle_errors(_(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":388,"context_line":"                             \u0027node %(node)s: %(err)s\u0027) %"},{"line_number":389,"context_line":"                           {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_dc1b70c7","line":386,"in_reply_to":"ffe62b97_43c77f97","updated":"2017-03-28 21:48:51.000000000","message":"+1","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":383,"context_line":"    for volume_id in volume_list:"},{"line_number":384,"context_line":"        try:"},{"line_number":385,"context_line":"            volume \u003d client.volumes.get(volume_id)"},{"line_number":386,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":387,"context_line":"            _handle_errors(_(\u0027Could not get volume %(vol_id)s from cinder for \u0027"},{"line_number":388,"context_line":"                             \u0027node %(node)s: %(err)s\u0027) %"},{"line_number":389,"context_line":"                           {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_99ef3a1d","line":386,"in_reply_to":"ffe62b97_43c77f97","updated":"2017-03-28 21:48:14.000000000","message":"I don\u0027t think we should ignore already deleted volumes, unless we allow errors. If someone tries to detach deleted volume we should fail when errors are not allowed.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"e7834c02e4ed6106b7113d62937d8475f4f8f406","unresolved":false,"context_lines":[{"line_number":392,"context_line":"            # before we\u0027re attempting to power off the node."},{"line_number":393,"context_line":"            continue"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        if not is_volume_attached(node, volume):"},{"line_number":396,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is not attached to node \u0027"},{"line_number":397,"context_line":"                      \u0027%(uuid)s: Skipping detachment.\u0027,"},{"line_number":398,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_03c3b739","line":395,"updated":"2017-03-28 20:25:49.000000000","message":"wondered if cinder returns specific exception when trying to detach not attached volume.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":392,"context_line":"            # before we\u0027re attempting to power off the node."},{"line_number":393,"context_line":"            continue"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        if not is_volume_attached(node, volume):"},{"line_number":396,"context_line":"            LOG.debug(\u0027Volume %(vol_id)s is not attached to node \u0027"},{"line_number":397,"context_line":"                      \u0027%(uuid)s: Skipping detachment.\u0027,"},{"line_number":398,"context_line":"                      {\u0027vol_id\u0027: volume_id, \u0027uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_5937724e","line":395,"in_reply_to":"ffe62b97_03c3b739","updated":"2017-03-28 21:48:14.000000000","message":"From what I see, VolumeAttachmentNotFound is raised when volume_attachment for volume to detach is not found, but then it\u0027s translated to bad request:\n[0]https://github.com/openstack/cinder/blob/master/cinder/volume/manager.py#L1102\n[1]https://github.com/openstack/cinder/blob/master/cinder/api/contrib/admin_actions.py#L223","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"47e2afa4c4ed306f0ba41a194d5e72e32df40b26","unresolved":false,"context_lines":[{"line_number":415,"context_line":"            _handle_errors(_(\u0027Could not detach volume %(vol_id)s from node \u0027"},{"line_number":416,"context_line":"                             \u0027%(node)s: %(err)s\u0027) %"},{"line_number":417,"context_line":"                           {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":418,"context_line":"            # Skip proceeding with this method if we\u0027re not raising"},{"line_number":419,"context_line":"            # errors. This will leave the volume in the detaching"},{"line_number":420,"context_line":"            # state, but in that case something very unexpected"},{"line_number":421,"context_line":"            # has occured."}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_79323660","line":418,"updated":"2017-03-28 21:48:51.000000000","message":"nit: s/method/volume/ maybe? We don\u0027t exit the whole method, just this iteration of the for loop.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"e7834c02e4ed6106b7113d62937d8475f4f8f406","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        attachment_id \u003d _get_attachment_id(node, volume)"},{"line_number":428,"context_line":"        try:"},{"line_number":429,"context_line":"            # Update the API attachment record"},{"line_number":430,"context_line":"            client.volumes.detach(volume_id, attachment_id)"},{"line_number":431,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":432,"context_line":"            _handle_errors(_(\u0027Could not inform cinder that the detachment for \u0027"},{"line_number":433,"context_line":"                             \u0027volume %(vol_id)s from node %(node)s has been \u0027"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_031f37b7","line":430,"updated":"2017-03-28 20:25:49.000000000","message":"wondered if detach methods is synchronous, and we can tell for sure here that operation was completed.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"47e2afa4c4ed306f0ba41a194d5e72e32df40b26","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        attachment_id \u003d _get_attachment_id(node, volume)"},{"line_number":428,"context_line":"        try:"},{"line_number":429,"context_line":"            # Update the API attachment record"},{"line_number":430,"context_line":"            client.volumes.detach(volume_id, attachment_id)"},{"line_number":431,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":432,"context_line":"            _handle_errors(_(\u0027Could not inform cinder that the detachment for \u0027"},{"line_number":433,"context_line":"                             \u0027volume %(vol_id)s from node %(node)s has been \u0027"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_3c8a5cbe","line":430,"in_reply_to":"ffe62b97_031f37b7","updated":"2017-03-28 21:48:51.000000000","message":"/me asks cinder irc channel","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":427,"context_line":"        attachment_id \u003d _get_attachment_id(node, volume)"},{"line_number":428,"context_line":"        try:"},{"line_number":429,"context_line":"            # Update the API attachment record"},{"line_number":430,"context_line":"            client.volumes.detach(volume_id, attachment_id)"},{"line_number":431,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":432,"context_line":"            _handle_errors(_(\u0027Could not inform cinder that the detachment for \u0027"},{"line_number":433,"context_line":"                             \u0027volume %(vol_id)s from node %(node)s has been \u0027"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_dcb25049","line":430,"in_reply_to":"ffe62b97_031f37b7","updated":"2017-03-28 21:48:14.000000000","message":"detach function are synchronous (detach, begin_detaching, terminate_connection)","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"6c168b3411ae1d42eb8f251b30088e2f7d6f1aa6","unresolved":false,"context_lines":[{"line_number":285,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":286,"context_line":"            LOG.error(msg)"},{"line_number":287,"context_line":"            try:"},{"line_number":288,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":289,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":290,"context_line":"                LOG.error(\u0027Failed to remove reservation of volume \u0027"},{"line_number":291,"context_line":"                          \u0027%(vol_id)s for node %(node)s\u0027,"}],"source_content_type":"text/x-python","patch_set":56,"id":"ffe62b97_2cd9bcf3","line":288,"updated":"2017-03-30 12:14:56.000000000","message":"The same question that reviewers asked before, but there is a difference in this code below. We unreserve only failed volume, if we reserve 5 volumes on previous loop iteration l266 and failed on 6, looks like we should unreserve all volumes.","commit_id":"161115dc841ec954cb3fba0f12e47b2c809da8f1"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"61abb3abf55458649a42670116a7716e8ec2cb01","unresolved":false,"context_lines":[{"line_number":285,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":286,"context_line":"            LOG.error(msg)"},{"line_number":287,"context_line":"            try:"},{"line_number":288,"context_line":"                client.volumes.unreserve(volume_id)"},{"line_number":289,"context_line":"            except cinder_exceptions.ClientException:"},{"line_number":290,"context_line":"                LOG.error(\u0027Failed to remove reservation of volume \u0027"},{"line_number":291,"context_line":"                          \u0027%(vol_id)s for node %(node)s\u0027,"}],"source_content_type":"text/x-python","patch_set":56,"id":"ffe62b97_376c599b","line":288,"in_reply_to":"ffe62b97_2cd9bcf3","updated":"2017-03-30 16:59:46.000000000","message":"I\u0027ll remove this reservation removal. It should be handled on the driver side in _abort_attach_volume.","commit_id":"161115dc841ec954cb3fba0f12e47b2c809da8f1"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"a762e6bb03e22e9e0336e31e842ad0be67fc7d35","unresolved":false,"context_lines":[{"line_number":404,"context_line":"            # is set to True."},{"line_number":405,"context_line":"        try:"},{"line_number":406,"context_line":"            # Remove the attachment"},{"line_number":407,"context_line":"            client.volumes.terminate_connection(volume_id, connector)"},{"line_number":408,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":409,"context_line":"            _handle_errors(_(\u0027Could not detach volume %(vol_id)s from node \u0027"},{"line_number":410,"context_line":"                             \u0027%(node)s: %(err)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":56,"id":"ffe62b97_97370100","line":407,"updated":"2017-03-28 22:15:26.000000000","message":"#openstack-cinder tells me that this is async, same for detach.\n\nSeems we should poll for a status here, or something.\n\n22:11:31         scottda | jroll: terminate_connection is async                                                                                                                 \n22:11:53         scottda | jroll: and detach is async\n22:12:06         scottda | https://drive.google.com/file/d/0B1Kp6K43HLHydU5XSWNnZEhqVDA/view?pref\u003d2\u0026pli\u003d1","commit_id":"161115dc841ec954cb3fba0f12e47b2c809da8f1"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"c487a79ae02a78b60df8c8b55f84717db0a7670e","unresolved":false,"context_lines":[{"line_number":404,"context_line":"            # is set to True."},{"line_number":405,"context_line":"        try:"},{"line_number":406,"context_line":"            # Remove the attachment"},{"line_number":407,"context_line":"            client.volumes.terminate_connection(volume_id, connector)"},{"line_number":408,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":409,"context_line":"            _handle_errors(_(\u0027Could not detach volume %(vol_id)s from node \u0027"},{"line_number":410,"context_line":"                             \u0027%(node)s: %(err)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":56,"id":"ffe62b97_f8f50058","line":407,"in_reply_to":"ffe62b97_0da1a094","updated":"2017-03-29 13:44:02.000000000","message":"Aha, got it. Thanks :D","commit_id":"161115dc841ec954cb3fba0f12e47b2c809da8f1"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"78fb7f206a3b3e2aff8da5270616416193bbaac1","unresolved":false,"context_lines":[{"line_number":404,"context_line":"            # is set to True."},{"line_number":405,"context_line":"        try:"},{"line_number":406,"context_line":"            # Remove the attachment"},{"line_number":407,"context_line":"            client.volumes.terminate_connection(volume_id, connector)"},{"line_number":408,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":409,"context_line":"            _handle_errors(_(\u0027Could not detach volume %(vol_id)s from node \u0027"},{"line_number":410,"context_line":"                             \u0027%(node)s: %(err)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":56,"id":"ffe62b97_0da1a094","line":407,"in_reply_to":"ffe62b97_97370100","updated":"2017-03-28 23:09:31.000000000","message":"I asked this question once again, because the code doesn\u0027t seem to be async. I got the following reply:\n\n\u003cjoanna_mac\u003e hemna: what does it exactly mean? I see the API methods return result from cctx.call(...)\n\u003cjoanna_mac\u003e hemna, scottda: from https://drive.google.com/file/d/0B1Kp6K43HLHydU5XSWNnZEhqVDA/view?pref\u003d2\u0026pli\u003d1 it looks like nova calls these functions asynchronously, but the functions itself look synchronous\n\u003cscottda\u003e Yes, I mean that the call from Nova is async\n\nI checked how it looks in the client and all of these actions are synchronous:\nhttps://github.com/openstack/python-cinderclient/blob/master/cinderclient/v2/volumes.py#L328","commit_id":"161115dc841ec954cb3fba0f12e47b2c809da8f1"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"a762e6bb03e22e9e0336e31e842ad0be67fc7d35","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        attachment_id \u003d _get_attachment_id(node, volume)"},{"line_number":422,"context_line":"        try:"},{"line_number":423,"context_line":"            # Update the API attachment record"},{"line_number":424,"context_line":"            client.volumes.detach(volume_id, attachment_id)"},{"line_number":425,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":426,"context_line":"            _handle_errors(_(\u0027Could not inform cinder that the detachment for \u0027"},{"line_number":427,"context_line":"                             \u0027volume %(vol_id)s from node %(node)s has been \u0027"}],"source_content_type":"text/x-python","patch_set":56,"id":"ffe62b97_1723f1be","line":424,"updated":"2017-03-28 22:15:26.000000000","message":"Ditto as above.","commit_id":"161115dc841ec954cb3fba0f12e47b2c809da8f1"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"431ca2cfd625da23df7160419557b850b1bb8265","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    # filter, the python client library is centered around"},{"line_number":51,"context_line":"    # keystone, and as such is impractical to attempt noauth"},{"line_number":52,"context_line":"    # at this time."},{"line_number":53,"context_line":"    # https://bugs.launchpad.net/python-cinderclient/+bug/1657156"},{"line_number":54,"context_line":"    # NOTE(TheJulia): If a URL is provided for cinder, we will pass"},{"line_number":55,"context_line":"    # along the URL to python-cinderclient. Otherwise the library"},{"line_number":56,"context_line":"    # handles keystone url autodetection."}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_2b6a9c7f","line":53,"range":{"start_line":53,"start_character":6,"end_line":53,"end_character":64},"updated":"2017-03-31 20:17:00.000000000","message":"I\u0027ll replace the NOTE with a TODO note and add support for noauth in separate patch.","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"c6172da467a31dbe17580a92c99ea72098e9601b","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    params \u003d {"},{"line_number":47,"context_line":"        \u0027connect_retries\u0027: CONF.cinder.retries"},{"line_number":48,"context_line":"    }"},{"line_number":49,"context_line":"    # NOTE(TheJulia): While the cinder API has a noauth"},{"line_number":50,"context_line":"    # filter, the python client library is centered around"},{"line_number":51,"context_line":"    # keystone, and as such is impractical to attempt noauth"},{"line_number":52,"context_line":"    # at this time."},{"line_number":53,"context_line":"    # https://bugs.launchpad.net/python-cinderclient/+bug/1657156"},{"line_number":54,"context_line":"    # NOTE(TheJulia): If a URL is provided for cinder, we will pass"},{"line_number":55,"context_line":"    # along the URL to python-cinderclient. Otherwise the library"},{"line_number":56,"context_line":"    # handles keystone url autodetection."}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_9fa9eae0","line":53,"range":{"start_line":49,"start_character":0,"end_line":53,"end_character":65},"updated":"2017-03-31 19:15:38.000000000","message":"JFY, this bug was just fixed this week. Now, python-cinderclient should have noauth support.","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"c6172da467a31dbe17580a92c99ea72098e9601b","unresolved":false,"context_lines":[{"line_number":80,"context_line":"def is_volume_attached(node, volume):"},{"line_number":81,"context_line":"    \"\"\"Check if a volume is attached to the supplied node."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    Returns true if cinder shows the volume as presently attached."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    :param node: The object representing the node."},{"line_number":86,"context_line":"    :param volume: The object representing the volume from cinder."}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_9a4a1825","line":83,"range":{"start_line":83,"start_character":0,"end_line":83,"end_character":66},"updated":"2017-03-31 19:15:38.000000000","message":"nit: L83 could be combined into L88","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"431ca2cfd625da23df7160419557b850b1bb8265","unresolved":false,"context_lines":[{"line_number":80,"context_line":"def is_volume_attached(node, volume):"},{"line_number":81,"context_line":"    \"\"\"Check if a volume is attached to the supplied node."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    Returns true if cinder shows the volume as presently attached."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    :param node: The object representing the node."},{"line_number":86,"context_line":"    :param volume: The object representing the volume from cinder."}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_2b185c1b","line":83,"range":{"start_line":83,"start_character":0,"end_line":83,"end_character":66},"in_reply_to":"dfeb2761_9a4a1825","updated":"2017-03-31 20:17:00.000000000","message":"Done","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"c6172da467a31dbe17580a92c99ea72098e9601b","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        try:"},{"line_number":266,"context_line":"            client.volumes.reserve(volume_id)"},{"line_number":267,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":268,"context_line":"            msg \u003d (_(\u0027Could not reserve volume %(vol_id)s for node %(node)s: \u0027"},{"line_number":269,"context_line":"                     \u0027%(err)s)\u0027) %"},{"line_number":270,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":271,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_f5d6d74f","line":268,"range":{"start_line":268,"start_character":22,"end_line":268,"end_character":32},"updated":"2017-03-31 19:15:38.000000000","message":"nit: We should use only one pattern for logging errors or warnings.\n\u0027Could not\u0027 or \u0027Failed to\u0027. I like \u0027Failed to\u0027 to easy error searches in logs.","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"431ca2cfd625da23df7160419557b850b1bb8265","unresolved":false,"context_lines":[{"line_number":265,"context_line":"        try:"},{"line_number":266,"context_line":"            client.volumes.reserve(volume_id)"},{"line_number":267,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":268,"context_line":"            msg \u003d (_(\u0027Could not reserve volume %(vol_id)s for node %(node)s: \u0027"},{"line_number":269,"context_line":"                     \u0027%(err)s)\u0027) %"},{"line_number":270,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":271,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_2bedfcee","line":268,"range":{"start_line":268,"start_character":22,"end_line":268,"end_character":32},"in_reply_to":"dfeb2761_f5d6d74f","updated":"2017-03-31 20:17:00.000000000","message":"Done","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"c6172da467a31dbe17580a92c99ea72098e9601b","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                                                              connector)"},{"line_number":278,"context_line":"            if \u0027volume_id\u0027 not in connection[\u0027data\u0027]:"},{"line_number":279,"context_line":"                connection[\u0027data\u0027][\u0027volume_id\u0027] \u003d volume_id"},{"line_number":280,"context_line":"            connected.append(connection)"},{"line_number":281,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"},{"line_number":282,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":283,"context_line":"            msg \u003d (_(\u0027Could not initialize storage attachment for volume \u0027"},{"line_number":284,"context_line":"                     \u0027%(vol_id)s to node %(node)s: %(err)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_da98a06b","line":281,"range":{"start_line":280,"start_character":0,"end_line":281,"end_character":66},"updated":"2017-03-31 19:15:38.000000000","message":"nit: It\u0027s the same effect, but for clarity, should L281 come before L280?","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"431ca2cfd625da23df7160419557b850b1bb8265","unresolved":false,"context_lines":[{"line_number":277,"context_line":"                                                              connector)"},{"line_number":278,"context_line":"            if \u0027volume_id\u0027 not in connection[\u0027data\u0027]:"},{"line_number":279,"context_line":"                connection[\u0027data\u0027][\u0027volume_id\u0027] \u003d volume_id"},{"line_number":280,"context_line":"            connected.append(connection)"},{"line_number":281,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"},{"line_number":282,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":283,"context_line":"            msg \u003d (_(\u0027Could not initialize storage attachment for volume \u0027"},{"line_number":284,"context_line":"                     \u0027%(vol_id)s to node %(node)s: %(err)s\u0027) %"}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_abba2cdb","line":281,"range":{"start_line":280,"start_character":0,"end_line":281,"end_character":66},"in_reply_to":"dfeb2761_da98a06b","updated":"2017-03-31 20:17:00.000000000","message":"Done","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"c6172da467a31dbe17580a92c99ea72098e9601b","unresolved":false,"context_lines":[{"line_number":280,"context_line":"            connected.append(connection)"},{"line_number":281,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"},{"line_number":282,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":283,"context_line":"            msg \u003d (_(\u0027Could not initialize storage attachment for volume \u0027"},{"line_number":284,"context_line":"                     \u0027%(vol_id)s to node %(node)s: %(err)s\u0027) %"},{"line_number":285,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":286,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_1af04867","line":283,"range":{"start_line":283,"start_character":22,"end_line":283,"end_character":61},"updated":"2017-03-31 19:15:38.000000000","message":"nit: s/storage attachment/connection\nTo quickly associate that we were trying to initialize the volume connection.","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"431ca2cfd625da23df7160419557b850b1bb8265","unresolved":false,"context_lines":[{"line_number":280,"context_line":"            connected.append(connection)"},{"line_number":281,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"},{"line_number":282,"context_line":"        except cinder_exceptions.ClientException as e:"},{"line_number":283,"context_line":"            msg \u003d (_(\u0027Could not initialize storage attachment for volume \u0027"},{"line_number":284,"context_line":"                     \u0027%(vol_id)s to node %(node)s: %(err)s\u0027) %"},{"line_number":285,"context_line":"                   {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":286,"context_line":"            LOG.error(msg)"}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_8b7d281e","line":283,"range":{"start_line":283,"start_character":22,"end_line":283,"end_character":61},"in_reply_to":"dfeb2761_1af04867","updated":"2017-03-31 20:17:00.000000000","message":"Done","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"c6172da467a31dbe17580a92c99ea72098e9601b","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            LOG.error(msg)"},{"line_number":287,"context_line":"            raise exception.StorageError(msg)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        LOG.info(\u0027Successfully initialized volume %(vol_id) for \u0027"},{"line_number":290,"context_line":"                 \u0027node %(node)s.\u0027, {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        instance_uuid \u003d node.instance_uuid or node.uuid"}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_7a8514ad","line":289,"range":{"start_line":289,"start_character":50,"end_line":289,"end_character":59},"updated":"2017-03-31 19:15:38.000000000","message":"%(vol_id)s","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"431ca2cfd625da23df7160419557b850b1bb8265","unresolved":false,"context_lines":[{"line_number":286,"context_line":"            LOG.error(msg)"},{"line_number":287,"context_line":"            raise exception.StorageError(msg)"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"        LOG.info(\u0027Successfully initialized volume %(vol_id) for \u0027"},{"line_number":290,"context_line":"                 \u0027node %(node)s.\u0027, {\u0027vol_id\u0027: volume_id, \u0027node\u0027: node.uuid})"},{"line_number":291,"context_line":""},{"line_number":292,"context_line":"        instance_uuid \u003d node.instance_uuid or node.uuid"}],"source_content_type":"text/x-python","patch_set":57,"id":"dfeb2761_ebe154d2","line":289,"range":{"start_line":289,"start_character":50,"end_line":289,"end_character":59},"in_reply_to":"dfeb2761_7a8514ad","updated":"2017-03-31 20:17:00.000000000","message":"Done","commit_id":"639a36f3524a35db66a803d4f7dc7f1d4833a1bf"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"2e28ce3b6b4b66664586dc17edd143cc2f58ea75","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    # NOTE(TheJulia): If a URL is provided for cinder, we will pass"},{"line_number":51,"context_line":"    # along the URL to python-cinderclient. Otherwise the library"},{"line_number":52,"context_line":"    # handles keystone url autodetection."},{"line_number":53,"context_line":"    if CONF.cinder.url is not None:"},{"line_number":54,"context_line":"        params[\u0027endpoint_override\u0027] \u003d CONF.cinder.url"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if CONF.keystone.region_name is not None:"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_22906c4e","line":53,"range":{"start_line":53,"start_character":4,"end_line":53,"end_character":35},"updated":"2017-04-02 16:04:06.000000000","message":"Why are we checking against None, just:\nif CONF.cinder.url:\n\nshould work.","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"69b698ce27c8b311471426717678132774e48835","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    # NOTE(TheJulia): If a URL is provided for cinder, we will pass"},{"line_number":51,"context_line":"    # along the URL to python-cinderclient. Otherwise the library"},{"line_number":52,"context_line":"    # handles keystone url autodetection."},{"line_number":53,"context_line":"    if CONF.cinder.url is not None:"},{"line_number":54,"context_line":"        params[\u0027endpoint_override\u0027] \u003d CONF.cinder.url"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if CONF.keystone.region_name is not None:"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_3965f11e","line":53,"range":{"start_line":53,"start_character":4,"end_line":53,"end_character":35},"in_reply_to":"dfeb2761_22906c4e","updated":"2017-04-04 21:54:07.000000000","message":"Because default is None. Default is not \"\", 0, {}, [], etc...","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    # NOTE(TheJulia): If a URL is provided for cinder, we will pass"},{"line_number":51,"context_line":"    # along the URL to python-cinderclient. Otherwise the library"},{"line_number":52,"context_line":"    # handles keystone url autodetection."},{"line_number":53,"context_line":"    if CONF.cinder.url is not None:"},{"line_number":54,"context_line":"        params[\u0027endpoint_override\u0027] \u003d CONF.cinder.url"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if CONF.keystone.region_name is not None:"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_f844591d","line":53,"range":{"start_line":53,"start_character":4,"end_line":53,"end_character":35},"in_reply_to":"dfeb2761_22906c4e","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"2e28ce3b6b4b66664586dc17edd143cc2f58ea75","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    if CONF.cinder.url is not None:"},{"line_number":54,"context_line":"        params[\u0027endpoint_override\u0027] \u003d CONF.cinder.url"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if CONF.keystone.region_name is not None:"},{"line_number":57,"context_line":"        params[\u0027region_name\u0027] \u003d CONF.keystone.region_name"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    params[\u0027session\u0027] \u003d _get_cinder_session()"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_029fa85f","line":56,"range":{"start_line":56,"start_character":4,"end_line":56,"end_character":45},"updated":"2017-04-02 16:04:06.000000000","message":"ditto","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    if CONF.cinder.url is not None:"},{"line_number":54,"context_line":"        params[\u0027endpoint_override\u0027] \u003d CONF.cinder.url"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    if CONF.keystone.region_name is not None:"},{"line_number":57,"context_line":"        params[\u0027region_name\u0027] \u003d CONF.keystone.region_name"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    params[\u0027session\u0027] \u003d _get_cinder_session()"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_383be19c","line":56,"range":{"start_line":56,"start_character":4,"end_line":56,"end_character":45},"in_reply_to":"dfeb2761_029fa85f","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":10206,"name":"Madhuri Kumari","email":"madhuri.kumari@intel.com","username":"Madhuri"},"change_message_id":"2e28ce3b6b4b66664586dc17edd143cc2f58ea75","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"       :param task: TaskManager instance representing the operation."},{"line_number":161,"context_line":"       :param volume_list: List of volume_id UUID values representing volumes."},{"line_number":162,"context_line":"       :param connector: Dictionary object representing the node sufficently"},{"line_number":163,"context_line":"                         to attach a volume. This value can vary based upon"},{"line_number":164,"context_line":"                         the node\u0027s configuration, capability, and ultimately"},{"line_number":165,"context_line":"                         the back-end storage driver. As cinder was designed"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_e8170345","line":162,"range":{"start_line":162,"start_character":65,"end_line":162,"end_character":76},"updated":"2017-04-02 16:04:06.000000000","message":"sufficiently","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"       :param task: TaskManager instance representing the operation."},{"line_number":161,"context_line":"       :param volume_list: List of volume_id UUID values representing volumes."},{"line_number":162,"context_line":"       :param connector: Dictionary object representing the node sufficently"},{"line_number":163,"context_line":"                         to attach a volume. This value can vary based upon"},{"line_number":164,"context_line":"                         the node\u0027s configuration, capability, and ultimately"},{"line_number":165,"context_line":"                         the back-end storage driver. As cinder was designed"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_586105a9","line":162,"range":{"start_line":162,"start_character":65,"end_line":162,"end_character":76},"in_reply_to":"dfeb2761_e8170345","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    # attachment for each node that represents all possible attachment"},{"line_number":105,"context_line":"    # information as multiple types can be submitted in a single request."},{"line_number":106,"context_line":"    attachments \u003d volume.attachments"},{"line_number":107,"context_line":"    if attachments is not None:"},{"line_number":108,"context_line":"        for attachment in attachments:"},{"line_number":109,"context_line":"            if attachment.get(\u0027server_id\u0027) in (node.instance_uuid, node.uuid):"},{"line_number":110,"context_line":"                return attachment.get(\u0027attachment_id\u0027)"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_baa10049","line":107,"updated":"2017-04-04 15:10:31.000000000","message":"nit: to reduce indentation:\n\n if attachments is None:\n     return\n\n for ...","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    label \u003d \"ironic_node_%s\" % node.uuid"},{"line_number":122,"context_line":"    return {"},{"line_number":123,"context_line":"        label: {"},{"line_number":124,"context_line":"            \u0027instance_uuid\u0027: node.instance_uuid,"},{"line_number":125,"context_line":"            \u0027last_seen\u0027: datetime.datetime.utcnow().isoformat(),"},{"line_number":126,"context_line":"            \u0027last_action\u0027: action}}"},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_9a8abcbc","line":124,"updated":"2017-04-04 15:10:31.000000000","message":"good question (can be fixed in a follow-up IMO)","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"466381eb25a9603a75f9f73f00b1cc4b5ec279d2","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    label \u003d \"ironic_node_%s\" % node.uuid"},{"line_number":122,"context_line":"    return {"},{"line_number":123,"context_line":"        label: {"},{"line_number":124,"context_line":"            \u0027instance_uuid\u0027: node.instance_uuid,"},{"line_number":125,"context_line":"            \u0027last_seen\u0027: datetime.datetime.utcnow().isoformat(),"},{"line_number":126,"context_line":"            \u0027last_action\u0027: action}}"},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_638d2d7a","line":124,"updated":"2017-04-03 23:25:34.000000000","message":"what if node doesn\u0027t have instance_uuid, in places below you pick node.uuid why not do the same here?\n\nhttps://review.openstack.org/#/c/355625/59/ironic/common/cinder.py@288","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"8fea62809e18e63dd5d8a5ff9ee7769168e29641","unresolved":false,"context_lines":[{"line_number":121,"context_line":"    label \u003d \"ironic_node_%s\" % node.uuid"},{"line_number":122,"context_line":"    return {"},{"line_number":123,"context_line":"        label: {"},{"line_number":124,"context_line":"            \u0027instance_uuid\u0027: node.instance_uuid,"},{"line_number":125,"context_line":"            \u0027last_seen\u0027: datetime.datetime.utcnow().isoformat(),"},{"line_number":126,"context_line":"            \u0027last_action\u0027: action}}"},{"line_number":127,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_c9e99cb7","line":124,"in_reply_to":"dfeb2761_9a8abcbc","updated":"2017-04-04 17:12:33.000000000","message":"because node_uuid is not instance_uuid. Node UUID is already included in the label. So worst case scenario is:\n{\"ironic_node_UUID\": {\"last_seen\": X, \"last_action\": Y}}","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":126,"context_line":"            \u0027last_action\u0027: action}}"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"def _init_client_for_operations(task):"},{"line_number":130,"context_line":"    \"\"\"Obtain cinder client and return it for use."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"    :param task: TaskManager instance representing the operation."}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_7a87f8b6","line":129,"updated":"2017-04-04 15:10:31.000000000","message":"nit: I\u0027d call it just _init_client. also not sure why plural operations?","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    try:"},{"line_number":139,"context_line":"        return get_client()"},{"line_number":140,"context_line":"    except Exception as e:"},{"line_number":141,"context_line":"        msg \u003d (_(\u0027Failed to initialize cinder client for node %(uuid)s: %(\u0027"},{"line_number":142,"context_line":"                 \u0027err)s\u0027) % {\u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":143,"context_line":"        LOG.error(msg)"},{"line_number":144,"context_line":"        raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_5a90b4ed","line":141,"updated":"2017-04-04 15:10:31.000000000","message":"this is a bit confusing, there is no \"cinder client for node\". maybe reword it as \"Failed to create a cinder client for volume-related operations on node %(uuid)s:\u003e","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"8fea62809e18e63dd5d8a5ff9ee7769168e29641","unresolved":false,"context_lines":[{"line_number":138,"context_line":"    try:"},{"line_number":139,"context_line":"        return get_client()"},{"line_number":140,"context_line":"    except Exception as e:"},{"line_number":141,"context_line":"        msg \u003d (_(\u0027Failed to initialize cinder client for node %(uuid)s: %(\u0027"},{"line_number":142,"context_line":"                 \u0027err)s\u0027) % {\u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":143,"context_line":"        LOG.error(msg)"},{"line_number":144,"context_line":"        raise exception.StorageError(msg)"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_890cb441","line":141,"in_reply_to":"dfeb2761_5a90b4ed","updated":"2017-04-04 17:12:33.000000000","message":"You\u0027re right, this would sound better :) I\u0027d only remove volume-related operations, since it\u0027s kind of obvious with cinder client, OK?","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        return get_client()"},{"line_number":140,"context_line":"    except Exception as e:"},{"line_number":141,"context_line":"        msg \u003d (_(\u0027Failed to initialize cinder client for node %(uuid)s: %(\u0027"},{"line_number":142,"context_line":"                 \u0027err)s\u0027) % {\u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":143,"context_line":"        LOG.error(msg)"},{"line_number":144,"context_line":"        raise exception.StorageError(msg)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_3a8df0d2","line":142,"updated":"2017-04-04 15:10:31.000000000","message":"nit: splitting %(err)s into lines looks a bit weird to me","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6b9ff6f5471d92c64bbd0474e8f4c4b146772e34","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        return get_client()"},{"line_number":140,"context_line":"    except Exception as e:"},{"line_number":141,"context_line":"        msg \u003d (_(\u0027Failed to initialize cinder client for node %(uuid)s: %(\u0027"},{"line_number":142,"context_line":"                 \u0027err)s\u0027) % {\u0027uuid\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":143,"context_line":"        LOG.error(msg)"},{"line_number":144,"context_line":"        raise exception.StorageError(msg)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_89ca744b","line":142,"in_reply_to":"dfeb2761_3a8df0d2","updated":"2017-04-04 21:59:20.000000000","message":"+1","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"8797d2d3a32bd403434c27d91da8d562b52c4243","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                             }"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"       :raises: StorageError If storage subsystem exception is raised."},{"line_number":184,"context_line":"       :raises: TypeError If the supplied volume_list is not a list."},{"line_number":185,"context_line":"       :returns: List of connected volumes, including volumes that were"},{"line_number":186,"context_line":"                 already connected to desired nodes. The returned list"},{"line_number":187,"context_line":"                 can be relatively consistent depending on the end storage"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_77dcb8e3","line":184,"updated":"2017-04-04 12:56:15.000000000","message":"I think not needed to mention this, arguments are documented, this will be programmer error.","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"8797d2d3a32bd403434c27d91da8d562b52c4243","unresolved":false,"context_lines":[{"line_number":271,"context_line":"            # Provide connector information to cinder"},{"line_number":272,"context_line":"            connection \u003d client.volumes.initialize_connection(volume_id,"},{"line_number":273,"context_line":"                                                              connector)"},{"line_number":274,"context_line":"            if \u0027volume_id\u0027 not in connection[\u0027data\u0027]:"},{"line_number":275,"context_line":"                connection[\u0027data\u0027][\u0027volume_id\u0027] \u003d volume_id"},{"line_number":276,"context_line":"            connection[\u0027data\u0027][\u0027ironic_volume_uuid\u0027] \u003d volume.uuid"},{"line_number":277,"context_line":"            connected.append(connection)"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_171c4cbf","line":274,"updated":"2017-04-04 12:56:15.000000000","message":"nit: better to move l274-277 from try-except block","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"8797d2d3a32bd403434c27d91da8d562b52c4243","unresolved":false,"context_lines":[{"line_number":351,"context_line":"       :param allow_errors: Boolean value governing if errors that are returned"},{"line_number":352,"context_line":"                            are treated as warnings instead of exceptions."},{"line_number":353,"context_line":"                            Default False."},{"line_number":354,"context_line":"       :raises: TypeError If the supplied volume_list is not a sequence."},{"line_number":355,"context_line":"       :raises: StorageError"},{"line_number":356,"context_line":"    \"\"\""},{"line_number":357,"context_line":"    def _handle_errors(msg):"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_b7e7e0ac","line":354,"updated":"2017-04-04 12:56:15.000000000","message":"ditto l184","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"466381eb25a9603a75f9f73f00b1cc4b5ec279d2","unresolved":false,"context_lines":[{"line_number":408,"context_line":"        # Attempt to identify the attachment id value to provide"},{"line_number":409,"context_line":"        # accessible relationship data to leave in the cinder API"},{"line_number":410,"context_line":"        # to enable reconciliation."},{"line_number":411,"context_line":"        attachment_id \u003d _get_attachment_id(node, volume)"},{"line_number":412,"context_line":"        try:"},{"line_number":413,"context_line":"            # Update the API attachment record"},{"line_number":414,"context_line":"            client.volumes.detach(volume_id, attachment_id)"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_c374f96a","line":411,"updated":"2017-04-03 23:25:34.000000000","message":"might be None, which is not valid value for operation below.","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"}],"ironic/common/exception.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"0cafe625ee4c4c75528d75289a09be775efd7765","unresolved":false,"context_lines":[{"line_number":741,"context_line":""},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"class StorageError(IronicException):"},{"line_number":744,"context_line":"    _msg_fmt \u003d _(\"Storage operation failure.\")"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_e0511b10","line":744,"updated":"2017-03-16 21:27:43.000000000","message":"This doesn\u0027t seem to take the argument provided.\n\n raise StorageError(message)\n\nWhat happens when it is called?","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"e402febced36d5b98b098a53ef7c65b365f62a06","unresolved":false,"context_lines":[{"line_number":741,"context_line":""},{"line_number":742,"context_line":""},{"line_number":743,"context_line":"class StorageError(IronicException):"},{"line_number":744,"context_line":"    _msg_fmt \u003d _(\"Storage operation failure.\")"}],"source_content_type":"text/x-python","patch_set":46,"id":"1a1ced50_80586758","line":744,"in_reply_to":"1a1ced50_e0511b10","updated":"2017-03-16 22:40:34.000000000","message":"if no message is passed, it used _msg_fmt, otherwise it uses what was passed as a message. Please see line 98","commit_id":"4141d317831a37f3a100c227976e9e31c24c1f19"}],"ironic/conf/cinder.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"7ca46c8e907411864a35e19eb9f290748b7bf672","unresolved":false,"context_lines":[{"line_number":25,"context_line":"               default\u003d3,"},{"line_number":26,"context_line":"               help\u003d_(\u0027Client retries in the case of a failed request \u0027"},{"line_number":27,"context_line":"                      \u0027connection.\u0027)),"},{"line_number":28,"context_line":"    cfg.StrOpt(\u0027auth_strategy\u0027,"},{"line_number":29,"context_line":"               default\u003d\u0027keystone\u0027,"},{"line_number":30,"context_line":"               choices\u003d[\u0027keystone\u0027],"},{"line_number":31,"context_line":"               help\u003d_(\u0027Authentication strategy to use when connecting to \u0027"},{"line_number":32,"context_line":"                      \u0027cinder. Utilizing noauth mode is unavailable due to \u0027"},{"line_number":33,"context_line":"                      \u0027the cinder client library.\u0027)),"},{"line_number":34,"context_line":"]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_3dfbc248","line":33,"range":{"start_line":28,"start_character":0,"end_line":33,"end_character":53},"updated":"2017-01-17 10:51:43.000000000","message":":-( \n\nI think we turn it in a configuration option for consistency but it\u0027s not really configurable :-/\n\nI looked at the python-cinderclient bug tracker [0] and apparently we have no bug opened for it, I think it worth creating one.\n\n[0] http://tinyurl.com/hkv6ruk","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"79ce676249a63fc548102fa198ad54fa5244a418","unresolved":false,"context_lines":[{"line_number":30,"context_line":"               choices\u003d[\u0027keystone\u0027],"},{"line_number":31,"context_line":"               help\u003d_(\u0027Authentication strategy to use when connecting to \u0027"},{"line_number":32,"context_line":"                      \u0027cinder. Utilizing noauth mode is unavailable due to \u0027"},{"line_number":33,"context_line":"                      \u0027the cinder client library.\u0027)),"},{"line_number":34,"context_line":"]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_f97cd9b6","line":33,"updated":"2017-01-17 16:38:40.000000000","message":"Thanks! Maybe we should not add this option until it makes sense?","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"13df83e160826c19293c96dc591693b7646cbc31","unresolved":false,"context_lines":[{"line_number":25,"context_line":"               default\u003d3,"},{"line_number":26,"context_line":"               help\u003d_(\u0027Client retries in the case of a failed request \u0027"},{"line_number":27,"context_line":"                      \u0027connection.\u0027)),"},{"line_number":28,"context_line":"    cfg.StrOpt(\u0027auth_strategy\u0027,"},{"line_number":29,"context_line":"               default\u003d\u0027keystone\u0027,"},{"line_number":30,"context_line":"               choices\u003d[\u0027keystone\u0027],"},{"line_number":31,"context_line":"               help\u003d_(\u0027Authentication strategy to use when connecting to \u0027"},{"line_number":32,"context_line":"                      \u0027cinder. Utilizing noauth mode is unavailable due to \u0027"},{"line_number":33,"context_line":"                      \u0027the cinder client library.\u0027)),"},{"line_number":34,"context_line":"]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"7a3c09a3_b8a252ac","line":33,"range":{"start_line":28,"start_character":0,"end_line":33,"end_character":53},"in_reply_to":"7a3c09a3_3dfbc248","updated":"2017-01-17 15:13:17.000000000","message":"I have opened https://bugs.launchpad.net/python-cinderclient/+bug/1657156","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"fd541e7396334359bf140620df64e1680cd21466","unresolved":false,"context_lines":[{"line_number":30,"context_line":"               choices\u003d[\u0027keystone\u0027],"},{"line_number":31,"context_line":"               help\u003d_(\u0027Authentication strategy to use when connecting to \u0027"},{"line_number":32,"context_line":"                      \u0027cinder. Utilizing noauth mode is unavailable due to \u0027"},{"line_number":33,"context_line":"                      \u0027the cinder client library.\u0027)),"},{"line_number":34,"context_line":"]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"5a3905b3_a89fd401","line":33,"in_reply_to":"7a3c09a3_f97cd9b6","updated":"2017-01-19 22:28:31.000000000","message":"I\u0027m going to remove it, e0ne assigned the bug to himself, so maybe for the pike release we can have noauth :)","commit_id":"740cba0ec61959f69622ba92e3330119a5bb5e71"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development Company LP."},{"line_number":2,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":3,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":4,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_09d91a57","line":1,"updated":"2017-02-01 00:16:53.000000000","message":"Is this header proper?\nI\u0027d at least add 2017 :)","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development Company LP."},{"line_number":2,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":3,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":4,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_7d29e336","line":1,"in_reply_to":"3a461143_09d91a57","updated":"2017-02-13 20:13:44.000000000","message":"So..... I created this file when I worked for HPE, which means the 2016 is corrected based upon file creation date.  I now work for IBM now.... so.... Uhh... Yeah. :)","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"fec3918dcf2ffc053777b9211c7a5e457cb60c76","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"fa31d9ce_7c9e01ba","line":33,"updated":"2017-02-15 09:21:42.000000000","message":"It is necessary to add calling auth.register_auth_opts() like ironic/conf/neutron.py[1]. Missing it causes an error[2] here[3] because of lack of auth_section. Because register_auth_opts() adds \u0027timeout\u0027 parameter to the group, \u0027timeout\u0027 parameter in this file needs to be renamed \u0027url_timeout\u0027 like neutron section.\n\n[1] https://github.com/openstack/ironic/blob/master/ironic/conf/neutron.py#L83-L87\n[2] NoSuchOptError: no such option auth_section in group [cinder]\n[3] https://review.openstack.org/#/c/355625/35/ironic/common/cinder.py@74","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"a9820e96377dee2bcc0bf861fa53d3b22daed803","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":35,"id":"fa31d9ce_8157b056","line":33,"in_reply_to":"fa31d9ce_7c9e01ba","updated":"2017-02-15 18:28:14.000000000","message":"Ugh, I was hoping to avoid having to do that since so many of those options don\u0027t actually work/apply/translate through.  Great catch, will fix in the next revision.","commit_id":"7454d13767b3d88455ffe1a8bd77b8f663a0a2ea"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"9e2fd4d93af4e0c7cce74f3b0898eff6200332c8","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from ironic.conf import auth"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"opts \u003d ["},{"line_number":20,"context_line":"    cfg.StrOpt(\u0027url\u0027,"},{"line_number":21,"context_line":"               help\u003d_(\u0027URL for connecting to cinder.\u0027)),"},{"line_number":22,"context_line":"    cfg.IntOpt(\u0027url_timeout\u0027,"},{"line_number":23,"context_line":"               default\u003d30,"}],"source_content_type":"text/x-python","patch_set":37,"id":"da36d5c6_9e87e911","line":20,"range":{"start_line":20,"start_character":16,"end_line":20,"end_character":19},"updated":"2017-02-18 01:37:34.000000000","message":"Just curious to know will there be any default url value when auth_strategy/auth_system is not keystone? When keystone is used as auth_strategy it will get it from catalog.","commit_id":"966088ff23828bc7dc0a6df36392a5ccf1e85593"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"d601fc4caf032d96bbddaa815d97bd084d301050","unresolved":false,"context_lines":[{"line_number":19,"context_line":"opts \u003d ["},{"line_number":20,"context_line":"    cfg.StrOpt(\u0027url\u0027,"},{"line_number":21,"context_line":"               help\u003d_(\u0027URL for connecting to cinder.\u0027)),"},{"line_number":22,"context_line":"    cfg.IntOpt(\u0027url_timeout\u0027,"},{"line_number":23,"context_line":"               default\u003d30,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Timeout value for connecting to cinder in seconds.\u0027)),"},{"line_number":25,"context_line":"    cfg.IntOpt(\u0027retries\u0027,"}],"source_content_type":"text/x-python","patch_set":44,"id":"3a1ff146_0111af52","line":22,"range":{"start_line":22,"start_character":16,"end_line":22,"end_character":27},"updated":"2017-03-15 16:01:01.000000000","message":"\"url_timeout\" name looks strange.","commit_id":"99857718e3e85929ccc508f5e4464a5623e72829"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"9158d3241ae62d1bed561386765afe76cdcbbd84","unresolved":false,"context_lines":[{"line_number":19,"context_line":"opts \u003d ["},{"line_number":20,"context_line":"    cfg.StrOpt(\u0027url\u0027,"},{"line_number":21,"context_line":"               help\u003d_(\u0027URL for connecting to cinder.\u0027)),"},{"line_number":22,"context_line":"    cfg.IntOpt(\u0027url_timeout\u0027,"},{"line_number":23,"context_line":"               default\u003d30,"},{"line_number":24,"context_line":"               help\u003d_(\u0027Timeout value for connecting to cinder in seconds.\u0027)),"},{"line_number":25,"context_line":"    cfg.IntOpt(\u0027retries\u0027,"}],"source_content_type":"text/x-python","patch_set":44,"id":"3a1ff146_707ea7e5","line":22,"range":{"start_line":22,"start_character":16,"end_line":22,"end_character":27},"in_reply_to":"3a1ff146_0111af52","updated":"2017-03-15 17:21:02.000000000","message":"these options\u0027 names are exactly the same as for neutron. I\u0027d leave it this way for compliance.","commit_id":"99857718e3e85929ccc508f5e4464a5623e72829"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def register_opts(conf):"},{"line_number":35,"context_line":"    conf.register_opts(opts, group\u003d\u0027cinder\u0027)"},{"line_number":36,"context_line":"    auth.register_auth_opts(conf, \u0027cinder\u0027)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def list_opts():"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_d6e09b2b","line":36,"updated":"2017-03-22 20:16:42.000000000","message":"ah, is this where \"insecure\" and \"cacert\" config options are supposed to come from? in that case, maybe sample config just needs to be regenerated","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def register_opts(conf):"},{"line_number":35,"context_line":"    conf.register_opts(opts, group\u003d\u0027cinder\u0027)"},{"line_number":36,"context_line":"    auth.register_auth_opts(conf, \u0027cinder\u0027)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def list_opts():"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_9ba1e448","line":36,"in_reply_to":"1a1ced50_a52203a1","updated":"2017-03-23 00:56:17.000000000","message":"Done","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":19593,"name":"Anup Navare","email":"anup.d.navare@intel.com","username":"anup"},"change_message_id":"89bb0ac92c957f4cc2bb335bed526a73c5bafd0a","unresolved":false,"context_lines":[{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def register_opts(conf):"},{"line_number":35,"context_line":"    conf.register_opts(opts, group\u003d\u0027cinder\u0027)"},{"line_number":36,"context_line":"    auth.register_auth_opts(conf, \u0027cinder\u0027)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"def list_opts():"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_a52203a1","line":36,"in_reply_to":"1a1ced50_d6e09b2b","updated":"2017-03-22 22:53:34.000000000","message":"those options are deprecated https://github.com/openstack/ironic/blob/42da97575d2d93669808b659a72a171647493fbe/ironic/conf/auth.py#L54 and believe they getting populated by calling \u0027register_auth_opts\u0027. \nBut I think \u0027cinder\u0027 should be added here https://github.com/openstack/ironic/blob/ad5840313b766d514c12e19af33c7a47f2745f22/ironic/cmd/conductor.py#L37 to load auth options?","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"aba7d0852d4b23da97231fd3b30e149c72d5c3ec","unresolved":false,"context_lines":[{"line_number":27,"context_line":"    cfg.IntOpt(\u0027retries\u0027,"},{"line_number":28,"context_line":"               default\u003d3,"},{"line_number":29,"context_line":"               help\u003d_(\u0027Client retries in the case of a failed request \u0027"},{"line_number":30,"context_line":"                      \u0027connection.\u0027))"},{"line_number":31,"context_line":"]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":53,"id":"ffe62b97_5fd8b27d","line":30,"updated":"2017-03-27 18:10:20.000000000","message":"Previous patch set had the trailing comma, which is good.","commit_id":"83ab8b0261b8ba91c62901bb041f9d2bfbaa9925"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"6793887437426d1f7a068fca2c91153f6dd9b5a5","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def list_opts():"},{"line_number":37,"context_line":"    # NOTE(jtaryma): Function add_auth_opts uses deepcopy on passed array."},{"line_number":38,"context_line":"    #                Since deepcopy does not support regex, to enable regex"},{"line_number":39,"context_line":"    #                protocol restriction for \u0027url\u0027 option, empty array is"},{"line_number":40,"context_line":"    #                passed. The result is appended to opts array and resorted."},{"line_number":41,"context_line":"    cinder_opts \u003d opts + auth.add_auth_opts([])"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_96802ac1","line":38,"range":{"start_line":38,"start_character":21,"end_line":38,"end_character":75},"updated":"2017-03-28 19:35:21.000000000","message":"Hmm, curious why specifically this doesn\u0027t work.... I guess it\u0027s fine as long as the end result (sample config) looks good.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def list_opts():"},{"line_number":37,"context_line":"    # NOTE(jtaryma): Function add_auth_opts uses deepcopy on passed array."},{"line_number":38,"context_line":"    #                Since deepcopy does not support regex, to enable regex"},{"line_number":39,"context_line":"    #                protocol restriction for \u0027url\u0027 option, empty array is"},{"line_number":40,"context_line":"    #                passed. The result is appended to opts array and resorted."},{"line_number":41,"context_line":"    cinder_opts \u003d opts + auth.add_auth_opts([])"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_43a41fa6","line":38,"range":{"start_line":38,"start_character":21,"end_line":38,"end_character":75},"in_reply_to":"ffe62b97_96802ac1","updated":"2017-03-28 21:48:14.000000000","message":"https://bugzilla.redhat.com/show_bug.cgi?id\u003d1075503","commit_id":"b655775595859de915532d00d952304e77da07c0"}],"ironic/tests/unit/common/test_cinder.py":[{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development Company LP."},{"line_number":2,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":3,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":4,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":33,"id":"3a461143_09c03a4f","line":1,"updated":"2017-02-01 00:16:53.000000000","message":"ditto - header","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 Hewlett Packard Enterprise Development Company LP."},{"line_number":2,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":3,"context_line":"#    not use this file except in compliance with the License. You may obtain"},{"line_number":4,"context_line":"#    a copy of the License at"}],"source_content_type":"text/x-python","patch_set":33,"id":"fa31d9ce_5d97bf39","line":1,"in_reply_to":"3a461143_09c03a4f","updated":"2017-02-13 20:13:44.000000000","message":"Same reply regarding the header.  I\u0027ve not really changed enough here since it was created to justify adding IBM either :(","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from ironic.tests.unit.objects import utils as object_utils"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027)"},{"line_number":31,"context_line":"@mock.patch.object(cinderclient.Client, \"__init__\")"},{"line_number":32,"context_line":"class TestCinderClient(base.TestCase):"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_3907c91d","line":30,"updated":"2017-03-17 19:25:12.000000000","message":"Please add:\n  autospec\u003dTrue\n\nTo all of the mock.patch.object()","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from ironic.tests.unit.objects import utils as object_utils"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027)"},{"line_number":31,"context_line":"@mock.patch.object(cinderclient.Client, \"__init__\")"},{"line_number":32,"context_line":"class TestCinderClient(base.TestCase):"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_10bb7c0f","line":30,"in_reply_to":"1a1ced50_3907c91d","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                    group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @mock.patch.object(keystone, \"get_service_url\")"},{"line_number":47,"context_line":"    def test_get_cinder_client(self, mock_ks, mock_client, mock_session):"},{"line_number":48,"context_line":"        session \u003d mock.Mock()"},{"line_number":49,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":50,"context_line":"                    \u0027retries\u0027: 2,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_d97235e5","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":30},"updated":"2017-03-17 19:25:12.000000000","message":"test_get_client\n\nshould reflect the function name","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"00cb7e6c62a6a27abd33836aeca2bd179456499a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                    group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @mock.patch.object(keystone, \"get_service_url\")"},{"line_number":47,"context_line":"    def test_get_cinder_client(self, mock_ks, mock_client, mock_session):"},{"line_number":48,"context_line":"        session \u003d mock.Mock()"},{"line_number":49,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":50,"context_line":"                    \u0027retries\u0027: 2,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_d63d5cbc","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":30},"in_reply_to":"1a1ced50_9045ac18","updated":"2017-03-21 16:41:22.000000000","message":"I don\u0027t see it done.\n\nhttps://review.openstack.org/#/c/355625/48..49/ironic/tests/unit/common/test_cinder.py","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                    group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @mock.patch.object(keystone, \"get_service_url\")"},{"line_number":47,"context_line":"    def test_get_cinder_client(self, mock_ks, mock_client, mock_session):"},{"line_number":48,"context_line":"        session \u003d mock.Mock()"},{"line_number":49,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":50,"context_line":"                    \u0027retries\u0027: 2,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_9045ac18","line":47,"range":{"start_line":47,"start_character":8,"end_line":47,"end_character":30},"in_reply_to":"1a1ced50_d97235e5","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @mock.patch.object(keystone, \"get_service_url\")"},{"line_number":47,"context_line":"    def test_get_cinder_client(self, mock_ks, mock_client, mock_session):"},{"line_number":48,"context_line":"        session \u003d mock.Mock()"},{"line_number":49,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":50,"context_line":"                    \u0027retries\u0027: 2,"},{"line_number":51,"context_line":"                    \u0027insecure\u0027: False,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_bcf3a709","line":48,"updated":"2017-03-17 19:25:12.000000000","message":"nit:\n\n mock_session_obj \u003d mock.Mock()\n\nJust to make it obvious to readers of the code it is a mock object.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"00cb7e6c62a6a27abd33836aeca2bd179456499a","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @mock.patch.object(keystone, \"get_service_url\")"},{"line_number":47,"context_line":"    def test_get_cinder_client(self, mock_ks, mock_client, mock_session):"},{"line_number":48,"context_line":"        session \u003d mock.Mock()"},{"line_number":49,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":50,"context_line":"                    \u0027retries\u0027: 2,"},{"line_number":51,"context_line":"                    \u0027insecure\u0027: False,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_3675d097","line":48,"in_reply_to":"1a1ced50_705910fe","updated":"2017-03-21 16:41:22.000000000","message":"I don\u0027t see it done.\n\nhttps://review.openstack.org/#/c/355625/48..49/ironic/tests/unit/common/test_cinder.py","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @mock.patch.object(keystone, \"get_service_url\")"},{"line_number":47,"context_line":"    def test_get_cinder_client(self, mock_ks, mock_client, mock_session):"},{"line_number":48,"context_line":"        session \u003d mock.Mock()"},{"line_number":49,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":50,"context_line":"                    \u0027retries\u0027: 2,"},{"line_number":51,"context_line":"                    \u0027insecure\u0027: False,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_705910fe","line":48,"in_reply_to":"1a1ced50_bcf3a709","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                    \u0027session\u0027: session}"},{"line_number":54,"context_line":"        mock_ks.return_value \u003d \u0027test-auth-uri\u0027"},{"line_number":55,"context_line":"        mock_session.return_value \u003d session"},{"line_number":56,"context_line":"        mock_client.return_value \u003d None"},{"line_number":57,"context_line":"        cinder.get_client()"},{"line_number":58,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_5c9d5364","line":56,"updated":"2017-03-17 19:25:12.000000000","message":"Why this?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                    \u0027session\u0027: session}"},{"line_number":54,"context_line":"        mock_ks.return_value \u003d \u0027test-auth-uri\u0027"},{"line_number":55,"context_line":"        mock_session.return_value \u003d session"},{"line_number":56,"context_line":"        mock_client.return_value \u003d None"},{"line_number":57,"context_line":"        cinder.get_client()"},{"line_number":58,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":59,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_b096284a","line":56,"in_reply_to":"1a1ced50_5c9d5364","updated":"2017-03-20 23:40:30.000000000","message":"default value of functions in mock is a mock instance. Here a constructor is mocked, and constructor\u0027s return value must be a None.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        mock_ks.return_value \u003d \u0027test-auth-uri\u0027"},{"line_number":55,"context_line":"        mock_session.return_value \u003d session"},{"line_number":56,"context_line":"        mock_client.return_value \u003d None"},{"line_number":57,"context_line":"        cinder.get_client()"},{"line_number":58,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_get_cinder_client_with_bypass_url("}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_dc9ea355","line":57,"updated":"2017-03-17 19:25:12.000000000","message":"Should we be validating that this returns None, from line 56? Or maybe line 56 should return a mock or some unique string?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        mock_ks.return_value \u003d \u0027test-auth-uri\u0027"},{"line_number":55,"context_line":"        mock_session.return_value \u003d session"},{"line_number":56,"context_line":"        mock_client.return_value \u003d None"},{"line_number":57,"context_line":"        cinder.get_client()"},{"line_number":58,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_get_cinder_client_with_bypass_url("}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_7083d004","line":57,"in_reply_to":"1a1ced50_dc9ea355","updated":"2017-03-20 23:40:30.000000000","message":"No need. if a constructor would return non-None value, an exception would be raised.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        mock_session.return_value \u003d session"},{"line_number":56,"context_line":"        mock_client.return_value \u003d None"},{"line_number":57,"context_line":"        cinder.get_client()"},{"line_number":58,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_get_cinder_client_with_bypass_url("},{"line_number":61,"context_line":"            self, mock_client, mock_session):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_3c6df798","line":58,"updated":"2017-03-17 19:25:12.000000000","message":"Maybe add:\n\n mock_session.assert_called_once_with()","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        mock_session.return_value \u003d session"},{"line_number":56,"context_line":"        mock_client.return_value \u003d None"},{"line_number":57,"context_line":"        cinder.get_client()"},{"line_number":58,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_get_cinder_client_with_bypass_url("},{"line_number":61,"context_line":"            self, mock_client, mock_session):"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_f077c037","line":58,"in_reply_to":"1a1ced50_3c6df798","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        cinder.get_client()"},{"line_number":58,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_get_cinder_client_with_bypass_url("},{"line_number":61,"context_line":"            self, mock_client, mock_session):"},{"line_number":62,"context_line":"        self.config(url\u003d\u0027test-url\u0027, group\u003d\u0027cinder\u0027)"},{"line_number":63,"context_line":"        session \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_39826995","line":60,"updated":"2017-03-17 19:25:12.000000000","message":"test_get_client_with_bypass_url","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        cinder.get_client()"},{"line_number":58,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def test_get_cinder_client_with_bypass_url("},{"line_number":61,"context_line":"            self, mock_client, mock_session):"},{"line_number":62,"context_line":"        self.config(url\u003d\u0027test-url\u0027, group\u003d\u0027cinder\u0027)"},{"line_number":63,"context_line":"        session \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_10737c4e","line":60,"in_reply_to":"1a1ced50_39826995","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    def test_get_cinder_client_with_bypass_url("},{"line_number":61,"context_line":"            self, mock_client, mock_session):"},{"line_number":62,"context_line":"        self.config(url\u003d\u0027test-url\u0027, group\u003d\u0027cinder\u0027)"},{"line_number":63,"context_line":"        session \u003d mock.Mock()"},{"line_number":64,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":65,"context_line":"                    \u0027retries\u0027: 2,"},{"line_number":66,"context_line":"                    \u0027insecure\u0027: False,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_5ce55335","line":63,"updated":"2017-03-17 19:25:12.000000000","message":"nit:\n\n mock_session_obj \u003d mock.Mock()\n\nJust to make it obvious to readers of the code it is a mock object.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    def test_get_cinder_client_with_bypass_url("},{"line_number":61,"context_line":"            self, mock_client, mock_session):"},{"line_number":62,"context_line":"        self.config(url\u003d\u0027test-url\u0027, group\u003d\u0027cinder\u0027)"},{"line_number":63,"context_line":"        session \u003d mock.Mock()"},{"line_number":64,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":65,"context_line":"                    \u0027retries\u0027: 2,"},{"line_number":66,"context_line":"                    \u0027insecure\u0027: False,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_30907843","line":63,"in_reply_to":"1a1ced50_5ce55335","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                    \u0027bypass_url\u0027: \u0027test-url\u0027,"},{"line_number":69,"context_line":"                    \u0027session\u0027: session}"},{"line_number":70,"context_line":"        mock_session.return_value \u003d session"},{"line_number":71,"context_line":"        mock_client.return_value \u003d None"},{"line_number":72,"context_line":"        cinder.get_client()"},{"line_number":73,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_9c8d0b34","line":71,"updated":"2017-03-17 19:25:12.000000000","message":"Why this?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                    \u0027bypass_url\u0027: \u0027test-url\u0027,"},{"line_number":69,"context_line":"                    \u0027session\u0027: session}"},{"line_number":70,"context_line":"        mock_session.return_value \u003d session"},{"line_number":71,"context_line":"        mock_client.return_value \u003d None"},{"line_number":72,"context_line":"        cinder.get_client()"},{"line_number":73,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_d09f244e","line":71,"in_reply_to":"1a1ced50_9c8d0b34","updated":"2017-03-20 23:40:30.000000000","message":"please see ln 56","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        cinder.get_client()"},{"line_number":73,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_get_cinder_client_with_region(self, mock_client_init,"},{"line_number":76,"context_line":"                                           mock_session):"},{"line_number":77,"context_line":"        session \u003d mock.Mock()"},{"line_number":78,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_9ce26bd4","line":75,"range":{"start_line":75,"start_character":49,"end_line":75,"end_character":65},"updated":"2017-03-17 19:25:12.000000000","message":"Why \u0027mock_client_init\u0027 here and other uses are \u0027mock_client\u0027?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        cinder.get_client()"},{"line_number":73,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_get_cinder_client_with_region(self, mock_client_init,"},{"line_number":76,"context_line":"                                           mock_session):"},{"line_number":77,"context_line":"        session \u003d mock.Mock()"},{"line_number":78,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_597f25aa","line":75,"updated":"2017-03-17 19:25:12.000000000","message":"test_get_client_with_region","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        cinder.get_client()"},{"line_number":73,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_get_cinder_client_with_region(self, mock_client_init,"},{"line_number":76,"context_line":"                                           mock_session):"},{"line_number":77,"context_line":"        session \u003d mock.Mock()"},{"line_number":78,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_f0aee083","line":75,"in_reply_to":"1a1ced50_597f25aa","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        cinder.get_client()"},{"line_number":73,"context_line":"        mock_client.assert_called_once_with(**expected)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_get_cinder_client_with_region(self, mock_client_init,"},{"line_number":76,"context_line":"                                           mock_session):"},{"line_number":77,"context_line":"        session \u003d mock.Mock()"},{"line_number":78,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_d0c64448","line":75,"range":{"start_line":75,"start_character":49,"end_line":75,"end_character":65},"in_reply_to":"1a1ced50_9ce26bd4","updated":"2017-03-20 23:40:30.000000000","message":"renamed all to \u0027mock_client_init\u0027 as it\u0027s more descriptive","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"c6934f5e543a1f4ffb18d0eab1d565a16c5a2ab0","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_get_cinder_client_with_region(self, mock_client_init,"},{"line_number":76,"context_line":"                                           mock_session):"},{"line_number":77,"context_line":"        session \u003d mock.Mock()"},{"line_number":78,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":79,"context_line":"                    \u0027retries\u0027: 2,"},{"line_number":80,"context_line":"                    \u0027insecure\u0027: False,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_9cd50b45","line":77,"updated":"2017-03-17 19:25:12.000000000","message":"nit:\n\n mock_session_obj \u003d mock.Mock()\n\nJust to make it obvious to readers of the code it is a mock object.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    def test_get_cinder_client_with_region(self, mock_client_init,"},{"line_number":76,"context_line":"                                           mock_session):"},{"line_number":77,"context_line":"        session \u003d mock.Mock()"},{"line_number":78,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":79,"context_line":"                    \u0027retries\u0027: 2,"},{"line_number":80,"context_line":"                    \u0027insecure\u0027: False,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_10c1bc2e","line":77,"in_reply_to":"1a1ced50_9cd50b45","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b05852862607a3bd5b5c081ad8e6f0fddf4acc4c","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        def __check_volume(volume, expectation):"},{"line_number":109,"context_line":"            result \u003d cinder.is_volume_available(volume)"},{"line_number":110,"context_line":"            self.assertEqual(expectation, result)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        available_volumes \u003d ["},{"line_number":113,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.AVAILABLE,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_dc49438d","line":110,"updated":"2017-03-17 19:52:14.000000000","message":"Please add a \u0027msg\u0027 field as if one of these fails I think it might be hard to figure out which one.\n\nMaybe with longMessage\n\nhttps://docs.python.org/2/library/unittest.html#unittest.TestCase.longMessage","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        def __check_volume(volume, expectation):"},{"line_number":109,"context_line":"            result \u003d cinder.is_volume_available(volume)"},{"line_number":110,"context_line":"            self.assertEqual(expectation, result)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        available_volumes \u003d ["},{"line_number":113,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.AVAILABLE,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_d0d724bd","line":110,"in_reply_to":"1a1ced50_dc49438d","updated":"2017-03-20 23:40:30.000000000","message":"longmessages won\u0027t be helful here as they only provide extended message about assertion failure. I removed the method __check_volume, to at least know whether available or unavailable volumes fail.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b05852862607a3bd5b5c081ad8e6f0fddf4acc4c","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            self.assertEqual(expectation, result)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        available_volumes \u003d ["},{"line_number":113,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.AVAILABLE,"},{"line_number":114,"context_line":"                      \u0027multiattach\u0027: False}),"},{"line_number":115,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.IN_USE,"},{"line_number":116,"context_line":"                      \u0027multiattach\u0027: True})]"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_1f110d53","line":113,"updated":"2017-03-17 19:52:14.000000000","message":"Is there a reason this isn\u0027t just:\n\n mock.Mock(status\u003dcinder.AVAILABLE, multiattach\u003dFalse)","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            self.assertEqual(expectation, result)"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        available_volumes \u003d ["},{"line_number":113,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.AVAILABLE,"},{"line_number":114,"context_line":"                      \u0027multiattach\u0027: False}),"},{"line_number":115,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.IN_USE,"},{"line_number":116,"context_line":"                      \u0027multiattach\u0027: True})]"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_bb21a94f","line":113,"in_reply_to":"1a1ced50_1f110d53","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b05852862607a3bd5b5c081ad8e6f0fddf4acc4c","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.AVAILABLE,"},{"line_number":114,"context_line":"                      \u0027multiattach\u0027: False}),"},{"line_number":115,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.IN_USE,"},{"line_number":116,"context_line":"                      \u0027multiattach\u0027: True})]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        unavailable_volumes \u003d ["},{"line_number":119,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.IN_USE,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_fff991c9","line":116,"updated":"2017-03-17 19:52:14.000000000","message":"Maybe use spec_set, since if multiattach was spelled wrong, this test would pass as the mock would just return a mock.\n\n mock.Mock(spec_set\u003d[\u0027status\u0027, \u0027multiattach\u0027, ...)\n\nOr use a namedtuple :)","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"00cb7e6c62a6a27abd33836aeca2bd179456499a","unresolved":false,"context_lines":[{"line_number":113,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.AVAILABLE,"},{"line_number":114,"context_line":"                      \u0027multiattach\u0027: False}),"},{"line_number":115,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.IN_USE,"},{"line_number":116,"context_line":"                      \u0027multiattach\u0027: True})]"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        unavailable_volumes \u003d ["},{"line_number":119,"context_line":"            mock.Mock(**{\u0027status\u0027: cinder.IN_USE,"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_028cedd8","line":116,"in_reply_to":"1a1ced50_fff991c9","updated":"2017-03-21 16:41:22.000000000","message":"What about namedtuple or spec_set?","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"95d1bf67cc88dce4fb0ec01f4925618e385eb2f8","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            attachments \u003d cinder.attach_volumes(task, volumes, connector)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":235,"context_line":"        self.assertTrue(mock_reserve.called_once_with(volume_id))"},{"line_number":236,"context_line":"        self.assertTrue(mock_init.called_once_with(volume_id, connector))"},{"line_number":237,"context_line":"        self.assertTrue("},{"line_number":238,"context_line":"            mock_attach.called_once_with((volume_id, self.node.uuid, None)))"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_70b75086","line":235,"updated":"2017-03-20 23:05:17.000000000","message":"This probably needs to be:\n\n  ASSERT_called_once_with(....)\n\nAnd probably do not need the self.assertTrue()","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":232,"context_line":"            attachments \u003d cinder.attach_volumes(task, volumes, connector)"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":235,"context_line":"        self.assertTrue(mock_reserve.called_once_with(volume_id))"},{"line_number":236,"context_line":"        self.assertTrue(mock_init.called_once_with(volume_id, connector))"},{"line_number":237,"context_line":"        self.assertTrue("},{"line_number":238,"context_line":"            mock_attach.called_once_with((volume_id, self.node.uuid, None)))"}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_db1ca515","line":235,"in_reply_to":"1a1ced50_70b75086","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"95d1bf67cc88dce4fb0ec01f4925618e385eb2f8","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":235,"context_line":"        self.assertTrue(mock_reserve.called_once_with(volume_id))"},{"line_number":236,"context_line":"        self.assertTrue(mock_init.called_once_with(volume_id, connector))"},{"line_number":237,"context_line":"        self.assertTrue("},{"line_number":238,"context_line":"            mock_attach.called_once_with((volume_id, self.node.uuid, None)))"},{"line_number":239,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_10a7fc4f","line":236,"updated":"2017-03-20 23:05:17.000000000","message":"This probably needs to be:\n\n  ASSERT_called_once_with(....)\n\nAnd probably do not need the self.assertTrue()\n\nand the rest of them.","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b1d02f2a7eef0ed98c933e3403e1106c05576f59","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":235,"context_line":"        self.assertTrue(mock_reserve.called_once_with(volume_id))"},{"line_number":236,"context_line":"        self.assertTrue(mock_init.called_once_with(volume_id, connector))"},{"line_number":237,"context_line":"        self.assertTrue("},{"line_number":238,"context_line":"            mock_attach.called_once_with((volume_id, self.node.uuid, None)))"},{"line_number":239,"context_line":"        self.assertTrue("}],"source_content_type":"text/x-python","patch_set":48,"id":"1a1ced50_1b171dee","line":236,"in_reply_to":"1a1ced50_10a7fc4f","updated":"2017-03-20 23:40:30.000000000","message":"Done","commit_id":"63fea594dc407c6d05f5716bd5ca83f066db321a"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"85abc386e184c83da8f6808e119229292048e8b2","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        mock_keystone_session.reset_mock()"},{"line_number":53,"context_line":"        mock_keystone_session.return_value \u003d \u0027session2\u0027"},{"line_number":54,"context_line":"        self.assertEqual(\u0027session1\u0027, cinder._get_cinder_session())"},{"line_number":55,"context_line":"        self.assertEqual(False, mock_keystone_session.called)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_20ef4588","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":61},"updated":"2017-03-21 04:52:43.000000000","message":"I guess this was already suggested:\nmock_keystone_session.assert_not_called()","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4173073bc23872990df91f88a17dc23aa4220bfb","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        mock_keystone_session.reset_mock()"},{"line_number":53,"context_line":"        mock_keystone_session.return_value \u003d \u0027session2\u0027"},{"line_number":54,"context_line":"        self.assertEqual(\u0027session1\u0027, cinder._get_cinder_session())"},{"line_number":55,"context_line":"        self.assertEqual(False, mock_keystone_session.called)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_bd425866","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":61},"in_reply_to":"1a1ced50_20ef4588","updated":"2017-03-21 19:47:09.000000000","message":"assert_not_called is available only in python 3.6 :(","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"cdafc45e6b8f664d93d46a7e0ab30221d5cce023","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        mock_keystone_session.reset_mock()"},{"line_number":53,"context_line":"        mock_keystone_session.return_value \u003d \u0027session2\u0027"},{"line_number":54,"context_line":"        self.assertEqual(\u0027session1\u0027, cinder._get_cinder_session())"},{"line_number":55,"context_line":"        self.assertEqual(False, mock_keystone_session.called)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_06423868","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":61},"in_reply_to":"1a1ced50_ab9a0d6c","updated":"2017-03-21 20:50:50.000000000","message":"I checked it. All the usages use this function on class mocks, here all the mocks are function mocks. It causes following error: \nAttributeError: \u0027function\u0027 object has no attribute \u0027assert_not_called\u0027\n\nMore: https://github.com/testing-cabal/mock/issues/398\n\nLeaving as is.","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b99c35b56741d184c836b67b9295f68fe395b0a2","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        mock_keystone_session.reset_mock()"},{"line_number":53,"context_line":"        mock_keystone_session.return_value \u003d \u0027session2\u0027"},{"line_number":54,"context_line":"        self.assertEqual(\u0027session1\u0027, cinder._get_cinder_session())"},{"line_number":55,"context_line":"        self.assertEqual(False, mock_keystone_session.called)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_ab9a0d6c","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":61},"in_reply_to":"1a1ced50_bd425866","updated":"2017-03-21 19:52:39.000000000","message":"We use it now in the code base. So it can be used.\n\nIt was introduced in Python 3.5 and back-ported.","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"74872107ea799fd1255fc613b144b306453daefe","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"},{"line_number":59,"context_line":"@mock.patch.object(cinderclient.Client, \"__init__\", autospec\u003dTrue)"},{"line_number":60,"context_line":"class TestCinderClient(base.TestCase):"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_767d886d","line":59,"updated":"2017-03-21 16:44:59.000000000","message":"Any reason it isn\u0027t the class that is mocked?\n\n @mock.patch.object(cinderclient, \"Client\", autospec\u003dTrue)","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4173073bc23872990df91f88a17dc23aa4220bfb","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"},{"line_number":59,"context_line":"@mock.patch.object(cinderclient.Client, \"__init__\", autospec\u003dTrue)"},{"line_number":60,"context_line":"class TestCinderClient(base.TestCase):"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_53b5d52e","line":59,"in_reply_to":"1a1ced50_767d886d","updated":"2017-03-21 19:47:09.000000000","message":"to explicitly state that only constructor is mocked","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"74872107ea799fd1255fc613b144b306453daefe","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        for vol in available_volumes:"},{"line_number":143,"context_line":"            result \u003d cinder.is_volume_available(vol)"},{"line_number":144,"context_line":"            self.assertEqual(True, result)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        for vol in unavailable_volumes:"},{"line_number":147,"context_line":"            result \u003d cinder.is_volume_available(vol)"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_02578d58","line":144,"updated":"2017-03-21 16:44:59.000000000","message":"I still think should use the \u0027msg\u0027 argument. And maybe use longMessage, but not sure on that.","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4173073bc23872990df91f88a17dc23aa4220bfb","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        for vol in available_volumes:"},{"line_number":143,"context_line":"            result \u003d cinder.is_volume_available(vol)"},{"line_number":144,"context_line":"            self.assertEqual(True, result)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        for vol in unavailable_volumes:"},{"line_number":147,"context_line":"            result \u003d cinder.is_volume_available(vol)"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_7891ce46","line":144,"in_reply_to":"1a1ced50_02578d58","updated":"2017-03-21 19:47:09.000000000","message":"Done","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"85abc386e184c83da8f6808e119229292048e8b2","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        attached_vol2 \u003d mock.Mock(id\u003d\u0027bar\u0027, attachments\u003d["},{"line_number":154,"context_line":"            {\u0027server_id\u0027: self.node.instance_uuid, \u0027attachment_id\u0027: \u0027meow\u0027}],)"},{"line_number":155,"context_line":"        unattached \u003d mock.Mock(attachments\u003d[])"},{"line_number":156,"context_line":"        cinder.is_volume_attached(self.node, attached_vol)"},{"line_number":157,"context_line":"        cinder.is_volume_attached(self.node, attached_vol2)"},{"line_number":158,"context_line":"        self.assertFalse(cinder.is_volume_attached(self.node, unattached))"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def test__get_attachment_id(self):"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_a3fa5fbb","line":157,"range":{"start_line":156,"start_character":0,"end_line":157,"end_character":59},"updated":"2017-03-21 04:52:43.000000000","message":"Should we be asserting something here?","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d1f1fb9112d1148806e173358849172039e4d179","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        attached_vol2 \u003d mock.Mock(id\u003d\u0027bar\u0027, attachments\u003d["},{"line_number":154,"context_line":"            {\u0027server_id\u0027: self.node.instance_uuid, \u0027attachment_id\u0027: \u0027meow\u0027}],)"},{"line_number":155,"context_line":"        unattached \u003d mock.Mock(attachments\u003d[])"},{"line_number":156,"context_line":"        cinder.is_volume_attached(self.node, attached_vol)"},{"line_number":157,"context_line":"        cinder.is_volume_attached(self.node, attached_vol2)"},{"line_number":158,"context_line":"        self.assertFalse(cinder.is_volume_attached(self.node, unattached))"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def test__get_attachment_id(self):"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_9d511c39","line":157,"range":{"start_line":156,"start_character":0,"end_line":157,"end_character":59},"in_reply_to":"1a1ced50_a3fa5fbb","updated":"2017-03-21 17:06:24.000000000","message":"+1","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4173073bc23872990df91f88a17dc23aa4220bfb","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        attached_vol2 \u003d mock.Mock(id\u003d\u0027bar\u0027, attachments\u003d["},{"line_number":154,"context_line":"            {\u0027server_id\u0027: self.node.instance_uuid, \u0027attachment_id\u0027: \u0027meow\u0027}],)"},{"line_number":155,"context_line":"        unattached \u003d mock.Mock(attachments\u003d[])"},{"line_number":156,"context_line":"        cinder.is_volume_attached(self.node, attached_vol)"},{"line_number":157,"context_line":"        cinder.is_volume_attached(self.node, attached_vol2)"},{"line_number":158,"context_line":"        self.assertFalse(cinder.is_volume_attached(self.node, unattached))"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def test__get_attachment_id(self):"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_18ca9a4e","line":157,"range":{"start_line":156,"start_character":0,"end_line":157,"end_character":59},"in_reply_to":"1a1ced50_a3fa5fbb","updated":"2017-03-21 19:47:09.000000000","message":"Done","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"85abc386e184c83da8f6808e119229292048e8b2","unresolved":false,"context_lines":[{"line_number":194,"context_line":""},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"},{"line_number":197,"context_line":"@mock.patch.object(cinderclient.volumes.VolumeManager, \"set_metadata\","},{"line_number":198,"context_line":"                   autospec\u003dTrue)"},{"line_number":199,"context_line":"@mock.patch.object(cinderclient.volumes.VolumeManager, \"get\", autospec\u003dTrue)"},{"line_number":200,"context_line":"class TestCinderActions(db_base.DbTestCase):"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_9ecf767e","line":197,"range":{"start_line":197,"start_character":55,"end_line":197,"end_character":69},"updated":"2017-03-21 04:52:43.000000000","message":"nit: I\u0027d use single quotes for all patch object parameters.","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4173073bc23872990df91f88a17dc23aa4220bfb","unresolved":false,"context_lines":[{"line_number":194,"context_line":""},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"},{"line_number":197,"context_line":"@mock.patch.object(cinderclient.volumes.VolumeManager, \"set_metadata\","},{"line_number":198,"context_line":"                   autospec\u003dTrue)"},{"line_number":199,"context_line":"@mock.patch.object(cinderclient.volumes.VolumeManager, \"get\", autospec\u003dTrue)"},{"line_number":200,"context_line":"class TestCinderActions(db_base.DbTestCase):"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_b36c49d1","line":197,"range":{"start_line":197,"start_character":55,"end_line":197,"end_character":69},"in_reply_to":"1a1ced50_9ecf767e","updated":"2017-03-21 19:47:09.000000000","message":"Done","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d1f1fb9112d1148806e173358849172039e4d179","unresolved":false,"context_lines":[{"line_number":194,"context_line":""},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"},{"line_number":197,"context_line":"@mock.patch.object(cinderclient.volumes.VolumeManager, \"set_metadata\","},{"line_number":198,"context_line":"                   autospec\u003dTrue)"},{"line_number":199,"context_line":"@mock.patch.object(cinderclient.volumes.VolumeManager, \"get\", autospec\u003dTrue)"},{"line_number":200,"context_line":"class TestCinderActions(db_base.DbTestCase):"}],"source_content_type":"text/x-python","patch_set":49,"id":"1a1ced50_bd3978f4","line":197,"range":{"start_line":197,"start_character":55,"end_line":197,"end_character":69},"in_reply_to":"1a1ced50_9ecf767e","updated":"2017-03-21 17:06:24.000000000","message":"meh. But that is because I don\u0027t care if it is single or double quotes.\n\nWhat I don\u0027t like is single quotes and then they escape the single quote like:\n\n \u0027Hi this ain\\\u0027t good\u0027\n \"Hi this ain\u0027t good\"","commit_id":"2904fbada20108be1f5af3751b8d21fafa68c004"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"96b21ea36ba17f01d28cf435cba822c3ea1f5e3d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                    group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @mock.patch.object(keystone, \u0027get_service_url\u0027, autospec\u003dTrue)"},{"line_number":75,"context_line":"    def test_get_cinder_client(self, mock_ks, mock_client_init, mock_session):"},{"line_number":76,"context_line":"        session \u003d mock.Mock()"},{"line_number":77,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":78,"context_line":"                    \u0027retries\u0027: 2,"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a1ced50_8b5391e1","line":75,"updated":"2017-03-21 19:53:40.000000000","message":"Please see comment in patch set 48","commit_id":"a7c476e7a5405e50b9433e882da9ae3608f0a6a7"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4a5696268e8e8d715d3eca2cfd9c5ca21935f0f3","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                    group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @mock.patch.object(keystone, \u0027get_service_url\u0027, autospec\u003dTrue)"},{"line_number":75,"context_line":"    def test_get_cinder_client(self, mock_ks, mock_client_init, mock_session):"},{"line_number":76,"context_line":"        session \u003d mock.Mock()"},{"line_number":77,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":78,"context_line":"                    \u0027retries\u0027: 2,"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a1ced50_d1837854","line":75,"in_reply_to":"1a1ced50_8b5391e1","updated":"2017-03-21 20:51:02.000000000","message":"Done","commit_id":"a7c476e7a5405e50b9433e882da9ae3608f0a6a7"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"96b21ea36ba17f01d28cf435cba822c3ea1f5e3d","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @mock.patch.object(keystone, \u0027get_service_url\u0027, autospec\u003dTrue)"},{"line_number":75,"context_line":"    def test_get_cinder_client(self, mock_ks, mock_client_init, mock_session):"},{"line_number":76,"context_line":"        session \u003d mock.Mock()"},{"line_number":77,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":78,"context_line":"                    \u0027retries\u0027: 2,"},{"line_number":79,"context_line":"                    \u0027insecure\u0027: False,"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a1ced50_cb5f49e3","line":76,"updated":"2017-03-21 19:53:40.000000000","message":"Please see comment in patch set 48","commit_id":"a7c476e7a5405e50b9433e882da9ae3608f0a6a7"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4a5696268e8e8d715d3eca2cfd9c5ca21935f0f3","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @mock.patch.object(keystone, \u0027get_service_url\u0027, autospec\u003dTrue)"},{"line_number":75,"context_line":"    def test_get_cinder_client(self, mock_ks, mock_client_init, mock_session):"},{"line_number":76,"context_line":"        session \u003d mock.Mock()"},{"line_number":77,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"},{"line_number":78,"context_line":"                    \u0027retries\u0027: 2,"},{"line_number":79,"context_line":"                    \u0027insecure\u0027: False,"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a1ced50_71956485","line":76,"in_reply_to":"1a1ced50_cb5f49e3","updated":"2017-03-21 20:51:02.000000000","message":"Done","commit_id":"a7c476e7a5405e50b9433e882da9ae3608f0a6a7"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"96b21ea36ba17f01d28cf435cba822c3ea1f5e3d","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        for vol in available_volumes:"},{"line_number":143,"context_line":"            result \u003d cinder.is_volume_available(vol)"},{"line_number":144,"context_line":"            self.assertEqual(True, result,"},{"line_number":145,"context_line":"                             message\u003d\"Failed for status \u0027%s\u0027.\" % vol.status)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        for vol in unavailable_volumes:"},{"line_number":148,"context_line":"            result \u003d cinder.is_volume_available(vol)"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a1ced50_abb92d17","line":145,"updated":"2017-03-21 19:53:40.000000000","message":"I thought the argument had to be \u0027msg\u0027","commit_id":"a7c476e7a5405e50b9433e882da9ae3608f0a6a7"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"38e1a145e1901819ed5d6fe6814d6cc095014264","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        for vol in available_volumes:"},{"line_number":143,"context_line":"            result \u003d cinder.is_volume_available(vol)"},{"line_number":144,"context_line":"            self.assertEqual(True, result,"},{"line_number":145,"context_line":"                             message\u003d\"Failed for status \u0027%s\u0027.\" % vol.status)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        for vol in unavailable_volumes:"},{"line_number":148,"context_line":"            result \u003d cinder.is_volume_available(vol)"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a1ced50_2c5d5379","line":145,"in_reply_to":"1a1ced50_91b74039","updated":"2017-03-21 21:19:45.000000000","message":"Ah okay. I believed the docs when it said:\n\nAll the assert methods (except assertRaises(), assertRaisesRegexp()) accept a msg argument that, if specified, is used as the error message on failure (see also longMessage).","commit_id":"a7c476e7a5405e50b9433e882da9ae3608f0a6a7"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"4a5696268e8e8d715d3eca2cfd9c5ca21935f0f3","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        for vol in available_volumes:"},{"line_number":143,"context_line":"            result \u003d cinder.is_volume_available(vol)"},{"line_number":144,"context_line":"            self.assertEqual(True, result,"},{"line_number":145,"context_line":"                             message\u003d\"Failed for status \u0027%s\u0027.\" % vol.status)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        for vol in unavailable_volumes:"},{"line_number":148,"context_line":"            result \u003d cinder.is_volume_available(vol)"}],"source_content_type":"text/x-python","patch_set":50,"id":"1a1ced50_91b74039","line":145,"in_reply_to":"1a1ced50_abb92d17","updated":"2017-03-21 20:51:02.000000000","message":"signature says:  assertEqual(self, expected, observed, message\u003d\u0027\u0027)\n\nIt works with message, tried with msg and if fails","commit_id":"a7c476e7a5405e50b9433e882da9ae3608f0a6a7"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                    group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def test__get_cinder_session(self, mock_keystone_session):"},{"line_number":46,"context_line":"        \"\"\"Check establishing new session when no session exists.\"\"\""},{"line_number":47,"context_line":"        mock_keystone_session.return_value \u003d \u0027session1\u0027"},{"line_number":48,"context_line":"        self.assertEqual(\u0027session1\u0027, cinder._get_cinder_session())"},{"line_number":49,"context_line":"        mock_keystone_session.assert_called_once_with(\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_76c0c750","line":46,"updated":"2017-03-22 20:16:42.000000000","message":"super small style nit: maybe replace with # prefix instead and L51, since these are single-line comments and not multiline or docstring","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":43,"context_line":"                    group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def test__get_cinder_session(self, mock_keystone_session):"},{"line_number":46,"context_line":"        \"\"\"Check establishing new session when no session exists.\"\"\""},{"line_number":47,"context_line":"        mock_keystone_session.return_value \u003d \u0027session1\u0027"},{"line_number":48,"context_line":"        self.assertEqual(\u0027session1\u0027, cinder._get_cinder_session())"},{"line_number":49,"context_line":"        mock_keystone_session.assert_called_once_with(\u0027cinder\u0027)"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_e075c9ca","line":46,"in_reply_to":"1a1ced50_76c0c750","updated":"2017-03-23 00:56:17.000000000","message":"I find these comments descriptive in docstring-like style, since they describe what that test does.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        for vol in available_volumes:"},{"line_number":143,"context_line":"            result \u003d cinder.is_volume_available(vol)"},{"line_number":144,"context_line":"            self.assertEqual(True, result,"},{"line_number":145,"context_line":"                             message\u003d\"Failed for status \u0027%s\u0027.\" % vol.status)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        for vol in unavailable_volumes:"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_369acf6e","line":144,"updated":"2017-03-22 20:16:42.000000000","message":"nit: this can be assertTrue, or assertIs if you\u0027re expecting the result to be True and not \"truthy\"\n\nThis (and assertTrue, I think) test result \u003d\u003d True, but you probably want to test \"result is True\"\n\nsame with other assertEqual with booleans below","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":141,"context_line":""},{"line_number":142,"context_line":"        for vol in available_volumes:"},{"line_number":143,"context_line":"            result \u003d cinder.is_volume_available(vol)"},{"line_number":144,"context_line":"            self.assertEqual(True, result,"},{"line_number":145,"context_line":"                             message\u003d\"Failed for status \u0027%s\u0027.\" % vol.status)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        for vol in unavailable_volumes:"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_a03d91de","line":144,"in_reply_to":"1a1ced50_369acf6e","updated":"2017-03-23 00:56:17.000000000","message":"I hesitated on this one and chose to use assertEqual, because it shows the purpose of this test more explicitly together with lines 147-150.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        result \u003d cinder._create_metadata_dictionary(self.node, \u0027meow\u0027)"},{"line_number":190,"context_line":"        self.maxDiff \u003d None"},{"line_number":191,"context_line":"        # Since datetime is an internal, we can\u0027t exactly mock it."},{"line_number":192,"context_line":"        # We can however verify it\u0027s presence, and replace it."},{"line_number":193,"context_line":"        self.assertIsInstance(result[expected_key][\u0027last_seen\u0027], str)"},{"line_number":194,"context_line":"        result[expected_key][\u0027last_seen\u0027] \u003d \u0027faked-time\u0027"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_36d64ff1","line":191,"updated":"2017-03-22 20:16:42.000000000","message":"nit: you could use this instead: https://docs.openstack.org/developer/oslo.utils/api/timeutils.html#oslo_utils.timeutils.utcnow\n\nThat\u0027d make mocking easier","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":485,"context_line":"                                            self.node.instance_uuid, None)"},{"line_number":486,"context_line":"        mock_set_meta.assert_called_once_with(mock.ANY, volume_id,"},{"line_number":487,"context_line":"                                              {\u0027bar\u0027: \u0027baz\u0027})"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    @mock.patch.object(cinderclient.volumes.VolumeManager, \u0027detach\u0027,"},{"line_number":490,"context_line":"                       autospec\u003dTrue)"},{"line_number":491,"context_line":"    @mock.patch.object(cinderclient.volumes.VolumeManager,"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_f66bd71b","line":488,"updated":"2017-03-22 20:16:42.000000000","message":"Please add test cases for attach_volumes failure with multiple volumes, regardless of whether we do best effort or not. \n\nIf we go with the current attachment strategy, it\u0027d be good to test that no further attempts are made after the first failure.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":485,"context_line":"                                            self.node.instance_uuid, None)"},{"line_number":486,"context_line":"        mock_set_meta.assert_called_once_with(mock.ANY, volume_id,"},{"line_number":487,"context_line":"                                              {\u0027bar\u0027: \u0027baz\u0027})"},{"line_number":488,"context_line":""},{"line_number":489,"context_line":"    @mock.patch.object(cinderclient.volumes.VolumeManager, \u0027detach\u0027,"},{"line_number":490,"context_line":"                       autospec\u003dTrue)"},{"line_number":491,"context_line":"    @mock.patch.object(cinderclient.volumes.VolumeManager,"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_bb8ce0da","line":488,"in_reply_to":"1a1ced50_f66bd71b","updated":"2017-03-23 00:56:17.000000000","message":"Done","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"2d7bce2c30efe63d10129220c72fede8873caf56","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                                  connector, allow_errors\u003dTrue)"},{"line_number":689,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"},{"line_number":690,"context_line":"            mock_set_meta.assert_called_once_with(mock.ANY, volume_id,"},{"line_number":691,"context_line":"                                                  {\u0027bar\u0027: \u0027baz\u0027})"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_76f4475a","line":691,"updated":"2017-03-22 20:16:42.000000000","message":"Please add tests for detach_volume failure cases where allow_errors\u003dFalse with errors that aren\u0027t client init failures.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"17194b0d630db50f097def573344018f9930cdcf","unresolved":false,"context_lines":[{"line_number":688,"context_line":"                                  connector, allow_errors\u003dTrue)"},{"line_number":689,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"},{"line_number":690,"context_line":"            mock_set_meta.assert_called_once_with(mock.ANY, volume_id,"},{"line_number":691,"context_line":"                                                  {\u0027bar\u0027: \u0027baz\u0027})"}],"source_content_type":"text/x-python","patch_set":52,"id":"1a1ced50_1f531f18","line":691,"in_reply_to":"1a1ced50_76f4475a","updated":"2017-03-23 00:56:17.000000000","message":"it is False by default so all above test cases apply. Anyway - added check here.","commit_id":"cf284c43f56daa4b5d52d48a07ab924a596a3462"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"a8fa82c6b0610ecf6eda1a9ffb5120e90726953b","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        super(TestCinderSession, self).setUp()"},{"line_number":35,"context_line":"        self.config(url_timeout\u003d30,"},{"line_number":36,"context_line":"                    retries\u003d2,"},{"line_number":37,"context_line":"                    insecure\u003dFalse,"},{"line_number":38,"context_line":"                    certfile\u003d\u0027test-file\u0027,"},{"line_number":39,"context_line":"                    group\u003d\u0027cinder\u0027)"},{"line_number":40,"context_line":"        self.config(admin_user\u003d\u0027test-admin-user\u0027,"},{"line_number":41,"context_line":"                    admin_password\u003d\u0027test-admin-password\u0027,"},{"line_number":42,"context_line":"                    auth_uri\u003d\u0027test-auth-uri\u0027,"},{"line_number":43,"context_line":"                    group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def test__get_cinder_session(self, mock_keystone_session):"},{"line_number":46,"context_line":"        \"\"\"Check establishing new session when no session exists.\"\"\""}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_7ecec682","line":43,"range":{"start_line":35,"start_character":0,"end_line":43,"end_character":47},"updated":"2017-03-28 06:30:24.000000000","message":"This configuration is not necessary just to test _get_cinder().","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"5773266dcc41da6605ddf272f235c5db5105f8ec","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def setUp(self):"},{"line_number":34,"context_line":"        super(TestCinderSession, self).setUp()"},{"line_number":35,"context_line":"        self.config(url_timeout\u003d30,"},{"line_number":36,"context_line":"                    retries\u003d2,"},{"line_number":37,"context_line":"                    insecure\u003dFalse,"},{"line_number":38,"context_line":"                    certfile\u003d\u0027test-file\u0027,"},{"line_number":39,"context_line":"                    group\u003d\u0027cinder\u0027)"},{"line_number":40,"context_line":"        self.config(admin_user\u003d\u0027test-admin-user\u0027,"},{"line_number":41,"context_line":"                    admin_password\u003d\u0027test-admin-password\u0027,"},{"line_number":42,"context_line":"                    auth_uri\u003d\u0027test-auth-uri\u0027,"},{"line_number":43,"context_line":"                    group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def test__get_cinder_session(self, mock_keystone_session):"},{"line_number":46,"context_line":"        \"\"\"Check establishing new session when no session exists.\"\"\""}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_c945feb5","line":43,"range":{"start_line":35,"start_character":0,"end_line":43,"end_character":47},"in_reply_to":"ffe62b97_7ecec682","updated":"2017-03-28 16:14:21.000000000","message":"Done","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":13689,"name":"Hironori Shiina","email":"Hironori.Shiina@fujitsu.com","username":"shiina"},"change_message_id":"a8fa82c6b0610ecf6eda1a9ffb5120e90726953b","unresolved":false,"context_lines":[{"line_number":71,"context_line":"                    auth_uri\u003d\u0027test-auth-uri\u0027,"},{"line_number":72,"context_line":"                    group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    @mock.patch.object(keystone, \u0027get_service_url\u0027, autospec\u003dTrue)"},{"line_number":75,"context_line":"    def test_get_client(self, mock_ks, mock_client_init, mock_session):"},{"line_number":76,"context_line":"        mock_session_obj \u003d mock.Mock()"},{"line_number":77,"context_line":"        expected \u003d {\u0027timeout\u0027: 30,"}],"source_content_type":"text/x-python","patch_set":54,"id":"ffe62b97_3ed5dee5","line":74,"updated":"2017-03-28 06:30:24.000000000","message":"This mock is no longer necessary.","commit_id":"207ac326254c91e11fce3f3b9a86aaa756335059"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"3c2723d9dbd939972bfd209496d8f0a3b1c9ac9c","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":282,"context_line":"            attachments \u003d cinder.attach_volumes(task, volumes, connector)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        self.assertEqual(len(expected), len(attachments))"},{"line_number":285,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":286,"context_line":"        self.assertDictEqual(expected[1], attachments[1])"},{"line_number":287,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_9aedf6b8","line":284,"updated":"2017-03-28 17:16:18.000000000","message":"Can we just do:\n\n self.assertEqual(expected, attachments)\n\nto replace lines 284-286","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":282,"context_line":"            attachments \u003d cinder.attach_volumes(task, volumes, connector)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        self.assertEqual(len(expected), len(attachments))"},{"line_number":285,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":286,"context_line":"        self.assertDictEqual(expected[1], attachments[1])"},{"line_number":287,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_a3be4bb1","line":284,"in_reply_to":"ffe62b97_765c86ec","updated":"2017-03-28 21:48:14.000000000","message":"Done","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"6793887437426d1f7a068fca2c91153f6dd9b5a5","unresolved":false,"context_lines":[{"line_number":281,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":282,"context_line":"            attachments \u003d cinder.attach_volumes(task, volumes, connector)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        self.assertEqual(len(expected), len(attachments))"},{"line_number":285,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":286,"context_line":"        self.assertDictEqual(expected[1], attachments[1])"},{"line_number":287,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_765c86ec","line":284,"in_reply_to":"ffe62b97_9aedf6b8","updated":"2017-03-28 19:35:21.000000000","message":"I think so; python seems to be happy with comparing dicts, lists, and lists of dicts from some sciencing:\n\n\u003e\u003e\u003e [1,2,3] \u003d\u003d [1,2,3]\nTrue\n\u003e\u003e\u003e [{\u0027a\u0027: 1}] \u003d\u003d [{\u0027a\u0027: 1}]\nTrue\n\u003e\u003e\u003e [{\u0027a\u0027: 1}] \u003d\u003d [{\u0027a\u0027: 1, \u0027b\u0027: 1}]\nFalse\n\u003e\u003e\u003e {\u0027a\u0027: 1} \u003d\u003d {\u0027a\u0027: 1}\nTrue","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b32b40e0b74c777a1e0fa84d7b67ef01a4b88264","unresolved":false,"context_lines":[{"line_number":687,"context_line":"            {\u0027server_id\u0027: self.node.uuid, \u0027attachment_id\u0027: \u0027qux\u0027}])"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":690,"context_line":"            mock_detach.side_effect \u003d cinder_exceptions.NotAcceptable(406)"},{"line_number":691,"context_line":"            cinder.detach_volumes(task, volumes, connector, allow_errors\u003dTrue)"},{"line_number":692,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"},{"line_number":693,"context_line":"            mock_detach.reset_mock()"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_ff42b1aa","line":690,"range":{"start_line":690,"start_character":70,"end_line":690,"end_character":73},"updated":"2017-03-28 17:43:15.000000000","message":"Please use the http_client library instead of bare number.\n\n from six.moves import http_client\n\n \n\n http_client.NOT_ACCEPTABLE \u003d\u003d 406\n\nhttps://docs.python.org/3/library/http.html#http-status-codes","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":687,"context_line":"            {\u0027server_id\u0027: self.node.uuid, \u0027attachment_id\u0027: \u0027qux\u0027}])"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":690,"context_line":"            mock_detach.side_effect \u003d cinder_exceptions.NotAcceptable(406)"},{"line_number":691,"context_line":"            cinder.detach_volumes(task, volumes, connector, allow_errors\u003dTrue)"},{"line_number":692,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"},{"line_number":693,"context_line":"            mock_detach.reset_mock()"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_43fbff77","line":690,"range":{"start_line":690,"start_character":70,"end_line":690,"end_character":73},"in_reply_to":"ffe62b97_36727e7c","updated":"2017-03-28 21:48:14.000000000","message":"Done","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"6793887437426d1f7a068fca2c91153f6dd9b5a5","unresolved":false,"context_lines":[{"line_number":687,"context_line":"            {\u0027server_id\u0027: self.node.uuid, \u0027attachment_id\u0027: \u0027qux\u0027}])"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":690,"context_line":"            mock_detach.side_effect \u003d cinder_exceptions.NotAcceptable(406)"},{"line_number":691,"context_line":"            cinder.detach_volumes(task, volumes, connector, allow_errors\u003dTrue)"},{"line_number":692,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"},{"line_number":693,"context_line":"            mock_detach.reset_mock()"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_36727e7c","line":690,"range":{"start_line":690,"start_character":70,"end_line":690,"end_character":73},"in_reply_to":"ffe62b97_ff42b1aa","updated":"2017-03-28 19:35:21.000000000","message":"+1","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b32b40e0b74c777a1e0fa84d7b67ef01a4b88264","unresolved":false,"context_lines":[{"line_number":697,"context_line":"                              volumes,"},{"line_number":698,"context_line":"                              connector,"},{"line_number":699,"context_line":"                              allow_errors\u003dFalse)"},{"line_number":700,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"},{"line_number":701,"context_line":"            mock_detach.reset_mock()"},{"line_number":702,"context_line":"            mock_set_meta.reset_mock()"},{"line_number":703,"context_line":"            mock_set_meta.side_effect \u003d cinder_exceptions.NotAcceptable(406)"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_3f93795d","line":700,"updated":"2017-03-28 17:43:15.000000000","message":"This and line 705 appear to be the same. But now I see that there is a second test in here. Might be clearer to separate them.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"b32b40e0b74c777a1e0fa84d7b67ef01a4b88264","unresolved":false,"context_lines":[{"line_number":698,"context_line":"                              connector,"},{"line_number":699,"context_line":"                              allow_errors\u003dFalse)"},{"line_number":700,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"},{"line_number":701,"context_line":"            mock_detach.reset_mock()"},{"line_number":702,"context_line":"            mock_set_meta.reset_mock()"},{"line_number":703,"context_line":"            mock_set_meta.side_effect \u003d cinder_exceptions.NotAcceptable(406)"},{"line_number":704,"context_line":"            cinder.detach_volumes(task, volumes, connector, allow_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_ffa631ab","line":701,"updated":"2017-03-28 17:43:15.000000000","message":"Might be good to separate these two tests with some whitespace and a comment.","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"b4207ed1570fbf96a5ad7a1248b510c725325008","unresolved":false,"context_lines":[{"line_number":698,"context_line":"                              connector,"},{"line_number":699,"context_line":"                              allow_errors\u003dFalse)"},{"line_number":700,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"},{"line_number":701,"context_line":"            mock_detach.reset_mock()"},{"line_number":702,"context_line":"            mock_set_meta.reset_mock()"},{"line_number":703,"context_line":"            mock_set_meta.side_effect \u003d cinder_exceptions.NotAcceptable(406)"},{"line_number":704,"context_line":"            cinder.detach_volumes(task, volumes, connector, allow_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":55,"id":"ffe62b97_2326bb16","line":701,"in_reply_to":"ffe62b97_ffa631ab","updated":"2017-03-28 21:48:14.000000000","message":"Done","commit_id":"b655775595859de915532d00d952304e77da07c0"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"},{"line_number":55,"context_line":"@mock.patch.object(cinderclient.Client, \"__init__\", autospec\u003dTrue)"},{"line_number":56,"context_line":"class TestCinderClient(base.TestCase):"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_4e3ccd92","line":55,"range":{"start_line":55,"start_character":40,"end_line":55,"end_character":50},"updated":"2017-04-01 04:52:18.000000000","message":"super nit: s/\"__init__\"/\u0027__init__\u0027","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"},{"line_number":55,"context_line":"@mock.patch.object(cinderclient.Client, \"__init__\", autospec\u003dTrue)"},{"line_number":56,"context_line":"class TestCinderClient(base.TestCase):"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_759a946e","line":55,"range":{"start_line":55,"start_character":40,"end_line":55,"end_character":50},"in_reply_to":"dfeb2761_4e3ccd92","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        mock_session_obj \u003d mock.Mock()"},{"line_number":67,"context_line":"        expected \u003d {\u0027connect_retries\u0027: 2,"},{"line_number":68,"context_line":"                    \u0027session\u0027: mock_session_obj}"},{"line_number":69,"context_line":"        mock_ks.return_value \u003d \u0027test-auth-uri\u0027"},{"line_number":70,"context_line":"        mock_session.return_value \u003d mock_session_obj"},{"line_number":71,"context_line":"        mock_client_init.return_value \u003d None"},{"line_number":72,"context_line":"        cinder.get_client()"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_8ea9b57c","line":69,"range":{"start_line":69,"start_character":0,"end_line":69,"end_character":46},"updated":"2017-04-01 04:52:18.000000000","message":"Why is it necessary to mock keystone.get_service_url? It\u0027s not clear no me.","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        mock_session_obj \u003d mock.Mock()"},{"line_number":67,"context_line":"        expected \u003d {\u0027connect_retries\u0027: 2,"},{"line_number":68,"context_line":"                    \u0027session\u0027: mock_session_obj}"},{"line_number":69,"context_line":"        mock_ks.return_value \u003d \u0027test-auth-uri\u0027"},{"line_number":70,"context_line":"        mock_session.return_value \u003d mock_session_obj"},{"line_number":71,"context_line":"        mock_client_init.return_value \u003d None"},{"line_number":72,"context_line":"        cinder.get_client()"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_358e4c2e","line":69,"range":{"start_line":69,"start_character":0,"end_line":69,"end_character":46},"in_reply_to":"dfeb2761_8ea9b57c","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                    \u0027session\u0027: mock_session_obj}"},{"line_number":83,"context_line":"        mock_session.return_value \u003d mock_session_obj"},{"line_number":84,"context_line":"        mock_client_init.return_value \u003d None"},{"line_number":85,"context_line":"        cinder.get_client()"},{"line_number":86,"context_line":"        mock_client_init.assert_called_once_with(mock.ANY, **expected)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_get_client_with_region(self, mock_client_init, mock_session):"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_0e612537","line":85,"range":{"start_line":85,"start_character":0,"end_line":85,"end_character":27},"updated":"2017-04-01 04:52:18.000000000","message":"After L85 and L97 we should call (like L73):\n\n  mock_session.assert_called_once_with()","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                    \u0027session\u0027: mock_session_obj}"},{"line_number":83,"context_line":"        mock_session.return_value \u003d mock_session_obj"},{"line_number":84,"context_line":"        mock_client_init.return_value \u003d None"},{"line_number":85,"context_line":"        cinder.get_client()"},{"line_number":86,"context_line":"        mock_client_init.assert_called_once_with(mock.ANY, **expected)"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    def test_get_client_with_region(self, mock_client_init, mock_session):"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_5590b043","line":85,"range":{"start_line":85,"start_character":0,"end_line":85,"end_character":27},"in_reply_to":"dfeb2761_0e612537","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":230,"context_line":"            attachments \u003d cinder.attach_volumes(task, volumes, connector)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":233,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"},{"line_number":234,"context_line":"        mock_init.assert_called_once_with(mock.ANY, volume_id, connector)"},{"line_number":235,"context_line":"        mock_attach.assert_called_once_with(mock.ANY, volume_id,"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_3199ee6d","line":232,"updated":"2017-04-01 04:52:18.000000000","message":"This should be also tested:\nmock_get.assert_called_once_with(mock.ANY, volume_id)","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":230,"context_line":"            attachments \u003d cinder.attach_volumes(task, volumes, connector)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":233,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"},{"line_number":234,"context_line":"        mock_init.assert_called_once_with(mock.ANY, volume_id, connector)"},{"line_number":235,"context_line":"        mock_attach.assert_called_once_with(mock.ANY, volume_id,"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_35e1acd1","line":232,"in_reply_to":"dfeb2761_3199ee6d","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    @mock.patch.object(cinderclient.volumes.VolumeManager, \u0027reserve\u0027,"},{"line_number":313,"context_line":"                       autospec\u003dTrue)"},{"line_number":314,"context_line":"    @mock.patch.object(cinder, \u0027_create_metadata_dictionary\u0027, autospec\u003dTrue)"},{"line_number":315,"context_line":"    def test_attach_volumes_vol_not_found("},{"line_number":316,"context_line":"            self, mock_create_meta, mock_reserve, mock_init, mock_attach,"},{"line_number":317,"context_line":"            mock_get, mock_set_meta, mock_session):"},{"line_number":318,"context_line":"        \"\"\"Raise an error if the volume lookup fails\"\"\""}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_5a2ec743","line":315,"updated":"2017-04-01 04:52:18.000000000","message":"I wonder this method needs:\n@mock.patch.object(cinderclient.Client, \u0027__init__\u0027)\n\nTo patch `return client.Client(**params)` in cinder.py L61.","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":312,"context_line":"    @mock.patch.object(cinderclient.volumes.VolumeManager, \u0027reserve\u0027,"},{"line_number":313,"context_line":"                       autospec\u003dTrue)"},{"line_number":314,"context_line":"    @mock.patch.object(cinder, \u0027_create_metadata_dictionary\u0027, autospec\u003dTrue)"},{"line_number":315,"context_line":"    def test_attach_volumes_vol_not_found("},{"line_number":316,"context_line":"            self, mock_create_meta, mock_reserve, mock_init, mock_attach,"},{"line_number":317,"context_line":"            mock_get, mock_set_meta, mock_session):"},{"line_number":318,"context_line":"        \"\"\"Raise an error if the volume lookup fails\"\"\""}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_f538e43d","line":315,"in_reply_to":"dfeb2761_5a2ec743","updated":"2017-04-03 16:39:03.000000000","message":"It doesn\u0027t - all client methods are mocked, client creation is tested above :)","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                       autospec\u003dTrue)"},{"line_number":378,"context_line":"    @mock.patch.object(cinder, \u0027is_volume_attached\u0027, autospec\u003dTrue)"},{"line_number":379,"context_line":"    @mock.patch.object(cinder, \u0027_create_metadata_dictionary\u0027, autospec\u003dTrue)"},{"line_number":380,"context_line":"    def test_attach_volumes_init_failure("},{"line_number":381,"context_line":"            self, mock_create_meta, mock_is_attached, mock_reserve, mock_init,"},{"line_number":382,"context_line":"            mock_get, mock_set_meta, mock_session):"},{"line_number":383,"context_line":"        \"\"\"Fail attachment upon an initialization failure.\"\"\""}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_ba9f134f","line":380,"range":{"start_line":380,"start_character":8,"end_line":380,"end_character":40},"updated":"2017-04-01 04:52:18.000000000","message":"I\u0027d rename this method to:\ntest_attach_volumes_initialize_connection_failure\n\nWhich is more specific and avoids relating it to class initialization.","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":377,"context_line":"                       autospec\u003dTrue)"},{"line_number":378,"context_line":"    @mock.patch.object(cinder, \u0027is_volume_attached\u0027, autospec\u003dTrue)"},{"line_number":379,"context_line":"    @mock.patch.object(cinder, \u0027_create_metadata_dictionary\u0027, autospec\u003dTrue)"},{"line_number":380,"context_line":"    def test_attach_volumes_init_failure("},{"line_number":381,"context_line":"            self, mock_create_meta, mock_is_attached, mock_reserve, mock_init,"},{"line_number":382,"context_line":"            mock_get, mock_set_meta, mock_session):"},{"line_number":383,"context_line":"        \"\"\"Fail attachment upon an initialization failure.\"\"\""}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_b8d8117f","line":380,"range":{"start_line":380,"start_character":8,"end_line":380,"end_character":40},"in_reply_to":"dfeb2761_ba9f134f","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":398,"context_line":"                              task,"},{"line_number":399,"context_line":"                              volumes,"},{"line_number":400,"context_line":"                              connector)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"},{"line_number":403,"context_line":"        mock_init.assert_called_once_with(mock.ANY, volume_id, connector)"},{"line_number":404,"context_line":""}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_faeb5bad","line":401,"updated":"2017-04-01 04:52:18.000000000","message":"mock_get.assert_called_once_with(mock.ANY, volume_id)","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":398,"context_line":"                              task,"},{"line_number":399,"context_line":"                              volumes,"},{"line_number":400,"context_line":"                              connector)"},{"line_number":401,"context_line":""},{"line_number":402,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"},{"line_number":403,"context_line":"        mock_init.assert_called_once_with(mock.ANY, volume_id, connector)"},{"line_number":404,"context_line":""}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_55bf9060","line":401,"in_reply_to":"dfeb2761_faeb5bad","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":436,"context_line":"            self.assertRaises(exception.StorageError, cinder.attach_volumes,"},{"line_number":437,"context_line":"                              task, volumes, connector)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"},{"line_number":440,"context_line":"        mock_init.assert_called_once_with(mock.ANY, volume_id, connector)"},{"line_number":441,"context_line":"        mock_attach.assert_called_once_with(mock.ANY, volume_id,"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_fa391b41","line":438,"updated":"2017-04-01 04:52:18.000000000","message":"Should these be added?\n\nmock_get.assert_called_once_with(mock.ANY, volume_id)\nmock_is_attached.assert_called_once_with(mock.ANY, mock_get.return_value)","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":435,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":436,"context_line":"            self.assertRaises(exception.StorageError, cinder.attach_volumes,"},{"line_number":437,"context_line":"                              task, volumes, connector)"},{"line_number":438,"context_line":""},{"line_number":439,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"},{"line_number":440,"context_line":"        mock_init.assert_called_once_with(mock.ANY, volume_id, connector)"},{"line_number":441,"context_line":"        mock_attach.assert_called_once_with(mock.ANY, volume_id,"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_95acf834","line":438,"in_reply_to":"dfeb2761_fa391b41","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":449,"context_line":"                       autospec\u003dTrue)"},{"line_number":450,"context_line":"    @mock.patch.object(cinder, \u0027is_volume_attached\u0027, autospec\u003dTrue)"},{"line_number":451,"context_line":"    @mock.patch.object(cinder, \u0027_create_metadata_dictionary\u0027, autospec\u003dTrue)"},{"line_number":452,"context_line":"    def test_attach_volumes_attach_set_meta_failure("},{"line_number":453,"context_line":"            self, mock_create_meta, mock_is_attached,"},{"line_number":454,"context_line":"            mock_reserve, mock_init, mock_attach, mock_get, mock_set_meta,"},{"line_number":455,"context_line":"            mock_session):"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_e5c5fc8f","line":452,"updated":"2017-04-01 04:52:18.000000000","message":"Maybe it\u0027d be good to test the exception by checking the log call:\n\n@mock.patch.object(cinder, \u0027LOG\u0027, autospec\u003dTrue)\nself.assertTrue(mock_log.warning.called)","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":449,"context_line":"                       autospec\u003dTrue)"},{"line_number":450,"context_line":"    @mock.patch.object(cinder, \u0027is_volume_attached\u0027, autospec\u003dTrue)"},{"line_number":451,"context_line":"    @mock.patch.object(cinder, \u0027_create_metadata_dictionary\u0027, autospec\u003dTrue)"},{"line_number":452,"context_line":"    def test_attach_volumes_attach_set_meta_failure("},{"line_number":453,"context_line":"            self, mock_create_meta, mock_is_attached,"},{"line_number":454,"context_line":"            mock_reserve, mock_init, mock_attach, mock_get, mock_set_meta,"},{"line_number":455,"context_line":"            mock_session):"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_554d5098","line":452,"in_reply_to":"dfeb2761_e5c5fc8f","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":485,"context_line":"            attachments \u003d cinder.attach_volumes(task, volumes, connector)"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":488,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"},{"line_number":489,"context_line":"        mock_init.assert_called_once_with(mock.ANY, volume_id, connector)"},{"line_number":490,"context_line":"        mock_attach.assert_called_once_with(mock.ANY, volume_id,"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_9a59ef5b","line":487,"updated":"2017-04-01 04:52:18.000000000","message":"Should these be added?\n\nmock_get.assert_called_once_with(mock.ANY, volume_id)\nmock_is_attached.assert_called_once_with(mock.ANY, mock_get.return_value)","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":485,"context_line":"            attachments \u003d cinder.attach_volumes(task, volumes, connector)"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":488,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"},{"line_number":489,"context_line":"        mock_init.assert_called_once_with(mock.ANY, volume_id, connector)"},{"line_number":490,"context_line":"        mock_attach.assert_called_once_with(mock.ANY, volume_id,"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_1515884a","line":487,"in_reply_to":"dfeb2761_9a59ef5b","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":530,"context_line":"                       autospec\u003dTrue)"},{"line_number":531,"context_line":"    @mock.patch.object(cinder, \u0027is_volume_attached\u0027, autospec\u003dTrue)"},{"line_number":532,"context_line":"    @mock.patch.object(cinder, \u0027_create_metadata_dictionary\u0027, autospec\u003dTrue)"},{"line_number":533,"context_line":"    def test_detach_volumes_one_detached("},{"line_number":534,"context_line":"            self, mock_create_meta, mock_is_attached, mock_begin,"},{"line_number":535,"context_line":"            mock_term, mock_detach, mock_get, mock_set_meta, mock_session):"},{"line_number":536,"context_line":"        \"\"\"Iterate with two volumes, one already detached.\"\"\""}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_25b2c4e7","line":533,"updated":"2017-04-01 04:52:18.000000000","message":"Few changes in this test:\n- \u0027is_volume_attached\u0027 should not be mocked, attach status is inferred from each object in mock_get.side_effects\n- L538 volumes needs two ids, e.g. [volume_id, \u0027unknown\u0027]\n- L542 is not needed","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":530,"context_line":"                       autospec\u003dTrue)"},{"line_number":531,"context_line":"    @mock.patch.object(cinder, \u0027is_volume_attached\u0027, autospec\u003dTrue)"},{"line_number":532,"context_line":"    @mock.patch.object(cinder, \u0027_create_metadata_dictionary\u0027, autospec\u003dTrue)"},{"line_number":533,"context_line":"    def test_detach_volumes_one_detached("},{"line_number":534,"context_line":"            self, mock_create_meta, mock_is_attached, mock_begin,"},{"line_number":535,"context_line":"            mock_term, mock_detach, mock_get, mock_set_meta, mock_session):"},{"line_number":536,"context_line":"        \"\"\"Iterate with two volumes, one already detached.\"\"\""}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_589c65bf","line":533,"in_reply_to":"dfeb2761_25b2c4e7","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":687,"context_line":"            mock_detach.side_effect \u003d cinder_exceptions.NotAcceptable("},{"line_number":688,"context_line":"                http_client.NOT_ACCEPTABLE)"},{"line_number":689,"context_line":"            cinder.detach_volumes(task, volumes, connector, allow_errors\u003dTrue)"},{"line_number":690,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"},{"line_number":691,"context_line":"            mock_detach.reset_mock()"},{"line_number":692,"context_line":"            mock_set_meta.reset_mock()"},{"line_number":693,"context_line":""}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_654c4c9e","line":690,"updated":"2017-04-01 04:52:18.000000000","message":"Because allow_errors\u003dTrue and set_metadata is called:\n\n  mock_set_meta.assert_called_once_with(mock.ANY, volume_id, {\u0027bar\u0027: \u0027baz\u0027})","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":687,"context_line":"            mock_detach.side_effect \u003d cinder_exceptions.NotAcceptable("},{"line_number":688,"context_line":"                http_client.NOT_ACCEPTABLE)"},{"line_number":689,"context_line":"            cinder.detach_volumes(task, volumes, connector, allow_errors\u003dTrue)"},{"line_number":690,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"},{"line_number":691,"context_line":"            mock_detach.reset_mock()"},{"line_number":692,"context_line":"            mock_set_meta.reset_mock()"},{"line_number":693,"context_line":""}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_187ffd67","line":690,"in_reply_to":"dfeb2761_654c4c9e","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":22860,"name":"Solio Sarabia","email":"solio.sarabia@intel.com","username":"ssarabia"},"change_message_id":"e7c47dfdd54ac03442a50ce9b1484ce7fd8f9314","unresolved":false,"context_lines":[{"line_number":706,"context_line":"                              volumes,"},{"line_number":707,"context_line":"                              connector,"},{"line_number":708,"context_line":"                              allow_errors\u003dFalse)"},{"line_number":709,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_402db693","line":709,"updated":"2017-04-01 04:52:18.000000000","message":"Since allow_errors\u003dFalse, set_metadata is not called.\n\n  self.assertFalse(mock_set_meta.called)","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"a4fc64f16909470e5e13b0239c611dbb7612b0e6","unresolved":false,"context_lines":[{"line_number":706,"context_line":"                              volumes,"},{"line_number":707,"context_line":"                              connector,"},{"line_number":708,"context_line":"                              allow_errors\u003dFalse)"},{"line_number":709,"context_line":"            mock_detach.assert_called_once_with(mock.ANY, volume_id, \u0027qux\u0027)"}],"source_content_type":"text/x-python","patch_set":58,"id":"dfeb2761_f881f94b","line":709,"in_reply_to":"dfeb2761_402db693","updated":"2017-04-03 16:39:03.000000000","message":"Done","commit_id":"866213fd10d1be63da21ae3728f0a70075a80407"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"6b9ff6f5471d92c64bbd0474e8f4c4b146772e34","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from cinderclient import exceptions as cinder_exceptions"},{"line_number":17,"context_line":"import cinderclient.v3 as cinderclient"},{"line_number":18,"context_line":"from oslo_utils import uuidutils"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"from six.moves import http_client"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"from ironic.common import cinder"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_19690d20","line":19,"updated":"2017-04-04 21:59:20.000000000","message":"Should not have blank line.","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def test_cinder_states(self):"},{"line_number":112,"context_line":"        self.assertEqual(\u0027available\u0027, cinder.AVAILABLE)"},{"line_number":113,"context_line":"        self.assertEqual(\u0027in-use\u0027, cinder.IN_USE)"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"    def test_is_volume_available(self):"},{"line_number":116,"context_line":"        available_volumes \u003d ["}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_1ac0ece0","line":113,"updated":"2017-04-04 15:10:31.000000000","message":"this test looks useless to me, it essentially tests python ability to create variables :)","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        for vol in available_volumes:"},{"line_number":124,"context_line":"            result \u003d cinder.is_volume_available(vol)"},{"line_number":125,"context_line":"            self.assertEqual(True, result,"},{"line_number":126,"context_line":"                             message\u003d\"Failed for status \u0027%s\u0027.\" % vol.status)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        for vol in unavailable_volumes:"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_fac428f7","line":125,"updated":"2017-04-04 15:10:31.000000000","message":"please use assertTrue","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":127,"context_line":""},{"line_number":128,"context_line":"        for vol in unavailable_volumes:"},{"line_number":129,"context_line":"            result \u003d cinder.is_volume_available(vol)"},{"line_number":130,"context_line":"            self.assertEqual(False, result,"},{"line_number":131,"context_line":"                             message\u003d\"Failed for status \u0027%s\u0027.\" % vol.status)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"    def test_is_volume_attached(self):"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_dab5e47f","line":130,"updated":"2017-04-04 15:10:31.000000000","message":"ditto","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"1aec67f848a24d7b3f222503b8daf9c28cec0609","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        }"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"        result \u003d cinder._create_metadata_dictionary(self.node, \u0027meow\u0027)"},{"line_number":171,"context_line":"        self.maxDiff \u003d None"},{"line_number":172,"context_line":"        # Since datetime is an internal, we can\u0027t exactly mock it."},{"line_number":173,"context_line":"        # We can however verify it\u0027s presence, and replace it."},{"line_number":174,"context_line":"        self.assertIsInstance(result[expected_key][\u0027last_seen\u0027], str)"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_ddb611fb","line":171,"range":{"start_line":171,"start_character":13,"end_line":171,"end_character":20},"updated":"2017-04-04 09:11:18.000000000","message":"this is not needed.","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        # We can however verify it\u0027s presence, and replace it."},{"line_number":174,"context_line":"        self.assertIsInstance(result[expected_key][\u0027last_seen\u0027], str)"},{"line_number":175,"context_line":"        result[expected_key][\u0027last_seen\u0027] \u003d \u0027faked-time\u0027"},{"line_number":176,"context_line":"        self.assertDictEqual(expected, result)"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":""},{"line_number":179,"context_line":"@mock.patch.object(cinder, \u0027_get_cinder_session\u0027, autospec\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_baba206b","line":176,"updated":"2017-04-04 15:10:31.000000000","message":"nit: IIRC assertEqual an be used just as well","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":230,"context_line":"            attachments \u003d cinder.attach_volumes(task, volumes, connector)"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":233,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"},{"line_number":234,"context_line":"        mock_init.assert_called_once_with(mock.ANY, volume_id, connector)"},{"line_number":235,"context_line":"        mock_attach.assert_called_once_with(mock.ANY, volume_id,"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_9ab3dc98","line":232,"updated":"2017-04-04 15:10:31.000000000","message":"why do you need [0] here? should not both lists be of length 1?","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        mock_set_meta.assert_called_once_with(mock.ANY, volume_id,"},{"line_number":293,"context_line":"                                              {\u0027bar\u0027: \u0027baz\u0027})"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    @mock.patch.object(cinderclient.Client, \u0027__init__\u0027)"},{"line_number":296,"context_line":"    def test_attach_volumes_client_init_failure("},{"line_number":297,"context_line":"            self, mock_client, mock_get, mock_set_meta, mock_session):"},{"line_number":298,"context_line":"        connector \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_7ab0188b","line":295,"updated":"2017-04-04 15:10:31.000000000","message":"autospec\u003dTrue?","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":318,"context_line":"            mock_get, mock_set_meta, mock_session):"},{"line_number":319,"context_line":"        \"\"\"Raise an error if the volume lookup fails\"\"\""},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"        def __mock_get_side_effect(*args, **kwargs):"},{"line_number":322,"context_line":"            if args[1] \u003d\u003d \u0027not_found\u0027:"},{"line_number":323,"context_line":"                raise cinder_exceptions.NotFound(404, message\u003d\u0027error\u0027)"},{"line_number":324,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_5aa9d421","line":321,"updated":"2017-04-04 15:10:31.000000000","message":"I\u0027d prefer real argument list here, instead of *args, **kwargs","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":481,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":482,"context_line":"            attachments \u003d cinder.attach_volumes(task, volumes, connector)"},{"line_number":483,"context_line":""},{"line_number":484,"context_line":"        self.assertDictEqual(expected[0], attachments[0])"},{"line_number":485,"context_line":"        mock_reserve.assert_called_once_with(mock.ANY, volume_id)"},{"line_number":486,"context_line":"        mock_init.assert_called_once_with(mock.ANY, volume_id, connector)"},{"line_number":487,"context_line":"        mock_attach.assert_called_once_with(mock.ANY, volume_id,"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_3aa61055","line":484,"updated":"2017-04-04 15:10:31.000000000","message":"ditto about [0]","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":572,"context_line":"            # While we would be permitting failures, this is an"},{"line_number":573,"context_line":"            # exception that must be raised since the client"},{"line_number":574,"context_line":"            # cannot be initialized."},{"line_number":575,"context_line":"            mock_client.side_effect \u003d exception.InvalidParameterValue(\u0027error\u0027)"},{"line_number":576,"context_line":"            self.assertRaises(exception.StorageError,"},{"line_number":577,"context_line":"                              cinder.detach_volumes, task, volumes,"},{"line_number":578,"context_line":"                              connector, allow_errors\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_1a658c1e","line":575,"updated":"2017-04-04 15:10:31.000000000","message":"I think this should be a separate test","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":690,"context_line":"            mock_set_meta.assert_called_once_with(mock.ANY, volume_id,"},{"line_number":691,"context_line":"                                                  {\u0027bar\u0027: \u0027baz\u0027})"},{"line_number":692,"context_line":"            mock_detach.reset_mock()"},{"line_number":693,"context_line":"            mock_set_meta.reset_mock()"},{"line_number":694,"context_line":""},{"line_number":695,"context_line":"            mock_set_meta.side_effect \u003d cinder_exceptions.NotAcceptable("},{"line_number":696,"context_line":"                http_client.NOT_ACCEPTABLE)"}],"source_content_type":"text/x-python","patch_set":59,"id":"dfeb2761_fa69c8f8","line":693,"updated":"2017-04-04 15:10:31.000000000","message":"essentially any time you use reset_mock, it\u0027s a good sign that you should split your test in several tests. this is the case here as well","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"}],"requirements.txt":[{"author":{"_account_id":13295,"name":"Mario Villaplana","email":"mario.villaplana@gmail.com","username":"mariojv"},"change_message_id":"ac6ba9fc431ae598c651727978e1267a3a32214f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"greenlet\u003e\u003d0.3.2 # MIT"},{"line_number":11,"context_line":"netaddr!\u003d0.7.16,\u003e\u003d0.7.13 # BSD"},{"line_number":12,"context_line":"paramiko\u003e\u003d2.0 # LGPLv2.1+"},{"line_number":13,"context_line":"python-cinderclient\u003e\u003d1.6.0,!\u003d1.7.0,!\u003d1.7.1  # Apache-2.0"},{"line_number":14,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":15,"context_line":"python-glanceclient\u003e\u003d2.5.0 # Apache-2.0"},{"line_number":16,"context_line":"keystoneauth1\u003e\u003d2.16.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":21,"id":"ba5201f7_34424d11","line":13,"updated":"2017-01-03 17:16:32.000000000","message":"why not 1.7.0 or 1.7.1? doesn\u0027t really matter since 1.9.0 seems to be the latest release on pypi, just curious\n\nhttps://pypi.python.org/pypi/python-cinderclient","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"6378fd4616389fd299104600c6fa274aca61ed11","unresolved":false,"context_lines":[{"line_number":10,"context_line":"greenlet\u003e\u003d0.3.2 # MIT"},{"line_number":11,"context_line":"netaddr!\u003d0.7.16,\u003e\u003d0.7.13 # BSD"},{"line_number":12,"context_line":"paramiko\u003e\u003d2.0 # LGPLv2.1+"},{"line_number":13,"context_line":"python-cinderclient\u003e\u003d1.6.0,!\u003d1.7.0,!\u003d1.7.1  # Apache-2.0"},{"line_number":14,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":15,"context_line":"python-glanceclient\u003e\u003d2.5.0 # Apache-2.0"},{"line_number":16,"context_line":"keystoneauth1\u003e\u003d2.16.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":21,"id":"ba5201f7_edbddb02","line":13,"in_reply_to":"ba5201f7_34424d11","updated":"2017-01-06 20:57:06.000000000","message":"So, this would pull 1.9.0 if present, that is if upper-constraints processing permits it.  This was whatever was present in the requirements repository for versioning since it has to match, although if it is off the requirements test would not pass.","commit_id":"ef1c21aa41df0ed698006317f89d7e37f02c9c66"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"f2ec1b6ef7c0a5b04bcda8a075dfa1d69d05e60f","unresolved":false,"context_lines":[{"line_number":8,"context_line":"eventlet!\u003d0.18.3,\u003e\u003d0.18.2 # MIT"},{"line_number":9,"context_line":"WebOb\u003e\u003d1.6.0 # MIT"},{"line_number":10,"context_line":"paramiko\u003e\u003d2.0 # LGPLv2.1+"},{"line_number":11,"context_line":"python-cinderclient\u003e\u003d1.6.0,!\u003d1.7.0,!\u003d1.7.1  # Apache-2.0"},{"line_number":12,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":13,"context_line":"python-glanceclient\u003e\u003d2.5.0 # Apache-2.0"},{"line_number":14,"context_line":"keystoneauth1\u003e\u003d2.18.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":33,"id":"3a461143_49b6c2f9","line":11,"updated":"2017-02-01 00:16:53.000000000","message":"total nit: 2 spaces instead one :D (excuse my non-official OCD)","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"bb83bdc100ea7109c5f63d35fde1b977629d1dbd","unresolved":false,"context_lines":[{"line_number":8,"context_line":"eventlet!\u003d0.18.3,\u003e\u003d0.18.2 # MIT"},{"line_number":9,"context_line":"WebOb\u003e\u003d1.6.0 # MIT"},{"line_number":10,"context_line":"paramiko\u003e\u003d2.0 # LGPLv2.1+"},{"line_number":11,"context_line":"python-cinderclient\u003e\u003d1.6.0,!\u003d1.7.0,!\u003d1.7.1  # Apache-2.0"},{"line_number":12,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":13,"context_line":"python-glanceclient\u003e\u003d2.5.0 # Apache-2.0"},{"line_number":14,"context_line":"keystoneauth1\u003e\u003d2.18.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":33,"id":"fa31d9ce_fd9a336d","line":11,"in_reply_to":"3a461143_49b6c2f9","updated":"2017-02-13 20:13:44.000000000","message":"LOL!  It has to match global-requirements or... well, CI hates us and the requirements bot has to do work.   https://github.com/openstack/requirements/blob/master/global-requirements.txt#L221 :)","commit_id":"7f0c30d33fab184c26ee8c0625d0d26d5b604bc5"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"f34d8d20021a24856144ab5cab65453055864f46","unresolved":false,"context_lines":[{"line_number":8,"context_line":"eventlet!\u003d0.18.3,\u003e\u003d0.18.2 # MIT"},{"line_number":9,"context_line":"WebOb\u003e\u003d1.6.0 # MIT"},{"line_number":10,"context_line":"paramiko\u003e\u003d2.0 # LGPLv2.1+"},{"line_number":11,"context_line":"python-cinderclient\u003e\u003d1.6.0,!\u003d1.7.0,!\u003d1.7.1  # Apache-2.0"},{"line_number":12,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":13,"context_line":"python-glanceclient\u003e\u003d2.5.0 # Apache-2.0"},{"line_number":14,"context_line":"keystoneauth1\u003e\u003d2.18.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":47,"id":"1a1ced50_f82f0bf4","line":11,"updated":"2017-03-17 01:30:10.000000000","message":"Needs to be:  \u003e\u003d2.0.1","commit_id":"a294b145ec7b66a4d708fead9f5b4b0f7cd8844d"},{"author":{"_account_id":23883,"name":"Joanna Taryma","email":"joanna.taryma@intel.com","username":"jtaryma"},"change_message_id":"26affa1d0d03ced2e83edcae041011b265c55b5c","unresolved":false,"context_lines":[{"line_number":8,"context_line":"eventlet!\u003d0.18.3,\u003e\u003d0.18.2 # MIT"},{"line_number":9,"context_line":"WebOb\u003e\u003d1.6.0 # MIT"},{"line_number":10,"context_line":"paramiko\u003e\u003d2.0 # LGPLv2.1+"},{"line_number":11,"context_line":"python-cinderclient\u003e\u003d1.6.0,!\u003d1.7.0,!\u003d1.7.1  # Apache-2.0"},{"line_number":12,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":13,"context_line":"python-glanceclient\u003e\u003d2.5.0 # Apache-2.0"},{"line_number":14,"context_line":"keystoneauth1\u003e\u003d2.18.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":47,"id":"1a1ced50_5f12aa63","line":11,"in_reply_to":"1a1ced50_f82f0bf4","updated":"2017-03-17 17:36:05.000000000","message":"Done","commit_id":"a294b145ec7b66a4d708fead9f5b4b0f7cd8844d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"638a235bfe326befeb1ceefdaf53a330f4f7d79c","unresolved":false,"context_lines":[{"line_number":8,"context_line":"eventlet!\u003d0.18.3,\u003e\u003d0.18.2 # MIT"},{"line_number":9,"context_line":"WebOb\u003e\u003d1.6.0 # MIT"},{"line_number":10,"context_line":"paramiko\u003e\u003d2.0 # LGPLv2.1+"},{"line_number":11,"context_line":"python-cinderclient\u003e\u003d2.0.1 # Apache-2.0"},{"line_number":12,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":13,"context_line":"python-glanceclient\u003e\u003d2.5.0 # Apache-2.0"},{"line_number":14,"context_line":"keystoneauth1\u003e\u003d2.18.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":59,"id":"dfeb2761_da9cc40f","line":11,"updated":"2017-04-04 15:10:31.000000000","message":"+1 for not having a release note","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"466381eb25a9603a75f9f73f00b1cc4b5ec279d2","unresolved":false,"context_lines":[{"line_number":8,"context_line":"eventlet!\u003d0.18.3,\u003e\u003d0.18.2 # MIT"},{"line_number":9,"context_line":"WebOb\u003e\u003d1.6.0 # MIT"},{"line_number":10,"context_line":"paramiko\u003e\u003d2.0 # LGPLv2.1+"},{"line_number":11,"context_line":"python-cinderclient\u003e\u003d2.0.1 # Apache-2.0"},{"line_number":12,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":13,"context_line":"python-glanceclient\u003e\u003d2.5.0 # Apache-2.0"},{"line_number":14,"context_line":"keystoneauth1\u003e\u003d2.18.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":59,"id":"dfeb2761_083c3ee0","line":11,"updated":"2017-04-03 23:25:34.000000000","message":"this requires a release note.","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":14525,"name":"Vasyl Saienko","email":"vsaienko@mirantis.com","username":"vsaienko"},"change_message_id":"1aec67f848a24d7b3f222503b8daf9c28cec0609","unresolved":false,"context_lines":[{"line_number":8,"context_line":"eventlet!\u003d0.18.3,\u003e\u003d0.18.2 # MIT"},{"line_number":9,"context_line":"WebOb\u003e\u003d1.6.0 # MIT"},{"line_number":10,"context_line":"paramiko\u003e\u003d2.0 # LGPLv2.1+"},{"line_number":11,"context_line":"python-cinderclient\u003e\u003d2.0.1 # Apache-2.0"},{"line_number":12,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":13,"context_line":"python-glanceclient\u003e\u003d2.5.0 # Apache-2.0"},{"line_number":14,"context_line":"keystoneauth1\u003e\u003d2.18.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":59,"id":"dfeb2761_8f604a03","line":11,"in_reply_to":"dfeb2761_083c3ee0","updated":"2017-04-04 09:11:18.000000000","message":"or not, I\u0027m a bit confused here.","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"0fb08d4251b7da0c6e5a6a694b342cf874c82a8b","unresolved":false,"context_lines":[{"line_number":8,"context_line":"eventlet!\u003d0.18.3,\u003e\u003d0.18.2 # MIT"},{"line_number":9,"context_line":"WebOb\u003e\u003d1.6.0 # MIT"},{"line_number":10,"context_line":"paramiko\u003e\u003d2.0 # LGPLv2.1+"},{"line_number":11,"context_line":"python-cinderclient\u003e\u003d2.0.1 # Apache-2.0"},{"line_number":12,"context_line":"python-neutronclient\u003e\u003d5.1.0 # Apache-2.0"},{"line_number":13,"context_line":"python-glanceclient\u003e\u003d2.5.0 # Apache-2.0"},{"line_number":14,"context_line":"keystoneauth1\u003e\u003d2.18.0 # Apache-2.0"}],"source_content_type":"text/plain","patch_set":59,"id":"dfeb2761_b1e490e1","line":11,"in_reply_to":"dfeb2761_8f604a03","updated":"2017-04-04 11:56:17.000000000","message":"I tend to think it doesn\u0027t. Packagers/deployers should be using requirements.txt, I don\u0027t think there\u0027s any need to send an additional message.","commit_id":"459fe314fa65111d4b1fd4f8210117903a778093"}]}
