)]}'
{"nova/objects/network_request.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a422d0af77d83b301eda649c07e93f77be6d10ba","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        \u0027port_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":41,"context_line":"        \u0027pci_request_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":42,"context_line":"        \u0027tag\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":43,"context_line":"        \u0027physnet\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":44,"context_line":"        \u0027tunneled\u0027: fields.BooleanField(nullable\u003dTrue),"},{"line_number":45,"context_line":"    }"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_462385bf","line":43,"updated":"2018-04-27 12:55:15.000000000","message":"This only fits to the model today as Nova only checks for the first physnet in the segments of the network the port belongs to. But in reality a Neutron network can map to more than one physnet via more than one segment. Today Neutron portbinding selects the physnet based on the host the port is being bound to. This also means that one one host the port might bound to a physnet that is affine to NUMA0 while on another host the port is bound to a different physnet affine to NUMA1.\n\nI suggest to add a note here that mutli provider networks are not supported yet","commit_id":"fb682123432f9e2fe20bde0d72d8fd4493438d5e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"806f67d75fa02b2c1281ba507fe4b664d4dee462","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        \u0027port_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":41,"context_line":"        \u0027pci_request_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":42,"context_line":"        \u0027tag\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":43,"context_line":"        \u0027physnet\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":44,"context_line":"        \u0027tunneled\u0027: fields.BooleanField(nullable\u003dTrue),"},{"line_number":45,"context_line":"    }"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_579ecd54","line":43,"in_reply_to":"9f6a8fd7_462385bf","updated":"2018-04-27 14:36:36.000000000","message":"Oh, good point. I\u0027ll do that. I guess we should think about how we do that in the future too. Would it even be possible at this stage, given that we don\u0027t know what host we\u0027re on (and don\u0027t want to start querying the neutron API from each host during filtering)","commit_id":"fb682123432f9e2fe20bde0d72d8fd4493438d5e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f19cd6c314909ebb4cc54aed3334ac66a48b8d0b","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        \u0027port_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":41,"context_line":"        \u0027pci_request_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":42,"context_line":"        \u0027tag\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":43,"context_line":"        \u0027physnet\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":44,"context_line":"        \u0027tunneled\u0027: fields.BooleanField(nullable\u003dTrue),"},{"line_number":45,"context_line":"    }"},{"line_number":46,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_a7ad9feb","line":43,"in_reply_to":"9f6a8fd7_579ecd54","updated":"2018-04-30 10:24:07.000000000","message":"this may depend on when we do port binding/creation also.\nif we move it to the conductor/scheduler then we should be able to determine what physnet is correct for that host and on what numa node we need to place the instance.\n\nhaving the same physnet mapped to different numa nodes on different host should work with what Stephen has proposed today without needing support for multi-provider networks.\n\nthe edge case that does not work today is if you have a multi provider network on physnet1(numa0) and physnet2(numa1) and a host connected to both. in that case since we take only the 1st physnet in nova we may eliminate the host if numa0 is full but numa1 has space for the instance.","commit_id":"fb682123432f9e2fe20bde0d72d8fd4493438d5e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"a422d0af77d83b301eda649c07e93f77be6d10ba","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027pci_request_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":42,"context_line":"        \u0027tag\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":43,"context_line":"        \u0027physnet\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":44,"context_line":"        \u0027tunneled\u0027: fields.BooleanField(nullable\u003dTrue),"},{"line_number":45,"context_line":"    }"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_81074719","line":44,"range":{"start_line":44,"start_character":40,"end_line":44,"end_character":53},"updated":"2018-04-27 12:55:15.000000000","message":"Why we need to allow null here?","commit_id":"fb682123432f9e2fe20bde0d72d8fd4493438d5e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"806f67d75fa02b2c1281ba507fe4b664d4dee462","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027pci_request_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":42,"context_line":"        \u0027tag\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":43,"context_line":"        \u0027physnet\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":44,"context_line":"        \u0027tunneled\u0027: fields.BooleanField(nullable\u003dTrue),"},{"line_number":45,"context_line":"    }"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_b78de92b","line":44,"range":{"start_line":44,"start_character":40,"end_line":44,"end_character":53},"in_reply_to":"9f6a8fd7_81074719","updated":"2018-04-27 14:36:36.000000000","message":"tbh, this was a copy-paste from the previous lines. I assume I should instead set \u0027default\u003dFalse\u0027. I can change that","commit_id":"fb682123432f9e2fe20bde0d72d8fd4493438d5e"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"f19cd6c314909ebb4cc54aed3334ac66a48b8d0b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027pci_request_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":42,"context_line":"        \u0027tag\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":43,"context_line":"        \u0027physnet\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":44,"context_line":"        \u0027tunneled\u0027: fields.BooleanField(nullable\u003dTrue),"},{"line_number":45,"context_line":"    }"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f6a8fd7_e7f15703","line":44,"range":{"start_line":44,"start_character":40,"end_line":44,"end_character":53},"in_reply_to":"9f6a8fd7_b78de92b","updated":"2018-04-30 10:24:07.000000000","message":"if you use nuallable\u003dTrue it will default to unset and then null will be stored in the db.\ndefault\u003dfalse would be more correct for a boolean flag.","commit_id":"fb682123432f9e2fe20bde0d72d8fd4493438d5e"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9da1ba7e6210bfc8d2c7b79838f26b244a8f7abe","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027pci_request_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":42,"context_line":"        \u0027tag\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":43,"context_line":"        \u0027physnet\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":44,"context_line":"        \u0027tunneled\u0027: fields.BooleanField(nullable\u003dTrue),"},{"line_number":45,"context_line":"    }"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f7c97a3_e60dd590","line":44,"range":{"start_line":44,"start_character":40,"end_line":44,"end_character":53},"in_reply_to":"9f6a8fd7_e7f15703","updated":"2018-06-14 13:39:52.000000000","message":"Done","commit_id":"fb682123432f9e2fe20bde0d72d8fd4493438d5e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"feda24b67d2c676a11cf0078cc3f050ac3400826","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027pci_request_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":42,"context_line":"        \u0027tag\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":43,"context_line":"        \u0027physnet\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":44,"context_line":"        \u0027tunneled\u0027: fields.BooleanField(default\u003dFalse),"},{"line_number":45,"context_line":"    }"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_4d78a28e","line":44,"updated":"2018-05-16 17:10:52.000000000","message":"From what I can tell from looking at the later patches, these are not parts of the network request. Meaning, they\u0027re not things the user asked for, they\u0027re attributes of the network, which is what the user (may have) asked for.\n\nBecause of that, I don\u0027t think these should be in this object, which will also, I think, obviate the need to access this object from all the places you currently want to access it.\n\nThe instance.info_cache.network_info object already contains everything we\u0027ve learned from neutron about the actual networks and ports the instance is going to have. It\u0027s where we stash stuff we need to mirror from neutron like this, which we will need for later, and I think it\u0027s the right place to put this. When we build the initial network_info cache of stuff from neutron, we just need to gather the physnet and tunneled bits at that time, and then they will be available later to anything that has the instance.\n\nNow, the problem is, I think the first time we do that is in compute manager when we do allocate_for_instance(). I assume that\u0027s too late because the scheduler needs this stuff, and the scheduler doesn\u0027t get to see info_cache anyway.\n\nSo, I think you might need to put some extra stuff into RequestSpec to communicate this, but I don\u0027t think it should be in NetworkRequest. Doing that will let you get this info to the scheduler, and stashing things in info_cache when we go to build it will avoid the need to store this stuff with the instance separately.","commit_id":"a827fd471e125f3c7027259f864124f5e606bcf8"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9da1ba7e6210bfc8d2c7b79838f26b244a8f7abe","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027pci_request_id\u0027: fields.UUIDField(nullable\u003dTrue),"},{"line_number":42,"context_line":"        \u0027tag\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":43,"context_line":"        \u0027physnet\u0027: fields.StringField(nullable\u003dTrue),"},{"line_number":44,"context_line":"        \u0027tunneled\u0027: fields.BooleanField(default\u003dFalse),"},{"line_number":45,"context_line":"    }"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":3,"id":"5f7c97a3_dc88eac6","line":44,"in_reply_to":"5f7c97a3_4d78a28e","updated":"2018-06-14 13:39:52.000000000","message":"Done","commit_id":"a827fd471e125f3c7027259f864124f5e606bcf8"}],"nova/objects/request_spec.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f3e22c36b563745dd2c9b45c74d274467c9ac4d1","unresolved":false,"context_lines":[{"line_number":573,"context_line":"    def save(self):"},{"line_number":574,"context_line":"        updates \u003d self._get_update_primitives()"},{"line_number":575,"context_line":"        db_spec \u003d self._save_in_db(self._context, self.instance_uuid, updates)"},{"line_number":576,"context_line":"        self._from_db_object(self._context, self, db_spec)"},{"line_number":577,"context_line":"        self.obj_reset_changes()"},{"line_number":578,"context_line":""},{"line_number":579,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":6,"id":"5f7c97a3_a23cc9e1","line":576,"updated":"2018-06-15 15:31:02.000000000","message":"This is nulling out your numa_networks field.","commit_id":"31ac13d52c4b9aa6dd5d490954eda61ebd86a323"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"4e2f8bd19c7d587bf04a66b68d3c66358ddb2826","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            # though they should match."},{"line_number":475,"context_line":"            if key in [\u0027id\u0027, \u0027instance_uuid\u0027]:"},{"line_number":476,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":477,"context_line":"            # Do not override what we already have in the object for fields"},{"line_number":478,"context_line":"            # that are not persisted"},{"line_number":479,"context_line":"            elif key in [\u0027numa_networks\u0027]:"},{"line_number":480,"context_line":"                pass"},{"line_number":481,"context_line":"            else:"},{"line_number":482,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"},{"line_number":483,"context_line":"        spec._context \u003d context"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_3dacd386","line":480,"range":{"start_line":477,"start_character":1,"end_line":480,"end_character":20},"updated":"2018-06-22 10:55:32.000000000","message":"I think you don\u0027t have test coverage for this.","commit_id":"d9d5e9e6edf2513001cabc22ce80a735a0285893"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"5e608ff071d910ae58f766d74eddd39c20b0f523","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            # though they should match."},{"line_number":475,"context_line":"            if key in [\u0027id\u0027, \u0027instance_uuid\u0027]:"},{"line_number":476,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":477,"context_line":"            # Do not override what we already have in the object for fields"},{"line_number":478,"context_line":"            # that are not persisted"},{"line_number":479,"context_line":"            elif key in [\u0027numa_networks\u0027]:"},{"line_number":480,"context_line":"                pass"},{"line_number":481,"context_line":"            else:"},{"line_number":482,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"},{"line_number":483,"context_line":"        spec._context \u003d context"}],"source_content_type":"text/x-python","patch_set":8,"id":"5f7c97a3_152f6bf5","line":480,"range":{"start_line":477,"start_character":1,"end_line":480,"end_character":20},"in_reply_to":"5f7c97a3_3dacd386","updated":"2018-06-22 15:29:33.000000000","message":"Done","commit_id":"d9d5e9e6edf2513001cabc22ce80a735a0285893"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e4983d358dafae1415049e4ad9f7d295423774f1","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(),"},{"line_number":83,"context_line":"        \u0027security_groups\u0027: fields.ObjectField(\u0027SecurityGroupList\u0027),"},{"line_number":84,"context_line":"        \u0027network_metadata\u0027: fields.ObjectField(\u0027NetworkMetadata\u0027,"},{"line_number":85,"context_line":"                                               nullable\u003dTrue,"},{"line_number":86,"context_line":"                                               default\u003dNone),"},{"line_number":87,"context_line":"    }"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5f7c97a3_1d91a046","line":85,"range":{"start_line":85,"start_character":47,"end_line":85,"end_character":60},"updated":"2018-07-09 15:18:00.000000000","message":"Again, do we really want to be able to set this to None? I would expect that this would always be a NetworkMetadata object and never None. Being unset means we don\u0027t have the data.","commit_id":"34883c6ea326217c5d4d224ad8d97fd88bf3d431"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"33e83f20ead1aca4c92d22d06a0d2c5a78637534","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(),"},{"line_number":83,"context_line":"        \u0027security_groups\u0027: fields.ObjectField(\u0027SecurityGroupList\u0027),"},{"line_number":84,"context_line":"        \u0027network_metadata\u0027: fields.ObjectField(\u0027NetworkMetadata\u0027,"},{"line_number":85,"context_line":"                                               nullable\u003dTrue,"},{"line_number":86,"context_line":"                                               default\u003dNone),"},{"line_number":87,"context_line":"    }"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"5f7c97a3_138c3133","line":85,"range":{"start_line":85,"start_character":47,"end_line":85,"end_character":60},"in_reply_to":"5f7c97a3_1d91a046","updated":"2018-07-09 16:23:50.000000000","message":"Done","commit_id":"34883c6ea326217c5d4d224ad8d97fd88bf3d431"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e4983d358dafae1415049e4ad9f7d295423774f1","unresolved":false,"context_lines":[{"line_number":403,"context_line":"    def from_components(cls, context, instance_uuid, image, flavor,"},{"line_number":404,"context_line":"            numa_topology, pci_requests, filter_properties, instance_group,"},{"line_number":405,"context_line":"            availability_zone, security_groups\u003dNone, project_id\u003dNone,"},{"line_number":406,"context_line":"            user_id\u003dNone, network_metadata\u003dNone):"},{"line_number":407,"context_line":"        \"\"\"Returns a new RequestSpec object hydrated by various components."},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        This helper is useful in creating the RequestSpec from the various"}],"source_content_type":"text/x-python","patch_set":17,"id":"5f7c97a3_7dcf7456","line":406,"updated":"2018-07-09 15:18:00.000000000","message":"I don\u0027t think we really want to do this. The from_components() thing was supposed to be short-lived for compatibility with the previous many-arguments-to-a-method way of specifying all this stuff. IMHO, just set it on the ReqSpec where you need it. Like I did here, for example:\n\nhttps://review.openstack.org/#/c/580720/2/nova/compute/api.py","commit_id":"34883c6ea326217c5d4d224ad8d97fd88bf3d431"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"33e83f20ead1aca4c92d22d06a0d2c5a78637534","unresolved":false,"context_lines":[{"line_number":403,"context_line":"    def from_components(cls, context, instance_uuid, image, flavor,"},{"line_number":404,"context_line":"            numa_topology, pci_requests, filter_properties, instance_group,"},{"line_number":405,"context_line":"            availability_zone, security_groups\u003dNone, project_id\u003dNone,"},{"line_number":406,"context_line":"            user_id\u003dNone, network_metadata\u003dNone):"},{"line_number":407,"context_line":"        \"\"\"Returns a new RequestSpec object hydrated by various components."},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"        This helper is useful in creating the RequestSpec from the various"}],"source_content_type":"text/x-python","patch_set":17,"id":"5f7c97a3_f3889522","line":406,"in_reply_to":"5f7c97a3_7dcf7456","updated":"2018-07-09 16:23:50.000000000","message":"Done","commit_id":"34883c6ea326217c5d4d224ad8d97fd88bf3d431"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e4983d358dafae1415049e4ad9f7d295423774f1","unresolved":false,"context_lines":[{"line_number":544,"context_line":"            # NOTE(stephenfin): Don\u0027t persist network metadata since we have"},{"line_number":545,"context_line":"            # no need for it after scheduling"},{"line_number":546,"context_line":"            if \u0027network_metadata\u0027 in spec and spec.network_metadata:"},{"line_number":547,"context_line":"                spec.network_metadata \u003d None"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"            db_updates \u003d {\u0027spec\u0027: jsonutils.dumps(spec.obj_to_primitive())}"},{"line_number":550,"context_line":"            if \u0027instance_uuid\u0027 in updates:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5f7c97a3_dd8008c1","line":547,"updated":"2018-07-09 15:18:00.000000000","message":"This will end up storing this as None in the DB. That might be reasonable for retry above, but I guess it just seems like we should del it from the thing and not store it at all, and then we don\u0027t need to ignore it on load.\n\nThe instance group example above is a little different I think, since we need to store some elements of that structure, and specifically avoid lazy-loads from the members and hosts fields on the persisted one when we restore it from the database. But I dunno, this network_metadata field, being always filled in when we need it from fresh neutron data seems worth just snipping out of what we store.","commit_id":"34883c6ea326217c5d4d224ad8d97fd88bf3d431"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"33e83f20ead1aca4c92d22d06a0d2c5a78637534","unresolved":false,"context_lines":[{"line_number":544,"context_line":"            # NOTE(stephenfin): Don\u0027t persist network metadata since we have"},{"line_number":545,"context_line":"            # no need for it after scheduling"},{"line_number":546,"context_line":"            if \u0027network_metadata\u0027 in spec and spec.network_metadata:"},{"line_number":547,"context_line":"                spec.network_metadata \u003d None"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"            db_updates \u003d {\u0027spec\u0027: jsonutils.dumps(spec.obj_to_primitive())}"},{"line_number":550,"context_line":"            if \u0027instance_uuid\u0027 in updates:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5f7c97a3_533e2926","line":547,"in_reply_to":"5f7c97a3_dd8008c1","updated":"2018-07-09 16:23:50.000000000","message":"Done","commit_id":"34883c6ea326217c5d4d224ad8d97fd88bf3d431"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1d7c33f22293dd74f8699188a195cd875dc09698","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        \u0027scheduler_hints\u0027: fields.DictOfListOfStringsField(nullable\u003dTrue),"},{"line_number":82,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(),"},{"line_number":83,"context_line":"        \u0027security_groups\u0027: fields.ObjectField(\u0027SecurityGroupList\u0027),"},{"line_number":84,"context_line":"        \u0027network_metadata\u0027: fields.ObjectField(\u0027NetworkMetadata\u0027),"},{"line_number":85,"context_line":"    }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f7c97a3_7bd2f735","line":84,"updated":"2018-07-10 22:11:37.000000000","message":"On the question of whether or not this should be nullable, it might depend on how it gets used, because the API could potentially set this to None if the user specifically requested networks\u003d\u0027none\u0027:\n\nhttps://review.openstack.org/#/c/564452/17/nova/compute/api.py@889","commit_id":"51248a4c01ec388c31b633cd95e90207d4b831d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e80f6352cfd46f45c307d37e7e635cdf039fee87","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        \u0027scheduler_hints\u0027: fields.DictOfListOfStringsField(nullable\u003dTrue),"},{"line_number":82,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(),"},{"line_number":83,"context_line":"        \u0027security_groups\u0027: fields.ObjectField(\u0027SecurityGroupList\u0027),"},{"line_number":84,"context_line":"        \u0027network_metadata\u0027: fields.ObjectField(\u0027NetworkMetadata\u0027),"},{"line_number":85,"context_line":"    }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f7c97a3_dbc9cb7a","line":84,"in_reply_to":"5f7c97a3_7bd2f735","updated":"2018-07-10 22:13:08.000000000","message":"Furthermore, we could short-circuit the logic in here during scheduling if we\u0027re passing in network_metadata\u003dNone:\n\nhttps://review.openstack.org/#/c/564448/14/nova/virt/hardware.py@1557","commit_id":"51248a4c01ec388c31b633cd95e90207d4b831d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"49ed4e0b3bc21a4c32a3f25c51298e0c4b1c7ae9","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        \u0027scheduler_hints\u0027: fields.DictOfListOfStringsField(nullable\u003dTrue),"},{"line_number":82,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(),"},{"line_number":83,"context_line":"        \u0027security_groups\u0027: fields.ObjectField(\u0027SecurityGroupList\u0027),"},{"line_number":84,"context_line":"        \u0027network_metadata\u0027: fields.ObjectField(\u0027NetworkMetadata\u0027),"},{"line_number":85,"context_line":"    }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f7c97a3_4b26fb69","line":84,"in_reply_to":"5f7c97a3_db778b3c","updated":"2018-07-13 16:10:29.000000000","message":"We agreed today in IRC that we\u0027ll leave this nullable. Consumers will have to be conscious of this and not set it to None (API) or access it if not set (hardware.py).","commit_id":"51248a4c01ec388c31b633cd95e90207d4b831d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f805e4569f595783a79639e3221e5e75bb4dfd73","unresolved":false,"context_lines":[{"line_number":81,"context_line":"        \u0027scheduler_hints\u0027: fields.DictOfListOfStringsField(nullable\u003dTrue),"},{"line_number":82,"context_line":"        \u0027instance_uuid\u0027: fields.UUIDField(),"},{"line_number":83,"context_line":"        \u0027security_groups\u0027: fields.ObjectField(\u0027SecurityGroupList\u0027),"},{"line_number":84,"context_line":"        \u0027network_metadata\u0027: fields.ObjectField(\u0027NetworkMetadata\u0027),"},{"line_number":85,"context_line":"    }"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    def obj_make_compatible(self, primitive, target_version):"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f7c97a3_db778b3c","line":84,"in_reply_to":"5f7c97a3_dbc9cb7a","updated":"2018-07-10 22:14:27.000000000","message":"\u003e Furthermore, we could short-circuit the logic in here during\n \u003e scheduling if we\u0027re passing in network_metadata\u003dNone:\n \u003e \n \u003e https://review.openstack.org/#/c/564448/14/nova/virt/hardware.py@1557\n\nAlthough if required_phsynets and required_tunneled are both empty/False for the default, we\u0027ll still short-circuit the chosen host cell filtering during scheduling.","commit_id":"51248a4c01ec388c31b633cd95e90207d4b831d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7a2ea0bf124727ea6d08c127a7e13356d804290f","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            if key in [\u0027id\u0027, \u0027instance_uuid\u0027]:"},{"line_number":475,"context_line":"                setattr(spec, key, db_spec[key])"},{"line_number":476,"context_line":"            else:"},{"line_number":477,"context_line":"                setattr(spec, key, getattr(spec_obj, key))"},{"line_number":478,"context_line":"        spec._context \u003d context"},{"line_number":479,"context_line":""},{"line_number":480,"context_line":"        if \u0027instance_group\u0027 in spec and spec.instance_group:"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f7c97a3_3bf23f07","line":477,"range":{"start_line":477,"start_character":16,"end_line":477,"end_character":58},"updated":"2018-07-10 22:07:10.000000000","message":"OK this will lazy-load network_metadata from spec_obj which will default the value.","commit_id":"51248a4c01ec388c31b633cd95e90207d4b831d2"}],"nova/tests/unit/objects/test_request_spec.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"e4983d358dafae1415049e4ad9f7d295423774f1","unresolved":false,"context_lines":[{"line_number":705,"context_line":"    def test_network_requests_load(self):"},{"line_number":706,"context_line":"        req_obj \u003d objects.RequestSpec()"},{"line_number":707,"context_line":"        self.assertNotIn(\u0027network_metadata\u0027, req_obj)"},{"line_number":708,"context_line":"        self.assertIsNone(req_obj.network_metadata)"},{"line_number":709,"context_line":"        self.assertIn(\u0027network_metadata\u0027, req_obj)"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    def test_destination_aggregates_default(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"5f7c97a3_bdb2ec94","line":708,"updated":"2018-07-09 15:18:00.000000000","message":"I guess this is why you want it to be nullable, so you can have this defaults-to-None behavior. However, doesn\u0027t that really mean that we\u0027ve got a bug somewhere? No matter what, if we pull out a reqspec and pass it to something that cares about this and network_metadata isn\u0027t present, then we missed a spot right? Like, if we go to live migrate an instance, and we pull out an old reqspec and don\u0027t add network_metadata to it before we start the migration, we\u0027ll not \"fix\" the topology and pinning as part of the mgiration, which we really should.\n\nRight?","commit_id":"34883c6ea326217c5d4d224ad8d97fd88bf3d431"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"33e83f20ead1aca4c92d22d06a0d2c5a78637534","unresolved":false,"context_lines":[{"line_number":705,"context_line":"    def test_network_requests_load(self):"},{"line_number":706,"context_line":"        req_obj \u003d objects.RequestSpec()"},{"line_number":707,"context_line":"        self.assertNotIn(\u0027network_metadata\u0027, req_obj)"},{"line_number":708,"context_line":"        self.assertIsNone(req_obj.network_metadata)"},{"line_number":709,"context_line":"        self.assertIn(\u0027network_metadata\u0027, req_obj)"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    def test_destination_aggregates_default(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"5f7c97a3_733d652a","line":708,"in_reply_to":"5f7c97a3_bdb2ec94","updated":"2018-07-09 16:23:50.000000000","message":"Right, but I do think I need to set it somewhere, otherwise every caller of RequestSpec would need to be updated to always set this attribute, which doesn\u0027t seem to be necessary for any other field.\n\nI\u0027ve started setting it to a non-null value, which should do the trick","commit_id":"34883c6ea326217c5d4d224ad8d97fd88bf3d431"}]}
