)]}'
{"nova/api/openstack/compute/servers.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"26f6e50fcdc0bfcf5ae9ed4ba23ca7d345a07ef7","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                # if the fixed IP address is not provided then"},{"line_number":324,"context_line":"                # it will use one of the available IP address from the network"},{"line_number":325,"context_line":"                try:"},{"line_number":326,"context_line":"                    request.address \u003d network.get(\u0027fixed_ip\u0027, None)"},{"line_number":327,"context_line":"                except ValueError:"},{"line_number":328,"context_line":"                    msg \u003d _(\"Invalid fixed IP address (%s)\") % request.address"},{"line_number":329,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_6faccfed","side":"PARENT","line":326,"updated":"2015-06-21 08:03:41.000000000","message":"can you please explain how this can raise a ValueError?\nIt should just return None","commit_id":"a96dc64afb52e070cef03f2b91f2bcb63560f095"},{"author":{"_account_id":7488,"name":"Jeffrey Zhang","email":"zhang.lei.fly@gmail.com","username":"Jeffrey4l"},"change_message_id":"a33e59bfbc99c68b50f96d53839c482c8bbff810","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                # if the fixed IP address is not provided then"},{"line_number":324,"context_line":"                # it will use one of the available IP address from the network"},{"line_number":325,"context_line":"                try:"},{"line_number":326,"context_line":"                    request.address \u003d network.get(\u0027fixed_ip\u0027, None)"},{"line_number":327,"context_line":"                except ValueError:"},{"line_number":328,"context_line":"                    msg \u003d _(\"Invalid fixed IP address (%s)\") % request.address"},{"line_number":329,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_ab0364b7","side":"PARENT","line":326,"in_reply_to":"fa32b979_6faccfed","updated":"2015-06-23 09:56:03.000000000","message":"garyk, the exception come from this line https://github.com/openstack/nova/blob/master/nova/objects/fields.py#L303 \nYou can found more from nova.objects.network_request, oslo.versionobjects module","commit_id":"a96dc64afb52e070cef03f2b91f2bcb63560f095"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"83c621c807cf03a784aa838442976bb743eecf64","unresolved":false,"context_lines":[{"line_number":323,"context_line":"                # if the fixed IP address is not provided then"},{"line_number":324,"context_line":"                # it will use one of the available IP address from the network"},{"line_number":325,"context_line":"                try:"},{"line_number":326,"context_line":"                    request.address \u003d network.get(\u0027fixed_ip\u0027, None)"},{"line_number":327,"context_line":"                except ValueError:"},{"line_number":328,"context_line":"                    msg \u003d _(\"Invalid fixed IP address (%s)\") % request.address"},{"line_number":329,"context_line":"                    raise exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa32b979_07ef1fb1","side":"PARENT","line":326,"in_reply_to":"fa32b979_6faccfed","updated":"2015-06-22 08:36:36.000000000","message":"garyk, there is field validation, which could cause ValueError, as address should belong to IPAddress type. You could easily reproduce this error. \nThere is unit test https://github.com/openstack/nova/blob/master/nova/tests/unit/api/openstack/compute/test_servers.py#L200 modify requested_networks so it contains new key-value pair with invalid fixed_ip value: \nfixed_ip \u003d \u0027wwwwwwwwwwwww\u0027\nrequested_networks \u003d [{\u0027uuid\u0027: uuid, \u0027fixed_ip\u0027: fixed_ip}]\nit cause Value error","commit_id":"a96dc64afb52e070cef03f2b91f2bcb63560f095"}]}
