)]}'
{"nova/objects/__init__.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34695e6955fc51c1bc8a5803de01539185465795","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    __import__(\u0027nova.objects.instance_pci_requests\u0027)"},{"line_number":51,"context_line":"    __import__(\u0027nova.objects.keypair\u0027)"},{"line_number":52,"context_line":"    __import__(\u0027nova.objects.migrate_data\u0027)"},{"line_number":53,"context_line":"    __import__(\u0027nova.objects.metadata\u0027)"},{"line_number":54,"context_line":"    __import__(\u0027nova.objects.migration\u0027)"},{"line_number":55,"context_line":"    __import__(\u0027nova.objects.migration_context\u0027)"},{"line_number":56,"context_line":"    __import__(\u0027nova.objects.monitor_metric\u0027)"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_a91cf413","line":53,"updated":"2016-03-30 14:23:25.000000000","message":"We have a lot of things called metadata, and these objects are the least likely to be thought of when you hear the word. Instead of capturing this very generic word for these objects can you come up with something more appropriate? Something like \"virt_devices\" or \"virt_device_info\" or even \"virt_device_metadata\".","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"c04de050814147dc1a7de0a2b55e76e6ce18860a","unresolved":false,"context_lines":[{"line_number":50,"context_line":"    __import__(\u0027nova.objects.instance_pci_requests\u0027)"},{"line_number":51,"context_line":"    __import__(\u0027nova.objects.keypair\u0027)"},{"line_number":52,"context_line":"    __import__(\u0027nova.objects.migrate_data\u0027)"},{"line_number":53,"context_line":"    __import__(\u0027nova.objects.metadata\u0027)"},{"line_number":54,"context_line":"    __import__(\u0027nova.objects.migration\u0027)"},{"line_number":55,"context_line":"    __import__(\u0027nova.objects.migration_context\u0027)"},{"line_number":56,"context_line":"    __import__(\u0027nova.objects.monitor_metric\u0027)"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_ba9d3f0c","line":53,"in_reply_to":"ba0121b8_a91cf413","updated":"2016-03-31 03:58:49.000000000","message":"Done","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"}],"nova/objects/fields.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f50541bdd7c12dc878b38a29c6ba9c64c3d2c94e","unresolved":false,"context_lines":[{"line_number":625,"context_line":"                                     for k, v in args.items()]))"},{"line_number":626,"context_line":""},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"class DeviceType(Enum):"},{"line_number":629,"context_line":"    DISK \u003d \u0027disk\u0027"},{"line_number":630,"context_line":"    NIC \u003d \u0027nic\u0027"},{"line_number":631,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"ba63e191_05d52542","line":628,"updated":"2016-01-18 20:12:58.000000000","message":"This is one reason I don\u0027t like the practice of defining Enum classes generically in fields for all cases. This is waaaay too broad of a name for this I think. It should probably be at least:\n\n MetadataTaggableDeviceType\n\nHowever, I\u0027d much prefer to just define it inline in the field definition itself.","commit_id":"17d6e65142093cbb5dfa0a4f85844dac66ec50fd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f50541bdd7c12dc878b38a29c6ba9c64c3d2c94e","unresolved":false,"context_lines":[{"line_number":635,"context_line":"        super(DeviceType, self).__init__(valid_values\u003dDeviceType.ALL)"},{"line_number":636,"context_line":""},{"line_number":637,"context_line":""},{"line_number":638,"context_line":"class DeviceBus(Enum):"},{"line_number":639,"context_line":"    PCI \u003d \u0027pci\u0027"},{"line_number":640,"context_line":"    USB \u003d \u0027usb\u0027"},{"line_number":641,"context_line":"    SCSI \u003d \u0027scsi\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba63e191_e55d71ed","line":638,"updated":"2016-01-18 20:12:58.000000000","message":"How is this different from DiskBus on L209? I mean, I see that it\u0027s a little narrower, but does it need to be? Again, if this is going to be something specific for just the metadata representation, it probably needs to be named appropriately, commented, etc.\n\nIn six months, someone else is going to come here, see this, add a thing to it and move on. If this is supposed to be tightly controlled for the purposes of keeping the metadata uniform, we need to not just change it willy-nilly for our own internal purposes.","commit_id":"17d6e65142093cbb5dfa0a4f85844dac66ec50fd"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34695e6955fc51c1bc8a5803de01539185465795","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        return v"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"class PCIAddress(FieldType):"},{"line_number":651,"context_line":"    PATTERN \u003d \u0027[a-f0-9]{4}:[a-f0-9]{2}:[a-f0-9]{2}.[a-f0-9]\u0027"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_4eea7e10","line":650,"updated":"2016-03-30 14:23:25.000000000","message":"This could be reduced to like half of what you have if you just declare a base class of PatternType and inherit below. We\u0027ve had a patch pending against o.vo for quite a while that is just a pattern-validating StringType, so if you build your code here to inherit from a common base, it will be easier to convert to that later.","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"c04de050814147dc1a7de0a2b55e76e6ce18860a","unresolved":false,"context_lines":[{"line_number":647,"context_line":"        return v"},{"line_number":648,"context_line":""},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"class PCIAddress(FieldType):"},{"line_number":651,"context_line":"    PATTERN \u003d \u0027[a-f0-9]{4}:[a-f0-9]{2}:[a-f0-9]{2}.[a-f0-9]\u0027"},{"line_number":652,"context_line":""},{"line_number":653,"context_line":"    @staticmethod"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_10debfdc","line":650,"in_reply_to":"ba0121b8_4eea7e10","updated":"2016-03-31 03:58:49.000000000","message":"Done","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"a41b9bed4d43a49f19e0324034386f408c503fa7","unresolved":false,"context_lines":[{"line_number":649,"context_line":""},{"line_number":650,"context_line":"class AddressBase(FieldType):"},{"line_number":651,"context_line":"    @staticmethod"},{"line_number":652,"context_line":"    def coerce(obj, attr, value):"},{"line_number":653,"context_line":"        if re.match(obj.PATTERN, str(value)):"},{"line_number":654,"context_line":"            return str(value)"},{"line_number":655,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":27,"id":"9a061dce_a063e040","line":652,"range":{"start_line":652,"start_character":8,"end_line":652,"end_character":14},"updated":"2016-04-08 08:20:22.000000000","message":"I saw the discussion on PS 25 that briefly complains about keeping schema validation in one place (presumably not objects), but there is definitely some bits of it here. I think it makes sense probably to have this as part of the object fields anyway.","commit_id":"0c8f01d238d57c3814ae251f54e9c80829991a61"}],"nova/objects/metadata.py":[{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"83c1d9643f668a37ba63b4ed978a74e2dd235e69","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (C) 2014, Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"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":3,"id":"fa69d971_e63a1ee7","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"updated":"2016-01-08 06:39:53.000000000","message":"should modify this?","commit_id":"585fb5a6f22ff88787232b46548ca9f0d6aca329"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"451a79df87b800960ef8eefe7dc890ecb6e29a41","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (C) 2014, Red Hat, Inc."},{"line_number":2,"context_line":"#"},{"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":3,"id":"fa69d971_8a20f24a","line":1,"range":{"start_line":1,"start_character":16,"end_line":1,"end_character":20},"in_reply_to":"fa69d971_e63a1ee7","updated":"2016-01-08 11:28:21.000000000","message":"Yep. I\u0027ll put 2016 in the next PS.","commit_id":"585fb5a6f22ff88787232b46548ca9f0d6aca329"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"bd58455b8d12394d332d672c56b0aab62e7add79","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        \u0027mac\u0027: fields.MACAddressField(),"},{"line_number":79,"context_line":"    }"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def to_dict(self):"},{"line_number":82,"context_line":"        return {"},{"line_number":83,"context_line":"            \u0027type\u0027: self.type,"},{"line_number":84,"context_line":"            \u0027bus\u0027: self.bus,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_733f6bb4","line":81,"range":{"start_line":81,"start_character":8,"end_line":81,"end_character":15},"updated":"2016-01-11 13:37:00.000000000","message":"This should be on the superclass really, and extended here...","commit_id":"585fb5a6f22ff88787232b46548ca9f0d6aca329"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"e3b670ad40d552c909dc0d6a1dcf129d58e19b1e","unresolved":false,"context_lines":[{"line_number":78,"context_line":"        \u0027mac\u0027: fields.MACAddressField(),"},{"line_number":79,"context_line":"    }"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def to_dict(self):"},{"line_number":82,"context_line":"        return {"},{"line_number":83,"context_line":"            \u0027type\u0027: self.type,"},{"line_number":84,"context_line":"            \u0027bus\u0027: self.bus,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_c100af36","line":81,"range":{"start_line":81,"start_character":8,"end_line":81,"end_character":15},"in_reply_to":"fa69d971_733f6bb4","updated":"2016-01-11 19:02:20.000000000","message":"Done","commit_id":"585fb5a6f22ff88787232b46548ca9f0d6aca329"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"ec00e81463b0150a51c2ce55ea418b2bed6192c3","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            \u0027mac\u0027: self.mac,"},{"line_number":87,"context_line":"            \u0027tags\u0027: self.tags,"},{"line_number":88,"context_line":"        }"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":92,"context_line":"class DeviceMetadataList(base.ObjectListBase, base.NovaObject):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_8a3a32cc","line":89,"updated":"2016-01-08 11:24:41.000000000","message":"This is missing a DiskMetadata class defined in the spec","commit_id":"585fb5a6f22ff88787232b46548ca9f0d6aca329"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"451a79df87b800960ef8eefe7dc890ecb6e29a41","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            \u0027mac\u0027: self.mac,"},{"line_number":87,"context_line":"            \u0027tags\u0027: self.tags,"},{"line_number":88,"context_line":"        }"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":92,"context_line":"class DeviceMetadataList(base.ObjectListBase, base.NovaObject):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_ea116e05","line":89,"in_reply_to":"fa69d971_8a3a32cc","updated":"2016-01-08 11:28:21.000000000","message":"It totally is! This patch series is for vNIC tagging only - should I add the DiskMetadata class regardless?","commit_id":"585fb5a6f22ff88787232b46548ca9f0d6aca329"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"bd58455b8d12394d332d672c56b0aab62e7add79","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            \u0027mac\u0027: self.mac,"},{"line_number":87,"context_line":"            \u0027tags\u0027: self.tags,"},{"line_number":88,"context_line":"        }"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":92,"context_line":"class DeviceMetadataList(base.ObjectListBase, base.NovaObject):"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_73ad2be8","line":89,"in_reply_to":"fa69d971_ea116e05","updated":"2016-01-11 13:37:00.000000000","message":"I think that as long as we are clear about the limitations of the patches we don\u0027t need to block them on this though. Having this working for interfaces will still be quite useful.","commit_id":"585fb5a6f22ff88787232b46548ca9f0d6aca329"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"686083b246ff0bb69be3de14dbbacb95edf57b74","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        return {"},{"line_number":74,"context_line":"            \u0027type\u0027: self.type,"},{"line_number":75,"context_line":"            \u0027bus\u0027: self.bus,"},{"line_number":76,"context_line":"            \u0027address\u0027: self.address.address,"},{"line_number":77,"context_line":"            \u0027tags\u0027: self.tags,"},{"line_number":78,"context_line":"        }"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_233a9337","line":76,"range":{"start_line":76,"start_character":43,"end_line":76,"end_character":44},"updated":"2016-01-12 10:45:19.000000000","message":"This is fail if self.address is unset, as would be the case for devices with no bus type, eg LXC container devices","commit_id":"5029bd13c9802daa2871c03f6182d47bf2fa0658"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"686083b246ff0bb69be3de14dbbacb95edf57b74","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    def to_dict(self):"},{"line_number":90,"context_line":"        d \u003d super(NetworkInterfaceMetadata, self).to_dict()"},{"line_number":91,"context_line":"        d[\u0027mac\u0027] \u003d self.mac"},{"line_number":92,"context_line":"        return d"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":4,"id":"da6ed579_030c2f93","line":92,"updated":"2016-01-12 10:45:19.000000000","message":"Still missing the DiskMetadata class definition","commit_id":"5029bd13c9802daa2871c03f6182d47bf2fa0658"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f50541bdd7c12dc878b38a29c6ba9c64c3d2c94e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from nova.objects import base"},{"line_number":17,"context_line":"from nova.objects import fields"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":21,"context_line":"class BusAddress(base.NovaObject):"},{"line_number":22,"context_line":"    version \u003d \u00271.0\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"ba63e191_6520a14a","line":19,"updated":"2016-01-18 20:12:58.000000000","message":"I\u0027m not sure I see the point in making any of these be registered objects. Are they ever sent over the wire or stored directly in the database? Maybe I need to read on in the set, but these seem like just things that get communicated between the virt driver and the config drive. If there is a reason to have them be versioned and tracked so that we ensure they don\u0027t change, then maybe that\u0027s a good enough reason, I dunno.\n\nHowever, I think it probably deserves some explaining, especially if these are special in that they directly affect metadata output or something, because that will mean we need to be more judicious about changes to them.","commit_id":"17d6e65142093cbb5dfa0a4f85844dac66ec50fd"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7794e0349ed0a04e446ac959bfea3571d7b651b6","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":21,"context_line":"class BusAddress(base.NovaObject):"},{"line_number":22,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_e9d3c55d","line":21,"updated":"2016-03-29 17:49:45.000000000","message":"Lets rename this to \u0027DeviceBus\u0027","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8ff420f81be6d343038901835241ca035c69b775","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":21,"context_line":"class BusAddress(base.NovaObject):"},{"line_number":22,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_40af1b94","line":21,"in_reply_to":"ba0121b8_e9d3c55d","updated":"2016-03-30 04:36:00.000000000","message":"Done","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7794e0349ed0a04e446ac959bfea3571d7b651b6","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":26,"context_line":"class PCIBusAddress(BusAddress):"},{"line_number":27,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_a9ba6d08","line":26,"range":{"start_line":26,"start_character":30,"end_line":26,"end_character":32},"updated":"2016-03-29 17:49:45.000000000","message":"And rename this to PCIDeviceBus","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8ff420f81be6d343038901835241ca035c69b775","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":26,"context_line":"class PCIBusAddress(BusAddress):"},{"line_number":27,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_a096f749","line":26,"range":{"start_line":26,"start_character":30,"end_line":26,"end_character":32},"in_reply_to":"ba0121b8_a9ba6d08","updated":"2016-03-30 04:36:00.000000000","message":"Done","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7794e0349ed0a04e446ac959bfea3571d7b651b6","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":35,"context_line":"class USBBusAddress(BusAddress):"},{"line_number":36,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_e93aa597","line":35,"range":{"start_line":35,"start_character":6,"end_line":35,"end_character":19},"updated":"2016-03-29 17:49:45.000000000","message":"USBDeviceBus","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8ff420f81be6d343038901835241ca035c69b775","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":35,"context_line":"class USBBusAddress(BusAddress):"},{"line_number":36,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_e0a0efa1","line":35,"range":{"start_line":35,"start_character":6,"end_line":35,"end_character":19},"in_reply_to":"ba0121b8_e93aa597","updated":"2016-03-30 04:36:00.000000000","message":"Done","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7794e0349ed0a04e446ac959bfea3571d7b651b6","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":44,"context_line":"class SCSIBusAddress(BusAddress):"},{"line_number":45,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_6947b51d","line":44,"range":{"start_line":44,"start_character":31,"end_line":44,"end_character":33},"updated":"2016-03-29 17:49:45.000000000","message":"SCSIDeviceBus","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8ff420f81be6d343038901835241ca035c69b775","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":44,"context_line":"class SCSIBusAddress(BusAddress):"},{"line_number":45,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_c09b2b71","line":44,"range":{"start_line":44,"start_character":31,"end_line":44,"end_character":33},"in_reply_to":"ba0121b8_6947b51d","updated":"2016-03-30 04:36:00.000000000","message":"Done","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7794e0349ed0a04e446ac959bfea3571d7b651b6","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":53,"context_line":"class IDEBusAddress(BusAddress):"},{"line_number":54,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_a951cdda","line":53,"range":{"start_line":53,"start_character":30,"end_line":53,"end_character":32},"updated":"2016-03-29 17:49:45.000000000","message":"IDEDeviceBus","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8ff420f81be6d343038901835241ca035c69b775","unresolved":false,"context_lines":[{"line_number":50,"context_line":""},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":53,"context_line":"class IDEBusAddress(BusAddress):"},{"line_number":54,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    fields \u003d {"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_008c0334","line":53,"range":{"start_line":53,"start_character":30,"end_line":53,"end_character":32},"in_reply_to":"ba0121b8_a951cdda","updated":"2016-03-30 04:36:00.000000000","message":"Done","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7794e0349ed0a04e446ac959bfea3571d7b651b6","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    }"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":62,"context_line":"class DeviceMetadata(base.NovaObject):"},{"line_number":63,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_c9f3619d","line":61,"range":{"start_line":61,"start_character":25,"end_line":61,"end_character":33},"updated":"2016-03-29 17:49:45.000000000","message":"iirc we don\u0027t need to register abstract base classes","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8ff420f81be6d343038901835241ca035c69b775","unresolved":false,"context_lines":[{"line_number":58,"context_line":"    }"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":62,"context_line":"class DeviceMetadata(base.NovaObject):"},{"line_number":63,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_4086fb13","line":61,"range":{"start_line":61,"start_character":25,"end_line":61,"end_character":33},"in_reply_to":"ba0121b8_c9f3619d","updated":"2016-03-30 04:36:00.000000000","message":"Done","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7794e0349ed0a04e446ac959bfea3571d7b651b6","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    fields \u003d {"},{"line_number":66,"context_line":"        \u0027type\u0027: fields.DeviceTypeField(),"},{"line_number":67,"context_line":"        \u0027bus\u0027: fields.DeviceBusField(),"},{"line_number":68,"context_line":"        \u0027address\u0027: fields.ObjectField(\u0027BusAddress\u0027, subclasses\u003dTrue),"},{"line_number":69,"context_line":"        \u0027tags\u0027: fields.ListOfStringsField(),"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_e907457f","line":66,"updated":"2016-03-29 17:49:45.000000000","message":"We don\u0027t need this field or the DeviceTypeField enum either. The device type is implicitly determined by what subclass we are","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8ff420f81be6d343038901835241ca035c69b775","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    fields \u003d {"},{"line_number":66,"context_line":"        \u0027type\u0027: fields.DeviceTypeField(),"},{"line_number":67,"context_line":"        \u0027bus\u0027: fields.DeviceBusField(),"},{"line_number":68,"context_line":"        \u0027address\u0027: fields.ObjectField(\u0027BusAddress\u0027, subclasses\u003dTrue),"},{"line_number":69,"context_line":"        \u0027tags\u0027: fields.ListOfStringsField(),"}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_7bbac90b","line":66,"in_reply_to":"ba0121b8_e907457f","updated":"2016-03-30 04:36:00.000000000","message":"Done","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7794e0349ed0a04e446ac959bfea3571d7b651b6","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    fields \u003d {"},{"line_number":66,"context_line":"        \u0027type\u0027: fields.DeviceTypeField(),"},{"line_number":67,"context_line":"        \u0027bus\u0027: fields.DeviceBusField(),"},{"line_number":68,"context_line":"        \u0027address\u0027: fields.ObjectField(\u0027BusAddress\u0027, subclasses\u003dTrue),"},{"line_number":69,"context_line":"        \u0027tags\u0027: fields.ListOfStringsField(),"},{"line_number":70,"context_line":"    }"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_c991a19b","line":68,"range":{"start_line":68,"start_character":67,"end_line":68,"end_character":69},"updated":"2016-03-29 17:49:45.000000000","message":"Looking at this again, I\u0027m thinking that we don\u0027t really need to have both the \u0027bus\u0027 and \u0027address\u0027 fields in this object.  The \u0027bus\u0027 enum value is implicitly provided by the subclass used in the address field.\n\nLets then just have a single field\n\n  \u0027bus\u0027: fields.ObjectField(\"DeviceBus\", subclasses\u003dTrue)\n\nWe thus don\u0027t need the DeviceBusField at all.","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8ff420f81be6d343038901835241ca035c69b775","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    fields \u003d {"},{"line_number":66,"context_line":"        \u0027type\u0027: fields.DeviceTypeField(),"},{"line_number":67,"context_line":"        \u0027bus\u0027: fields.DeviceBusField(),"},{"line_number":68,"context_line":"        \u0027address\u0027: fields.ObjectField(\u0027BusAddress\u0027, subclasses\u003dTrue),"},{"line_number":69,"context_line":"        \u0027tags\u0027: fields.ListOfStringsField(),"},{"line_number":70,"context_line":"    }"},{"line_number":71,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_db3795ae","line":68,"range":{"start_line":68,"start_character":67,"end_line":68,"end_character":69},"in_reply_to":"ba0121b8_c991a19b","updated":"2016-03-30 04:36:00.000000000","message":"Done","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7794e0349ed0a04e446ac959bfea3571d7b651b6","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        return {"},{"line_number":77,"context_line":"            \u0027type\u0027: self.type,"},{"line_number":78,"context_line":"            \u0027bus\u0027: self.bus,"},{"line_number":79,"context_line":"            \u0027address\u0027: address,"},{"line_number":80,"context_line":"            \u0027tags\u0027: self.tags,"},{"line_number":81,"context_line":"        }"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_a9726d47","line":79,"range":{"start_line":79,"start_character":30,"end_line":79,"end_character":31},"updated":"2016-03-29 17:49:45.000000000","message":"In dict representation we do still need the pair of bus + address, because this is untyped data, and likewise need to fill in the type field based on the subclass somehow\n\nSo we could have something like\n\n   bus_name_map \u003d {\n     PCIDeviceBus.__name__: \"pci\",\n     USBDeviceBus.__name__: \"usb\",\n     SCSIDeviceBus.__name__: \"scsi\",\n     IDEDeviceBus.__name__: \"ide\",\n   }\n\n\n   return {\n      ...\n      \u0027bus\u0027: bus_name_map.get(self.__name__, \"none\"),\n      \u0027address\u0027: self.bus.address if hasattr(self, bus) else None\n      ....\n   }\n\nie, if self.bus is not set then, in dict form we report the bus as \u0027none\u0027\n\nAlternatively we could define a class method on DeviceBus to return the data instead of having a static map","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"8ff420f81be6d343038901835241ca035c69b775","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        return {"},{"line_number":77,"context_line":"            \u0027type\u0027: self.type,"},{"line_number":78,"context_line":"            \u0027bus\u0027: self.bus,"},{"line_number":79,"context_line":"            \u0027address\u0027: address,"},{"line_number":80,"context_line":"            \u0027tags\u0027: self.tags,"},{"line_number":81,"context_line":"        }"},{"line_number":82,"context_line":""}],"source_content_type":"text/x-python","patch_set":18,"id":"ba0121b8_2678382b","line":79,"range":{"start_line":79,"start_character":30,"end_line":79,"end_character":31},"in_reply_to":"ba0121b8_a9726d47","updated":"2016-03-30 04:36:00.000000000","message":"Done, however, not sure if I got it right.\nPlease see comments on the new patchset","commit_id":"f0fcd80e9a93218a6cfb93c28167c01666388d36"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"caa11a2537f3ffc4f6518a824856e749d018285a","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":21,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @staticmethod"},{"line_number":24,"context_line":"    def get_bus_name(obj):"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba0121b8_10a0b88f","line":21,"updated":"2016-03-30 09:44:11.000000000","message":"Should be uppercase  VERSION, and likewise for other classes","commit_id":"04b912a249cbf5c4ee2aab2db1da2b01e2c0cf42"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"e1c1c2bff8d8a1b1fe2c9ab370579fccdcb26d1c","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":21,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @staticmethod"},{"line_number":24,"context_line":"    def get_bus_name(obj):"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba0121b8_f95fec3e","line":21,"in_reply_to":"ba0121b8_10a0b88f","updated":"2016-03-30 12:45:57.000000000","message":"Done","commit_id":"04b912a249cbf5c4ee2aab2db1da2b01e2c0cf42"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"caa11a2537f3ffc4f6518a824856e749d018285a","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @staticmethod"},{"line_number":24,"context_line":"    def get_bus_name(obj):"},{"line_number":25,"context_line":"        if isinstance(obj, PCIDeviceBus):"},{"line_number":26,"context_line":"            return \u0027pci\u0027"},{"line_number":27,"context_line":"        elif isinstance(obj, USBDeviceBus):"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba0121b8_10e4380b","line":24,"range":{"start_line":24,"start_character":24,"end_line":24,"end_character":26},"updated":"2016-03-30 09:44:11.000000000","message":"You could do the same thing you did for DeviceMetadata with DEVICE_TYPE and just define a attribute BUS_TYPE which is set in each subclass","commit_id":"04b912a249cbf5c4ee2aab2db1da2b01e2c0cf42"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"e1c1c2bff8d8a1b1fe2c9ab370579fccdcb26d1c","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    version \u003d \u00271.0\u0027"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"    @staticmethod"},{"line_number":24,"context_line":"    def get_bus_name(obj):"},{"line_number":25,"context_line":"        if isinstance(obj, PCIDeviceBus):"},{"line_number":26,"context_line":"            return \u0027pci\u0027"},{"line_number":27,"context_line":"        elif isinstance(obj, USBDeviceBus):"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba0121b8_3255f91c","line":24,"range":{"start_line":24,"start_character":24,"end_line":24,"end_character":26},"in_reply_to":"ba0121b8_10e4380b","updated":"2016-03-30 12:45:57.000000000","message":"Done","commit_id":"04b912a249cbf5c4ee2aab2db1da2b01e2c0cf42"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"10c5d7347ea1377b95af39f730178099862fb1bf","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def to_dict(self):"},{"line_number":83,"context_line":"        return {"},{"line_number":84,"context_line":"            \u0027type\u0027: self.DEVICE_TYPE,"},{"line_number":85,"context_line":"            \u0027bus\u0027: (DeviceBus.get_bus_name(self.bus)"},{"line_number":86,"context_line":"                    if hasattr(self, \u0027bus\u0027) else \"none\"),"},{"line_number":87,"context_line":"            \u0027address\u0027: self.bus.address if hasattr(self, \u0027bus\u0027) else None,"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba0121b8_39133668","line":84,"range":{"start_line":84,"start_character":12,"end_line":84,"end_character":37},"updated":"2016-03-30 04:42:16.000000000","message":"How bad is this?\n\nIf it is bad, would it be better if we will have a type field in the subclasses, each with a relevant default?\nLike:\n\u0027type\u0027: fields.StringField(default\u003d\u0027nic\u0027),\n\nAnd to do the same for the bus names?","commit_id":"04b912a249cbf5c4ee2aab2db1da2b01e2c0cf42"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"caa11a2537f3ffc4f6518a824856e749d018285a","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def to_dict(self):"},{"line_number":83,"context_line":"        return {"},{"line_number":84,"context_line":"            \u0027type\u0027: self.DEVICE_TYPE,"},{"line_number":85,"context_line":"            \u0027bus\u0027: (DeviceBus.get_bus_name(self.bus)"},{"line_number":86,"context_line":"                    if hasattr(self, \u0027bus\u0027) else \"none\"),"},{"line_number":87,"context_line":"            \u0027address\u0027: self.bus.address if hasattr(self, \u0027bus\u0027) else None,"}],"source_content_type":"text/x-python","patch_set":19,"id":"ba0121b8_50c1902d","line":84,"range":{"start_line":84,"start_character":12,"end_line":84,"end_character":37},"in_reply_to":"ba0121b8_39133668","updated":"2016-03-30 09:44:11.000000000","message":"I think this is fine as you have done it actually.","commit_id":"04b912a249cbf5c4ee2aab2db1da2b01e2c0cf42"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34695e6955fc51c1bc8a5803de01539185465795","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_6ece62b5","line":23,"updated":"2016-03-30 14:23:25.000000000","message":"A registered object with no fields? This makes no sense to me. If this is just something to inherit from below, then you shouldn\u0027t register it.","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"fe0aa06d0c009803ddde9334cf2692b9203624fb","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_579cc65c","line":23,"in_reply_to":"ba0121b8_317b22f7","updated":"2016-03-30 16:16:56.000000000","message":"We have other examples of non-registered base classes (look at LiveMigrateData).\n\nEither way, registering it is not okay so we need to figure out what the problem is and fix it.","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"77a852d8aa9622a6a6021d25a3f98f18e3be5d73","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_a2aec2e3","line":23,"in_reply_to":"ba0121b8_579cc65c","updated":"2016-03-30 16:26:50.000000000","message":"Got it, thanks.","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"d8dcc36ac9940a29771036292638e99c19d1e3ea","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_317b22f7","line":23,"in_reply_to":"ba0121b8_6ece62b5","updated":"2016-03-30 15:52:37.000000000","message":"I\u0027ve tried not to register it, test_obj_make_compatible failed as it seems that it expects the whole tree to be registered.","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"c04de050814147dc1a7de0a2b55e76e6ce18860a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_f024ebc5","line":23,"in_reply_to":"ba0121b8_a2aec2e3","updated":"2016-03-31 03:58:49.000000000","message":"Still can\u0027t find a way around this..\ntest_obj_make_compatible fails on DeviceMetadata subclasses because it has this class in the ObjectField.\nDoes it expect a registered object?","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"8bd20db2c60fcc7525d64bda6155505397c83be2","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_9b7e16e2","line":23,"in_reply_to":"ba0121b8_f024ebc5","updated":"2016-04-01 16:46:42.000000000","message":"You (Dan Smith) took care of that yourself in PS 23 :)","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34695e6955fc51c1bc8a5803de01539185465795","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        \u0027tags\u0027: fields.ListOfStringsField(),"},{"line_number":74,"context_line":"    }"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def to_dict(self):"},{"line_number":77,"context_line":"        return {"},{"line_number":78,"context_line":"            \u0027type\u0027: self.DEVICE_TYPE,"},{"line_number":79,"context_line":"            \u0027bus\u0027: self.bus.BUS_TYPE if hasattr(self, \u0027bus\u0027) else \u0027none\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_2e674a26","line":76,"updated":"2016-03-30 14:23:25.000000000","message":"Is this what generates the code that we put into the metadata blob?\n\nI\u0027m really concerned that these will get evolved over time because they look harmless and are far removed from the metadata code. If my assertion above is correct, then a slight tweak ends up changing the in-guest API, which should be one of our most sacred interfaces, IMHO.\n\nCan you come up with something to help ensure that these evolve gracefully (or at least warn us when they have changed)? Something like our object or api_samples tests...","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"8bd20db2c60fcc7525d64bda6155505397c83be2","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        \u0027tags\u0027: fields.ListOfStringsField(),"},{"line_number":74,"context_line":"    }"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def to_dict(self):"},{"line_number":77,"context_line":"        return {"},{"line_number":78,"context_line":"            \u0027type\u0027: self.DEVICE_TYPE,"},{"line_number":79,"context_line":"            \u0027bus\u0027: self.bus.BUS_TYPE if hasattr(self, \u0027bus\u0027) else \u0027none\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_fe7aa075","line":76,"in_reply_to":"ba0121b8_2e674a26","updated":"2016-04-01 16:46:42.000000000","message":"I\u0027ve removed the to_dict methods in PS 25 (and corresponding tests, which removes the entirely of test_virt_device_metadata, since there are no other methods to test). The functionality will be moved to [1] so as to not have objects generate API-level output. The next PS in [1] will also include tests to make sure the guest API is controlled.\n\n[1] https://review.openstack.org/#/c/264018/","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"c04de050814147dc1a7de0a2b55e76e6ce18860a","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        \u0027tags\u0027: fields.ListOfStringsField(),"},{"line_number":74,"context_line":"    }"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    def to_dict(self):"},{"line_number":77,"context_line":"        return {"},{"line_number":78,"context_line":"            \u0027type\u0027: self.DEVICE_TYPE,"},{"line_number":79,"context_line":"            \u0027bus\u0027: self.bus.BUS_TYPE if hasattr(self, \u0027bus\u0027) else \u0027none\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_b0b9d37b","line":76,"in_reply_to":"ba0121b8_2e674a26","updated":"2016-03-31 03:58:49.000000000","message":"OK, does it have to be part of this patch or can I add this validation in the patch, where I\u0027m using this class?","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34695e6955fc51c1bc8a5803de01539185465795","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    def to_dict(self):"},{"line_number":77,"context_line":"        return {"},{"line_number":78,"context_line":"            \u0027type\u0027: self.DEVICE_TYPE,"},{"line_number":79,"context_line":"            \u0027bus\u0027: self.bus.BUS_TYPE if hasattr(self, \u0027bus\u0027) else \u0027none\u0027,"},{"line_number":80,"context_line":"            \u0027address\u0027: self.bus.address if hasattr(self, \u0027bus\u0027) else None,"},{"line_number":81,"context_line":"            \u0027tags\u0027: self.tags"},{"line_number":82,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_8eb5b6ef","line":79,"updated":"2016-03-30 14:23:25.000000000","message":"hasattr will always be true for fields of a registered object. I think you meant:\n\n self.bus.BUS_TYPE if \u0027bus\u0027 in self else None.\n\nAlso, why is bus defaulted to a string of \u0027none\u0027 and below we use None?","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"c04de050814147dc1a7de0a2b55e76e6ce18860a","unresolved":false,"context_lines":[{"line_number":76,"context_line":"    def to_dict(self):"},{"line_number":77,"context_line":"        return {"},{"line_number":78,"context_line":"            \u0027type\u0027: self.DEVICE_TYPE,"},{"line_number":79,"context_line":"            \u0027bus\u0027: self.bus.BUS_TYPE if hasattr(self, \u0027bus\u0027) else \u0027none\u0027,"},{"line_number":80,"context_line":"            \u0027address\u0027: self.bus.address if hasattr(self, \u0027bus\u0027) else None,"},{"line_number":81,"context_line":"            \u0027tags\u0027: self.tags"},{"line_number":82,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_d0e607af","line":79,"in_reply_to":"ba0121b8_8eb5b6ef","updated":"2016-03-31 03:58:49.000000000","message":"Done","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34695e6955fc51c1bc8a5803de01539185465795","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        return {"},{"line_number":78,"context_line":"            \u0027type\u0027: self.DEVICE_TYPE,"},{"line_number":79,"context_line":"            \u0027bus\u0027: self.bus.BUS_TYPE if hasattr(self, \u0027bus\u0027) else \u0027none\u0027,"},{"line_number":80,"context_line":"            \u0027address\u0027: self.bus.address if hasattr(self, \u0027bus\u0027) else None,"},{"line_number":81,"context_line":"            \u0027tags\u0027: self.tags"},{"line_number":82,"context_line":"            }"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_6eaf8294","line":80,"range":{"start_line":80,"start_character":57,"end_line":80,"end_character":62},"updated":"2016-03-30 14:23:25.000000000","message":"Did you mean \u0027address\u0027 here?","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"c04de050814147dc1a7de0a2b55e76e6ce18860a","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        return {"},{"line_number":78,"context_line":"            \u0027type\u0027: self.DEVICE_TYPE,"},{"line_number":79,"context_line":"            \u0027bus\u0027: self.bus.BUS_TYPE if hasattr(self, \u0027bus\u0027) else \u0027none\u0027,"},{"line_number":80,"context_line":"            \u0027address\u0027: self.bus.address if hasattr(self, \u0027bus\u0027) else None,"},{"line_number":81,"context_line":"            \u0027tags\u0027: self.tags"},{"line_number":82,"context_line":"            }"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_65a831dc","line":80,"range":{"start_line":80,"start_character":57,"end_line":80,"end_character":62},"in_reply_to":"ba0121b8_6eaf8294","updated":"2016-03-31 03:58:49.000000000","message":"I think, I want to set self.bus.address only if self.bus is set, otherwise None or \u0027none\u0027","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34695e6955fc51c1bc8a5803de01539185465795","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def to_dict(self):"},{"line_number":95,"context_line":"        d \u003d super(NetworkInterfaceMetadata, self).to_dict()"},{"line_number":96,"context_line":"        d[\u0027mac\u0027] \u003d self.mac"},{"line_number":97,"context_line":"        return d"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_2ee10ad1","line":96,"updated":"2016-03-30 14:23:25.000000000","message":"Why don\u0027t you make the to_dict on the base class just include all the fields? Then you won\u0027t have to do this.","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"c04de050814147dc1a7de0a2b55e76e6ce18860a","unresolved":false,"context_lines":[{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def to_dict(self):"},{"line_number":95,"context_line":"        d \u003d super(NetworkInterfaceMetadata, self).to_dict()"},{"line_number":96,"context_line":"        d[\u0027mac\u0027] \u003d self.mac"},{"line_number":97,"context_line":"        return d"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_30f82349","line":96,"in_reply_to":"ba0121b8_2ee10ad1","updated":"2016-03-31 03:58:49.000000000","message":"Done","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"}],"nova/objects/virt_device_metadata.py":[{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"1e83d8506f0e0b28e41974afd1a7147ed07fd343","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova.objects import fields"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba0121b8_761f2208","line":20,"range":{"start_line":20,"start_character":25,"end_line":20,"end_character":36},"updated":"2016-03-31 12:22:08.000000000","message":"test_obj_make_compatible is failing because this object is not registered. not sure why, nor how to get around this yet.","commit_id":"bb3a6292f2e95ca192aef7770415f847c5ddf5a6"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"0815b122625b9c737b915b723a4fde8322247c07","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova.objects import fields"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba0121b8_a44ae452","line":20,"range":{"start_line":20,"start_character":25,"end_line":20,"end_character":36},"in_reply_to":"ba0121b8_21a40606","updated":"2016-04-01 14:17:03.000000000","message":"Right. I would definitely prefer to leave a comment here and open a bug in ovo.\nI was trying to find a way around this, implementing the classes differently, but nothing works.","commit_id":"bb3a6292f2e95ca192aef7770415f847c5ddf5a6"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"cff5c8b39af4794172be2c60ad92d3722db18f73","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova.objects import fields"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba0121b8_d6a075f6","line":20,"range":{"start_line":20,"start_character":25,"end_line":20,"end_character":36},"in_reply_to":"ba0121b8_761f2208","updated":"2016-04-01 11:24:49.000000000","message":"I don\u0027t think we have a choice to register DeviceBus. test_obj_make_compatible calls obj_tree_get_versions in ovo. It recursively goes through the objects and adds their fields to a tree, and their fields\u0027s fields, etc. In there you have the following line. It does so recursively. It gets to DeviceMetada, finds the \u0027bus\u0027 field, sees it\u0027s the DeviceBus class, and calls itself on that object. Then it gets to this line:\n\nobjclass \u003d VersionedObjectRegistry.obj_classes()[objname][0]\n\nAnd throws an IndexOutOfRange because we haven\u0027t registered DeviceBus.\n\nI don\u0027t think we have to fix this, we just have to register all classes that are fields of other classes.","commit_id":"bb3a6292f2e95ca192aef7770415f847c5ddf5a6"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"dcbc35747b914e6ece2d39d930f2b46ce2034ecd","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova.objects import fields"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba0121b8_f8459b6e","line":20,"range":{"start_line":20,"start_character":25,"end_line":20,"end_character":36},"in_reply_to":"ba0121b8_a44ae452","updated":"2016-04-01 15:30:18.000000000","message":"I\u0027m completely not okay with registering this object because unit tests fail if we don\u0027t.\n\nI\u0027ll pull this down and futz with it a bit.","commit_id":"bb3a6292f2e95ca192aef7770415f847c5ddf5a6"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"4ced0035d66c3c825fa6cf0c7e54338498efcb3c","unresolved":false,"context_lines":[{"line_number":17,"context_line":"from nova.objects import fields"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba0121b8_21a40606","line":20,"range":{"start_line":20,"start_character":25,"end_line":20,"end_character":36},"in_reply_to":"ba0121b8_d6a075f6","updated":"2016-04-01 14:01:50.000000000","message":"Conversely, we treat this as a bug in ovo and push a fix there. I\u0027d be weary of doing that in case other projects have become dependant on this particular behaviour.","commit_id":"bb3a6292f2e95ca192aef7770415f847c5ddf5a6"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7b91b818343601215e170b4757bae7d16a282a31","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a061dce_5dc10b2e","line":23,"range":{"start_line":23,"start_character":20,"end_line":23,"end_character":21},"updated":"2016-04-04 08:37:29.000000000","message":"Since you\u0027ve removed all the to_dict methods, I don\u0027t think it makes sense to keep this BUS_TYPE attribute here anymore. The data provided by BUS_TYPE is only relevant to the schema we expose to the guest, so should be maintained in the place where we generate that guest facing document. I\u0027d suggest you just create a dict with class names as keys and the bus types as values in the metadata API where you generate the doc.","commit_id":"7fe38c2492e5c1e8df7fe3fe4b4dd1121d6629bb"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"124cb4bb972423c9b6addc18b175ca48f7a97645","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a061dce_20cb5074","line":23,"range":{"start_line":23,"start_character":20,"end_line":23,"end_character":21},"in_reply_to":"9a061dce_2048702d","updated":"2016-04-04 08:58:20.000000000","message":"It is irrelevant here really - the bus type is just a more human friendly representation of the class name, which is only needed when exposing the data to the guest.","commit_id":"7fe38c2492e5c1e8df7fe3fe4b4dd1121d6629bb"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"df81d059f69d4f9c69cc84ce46c705cdfb342cbd","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a061dce_c0625416","line":23,"range":{"start_line":23,"start_character":20,"end_line":23,"end_character":21},"in_reply_to":"9a061dce_20cb5074","updated":"2016-04-04 09:04:51.000000000","message":"Fair enough, but then I\u0027m genuinely curious how this bus type information gets from the virt driver to the metadata API? In some cases there\u0027s no address and only a bus type (vladik was showing me a USB disk example Friday), so the bus type has to be recorded somehow...","commit_id":"7fe38c2492e5c1e8df7fe3fe4b4dd1121d6629bb"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"472c0067623d4634dfcf31fb1229901a3bea77f9","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a061dce_2048702d","line":23,"range":{"start_line":23,"start_character":20,"end_line":23,"end_character":21},"in_reply_to":"9a061dce_5dc10b2e","updated":"2016-04-04 08:55:37.000000000","message":"The objects are constructed in the virt driver through. In the case of libvirt specifically, the bus type appears in the XML. Considering that, can keep BUS_TYPE here?","commit_id":"7fe38c2492e5c1e8df7fe3fe4b4dd1121d6629bb"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"4bac1cff6f5ed363f6b3a5e5a04050fb1a8a861f","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a061dce_eb5e5975","line":23,"range":{"start_line":23,"start_character":20,"end_line":23,"end_character":21},"in_reply_to":"9a061dce_c0625416","updated":"2016-04-04 09:21:59.000000000","message":"In that scenario just create a USBDeviceBus() object and leave the address field unset. The object type indicates the bus.","commit_id":"7fe38c2492e5c1e8df7fe3fe4b4dd1121d6629bb"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"8288375ca97c1ed70f50e1b73104783d2de0cf2d","unresolved":false,"context_lines":[{"line_number":20,"context_line":"@base.NovaObjectRegistry.register_if(False)"},{"line_number":21,"context_line":"class DeviceBus(base.NovaObject):"},{"line_number":22,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":23,"context_line":"    BUS_TYPE \u003d \u0027none\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@base.NovaObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a061dce_d136a4b3","line":23,"range":{"start_line":23,"start_character":20,"end_line":23,"end_character":21},"in_reply_to":"9a061dce_eb5e5975","updated":"2016-04-04 09:48:59.000000000","message":"Done","commit_id":"7fe38c2492e5c1e8df7fe3fe4b4dd1121d6629bb"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7b91b818343601215e170b4757bae7d16a282a31","unresolved":false,"context_lines":[{"line_number":66,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":67,"context_line":"class DeviceMetadata(base.NovaObject):"},{"line_number":68,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":69,"context_line":"    DEVICE_TYPE \u003d None"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    fields \u003d {"},{"line_number":72,"context_line":"        \u0027bus\u0027: fields.ObjectField(\"DeviceBus\", subclasses\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a061dce_fde61fe7","line":69,"range":{"start_line":69,"start_character":18,"end_line":69,"end_character":22},"updated":"2016-04-04 08:37:29.000000000","message":"Same comment as the BUS_TYPE - this should be defined where you actually use it now.","commit_id":"7fe38c2492e5c1e8df7fe3fe4b4dd1121d6629bb"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"8288375ca97c1ed70f50e1b73104783d2de0cf2d","unresolved":false,"context_lines":[{"line_number":66,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":67,"context_line":"class DeviceMetadata(base.NovaObject):"},{"line_number":68,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":69,"context_line":"    DEVICE_TYPE \u003d None"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    fields \u003d {"},{"line_number":72,"context_line":"        \u0027bus\u0027: fields.ObjectField(\"DeviceBus\", subclasses\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a061dce_b13b309c","line":69,"range":{"start_line":69,"start_character":18,"end_line":69,"end_character":22},"in_reply_to":"9a061dce_fde61fe7","updated":"2016-04-04 09:48:59.000000000","message":"Done","commit_id":"7fe38c2492e5c1e8df7fe3fe4b4dd1121d6629bb"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"472c0067623d4634dfcf31fb1229901a3bea77f9","unresolved":false,"context_lines":[{"line_number":66,"context_line":"@base.NovaObjectRegistry.register"},{"line_number":67,"context_line":"class DeviceMetadata(base.NovaObject):"},{"line_number":68,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":69,"context_line":"    DEVICE_TYPE \u003d None"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    fields \u003d {"},{"line_number":72,"context_line":"        \u0027bus\u0027: fields.ObjectField(\"DeviceBus\", subclasses\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":25,"id":"9a061dce_e013180c","line":69,"range":{"start_line":69,"start_character":18,"end_line":69,"end_character":22},"in_reply_to":"9a061dce_fde61fe7","updated":"2016-04-04 08:55:37.000000000","message":"For this though it definitely makes sense to only keep it in the metadata service now.","commit_id":"7fe38c2492e5c1e8df7fe3fe4b4dd1121d6629bb"}],"nova/tests/unit/objects/test_fields.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"0ad676cb3b2d97423f8613f2aebc9dddbd03de0d","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        self.assertEqual(\"\u0027disk\u0027\", self.field.stringify(\u0027disk\u0027))"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def test_stringify_invalid(self):"},{"line_number":935,"context_line":"        self.assertRaises(ValueError, self.field.stringify, \u0027acme\u0027)"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":""},{"line_number":938,"context_line":"class TestDeviceBus(TestField):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba63e191_08aa271a","line":935,"range":{"start_line":935,"start_character":65,"end_line":935,"end_character":67},"updated":"2016-01-18 16:59:33.000000000","message":"We\u0027re killing all enum tests so dont add this one n https://review.openstack.org/#/c/244370/4","commit_id":"18d153d30409c1ab6adf81a2758033ea48f0ecb9"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"30c7cf7176d7f460893da4dba081de138b158268","unresolved":false,"context_lines":[{"line_number":932,"context_line":"        self.assertEqual(\"\u0027disk\u0027\", self.field.stringify(\u0027disk\u0027))"},{"line_number":933,"context_line":""},{"line_number":934,"context_line":"    def test_stringify_invalid(self):"},{"line_number":935,"context_line":"        self.assertRaises(ValueError, self.field.stringify, \u0027acme\u0027)"},{"line_number":936,"context_line":""},{"line_number":937,"context_line":""},{"line_number":938,"context_line":"class TestDeviceBus(TestField):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba63e191_6b939da4","line":935,"range":{"start_line":935,"start_character":65,"end_line":935,"end_character":67},"in_reply_to":"ba63e191_08aa271a","updated":"2016-01-18 17:04:19.000000000","message":"Done","commit_id":"18d153d30409c1ab6adf81a2758033ea48f0ecb9"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"0ad676cb3b2d97423f8613f2aebc9dddbd03de0d","unresolved":false,"context_lines":[{"line_number":949,"context_line":"        self.assertEqual(\"\u0027pci\u0027\", self.field.stringify(\u0027pci\u0027))"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"    def test_stringify_invalid(self):"},{"line_number":952,"context_line":"        self.assertRaises(ValueError, self.field.stringify, \u0027acme\u0027)"},{"line_number":953,"context_line":""},{"line_number":954,"context_line":""},{"line_number":955,"context_line":"class TestPCIAddress(TestField):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba63e191_886cd709","line":952,"updated":"2016-01-18 16:59:33.000000000","message":"Kill this too","commit_id":"18d153d30409c1ab6adf81a2758033ea48f0ecb9"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"30c7cf7176d7f460893da4dba081de138b158268","unresolved":false,"context_lines":[{"line_number":949,"context_line":"        self.assertEqual(\"\u0027pci\u0027\", self.field.stringify(\u0027pci\u0027))"},{"line_number":950,"context_line":""},{"line_number":951,"context_line":"    def test_stringify_invalid(self):"},{"line_number":952,"context_line":"        self.assertRaises(ValueError, self.field.stringify, \u0027acme\u0027)"},{"line_number":953,"context_line":""},{"line_number":954,"context_line":""},{"line_number":955,"context_line":"class TestPCIAddress(TestField):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba63e191_0b90e194","line":952,"in_reply_to":"ba63e191_886cd709","updated":"2016-01-18 17:04:19.000000000","message":"Done","commit_id":"18d153d30409c1ab6adf81a2758033ea48f0ecb9"}],"nova/tests/unit/objects/test_metadata.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"34695e6955fc51c1bc8a5803de01539185465795","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            bus\u003dmetadata_obj.PCIDeviceBus(address\u003d\u00270000:00:01.0\u0027),"},{"line_number":42,"context_line":"            tags\u003d[\u0027foo\u0027, \u0027bar\u0027]"},{"line_number":43,"context_line":"        )"},{"line_number":44,"context_line":"        self.assertEqual(fake_nic_meta, nic_meta.to_dict())"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class TestNetworkInterfaceMetadataObject(test_objects._LocalTest,"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_c9b04846","line":44,"updated":"2016-03-30 14:23:25.000000000","message":"Where are all the other types tested? Just testing PCI and IDE for these is not enough, IMHO.","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"},{"author":{"_account_id":8802,"name":"Vladik Romanovsky","email":"vromanso@redhat.com","username":"vladikr"},"change_message_id":"c04de050814147dc1a7de0a2b55e76e6ce18860a","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            bus\u003dmetadata_obj.PCIDeviceBus(address\u003d\u00270000:00:01.0\u0027),"},{"line_number":42,"context_line":"            tags\u003d[\u0027foo\u0027, \u0027bar\u0027]"},{"line_number":43,"context_line":"        )"},{"line_number":44,"context_line":"        self.assertEqual(fake_nic_meta, nic_meta.to_dict())"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class TestNetworkInterfaceMetadataObject(test_objects._LocalTest,"}],"source_content_type":"text/x-python","patch_set":20,"id":"ba0121b8_f0da2be7","line":44,"in_reply_to":"ba0121b8_c9b04846","updated":"2016-03-31 03:58:49.000000000","message":"Done","commit_id":"eb3211215af229adea3b64daf47e76ac654fd711"}]}
