)]}'
{"nova/network/api.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"ddae7b8e14cc75701a1434b0d98f48db4f7fd4e8","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        # NOTE(tr3buchet): host is passed in cases where we need to setup"},{"line_number":485,"context_line":"        # or teardown the networks on a host which has been migrated to/from"},{"line_number":486,"context_line":"        # and instance.host is not yet or is no longer equal to"},{"line_number":487,"context_line":"        args \u003d {\u0027instance_id\u0027: instance,"},{"line_number":488,"context_line":"                \u0027host\u0027: host,"},{"line_number":489,"context_line":"                \u0027teardown\u0027: teardown}"},{"line_number":490,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_a0817a4c","line":487,"updated":"2016-02-03 19:07:49.000000000","message":"This should just be instance.id, and then add an instance arg.","commit_id":"6bfa4bf5a3ce38b95b3123fcc8498181d017693b"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"052031d7f42b6a72b298b058c71bda7b919cf2fd","unresolved":false,"context_lines":[{"line_number":484,"context_line":"        # NOTE(tr3buchet): host is passed in cases where we need to setup"},{"line_number":485,"context_line":"        # or teardown the networks on a host which has been migrated to/from"},{"line_number":486,"context_line":"        # and instance.host is not yet or is no longer equal to"},{"line_number":487,"context_line":"        args \u003d {\u0027instance_id\u0027: instance,"},{"line_number":488,"context_line":"                \u0027host\u0027: host,"},{"line_number":489,"context_line":"                \u0027teardown\u0027: teardown}"},{"line_number":490,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_ab04fb7d","line":487,"in_reply_to":"5a5ae5dd_a0817a4c","updated":"2016-02-03 19:40:22.000000000","message":"good catch, thanks!","commit_id":"6bfa4bf5a3ce38b95b3123fcc8498181d017693b"}],"nova/network/manager.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7f507c6c3f2d45004edff2c02714e880aae5cdce","unresolved":false,"context_lines":[{"line_number":1505,"context_line":"        \"\"\"Calls allocate_fixed_ip once for each network.\"\"\""},{"line_number":1506,"context_line":"        raise NotImplementedError()"},{"line_number":1507,"context_line":""},{"line_number":1508,"context_line":"    def setup_networks_on_host(self, context, host, instance_id\u003dNone,"},{"line_number":1509,"context_line":"                               instance\u003dNone, teardown\u003dFalse):"},{"line_number":1510,"context_line":"        \"\"\"calls setup/teardown on network hosts for an instance.\"\"\""},{"line_number":1511,"context_line":"        green_threads \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_8147864a","line":1508,"updated":"2015-11-25 12:26:16.000000000","message":"You can\u0027t change the order of the parameters in the method signature like this, since it\u0027s a backwards-incompatible change. You would instead need to keep the instance_id and host parameters as is and either change the instance_id parameter to being an instance_id OR an instance object (and handle the difference in the implementation below) or add an additional keyword argument.","commit_id":"e7b56c1a3fd85deca8f5afc97929a1901dc17316"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"dd097c783729197b169f711161636615a350776e","unresolved":false,"context_lines":[{"line_number":1505,"context_line":"        \"\"\"Calls allocate_fixed_ip once for each network.\"\"\""},{"line_number":1506,"context_line":"        raise NotImplementedError()"},{"line_number":1507,"context_line":""},{"line_number":1508,"context_line":"    def setup_networks_on_host(self, context, host, instance_id\u003dNone,"},{"line_number":1509,"context_line":"                               instance\u003dNone, teardown\u003dFalse):"},{"line_number":1510,"context_line":"        \"\"\"calls setup/teardown on network hosts for an instance.\"\"\""},{"line_number":1511,"context_line":"        green_threads \u003d []"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_2196daf0","line":1508,"in_reply_to":"9a8ffd7b_8147864a","updated":"2015-11-25 12:30:50.000000000","message":"isn\u0027t backward compatibility covered by grenade jobs? will change order for this.","commit_id":"e7b56c1a3fd85deca8f5afc97929a1901dc17316"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"7f507c6c3f2d45004edff2c02714e880aae5cdce","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"            instance \u003d objects.Instance.get_by_id(context, instance_id)"},{"line_number":1519,"context_line":"        vifs \u003d objects.VirtualInterfaceList.get_by_instance_uuid("},{"line_number":1520,"context_line":"                context, instance.uuid)"},{"line_number":1521,"context_line":"        LOG.debug(\u0027Setup networks on host\u0027, instance\u003dinstance)"},{"line_number":1522,"context_line":"        for vif in vifs:"},{"line_number":1523,"context_line":"            network \u003d objects.Network.get_by_id(context, vif.network_id)"},{"line_number":1524,"context_line":"            if not network.multi_host:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_96782ac6","line":1521,"updated":"2015-11-25 12:26:16.000000000","message":"This is the only place that the instance object is used. Seems like it\u0027s a waste to do a database call only for doing a DEBUG message...","commit_id":"e7b56c1a3fd85deca8f5afc97929a1901dc17316"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f1539d3cafa52ccbb8c741511b7855dacdd2c6ac","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"            instance \u003d objects.Instance.get_by_id(context, instance_id)"},{"line_number":1519,"context_line":"        vifs \u003d objects.VirtualInterfaceList.get_by_instance_uuid("},{"line_number":1520,"context_line":"                context, instance.uuid)"},{"line_number":1521,"context_line":"        LOG.debug(\u0027Setup networks on host\u0027, instance\u003dinstance)"},{"line_number":1522,"context_line":"        for vif in vifs:"},{"line_number":1523,"context_line":"            network \u003d objects.Network.get_by_id(context, vif.network_id)"},{"line_number":1524,"context_line":"            if not network.multi_host:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_fcae3597","line":1521,"in_reply_to":"9a8ffd7b_41cbde1e","updated":"2015-11-25 12:38:22.000000000","message":"Hmm, yes, sorry, I missed that... :(\n\nOK, so a followup question would be: why don\u0027t we just pass a list of VIF objects to this RPC method, then? :)","commit_id":"e7b56c1a3fd85deca8f5afc97929a1901dc17316"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"ea7db7cad98bc52514b56e4563c9d35f77e4f849","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"            instance \u003d objects.Instance.get_by_id(context, instance_id)"},{"line_number":1519,"context_line":"        vifs \u003d objects.VirtualInterfaceList.get_by_instance_uuid("},{"line_number":1520,"context_line":"                context, instance.uuid)"},{"line_number":1521,"context_line":"        LOG.debug(\u0027Setup networks on host\u0027, instance\u003dinstance)"},{"line_number":1522,"context_line":"        for vif in vifs:"},{"line_number":1523,"context_line":"            network \u003d objects.Network.get_by_id(context, vif.network_id)"},{"line_number":1524,"context_line":"            if not network.multi_host:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_e1672db5","line":1521,"in_reply_to":"9a8ffd7b_82853aae","updated":"2015-11-26 12:41:20.000000000","message":"Well, I\u0027ve checked existing code carefully. Here is several things why I believe we should not pass list of vifs here:\nThe idea of the current patch was to reduce amount of db queries. By passing instance object here we could achieve this, because all methods that executes current one already had instance object, and it\u0027s easy to pass it. List of vifs is not available on the callers side and we will create new db query to fetch them first. Why moving this on the caller side is unwished? Actually only nova-network implements current method, neutron api does not have implementation for setup_networks_on_host at all.\nThat force us to fetch data from database, which would not be used. So, I\u0027d prefer to pass instance object here.","commit_id":"e7b56c1a3fd85deca8f5afc97929a1901dc17316"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"dd097c783729197b169f711161636615a350776e","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"            instance \u003d objects.Instance.get_by_id(context, instance_id)"},{"line_number":1519,"context_line":"        vifs \u003d objects.VirtualInterfaceList.get_by_instance_uuid("},{"line_number":1520,"context_line":"                context, instance.uuid)"},{"line_number":1521,"context_line":"        LOG.debug(\u0027Setup networks on host\u0027, instance\u003dinstance)"},{"line_number":1522,"context_line":"        for vif in vifs:"},{"line_number":1523,"context_line":"            network \u003d objects.Network.get_by_id(context, vif.network_id)"},{"line_number":1524,"context_line":"            if not network.multi_host:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_41cbde1e","line":1521,"in_reply_to":"9a8ffd7b_96782ac6","updated":"2015-11-25 12:30:50.000000000","message":"see line 1520, actually we use instance.uuid here","commit_id":"e7b56c1a3fd85deca8f5afc97929a1901dc17316"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"da978093eb12b17b5afcc9680f2a1962261cf665","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"            instance \u003d objects.Instance.get_by_id(context, instance_id)"},{"line_number":1519,"context_line":"        vifs \u003d objects.VirtualInterfaceList.get_by_instance_uuid("},{"line_number":1520,"context_line":"                context, instance.uuid)"},{"line_number":1521,"context_line":"        LOG.debug(\u0027Setup networks on host\u0027, instance\u003dinstance)"},{"line_number":1522,"context_line":"        for vif in vifs:"},{"line_number":1523,"context_line":"            network \u003d objects.Network.get_by_id(context, vif.network_id)"},{"line_number":1524,"context_line":"            if not network.multi_host:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_bb95bb32","line":1521,"in_reply_to":"9a8ffd7b_e1672db5","updated":"2015-12-02 19:23:06.000000000","message":"Okay, if this is nova-net only then it\u0027s eventually going to be removed anyways (hopefully) so looking up this information just for Neutron to ignore it would not be wise.","commit_id":"e7b56c1a3fd85deca8f5afc97929a1901dc17316"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"2bd72e62f7e162733b9ce79098c6fbf8dceace20","unresolved":false,"context_lines":[{"line_number":1518,"context_line":"            instance \u003d objects.Instance.get_by_id(context, instance_id)"},{"line_number":1519,"context_line":"        vifs \u003d objects.VirtualInterfaceList.get_by_instance_uuid("},{"line_number":1520,"context_line":"                context, instance.uuid)"},{"line_number":1521,"context_line":"        LOG.debug(\u0027Setup networks on host\u0027, instance\u003dinstance)"},{"line_number":1522,"context_line":"        for vif in vifs:"},{"line_number":1523,"context_line":"            network \u003d objects.Network.get_by_id(context, vif.network_id)"},{"line_number":1524,"context_line":"            if not network.multi_host:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a8ffd7b_82853aae","line":1521,"in_reply_to":"9a8ffd7b_fcae3597","updated":"2015-11-25 15:20:51.000000000","message":"Agreed.  Even the name of the method suggests that networks or networking related objects would be passed in rather than an instance.","commit_id":"e7b56c1a3fd85deca8f5afc97929a1901dc17316"},{"author":{"_account_id":9569,"name":"Sergey Nikitin","email":"nikitinserv@gmail.com","username":"snikitin"},"change_message_id":"f1cc163173571546c1db6ecea9b8114579a97ed6","unresolved":false,"context_lines":[{"line_number":1506,"context_line":"        \"\"\"Calls allocate_fixed_ip once for each network.\"\"\""},{"line_number":1507,"context_line":"        raise NotImplementedError()"},{"line_number":1508,"context_line":""},{"line_number":1509,"context_line":"    def setup_networks_on_host(self, context, host, instance_id,"},{"line_number":1510,"context_line":"                               teardown\u003dFalse):"},{"line_number":1511,"context_line":"        \"\"\"calls setup/teardown on network hosts for an instance.\"\"\""},{"line_number":1512,"context_line":"        green_threads \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_53d58619","line":1509,"updated":"2015-11-27 09:27:21.000000000","message":"Why you changed the order of arguments?","commit_id":"b20ec93c17a3796f7ca9e7b8561e487dd2e15c35"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"db494c5ed8275b678cfdaa1c24e22eb8a08770ff","unresolved":false,"context_lines":[{"line_number":1506,"context_line":"        \"\"\"Calls allocate_fixed_ip once for each network.\"\"\""},{"line_number":1507,"context_line":"        raise NotImplementedError()"},{"line_number":1508,"context_line":""},{"line_number":1509,"context_line":"    def setup_networks_on_host(self, context, host, instance_id,"},{"line_number":1510,"context_line":"                               teardown\u003dFalse):"},{"line_number":1511,"context_line":"        \"\"\"calls setup/teardown on network hosts for an instance.\"\"\""},{"line_number":1512,"context_line":"        green_threads \u003d []"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a8ffd7b_d3d3b602","line":1509,"in_reply_to":"9a8ffd7b_53d58619","updated":"2015-11-27 09:44:09.000000000","message":"good catch! thanks:)","commit_id":"b20ec93c17a3796f7ca9e7b8561e487dd2e15c35"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"cab53529cf5f0b461258395aad0d832eff32dff2","unresolved":false,"context_lines":[{"line_number":1515,"context_line":"            call_func \u003d self._teardown_network_on_host"},{"line_number":1516,"context_line":"        else:"},{"line_number":1517,"context_line":"            call_func \u003d self._setup_network_on_host"},{"line_number":1518,"context_line":"        # NOTE(tdurakov): new rpcapi is passing instance object"},{"line_number":1519,"context_line":"        # instead of instance_id, name of parameter variable was saved to"},{"line_number":1520,"context_line":"        # provide backward compatibility."},{"line_number":1521,"context_line":"        if not isinstance(instance_id, obj_instance.Instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_9b24770d","line":1518,"updated":"2015-12-02 19:49:51.000000000","message":"This note should be either above the method declaration or in the docstring.  Or move this code to the top of the method.  This name mismatch is a potential source of confusion so it should be immediately visible when someone starts reading this method.\n\nYou should also consider adding this note to the neutron method even though it\u0027s a noop.","commit_id":"c2233f6973f2d09e43e7894c198ab86d066cf216"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"61f03d2c2012098a8b88dda03a84f168ead33e4b","unresolved":false,"context_lines":[{"line_number":57,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":58,"context_line":"from nova import objects"},{"line_number":59,"context_line":"from nova.objects import base as obj_base"},{"line_number":60,"context_line":"from nova.objects import instance as obj_instance"},{"line_number":61,"context_line":"from nova.objects import quotas as quotas_obj"},{"line_number":62,"context_line":"from nova import servicegroup"},{"line_number":63,"context_line":"from nova import utils"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a5de9d1_e92186b5","line":60,"updated":"2016-01-28 15:05:54.000000000","message":"Minor thing, but everywhere else we call this instance_obj.","commit_id":"9d306d94e22884998da4543f37d7d6cf8d3d896b"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"75ae01a66fd1921c8c883e243ba8c6838ffe569c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":58,"context_line":"from nova import objects"},{"line_number":59,"context_line":"from nova.objects import base as obj_base"},{"line_number":60,"context_line":"from nova.objects import instance as obj_instance"},{"line_number":61,"context_line":"from nova.objects import quotas as quotas_obj"},{"line_number":62,"context_line":"from nova import servicegroup"},{"line_number":63,"context_line":"from nova import utils"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_cbcaa04f","line":60,"in_reply_to":"5a5ae5dd_de3105ee","updated":"2016-02-03 16:41:14.000000000","message":"Done","commit_id":"9d306d94e22884998da4543f37d7d6cf8d3d896b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"04a6f503ae55b9b3f1fe0c01f6c6d47f9f508a29","unresolved":false,"context_lines":[{"line_number":57,"context_line":"from nova.network.security_group import openstack_driver"},{"line_number":58,"context_line":"from nova import objects"},{"line_number":59,"context_line":"from nova.objects import base as obj_base"},{"line_number":60,"context_line":"from nova.objects import instance as obj_instance"},{"line_number":61,"context_line":"from nova.objects import quotas as quotas_obj"},{"line_number":62,"context_line":"from nova import servicegroup"},{"line_number":63,"context_line":"from nova import utils"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_de3105ee","line":60,"in_reply_to":"7a5de9d1_e92186b5","updated":"2016-02-03 15:31:18.000000000","message":"It\u0027s not needed anyway. He can just use objects.Instance below in the isinstance check.","commit_id":"9d306d94e22884998da4543f37d7d6cf8d3d896b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"780a79973c79b3ae88ab44dee433a27395c3bb39","unresolved":false,"context_lines":[{"line_number":1506,"context_line":"        raise NotImplementedError()"},{"line_number":1507,"context_line":""},{"line_number":1508,"context_line":"    def setup_networks_on_host(self, context, instance_id, host, instance\u003dNone,"},{"line_number":1509,"context_line":"                               teardown\u003dFalse):"},{"line_number":1510,"context_line":"        \"\"\"calls setup/teardown on network hosts for an instance.\"\"\""},{"line_number":1511,"context_line":"        green_threads \u003d []"},{"line_number":1512,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a5ae5dd_2d395ad7","line":1509,"updated":"2016-02-08 11:15:57.000000000","message":"in theory we should probably add this arg at the end, but as we always send things as kwargs, we should be safe.","commit_id":"da019e89976f9673c4f80575909dda3bab3e1a24"}],"nova/network/rpcapi.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"cab53529cf5f0b461258395aad0d832eff32dff2","unresolved":false,"context_lines":[{"line_number":106,"context_line":""},{"line_number":107,"context_line":"        * 1.14 - Add mac parameter to release_fixed_ip()."},{"line_number":108,"context_line":"        * 1.15 - Convert set_network_host() to use Network objects."},{"line_number":109,"context_line":"        * 1.16 - Transfer instance instead of instance_id in"},{"line_number":110,"context_line":"                 setup_networks_on_host"},{"line_number":111,"context_line":"        ... Liberty supports message version 1.15.  So, any changes to"},{"line_number":112,"context_line":"        existing methods in 1.x after that point should be done such that they"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_3e2c59ab","line":109,"updated":"2015-12-02 19:49:51.000000000","message":"This should go below the \"Liberty supports message ...\" block below as it\u0027s the first version in Mitaka.","commit_id":"c2233f6973f2d09e43e7894c198ab86d066cf216"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"cab53529cf5f0b461258395aad0d832eff32dff2","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        \u0027juno\u0027: \u00271.13\u0027,"},{"line_number":121,"context_line":"        \u0027kilo\u0027: \u00271.13\u0027,"},{"line_number":122,"context_line":"        \u0027liberty\u0027: \u00271.15\u0027,"},{"line_number":123,"context_line":"        \u0027mitaka\u0027: \u00271.16\u0027"},{"line_number":124,"context_line":"    }"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def __init__(self, topic\u003dNone):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_411aa270","line":123,"updated":"2015-12-02 19:49:51.000000000","message":"This is done at the end of the cycle since it records the last version supported by the release.","commit_id":"c2233f6973f2d09e43e7894c198ab86d066cf216"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"04a6f503ae55b9b3f1fe0c01f6c6d47f9f508a29","unresolved":false,"context_lines":[{"line_number":254,"context_line":"            version \u003d \u00271.0\u0027"},{"line_number":255,"context_line":"            kwargs[\u0027instance_id\u0027] \u003d instance_id.id"},{"line_number":256,"context_line":"        else:"},{"line_number":257,"context_line":"            kwargs[\u0027instance_id\u0027] \u003d instance_id"},{"line_number":258,"context_line":"        cctxt \u003d self.client.prepare(version\u003dversion)"},{"line_number":259,"context_line":"        return cctxt.call(ctxt, \u0027setup_networks_on_host\u0027,"},{"line_number":260,"context_line":"                          host\u003dhost, teardown\u003dteardown, **kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_5e73d5b1","line":257,"updated":"2016-02-03 15:31:18.000000000","message":"This is not how we do this sort of thing. We add an attribute for the new thing and avoid breaking the old thing. I know you\u0027re handling it on both sides, but I think we should be consistent here. There\u0027s really no reason not to be clean about it.","commit_id":"9d306d94e22884998da4543f37d7d6cf8d3d896b"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"75ae01a66fd1921c8c883e243ba8c6838ffe569c","unresolved":false,"context_lines":[{"line_number":254,"context_line":"            version \u003d \u00271.0\u0027"},{"line_number":255,"context_line":"            kwargs[\u0027instance_id\u0027] \u003d instance_id.id"},{"line_number":256,"context_line":"        else:"},{"line_number":257,"context_line":"            kwargs[\u0027instance_id\u0027] \u003d instance_id"},{"line_number":258,"context_line":"        cctxt \u003d self.client.prepare(version\u003dversion)"},{"line_number":259,"context_line":"        return cctxt.call(ctxt, \u0027setup_networks_on_host\u0027,"},{"line_number":260,"context_line":"                          host\u003dhost, teardown\u003dteardown, **kwargs)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_ebc75c43","line":257,"in_reply_to":"5a5ae5dd_5e73d5b1","updated":"2016-02-03 16:41:14.000000000","message":"Done","commit_id":"9d306d94e22884998da4543f37d7d6cf8d3d896b"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"ddae7b8e14cc75701a1434b0d98f48db4f7fd4e8","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        return self.client.call(ctxt, \u0027create_public_dns_domain\u0027,"},{"line_number":247,"context_line":"                                domain\u003ddomain, project\u003dproject)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def setup_networks_on_host(self, ctxt, instance_id, host, teardown):"},{"line_number":250,"context_line":"        # NOTE(tr3buchet): the call is just to wait for completion"},{"line_number":251,"context_line":"        version \u003d \u00271.16\u0027"},{"line_number":252,"context_line":"        kwargs \u003d {}"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_c05ef6e8","line":249,"updated":"2016-02-03 19:07:49.000000000","message":"Dan\u0027s point applies here as well.  Pass the instance rather than overloading the meaning of instance_id.  If you update all of the callers of this method you can just remove instance_id and add instance since this is not called via RPC.","commit_id":"6bfa4bf5a3ce38b95b3123fcc8498181d017693b"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"052031d7f42b6a72b298b058c71bda7b919cf2fd","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        return self.client.call(ctxt, \u0027create_public_dns_domain\u0027,"},{"line_number":247,"context_line":"                                domain\u003ddomain, project\u003dproject)"},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    def setup_networks_on_host(self, ctxt, instance_id, host, teardown):"},{"line_number":250,"context_line":"        # NOTE(tr3buchet): the call is just to wait for completion"},{"line_number":251,"context_line":"        version \u003d \u00271.16\u0027"},{"line_number":252,"context_line":"        kwargs \u003d {}"}],"source_content_type":"text/x-python","patch_set":5,"id":"5a5ae5dd_abdddb15","line":249,"in_reply_to":"5a5ae5dd_c05ef6e8","updated":"2016-02-03 19:40:22.000000000","message":"Yes, thanks, missed that. Done","commit_id":"6bfa4bf5a3ce38b95b3123fcc8498181d017693b"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"7b39eace617191f66b31b7330f597d406d0167e8","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        existing methods in 1.x after that point should be done such that they"},{"line_number":112,"context_line":"        can handle the version_cap being set to 1.15."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        * 1.16 - Transfer instance instead of instance_id in"},{"line_number":115,"context_line":"                 setup_networks_on_host"},{"line_number":116,"context_line":"    \u0027\u0027\u0027"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a5ae5dd_29fd4a3a","line":114,"updated":"2016-02-04 13:29:34.000000000","message":"s/instead of/in addition to/","commit_id":"859af8f4c59ffe524d5950da46ccbb195faa887e"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"23a5dbb4c668cd7d81ea173c62f8f340afda0ca3","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        existing methods in 1.x after that point should be done such that they"},{"line_number":112,"context_line":"        can handle the version_cap being set to 1.15."},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        * 1.16 - Transfer instance instead of instance_id in"},{"line_number":115,"context_line":"                 setup_networks_on_host"},{"line_number":116,"context_line":"    \u0027\u0027\u0027"},{"line_number":117,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"5a5ae5dd_111af86e","line":114,"in_reply_to":"5a5ae5dd_29fd4a3a","updated":"2016-02-04 13:34:15.000000000","message":"Done","commit_id":"859af8f4c59ffe524d5950da46ccbb195faa887e"}],"nova/tests/unit/network/test_rpcapi.py":[{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"cab53529cf5f0b461258395aad0d832eff32dff2","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                domain\u003d\u0027fake_domain\u0027, project\u003d\u0027fake_project\u0027)"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def test_setup_networks_on_host(self):"},{"line_number":198,"context_line":"        instance \u003d fake_instance.fake_instance_obj(context.get_admin_context())"},{"line_number":199,"context_line":"        self._test_network_api(\u0027setup_networks_on_host\u0027, rpc_method\u003d\u0027call\u0027,"},{"line_number":200,"context_line":"                instance_id\u003dinstance, host\u003d\u0027fake_host\u0027, teardown\u003dFalse,"},{"line_number":201,"context_line":"                version\u003d\u00271.16\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a8ffd7b_5e8d9dd1","line":198,"updated":"2015-12-02 19:49:51.000000000","message":"This is mostly a nit but tests should not be using an admin context unless necessary.  Lots of tests do this because it\u0027s the easiest way to get a context, but context.RequestContext(\u0027fake-user\u0027, \u0027fake-project\u0027) works as well.","commit_id":"c2233f6973f2d09e43e7894c198ab86d066cf216"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"61f03d2c2012098a8b88dda03a84f168ead33e4b","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def test_setup_networks_on_host_with_instance_id(self):"},{"line_number":205,"context_line":"        ctxt \u003d context.RequestContext(\u0027fake_user\u0027, \u0027fake_project\u0027)"},{"line_number":206,"context_line":"        instance \u003d fake_instance.fake_instance_obj(context.get_admin_context())"},{"line_number":207,"context_line":"        host \u003d \u0027fake_host\u0027"},{"line_number":208,"context_line":"        teardown \u003d True"},{"line_number":209,"context_line":"        rpcapi \u003d network_rpcapi.NetworkAPI()"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a5de9d1_84ba3722","line":206,"updated":"2016-01-28 15:05:54.000000000","message":"Unless this needs an admin context it\u0027s better to not use an admin context here.  You can use context.RequestContext(\u0027fake-user\u0027, \u0027fake-project\u0027).","commit_id":"9d306d94e22884998da4543f37d7d6cf8d3d896b"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"75ae01a66fd1921c8c883e243ba8c6838ffe569c","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    def test_setup_networks_on_host_with_instance_id(self):"},{"line_number":205,"context_line":"        ctxt \u003d context.RequestContext(\u0027fake_user\u0027, \u0027fake_project\u0027)"},{"line_number":206,"context_line":"        instance \u003d fake_instance.fake_instance_obj(context.get_admin_context())"},{"line_number":207,"context_line":"        host \u003d \u0027fake_host\u0027"},{"line_number":208,"context_line":"        teardown \u003d True"},{"line_number":209,"context_line":"        rpcapi \u003d network_rpcapi.NetworkAPI()"}],"source_content_type":"text/x-python","patch_set":4,"id":"5a5ae5dd_abc5e45b","line":206,"in_reply_to":"7a5de9d1_84ba3722","updated":"2016-02-03 16:41:14.000000000","message":"Done","commit_id":"9d306d94e22884998da4543f37d7d6cf8d3d896b"}]}
