)]}'
{"nova/objects/fields.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"ef53fcc41c91381594da82a832fba12f48336908","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        return super(Enum, self).stringify(value)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"class Architecture(Enum):"},{"line_number":289,"context_line":"    def __init__(self, **kwargs):"},{"line_number":290,"context_line":"        super(Architecture, self).__init__("},{"line_number":291,"context_line":"            valid_values\u003darch.ALL, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aca2d91_2c2c5001","line":288,"updated":"2015-05-07 19:49:00.000000000","message":"I\u0027m not certain this is the best place for these to go.  Architecture, for instance, is no longer a conceptually abstract type, like Enum was.  What about if arch.py was updated to have the Architecture and ArchitectureField classes, and they were then pulled in for the models?\n\nOne of the factors in my thinking is the possibility of future circular import issues: if we establish the precedent of declaring the concrete Enums here, someone adding a new one might try to import a module that already imports objects.fields, whereas if we establish a precedent of putting the concrete Enums near where their values are defined, I feel it would be less likely to encounter that particular circular import situation.  Feel free to tell me I\u0027m blowing smoke, though :)","commit_id":"66bd5e1f86a9dcfb79df5099998b5cc046cb849b"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"e7c632f550e3f95904d1fd47b756a82b6166c321","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        return super(Enum, self).stringify(value)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"class Architecture(Enum):"},{"line_number":289,"context_line":"    def __init__(self, **kwargs):"},{"line_number":290,"context_line":"        super(Architecture, self).__init__("},{"line_number":291,"context_line":"            valid_values\u003darch.ALL, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aca2d91_5cd0481f","line":288,"in_reply_to":"1aca2d91_2c2c5001","updated":"2015-05-08 08:38:46.000000000","message":"See my note in the commit message about this - the arch.py and cpumodel.py files can really just go away. Now we have a proper Enum object type, the constants can be declared as attributes on those classes, instead of needing to create separate files to merely hold the constants. So we won\u0027t have any circular imports at all.\n\nTake a look at the next patch in this series which does exactly that for the new enums I\u0027m adding\n\nhttps://review.openstack.org/#/c/76234/32/nova/objects/fields.py\n\nI didn\u0027t want to delete arch.py in this commit, since it\u0027d make it larger than required - but that\u0027s certainly something for a future patch.","commit_id":"66bd5e1f86a9dcfb79df5099998b5cc046cb849b"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"54d6763373a14d7b7aeee24a0eb1d964fbbb412c","unresolved":false,"context_lines":[{"line_number":285,"context_line":"        return super(Enum, self).stringify(value)"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"class Architecture(Enum):"},{"line_number":289,"context_line":"    def __init__(self, **kwargs):"},{"line_number":290,"context_line":"        super(Architecture, self).__init__("},{"line_number":291,"context_line":"            valid_values\u003darch.ALL, **kwargs)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aca2d91_7d3534f5","line":288,"in_reply_to":"1aca2d91_5cd0481f","updated":"2015-05-08 15:27:34.000000000","message":"OK, fair enough.","commit_id":"66bd5e1f86a9dcfb79df5099998b5cc046cb849b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42e345f58bfc8123343d8878ddca09ee9f4b3cc3","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"from nova.compute import arch"},{"line_number":27,"context_line":"from nova.compute import cpumodel"},{"line_number":28,"context_line":"from nova import exception"},{"line_number":29,"context_line":"from nova.i18n import _"},{"line_number":30,"context_line":"from nova.network import model as network_model"},{"line_number":31,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_f33bb536","line":28,"updated":"2015-05-08 16:09:25.000000000","message":"This seems like a bit of a layering violation. I think we\u0027re setting ourselves up for circular import trouble.\n\nSince the bulk of these generic fields are in the library and thus won\u0027t be here anyway, how about you put your Architecture, CPUMode, etc fields in one of your /nova/objects/$object files where you\u0027re already going to be importing the stuff from nova/compute that you need?","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42e345f58bfc8123343d8878ddca09ee9f4b3cc3","unresolved":false,"context_lines":[{"line_number":310,"context_line":"class CPUFeaturePolicy(Enum):"},{"line_number":311,"context_line":"    def __init__(self, **kwargs):"},{"line_number":312,"context_line":"        super(CPUFeaturePolicy, self).__init__("},{"line_number":313,"context_line":"            valid_values\u003dcpumodel.ALL_POLICIES, **kwargs)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"class UUID(FieldType):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_33afed95","line":313,"updated":"2015-05-08 16:09:25.000000000","message":"I hadn\u0027t really thought of doing these like this. On the one hand, it\u0027s very clean, but it also removes the visibility in the actual object implementation for later developers. Moving them into the object files themselves will bring them a little closer. What do you think?","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"9826732df74a8a91f67cb8ac4d0b6e98af0f8384","unresolved":false,"context_lines":[{"line_number":310,"context_line":"class CPUFeaturePolicy(Enum):"},{"line_number":311,"context_line":"    def __init__(self, **kwargs):"},{"line_number":312,"context_line":"        super(CPUFeaturePolicy, self).__init__("},{"line_number":313,"context_line":"            valid_values\u003dcpumodel.ALL_POLICIES, **kwargs)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"class UUID(FieldType):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_6e3b3c9d","line":313,"in_reply_to":"1aca2d91_33afed95","updated":"2015-05-08 16:19:33.000000000","message":"I mentioned in reply to Kevin on an earlier version that I consider this to be an intermediate state. I anticipate that we delete the arch.py and cpumodel.py files in a followup commit, and just define the constants as attributes of theses classes.\n\neg, we\u0027d change callers from doing\n\n\n  from nova.compute import arch\n\n\n  if foo \u003d\u003d arch.X86_64\n\n\nTo doing\n\n  from nova import fields\n\n  if foo \u003d\u003d fields.Architecture.X86_64\n\n\nSo that\u0027ll remove the circular import issue.\n\nThat\u0027s the approach I\u0027ve taken for the other new enums I\u0027ve added in the next patch in this series\n\n   https://review.openstack.org/#/c/76234/33/nova/objects/fields.py\n\nI did however just wonder if it is worth having a separate nova/objects/enums.py file to hold all the enum classes, instead of keeping them all in fields.py, as we could get quite alot of them over time.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3ae452e8f521468f834dcf893c41e1815ca3b38a","unresolved":false,"context_lines":[{"line_number":310,"context_line":"class CPUFeaturePolicy(Enum):"},{"line_number":311,"context_line":"    def __init__(self, **kwargs):"},{"line_number":312,"context_line":"        super(CPUFeaturePolicy, self).__init__("},{"line_number":313,"context_line":"            valid_values\u003dcpumodel.ALL_POLICIES, **kwargs)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"class UUID(FieldType):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_ce77f038","line":313,"in_reply_to":"1aca2d91_6e3b3c9d","updated":"2015-05-08 16:24:08.000000000","message":"Ah, sorry I missed that.\n\nSo, if they define all the things in place, then that\u0027s fine. I\u0027m fine with them being here or in an enums.py. I agree that this will get pretty large, but we\u0027re also going to be removing all but the nova-specific ones here soonish, which will reduce the size of the file.\n\nSo: your choice!","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"210cb9e81aad7693c5b5de5bc6607695ba9b6564","unresolved":false,"context_lines":[{"line_number":310,"context_line":"class CPUFeaturePolicy(Enum):"},{"line_number":311,"context_line":"    def __init__(self, **kwargs):"},{"line_number":312,"context_line":"        super(CPUFeaturePolicy, self).__init__("},{"line_number":313,"context_line":"            valid_values\u003dcpumodel.ALL_POLICIES, **kwargs)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"class UUID(FieldType):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_6ecb3c1f","line":313,"in_reply_to":"1aca2d91_ce77f038","updated":"2015-05-08 16:26:51.000000000","message":"Ok, since the generic fields are going away, I\u0027ll just leave them here for now. We can easily move them to enums.py in future if we find it a problem.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42e345f58bfc8123343d8878ddca09ee9f4b3cc3","unresolved":false,"context_lines":[{"line_number":655,"context_line":"    \u0027\u0027\u0027"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"    def __init__(self, **kwargs):"},{"line_number":658,"context_line":"        if self.AUTO_TYPE is None:"},{"line_number":659,"context_line":"            raise exception.EnumFieldUnset("},{"line_number":660,"context_line":"                fieldname\u003dself.__class__.__name__)"},{"line_number":661,"context_line":"        if not isinstance(self.AUTO_TYPE, Enum):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_93b7e1d7","line":658,"updated":"2015-05-08 16:09:25.000000000","message":"I think you need to at least set it \u003dNone on the base class, else you\u0027ll explode here with an AttributeError instead of your EnumFieldUnset.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"9826732df74a8a91f67cb8ac4d0b6e98af0f8384","unresolved":false,"context_lines":[{"line_number":655,"context_line":"    \u0027\u0027\u0027"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"    def __init__(self, **kwargs):"},{"line_number":658,"context_line":"        if self.AUTO_TYPE is None:"},{"line_number":659,"context_line":"            raise exception.EnumFieldUnset("},{"line_number":660,"context_line":"                fieldname\u003dself.__class__.__name__)"},{"line_number":661,"context_line":"        if not isinstance(self.AUTO_TYPE, Enum):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_ce56d0d1","line":658,"in_reply_to":"1aca2d91_93b7e1d7","updated":"2015-05-08 16:19:33.000000000","message":"Oh, yes, possibly.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42e345f58bfc8123343d8878ddca09ee9f4b3cc3","unresolved":false,"context_lines":[{"line_number":657,"context_line":"    def __init__(self, **kwargs):"},{"line_number":658,"context_line":"        if self.AUTO_TYPE is None:"},{"line_number":659,"context_line":"            raise exception.EnumFieldUnset("},{"line_number":660,"context_line":"                fieldname\u003dself.__class__.__name__)"},{"line_number":661,"context_line":"        if not isinstance(self.AUTO_TYPE, Enum):"},{"line_number":662,"context_line":"            raise exception.EnumFieldInvalid("},{"line_number":663,"context_line":"                typename\u003dself.AUTO_TYPE.__class__.__name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_5336e952","line":660,"updated":"2015-05-08 16:09:25.000000000","message":"Reminder that this is in the library now, so we have have to be careful about any sort of changes to the base fields.\n\nI think we have to retain the ability to have an \"anonymous enum\" both because it\u0027s already a thing in the library, but also because many cases may prefer to just declare them inline without needing to add a class.\n\nSo, I think we can just drop the is None check and still accomplish your goal, right?","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"210cb9e81aad7693c5b5de5bc6607695ba9b6564","unresolved":false,"context_lines":[{"line_number":657,"context_line":"    def __init__(self, **kwargs):"},{"line_number":658,"context_line":"        if self.AUTO_TYPE is None:"},{"line_number":659,"context_line":"            raise exception.EnumFieldUnset("},{"line_number":660,"context_line":"                fieldname\u003dself.__class__.__name__)"},{"line_number":661,"context_line":"        if not isinstance(self.AUTO_TYPE, Enum):"},{"line_number":662,"context_line":"            raise exception.EnumFieldInvalid("},{"line_number":663,"context_line":"                typename\u003dself.AUTO_TYPE.__class__.__name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_cee6d0b3","line":660,"in_reply_to":"1aca2d91_2e02e46f","updated":"2015-05-08 16:26:51.000000000","message":"Ok, I\u0027ll change this then.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"9826732df74a8a91f67cb8ac4d0b6e98af0f8384","unresolved":false,"context_lines":[{"line_number":657,"context_line":"    def __init__(self, **kwargs):"},{"line_number":658,"context_line":"        if self.AUTO_TYPE is None:"},{"line_number":659,"context_line":"            raise exception.EnumFieldUnset("},{"line_number":660,"context_line":"                fieldname\u003dself.__class__.__name__)"},{"line_number":661,"context_line":"        if not isinstance(self.AUTO_TYPE, Enum):"},{"line_number":662,"context_line":"            raise exception.EnumFieldInvalid("},{"line_number":663,"context_line":"                typename\u003dself.AUTO_TYPE.__class__.__name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_8e0698cc","line":660,"in_reply_to":"1aca2d91_5336e952","updated":"2015-05-08 16:19:33.000000000","message":"Yes, that\u0027s certainly an option - I personally wanted to discourage the use of anonymous enums thought since I don\u0027t think its much code to declare an explicit enum class and i think it leads to better consistency if the enum ever gets referenced from more than one object type.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3ae452e8f521468f834dcf893c41e1815ca3b38a","unresolved":false,"context_lines":[{"line_number":657,"context_line":"    def __init__(self, **kwargs):"},{"line_number":658,"context_line":"        if self.AUTO_TYPE is None:"},{"line_number":659,"context_line":"            raise exception.EnumFieldUnset("},{"line_number":660,"context_line":"                fieldname\u003dself.__class__.__name__)"},{"line_number":661,"context_line":"        if not isinstance(self.AUTO_TYPE, Enum):"},{"line_number":662,"context_line":"            raise exception.EnumFieldInvalid("},{"line_number":663,"context_line":"                typename\u003dself.AUTO_TYPE.__class__.__name,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_2e02e46f","line":660,"in_reply_to":"1aca2d91_8e0698cc","updated":"2015-05-08 16:24:08.000000000","message":"It certainly is better from the reuse perspective, but since it\u0027s in the library I think we need to not drop the capability.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"3e74dd9a0b66c6b36b0321672e9f5f1b90579f53","unresolved":false,"context_lines":[{"line_number":654,"context_line":"    declared, simply by passing in a list of valid values"},{"line_number":655,"context_line":"    to its constructor. It is generally preferrable though,"},{"line_number":656,"context_line":"    to create an explicit named enum type by sub-classing"},{"line_number":657,"context_line":"    the BaeEnumField type directly. See ArchitectureField"},{"line_number":658,"context_line":"    for an example."},{"line_number":659,"context_line":"    \u0027\u0027\u0027"},{"line_number":660,"context_line":"    def __init__(self, valid_values, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_0e588831","line":657,"updated":"2015-05-15 16:03:43.000000000","message":"femtonit: s/BaeEnumField/BaseEnumField/\n\nShould also give a reference to where ArchitectureField is…","commit_id":"74655acffd509fd78018be856c792ea2d52ef580"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"7d551c7ee2bd6ebe8e2abf82a96d28f4b93f97df","unresolved":false,"context_lines":[{"line_number":654,"context_line":"    declared, simply by passing in a list of valid values"},{"line_number":655,"context_line":"    to its constructor. It is generally preferrable though,"},{"line_number":656,"context_line":"    to create an explicit named enum type by sub-classing"},{"line_number":657,"context_line":"    the BaeEnumField type directly. See ArchitectureField"},{"line_number":658,"context_line":"    for an example."},{"line_number":659,"context_line":"    \u0027\u0027\u0027"},{"line_number":660,"context_line":"    def __init__(self, valid_values, **kwargs):"}],"source_content_type":"text/x-python","patch_set":4,"id":"7a016987_0e9ac863","line":657,"in_reply_to":"7a016987_0e588831","updated":"2015-05-15 16:11:08.000000000","message":"ArchitectureField arrives in the next patch in this series. I figured it didn\u0027t matter if i referenced it in this patch though","commit_id":"74655acffd509fd78018be856c792ea2d52ef580"}],"nova/objects/vcpu_model.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42e345f58bfc8123343d8878ddca09ee9f4b3cc3","unresolved":false,"context_lines":[{"line_number":20,"context_line":"class VirtCPUModel(base.NovaObject):"},{"line_number":21,"context_line":"    # Version 1.0: Initial version"},{"line_number":22,"context_line":"    # Version 1.1: Switch \u0027arch\u0027, \u0027mode\u0027, \u0027match\u0027 to EnumField subclass"},{"line_number":23,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    fields \u003d {"},{"line_number":26,"context_line":"        \u0027arch\u0027: fields.ArchitectureField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_9361213c","line":23,"updated":"2015-05-08 16:09:25.000000000","message":"You\u0027re not actually changing any of the enums, right? Meaning, none of the valid_values are changing? If not, you don\u0027t need a version bump here. If the field is exactly the same, but just a different class, you don\u0027t need to record it. The class isn\u0027t passed over the wire by design.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"3ae452e8f521468f834dcf893c41e1815ca3b38a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"class VirtCPUModel(base.NovaObject):"},{"line_number":21,"context_line":"    # Version 1.0: Initial version"},{"line_number":22,"context_line":"    # Version 1.1: Switch \u0027arch\u0027, \u0027mode\u0027, \u0027match\u0027 to EnumField subclass"},{"line_number":23,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    fields \u003d {"},{"line_number":26,"context_line":"        \u0027arch\u0027: fields.ArchitectureField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_ceaed084","line":23,"in_reply_to":"1aca2d91_0efba8c2","updated":"2015-05-08 16:24:08.000000000","message":"Yes, and I usually \"bless\" such a thing with an explanation of why the hash is changing and the version need not.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"9826732df74a8a91f67cb8ac4d0b6e98af0f8384","unresolved":false,"context_lines":[{"line_number":20,"context_line":"class VirtCPUModel(base.NovaObject):"},{"line_number":21,"context_line":"    # Version 1.0: Initial version"},{"line_number":22,"context_line":"    # Version 1.1: Switch \u0027arch\u0027, \u0027mode\u0027, \u0027match\u0027 to EnumField subclass"},{"line_number":23,"context_line":"    VERSION \u003d \u00271.1\u0027"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"    fields \u003d {"},{"line_number":26,"context_line":"        \u0027arch\u0027: fields.ArchitectureField(nullable\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_0efba8c2","line":23,"in_reply_to":"1aca2d91_9361213c","updated":"2015-05-08 16:19:33.000000000","message":"Yep, so I guess I can just replace the hash in the test suite and not change the version.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"}],"nova/tests/unit/objects/test_fields.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42e345f58bfc8123343d8878ddca09ee9f4b3cc3","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        self.coerce_good_values \u003d [(\u0027frog\u0027, \u0027frog\u0027),"},{"line_number":124,"context_line":"                                   (\u0027platypus\u0027, \u0027platypus\u0027),"},{"line_number":125,"context_line":"                                   (\u0027alligator\u0027, \u0027alligator\u0027)]"},{"line_number":126,"context_line":"        self.coerce_bad_values \u003d [\u0027aardvark\u0027, \u0027wookie\u0027]"},{"line_number":127,"context_line":"        self.to_primitive_values \u003d self.coerce_good_values[0:1]"},{"line_number":128,"context_line":"        self.from_primitive_values \u003d self.coerce_good_values[0:1]"},{"line_number":129,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_1304f147","line":126,"updated":"2015-05-08 16:09:25.000000000","message":"I think we need to test both the anonymous enum (which I think we need to keep) as well as the cleaner named enum pattern here.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"}],"nova/tests/unit/objects/test_objects.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42e345f58bfc8123343d8878ddca09ee9f4b3cc3","unresolved":false,"context_lines":[{"line_number":1300,"context_line":""},{"line_number":1301,"context_line":""},{"line_number":1302,"context_line":"object_relationships \u003d {"},{"line_number":1303,"context_line":"    \u0027BlockDeviceMapping\u0027: {\u0027Instance\u0027: \u00271.21\u0027},"},{"line_number":1304,"context_line":"    \u0027ComputeNode\u0027: {\u0027HVSpec\u0027: \u00271.0\u0027, \u0027PciDevicePoolList\u0027: \u00271.1\u0027},"},{"line_number":1305,"context_line":"    \u0027FixedIP\u0027: {\u0027Instance\u0027: \u00271.21\u0027, \u0027Network\u0027: \u00271.2\u0027,"},{"line_number":1306,"context_line":"                \u0027VirtualInterface\u0027: \u00271.0\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_93bda16a","line":1303,"updated":"2015-05-08 16:09:25.000000000","message":"This is telling you you need to bump BlockDeviceMapping because of the Instance bump. However, I don\u0027t think you need the version bump on VirtCPUModel, which means you don\u0027t need instance, which means you don\u0027t need this :)","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"}],"nova/tests/unit/objects/test_vcpu_model.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"42e345f58bfc8123343d8878ddca09ee9f4b3cc3","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    def test_arch_field(self):"},{"line_number":76,"context_line":"        model \u003d objects.VirtCPUModel(**fake_vcpumodel_dict)"},{"line_number":77,"context_line":"        self.assertRaises(exception.InvalidArchitectureName,"},{"line_number":78,"context_line":"                          setattr, model, \u0027arch\u0027, \u0027foo\u0027)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def test_serialize(self):"},{"line_number":81,"context_line":"        modelin \u003d objects.VirtCPUModel(**fake_vcpumodel_dict)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1aca2d91_f35a954f","line":78,"updated":"2015-05-08 16:09:25.000000000","message":"When we first did these fields and a bunch of python modeling experts chimed in, we tried to stick to always throwing ValueError for things like this, I think to mirror other objects and dict-like things, so you had a predictable error you could look for when setting a field. Not sure if we\u0027ve strayed from that much, but either way, I think you should catch the specific exception in your field when you canonicalize and raise ValueError so that this remains consistent.","commit_id":"906fca0ba6642bc2673b32f17cd31190b90805eb"}]}
