)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5e898c1cf7b310f1ddaa9540a94c170975ec0793","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This change does not handle rebuilding of the instance, this"},{"line_number":15,"context_line":"will come as part of a follow on patch."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Added unit and functional tests"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I3e00080a6b557c6a27634b1dc04fc589f0da0bc2"},{"line_number":20,"context_line":"Implements: blueprint glance-image-traits"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"9f6a8fd7_c103ed72","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":31},"updated":"2018-04-28 15:06:30.000000000","message":"This isn\u0027t really necessary.","commit_id":"e0b114dcf25e4c650dff7ce977975084e363a877"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"d7fdac6cb290e6713bb1fb8b8dc2b6e363dd57cc","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This change does not handle rebuilding of the instance, this"},{"line_number":15,"context_line":"will come as part of a follow on patch."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Added unit and functional tests"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I3e00080a6b557c6a27634b1dc04fc589f0da0bc2"},{"line_number":20,"context_line":"Implements: blueprint glance-image-traits"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"9f6a8fd7_94919049","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":31},"updated":"2018-05-01 13:03:25.000000000","message":"Still don\u0027t need this.","commit_id":"125a58db965970691f3add4a5829f05e6468505b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"3ab6bfb24399602127c66f3f38133127e119121d","unresolved":false,"context_lines":[{"line_number":14,"context_line":"This change does not handle rebuilding of the instance, this"},{"line_number":15,"context_line":"will come as part of a follow on patch."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Added unit and functional tests"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I3e00080a6b557c6a27634b1dc04fc589f0da0bc2"},{"line_number":20,"context_line":"Implements: blueprint glance-image-traits"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"9f6a8fd7_e15cacee","line":17,"range":{"start_line":17,"start_character":0,"end_line":17,"end_character":31},"updated":"2018-05-02 19:16:36.000000000","message":"Still don\u0027t need this.","commit_id":"351326b34e85adfa0d28bdb8445f09502daa8fa0"}],"nova/scheduler/utils.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"90415e1219113e5845cbd29a0295827d61049ce2","unresolved":false,"context_lines":[{"line_number":147,"context_line":"           ResourceRequest"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        Examines image properties for items of the following form:"},{"line_number":150,"context_line":"            \"trait:$TRAIT_NAME\": \"required\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        :param image_meta_props: The image metadata object."},{"line_number":153,"context_line":"        :param req: the ResourceRequest object to add the requirements to or"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_f27878c4","line":150,"range":{"start_line":150,"start_character":12,"end_line":150,"end_character":43},"updated":"2018-04-25 23:47:39.000000000","message":"This isn\u0027t true, right?","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"aa76ad82efcbe1b114e31f6e19f475f24af89139","unresolved":false,"context_lines":[{"line_number":147,"context_line":"           ResourceRequest"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        Examines image properties for items of the following form:"},{"line_number":150,"context_line":"            \"trait:$TRAIT_NAME\": \"required\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        :param image_meta_props: The image metadata object."},{"line_number":153,"context_line":"        :param req: the ResourceRequest object to add the requirements to or"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_ac8ff773","line":150,"range":{"start_line":150,"start_character":12,"end_line":150,"end_character":43},"in_reply_to":"9f6a8fd7_da2221bb","updated":"2018-04-26 16:45:09.000000000","message":"yup...got it :)","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"469d96f76e60f392a594b781f147f97e7a74a765","unresolved":false,"context_lines":[{"line_number":147,"context_line":"           ResourceRequest"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        Examines image properties for items of the following form:"},{"line_number":150,"context_line":"            \"trait:$TRAIT_NAME\": \"required\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        :param image_meta_props: The image metadata object."},{"line_number":153,"context_line":"        :param req: the ResourceRequest object to add the requirements to or"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_da2221bb","line":150,"range":{"start_line":150,"start_character":12,"end_line":150,"end_character":43},"in_reply_to":"9f6a8fd7_e6143d46","updated":"2018-04-26 11:46:28.000000000","message":"By the time we get to this method, we\u0027ve already parsed that format down to just \u0027CUSTOM_TRUSTED\u0027, right?","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"c10496f0168d1113535901081b187d0b911dffc9","unresolved":false,"context_lines":[{"line_number":147,"context_line":"           ResourceRequest"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        Examines image properties for items of the following form:"},{"line_number":150,"context_line":"            \"trait:$TRAIT_NAME\": \"required\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        :param image_meta_props: The image metadata object."},{"line_number":153,"context_line":"        :param req: the ResourceRequest object to add the requirements to or"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_e6143d46","line":150,"range":{"start_line":150,"start_character":12,"end_line":150,"end_character":43},"in_reply_to":"9f6a8fd7_f20f1834","updated":"2018-04-25 23:54:43.000000000","message":"do you mean since we have already parsed the properties into the image metadata object, you dont want this to be here?","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"bfc6abc0dced32bd62e86807a6e4c5ee3da45961","unresolved":false,"context_lines":[{"line_number":147,"context_line":"           ResourceRequest"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        Examines image properties for items of the following form:"},{"line_number":150,"context_line":"            \"trait:$TRAIT_NAME\": \"required\""},{"line_number":151,"context_line":""},{"line_number":152,"context_line":"        :param image_meta_props: The image metadata object."},{"line_number":153,"context_line":"        :param req: the ResourceRequest object to add the requirements to or"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_f20f1834","line":150,"range":{"start_line":150,"start_character":12,"end_line":150,"end_character":43},"in_reply_to":"9f6a8fd7_f27878c4","updated":"2018-04-25 23:52:00.000000000","message":"\u003e This isn\u0027t true, right?\n\nnot sure what you mean. Image properties are of the form key:value.\n\nThe key in this case is going to be \"trait:CUSTOM_TRUSTED\" and value is \"required\".\n\nso the final format is \"trait:CUSTOM_TRUSTED\": \"required\"","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"126794e0292d7ffde32b18d4b654b44a71bac19f","unresolved":false,"context_lines":[{"line_number":366,"context_line":"    # Process any image properties"},{"line_number":367,"context_line":"    if \u0027image\u0027 in spec_obj and \u0027properties\u0027 in spec_obj.image:"},{"line_number":368,"context_line":"        res_req \u003d ResourceRequest.from_image_props(spec_obj.image.properties,"},{"line_number":369,"context_line":"                                                   res_req)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"    # Add the (remaining) items from the spec_resources to the sharing group"},{"line_number":372,"context_line":"    for rclass, amount in spec_resources.items():"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_3dcf97b1","line":369,"range":{"start_line":369,"start_character":51,"end_line":369,"end_character":58},"updated":"2018-04-26 11:55:04.000000000","message":"name kwargs","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e96ed737e11878b9cbcc35c35d2754a7d5e96b24","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        :return: A ResourceRequest object representing the required traits on"},{"line_number":153,"context_line":"                the image."},{"line_number":154,"context_line":"        \"\"\""},{"line_number":155,"context_line":"        if isinstance(req, ResourceRequest):"},{"line_number":156,"context_line":"            ret \u003d req"},{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            ret \u003d cls()"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        if \u0027traits_required\u0027 in image_meta_props:"},{"line_number":161,"context_line":"            for trait in image_meta_props.traits_required:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f6a8fd7_71be6500","line":158,"range":{"start_line":155,"start_character":8,"end_line":158,"end_character":23},"updated":"2018-04-30 08:53:57.000000000","message":"you needn\u0027t this, since line 361","commit_id":"e0b114dcf25e4c650dff7ce977975084e363a877"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"90470fece1ac7ab56479aa6f7bed6a87608f1f03","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        :return: A ResourceRequest object representing the required traits on"},{"line_number":153,"context_line":"                the image."},{"line_number":154,"context_line":"        \"\"\""},{"line_number":155,"context_line":"        if isinstance(req, ResourceRequest):"},{"line_number":156,"context_line":"            ret \u003d req"},{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            ret \u003d cls()"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        if \u0027traits_required\u0027 in image_meta_props:"},{"line_number":161,"context_line":"            for trait in image_meta_props.traits_required:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f6a8fd7_bd792c30","line":158,"range":{"start_line":155,"start_character":8,"end_line":158,"end_character":23},"in_reply_to":"9f6a8fd7_71be6500","updated":"2018-04-30 12:36:54.000000000","message":"I agree it\u0027s not necessary, but I like the symmetry of from_extra_specs (which also doesn\u0027t technically need the `req` kwarg) and from_image_props having the same signature.","commit_id":"e0b114dcf25e4c650dff7ce977975084e363a877"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"2790ec50093d21378df3f911a8a973e48cbb06e6","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        :return: A ResourceRequest object representing the required traits on"},{"line_number":153,"context_line":"                the image."},{"line_number":154,"context_line":"        \"\"\""},{"line_number":155,"context_line":"        if isinstance(req, ResourceRequest):"},{"line_number":156,"context_line":"            ret \u003d req"},{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            ret \u003d cls()"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        if \u0027traits_required\u0027 in image_meta_props:"},{"line_number":161,"context_line":"            for trait in image_meta_props.traits_required:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f6a8fd7_eb07d4c8","line":158,"range":{"start_line":155,"start_character":8,"end_line":158,"end_character":23},"in_reply_to":"9f6a8fd7_93ad39ec","updated":"2018-04-30 23:38:11.000000000","message":"i\u0027, ok, so why we need \u0027isinstance\u0027, why not just \u0027req is not None\u0027","commit_id":"e0b114dcf25e4c650dff7ce977975084e363a877"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"8dc32cb490380a535a37ca1ada118550a15f409f","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        :return: A ResourceRequest object representing the required traits on"},{"line_number":153,"context_line":"                the image."},{"line_number":154,"context_line":"        \"\"\""},{"line_number":155,"context_line":"        if isinstance(req, ResourceRequest):"},{"line_number":156,"context_line":"            ret \u003d req"},{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            ret \u003d cls()"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        if \u0027traits_required\u0027 in image_meta_props:"},{"line_number":161,"context_line":"            for trait in image_meta_props.traits_required:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f6a8fd7_93ad39ec","line":158,"range":{"start_line":155,"start_character":8,"end_line":158,"end_character":23},"in_reply_to":"9f6a8fd7_bd792c30","updated":"2018-04-30 20:29:42.000000000","message":"yup...i wanted to make sure these could be called in any order and the symmetry helps too :)","commit_id":"e0b114dcf25e4c650dff7ce977975084e363a877"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"8a8f67ac27252dfd7289d50f66f11b870ad2b46e","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        :return: A ResourceRequest object representing the required traits on"},{"line_number":153,"context_line":"                the image."},{"line_number":154,"context_line":"        \"\"\""},{"line_number":155,"context_line":"        if isinstance(req, ResourceRequest):"},{"line_number":156,"context_line":"            ret \u003d req"},{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            ret \u003d cls()"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        if \u0027traits_required\u0027 in image_meta_props:"},{"line_number":161,"context_line":"            for trait in image_meta_props.traits_required:"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f6a8fd7_cbdc501a","line":158,"range":{"start_line":155,"start_character":8,"end_line":158,"end_character":23},"in_reply_to":"9f6a8fd7_eb07d4c8","updated":"2018-04-30 23:57:03.000000000","message":"was just guarding against something else passed in. \n\nits functionally equivalent, i can make this `req is not None` is this preferred? Let me know and i can update it.","commit_id":"e0b114dcf25e4c650dff7ce977975084e363a877"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e96ed737e11878b9cbcc35c35d2754a7d5e96b24","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    # Process any image properties"},{"line_number":364,"context_line":"    if \u0027image\u0027 in spec_obj and \u0027properties\u0027 in spec_obj.image:"},{"line_number":365,"context_line":"        res_req \u003d ResourceRequest.from_image_props(spec_obj.image.properties,"},{"line_number":366,"context_line":"                                                   req\u003dres_req)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    # Add the (remaining) items from the spec_resources to the sharing group"},{"line_number":369,"context_line":"    for rclass, amount in spec_resources.items():"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f6a8fd7_d16f3190","line":366,"range":{"start_line":365,"start_character":8,"end_line":366,"end_character":63},"updated":"2018-04-30 08:53:57.000000000","message":"we should return fault when granular request is in the extra spec?","commit_id":"e0b114dcf25e4c650dff7ce977975084e363a877"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"90470fece1ac7ab56479aa6f7bed6a87608f1f03","unresolved":false,"context_lines":[{"line_number":362,"context_line":""},{"line_number":363,"context_line":"    # Process any image properties"},{"line_number":364,"context_line":"    if \u0027image\u0027 in spec_obj and \u0027properties\u0027 in spec_obj.image:"},{"line_number":365,"context_line":"        res_req \u003d ResourceRequest.from_image_props(spec_obj.image.properties,"},{"line_number":366,"context_line":"                                                   req\u003dres_req)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    # Add the (remaining) items from the spec_resources to the sharing group"},{"line_number":369,"context_line":"    for rclass, amount in spec_resources.items():"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f6a8fd7_9dcea881","line":366,"range":{"start_line":365,"start_character":8,"end_line":366,"end_character":63},"in_reply_to":"9f6a8fd7_d16f3190","updated":"2018-04-30 12:36:54.000000000","message":"That won\u0027t happen; by the time we get here we already parsed the image properties and ignored anything granular in them [1].  As with flavor extra specs, I had been assuming we don\u0027t want to go looking for and \"validating\" properties we *might* support but don\u0027t.\n\n[1] https://review.openstack.org/#/c/557795/14/nova/objects/image_meta.py@565","commit_id":"e0b114dcf25e4c650dff7ce977975084e363a877"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3863f159c4df90ae61e905339fe2ed2e8f0b9058","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        if \u0027traits_required\u0027 in image_meta_props:"},{"line_number":161,"context_line":"            for trait in image_meta_props.traits_required:"},{"line_number":162,"context_line":"                ret._add_trait(None, trait, \"required\")"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        return ret"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_2a44cb1a","line":162,"range":{"start_line":162,"start_character":31,"end_line":162,"end_character":35},"updated":"2018-05-02 08:40:50.000000000","message":"I suggest to add a NOTE here that the required traits from the image_meta always added to the non-numbered resource request group.","commit_id":"125a58db965970691f3add4a5829f05e6468505b"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"8da009592d307c069863add2d72e5eb82e34981d","unresolved":false,"context_lines":[{"line_number":159,"context_line":""},{"line_number":160,"context_line":"        if \u0027traits_required\u0027 in image_meta_props:"},{"line_number":161,"context_line":"            for trait in image_meta_props.traits_required:"},{"line_number":162,"context_line":"                ret._add_trait(None, trait, \"required\")"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        return ret"},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_ae88e6c5","line":162,"range":{"start_line":162,"start_character":31,"end_line":162,"end_character":35},"in_reply_to":"9f6a8fd7_2a44cb1a","updated":"2018-05-02 15:48:14.000000000","message":"Done","commit_id":"125a58db965970691f3add4a5829f05e6468505b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fa27fd99dda7db653d67688a1b3db6eada013208","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        \"\"\"Processes image properties and adds trait requirements to the"},{"line_number":147,"context_line":"           ResourceRequest"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        :param image_meta_props: The image metadata object."},{"line_number":150,"context_line":"        :param req: the ResourceRequest object to add the requirements to or"},{"line_number":151,"context_line":"               None to create a new ResourceRequest"},{"line_number":152,"context_line":"        :return: A ResourceRequest object representing the required traits on"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_80d62a27","line":149,"range":{"start_line":149,"start_character":37,"end_line":149,"end_character":51},"updated":"2018-05-08 16:22:49.000000000","message":"nit: ImageMetaProps","commit_id":"351326b34e85adfa0d28bdb8445f09502daa8fa0"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"c72f4be177221225b7396b5ec181293e29edfc05","unresolved":false,"context_lines":[{"line_number":146,"context_line":"        \"\"\"Processes image properties and adds trait requirements to the"},{"line_number":147,"context_line":"           ResourceRequest"},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"        :param image_meta_props: The image metadata object."},{"line_number":150,"context_line":"        :param req: the ResourceRequest object to add the requirements to or"},{"line_number":151,"context_line":"               None to create a new ResourceRequest"},{"line_number":152,"context_line":"        :return: A ResourceRequest object representing the required traits on"}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_5990d5ed","line":149,"range":{"start_line":149,"start_character":37,"end_line":149,"end_character":51},"in_reply_to":"5f7c97a3_80d62a27","updated":"2018-05-10 20:15:12.000000000","message":"Done","commit_id":"351326b34e85adfa0d28bdb8445f09502daa8fa0"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"fa27fd99dda7db653d67688a1b3db6eada013208","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        res_req \u003d ResourceRequest()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    # Process any image properties"},{"line_number":367,"context_line":"    if \u0027image\u0027 in spec_obj and \u0027properties\u0027 in spec_obj.image:"},{"line_number":368,"context_line":"        res_req \u003d ResourceRequest.from_image_props(spec_obj.image.properties,"},{"line_number":369,"context_line":"                                                   req\u003dres_req)"},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_20b636fc","line":367,"updated":"2018-05-08 16:22:49.000000000","message":"Good to have this check because volume-backed instances won\u0027t have RequestSpec.image set.","commit_id":"351326b34e85adfa0d28bdb8445f09502daa8fa0"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"c72f4be177221225b7396b5ec181293e29edfc05","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        res_req \u003d ResourceRequest()"},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"    # Process any image properties"},{"line_number":367,"context_line":"    if \u0027image\u0027 in spec_obj and \u0027properties\u0027 in spec_obj.image:"},{"line_number":368,"context_line":"        res_req \u003d ResourceRequest.from_image_props(spec_obj.image.properties,"},{"line_number":369,"context_line":"                                                   req\u003dres_req)"},{"line_number":370,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5f7c97a3_99b3cd98","line":367,"in_reply_to":"5f7c97a3_20b636fc","updated":"2018-05-10 20:15:12.000000000","message":"i thought the same as well...but even for volume backed instances apparently the image meta data is parsed and sent in the request spec the same way.\n\nThe code has been structured to treat image meta data and volume image meta data the same way.\n\nAdded funtional tests for the same.\n\nsee\n\nhttps://bugs.launchpad.net/nova/+bug/1175571","commit_id":"351326b34e85adfa0d28bdb8445f09502daa8fa0"}],"nova/tests/fixtures.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b20ff9396ea6a8754671d479728a4b9c1f52633e","unresolved":false,"context_lines":[{"line_number":1511,"context_line":"    # This represents a bootable image-backed volume to test"},{"line_number":1512,"context_line":"    # boot-from-volume scenarios."},{"line_number":1513,"context_line":"    IMAGE_BACKED_VOL \u003d \u00276ca404f3-d844-4169-bb96-bc792f37de98\u0027"},{"line_number":1514,"context_line":"    IMAGE_WITH_TRAITS_BACKED_VOL \u003d \u00276194fc02-c60e-4a01-a8e5-600798208b5f\u0027"},{"line_number":1515,"context_line":""},{"line_number":1516,"context_line":"    def __init__(self, test):"},{"line_number":1517,"context_line":"        super(CinderFixtureNewAttachFlow, self).__init__()"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_f553cf69","line":1514,"updated":"2018-05-11 20:55:20.000000000","message":"nit: a comment about what this is / can be used for like for IMAGE_BACKED_VOL would be nice.","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"dda902e78417dc9a046e7f9987560c355ddd35b0","unresolved":false,"context_lines":[{"line_number":1511,"context_line":"    # This represents a bootable image-backed volume to test"},{"line_number":1512,"context_line":"    # boot-from-volume scenarios."},{"line_number":1513,"context_line":"    IMAGE_BACKED_VOL \u003d \u00276ca404f3-d844-4169-bb96-bc792f37de98\u0027"},{"line_number":1514,"context_line":"    IMAGE_WITH_TRAITS_BACKED_VOL \u003d \u00276194fc02-c60e-4a01-a8e5-600798208b5f\u0027"},{"line_number":1515,"context_line":""},{"line_number":1516,"context_line":"    def __init__(self, test):"},{"line_number":1517,"context_line":"        super(CinderFixtureNewAttachFlow, self).__init__()"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_a6320bf1","line":1514,"in_reply_to":"5f7c97a3_f553cf69","updated":"2018-05-11 23:38:46.000000000","message":"Done","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b20ff9396ea6a8754671d479728a4b9c1f52633e","unresolved":false,"context_lines":[{"line_number":1590,"context_line":"                }"},{"line_number":1591,"context_line":""},{"line_number":1592,"context_line":"            # Check for our special image-backed volume."},{"line_number":1593,"context_line":"            if (volume_id \u003d\u003d self.IMAGE_BACKED_VOL or"},{"line_number":1594,"context_line":"                    volume_id \u003d\u003d self.IMAGE_WITH_TRAITS_BACKED_VOL):"},{"line_number":1595,"context_line":"                # Make it a bootable volume."},{"line_number":1596,"context_line":"                volume[\u0027bootable\u0027] \u003d True"},{"line_number":1597,"context_line":"                if volume_id \u003d\u003d self.IMAGE_BACKED_VOL:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_b549d7b7","line":1594,"range":{"start_line":1593,"start_character":12,"end_line":1594,"end_character":68},"updated":"2018-05-11 20:55:20.000000000","message":"nit:\n\nif volume_id in (self.IMAGE_BACKED_VOL, self.IMAGE_WITH_TRAITS_BACKED_VOL):","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"dda902e78417dc9a046e7f9987560c355ddd35b0","unresolved":false,"context_lines":[{"line_number":1590,"context_line":"                }"},{"line_number":1591,"context_line":""},{"line_number":1592,"context_line":"            # Check for our special image-backed volume."},{"line_number":1593,"context_line":"            if (volume_id \u003d\u003d self.IMAGE_BACKED_VOL or"},{"line_number":1594,"context_line":"                    volume_id \u003d\u003d self.IMAGE_WITH_TRAITS_BACKED_VOL):"},{"line_number":1595,"context_line":"                # Make it a bootable volume."},{"line_number":1596,"context_line":"                volume[\u0027bootable\u0027] \u003d True"},{"line_number":1597,"context_line":"                if volume_id \u003d\u003d self.IMAGE_BACKED_VOL:"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_c62f0786","line":1594,"range":{"start_line":1593,"start_character":12,"end_line":1594,"end_character":68},"in_reply_to":"5f7c97a3_b549d7b7","updated":"2018-05-11 23:38:46.000000000","message":"Done","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b20ff9396ea6a8754671d479728a4b9c1f52633e","unresolved":false,"context_lines":[{"line_number":1604,"context_line":"                    # Add the image_id metadata with traits."},{"line_number":1605,"context_line":"                    volume[\u0027volume_image_metadata\u0027] \u003d {"},{"line_number":1606,"context_line":"                        \u0027image_id\u0027: \u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027,"},{"line_number":1607,"context_line":"                        \"container_format\": \"ami\","},{"line_number":1608,"context_line":"                        \"trait:HW_CPU_X86_SGX\": \"required\","},{"line_number":1609,"context_line":"                    }"},{"line_number":1610,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_35d387d7","line":1607,"updated":"2018-05-11 20:55:20.000000000","message":"I\u0027m not sure why you\u0027re setting container_format, it\u0027s already set to \u0027raw\u0027 in the fake image you\u0027re using here:\n\nhttps://github.com/openstack/nova/blob/268b4c5796db6fa90bb47948d13b2d7ef170032a/nova/tests/unit/image/fake.py#L52","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"dda902e78417dc9a046e7f9987560c355ddd35b0","unresolved":false,"context_lines":[{"line_number":1604,"context_line":"                    # Add the image_id metadata with traits."},{"line_number":1605,"context_line":"                    volume[\u0027volume_image_metadata\u0027] \u003d {"},{"line_number":1606,"context_line":"                        \u0027image_id\u0027: \u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027,"},{"line_number":1607,"context_line":"                        \"container_format\": \"ami\","},{"line_number":1608,"context_line":"                        \"trait:HW_CPU_X86_SGX\": \"required\","},{"line_number":1609,"context_line":"                    }"},{"line_number":1610,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_664e3370","line":1607,"in_reply_to":"5f7c97a3_35d387d7","updated":"2018-05-11 23:38:46.000000000","message":"removed the line.\n\nAlso AFAIK, it does not seem to matter what the fake image metadata is set to, the volume_image_metadata is a snapshot of image metadata so they can be different....please correct me if  am wrong..","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"126794e0292d7ffde32b18d4b654b44a71bac19f","unresolved":false,"context_lines":[{"line_number":3783,"context_line":"        \"\"\""},{"line_number":3784,"context_line":""},{"line_number":3785,"context_line":"        server \u003d self._create_server_with_traits("},{"line_number":3786,"context_line":"            self.flavor_without_trait[\u0027id\u0027],"},{"line_number":3787,"context_line":"            nova.tests.unit.image.fake.SGX_TRAIT_IMAGE_UUID)"},{"line_number":3788,"context_line":"        # The server should go to ERROR state because there is no valid host."},{"line_number":3789,"context_line":"        server \u003d self._wait_for_state_change(self.admin_api, server, \u0027ERROR\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_dd677bea","line":3786,"range":{"start_line":3786,"start_character":24,"end_line":3786,"end_character":31},"updated":"2018-04-26 11:55:04.000000000","message":"with?  (Or the docstring is wrong)","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"aa76ad82efcbe1b114e31f6e19f475f24af89139","unresolved":false,"context_lines":[{"line_number":3783,"context_line":"        \"\"\""},{"line_number":3784,"context_line":""},{"line_number":3785,"context_line":"        server \u003d self._create_server_with_traits("},{"line_number":3786,"context_line":"            self.flavor_without_trait[\u0027id\u0027],"},{"line_number":3787,"context_line":"            nova.tests.unit.image.fake.SGX_TRAIT_IMAGE_UUID)"},{"line_number":3788,"context_line":"        # The server should go to ERROR state because there is no valid host."},{"line_number":3789,"context_line":"        server \u003d self._wait_for_state_change(self.admin_api, server, \u0027ERROR\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_2ce8c77a","line":3786,"range":{"start_line":3786,"start_character":24,"end_line":3786,"end_character":31},"in_reply_to":"9f6a8fd7_dd677bea","updated":"2018-04-26 16:45:09.000000000","message":"Done","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bf8a9defa33b7405d2b7bc14be07d7525674258","unresolved":false,"context_lines":[{"line_number":3708,"context_line":"            {\u0027extra_specs\u0027: {\u0027trait:HW_CPU_X86_VMX\u0027: \u0027required\u0027}})"},{"line_number":3709,"context_line":"        self.flavor_without_trait \u003d flavors[1]"},{"line_number":3710,"context_line":""},{"line_number":3711,"context_line":"        # Note that we\u0027re using v2.35 by default as the api returns 404"},{"line_number":3712,"context_line":"        # starting with 2.36"},{"line_number":3713,"context_line":"        with nova.utils.temporary_mutation(self.api, microversion\u003d\u00272.35\u0027):"},{"line_number":3714,"context_line":"            images \u003d self.api.get_images()"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_da839803","line":3711,"range":{"start_line":3711,"start_character":38,"end_line":3711,"end_character":48},"updated":"2018-05-02 13:02:48.000000000","message":"Not by default, explicitly.","commit_id":"125a58db965970691f3add4a5829f05e6468505b"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"8da009592d307c069863add2d72e5eb82e34981d","unresolved":false,"context_lines":[{"line_number":3708,"context_line":"            {\u0027extra_specs\u0027: {\u0027trait:HW_CPU_X86_VMX\u0027: \u0027required\u0027}})"},{"line_number":3709,"context_line":"        self.flavor_without_trait \u003d flavors[1]"},{"line_number":3710,"context_line":""},{"line_number":3711,"context_line":"        # Note that we\u0027re using v2.35 by default as the api returns 404"},{"line_number":3712,"context_line":"        # starting with 2.36"},{"line_number":3713,"context_line":"        with nova.utils.temporary_mutation(self.api, microversion\u003d\u00272.35\u0027):"},{"line_number":3714,"context_line":"            images \u003d self.api.get_images()"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_ae5f863f","line":3711,"range":{"start_line":3711,"start_character":38,"end_line":3711,"end_character":48},"in_reply_to":"9f6a8fd7_da839803","updated":"2018-05-02 15:48:14.000000000","message":"Done","commit_id":"125a58db965970691f3add4a5829f05e6468505b"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"3863f159c4df90ae61e905339fe2ed2e8f0b9058","unresolved":false,"context_lines":[{"line_number":3708,"context_line":"            {\u0027extra_specs\u0027: {\u0027trait:HW_CPU_X86_VMX\u0027: \u0027required\u0027}})"},{"line_number":3709,"context_line":"        self.flavor_without_trait \u003d flavors[1]"},{"line_number":3710,"context_line":""},{"line_number":3711,"context_line":"        # Note that we\u0027re using v2.35 by default as the api returns 404"},{"line_number":3712,"context_line":"        # starting with 2.36"},{"line_number":3713,"context_line":"        with nova.utils.temporary_mutation(self.api, microversion\u003d\u00272.35\u0027):"},{"line_number":3714,"context_line":"            images \u003d self.api.get_images()"},{"line_number":3715,"context_line":"            self.image_id_with_trait \u003d images[0][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_8a4ab752","line":3712,"range":{"start_line":3711,"start_character":0,"end_line":3712,"end_character":28},"updated":"2018-05-02 08:40:50.000000000","message":"This seems dangerous as nova has a good reason not supporting image API proxy any more. In this test the image API is proxied to a nova.tests.unit.image.fake._FakeImageService instance, which is created here [1]. So if the test setup stores the return value of [1] then in this place you can call the stub directly instead of forcing to use an old microversion to access the image API via the nova proxy.\n\n[1] https://github.com/openstack/nova/blob/aa537551dc5f8ff45d2a679fb68a867f449be73d/nova/tests/functional/test_servers.py#L1409","commit_id":"125a58db965970691f3add4a5829f05e6468505b"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9bf8a9defa33b7405d2b7bc14be07d7525674258","unresolved":false,"context_lines":[{"line_number":3708,"context_line":"            {\u0027extra_specs\u0027: {\u0027trait:HW_CPU_X86_VMX\u0027: \u0027required\u0027}})"},{"line_number":3709,"context_line":"        self.flavor_without_trait \u003d flavors[1]"},{"line_number":3710,"context_line":""},{"line_number":3711,"context_line":"        # Note that we\u0027re using v2.35 by default as the api returns 404"},{"line_number":3712,"context_line":"        # starting with 2.36"},{"line_number":3713,"context_line":"        with nova.utils.temporary_mutation(self.api, microversion\u003d\u00272.35\u0027):"},{"line_number":3714,"context_line":"            images \u003d self.api.get_images()"},{"line_number":3715,"context_line":"            self.image_id_with_trait \u003d images[0][\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"9f6a8fd7_da98786b","line":3712,"range":{"start_line":3711,"start_character":0,"end_line":3712,"end_character":28},"in_reply_to":"9f6a8fd7_8a4ab752","updated":"2018-05-02 13:02:48.000000000","message":"Personally I\u0027m OK with this. The point of functional tests is to use the REST API like an end user would, which in this case means working around the image proxy API restriction.","commit_id":"125a58db965970691f3add4a5829f05e6468505b"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"89747feb01559ba213b712a5f7e1d5c9f4944030","unresolved":false,"context_lines":[{"line_number":3819,"context_line":"        image expressing traits, the instance ends up on the single compute"},{"line_number":3820,"context_line":"        node resource provider that also has that trait in Placement."},{"line_number":3821,"context_line":"        \"\"\""},{"line_number":3822,"context_line":"        # Decorate compute2 resource provider with volume image metadatz trait."},{"line_number":3823,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(self.compute2.host)"},{"line_number":3824,"context_line":"        self._set_provider_traits(rp_uuid, [\u0027HW_CPU_X86_SGX\u0027])"},{"line_number":3825,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_1c780b8e","line":3822,"range":{"start_line":3822,"start_character":64,"end_line":3822,"end_character":72},"updated":"2018-05-10 20:29:53.000000000","message":"metadata","commit_id":"e97b0923d3df3721d970ecb49e0e69328dd3de1e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"89747feb01559ba213b712a5f7e1d5c9f4944030","unresolved":false,"context_lines":[{"line_number":3836,"context_line":"        self.assertEqual(self.compute2.host, server[\u0027OS-EXT-SRV-ATTR:host\u0027])"},{"line_number":3837,"context_line":""},{"line_number":3838,"context_line":"    def test_flavor_image_trait_on_volume_backed_instance(self):"},{"line_number":3839,"context_line":"        \"\"\"Tests that when trying to launch a volume-backed instance with an"},{"line_number":3840,"context_line":"        required trait on flavor AND image expressing a trait, the instance"},{"line_number":3841,"context_line":"        ends up on the single compute node resource provider that also has"},{"line_number":3842,"context_line":"        those traits in Placement."}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_fc72efac","line":3839,"range":{"start_line":3839,"start_character":74,"end_line":3839,"end_character":76},"updated":"2018-05-10 20:29:53.000000000","message":"a","commit_id":"e97b0923d3df3721d970ecb49e0e69328dd3de1e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"89747feb01559ba213b712a5f7e1d5c9f4944030","unresolved":false,"context_lines":[{"line_number":3841,"context_line":"        ends up on the single compute node resource provider that also has"},{"line_number":3842,"context_line":"        those traits in Placement."},{"line_number":3843,"context_line":"        \"\"\""},{"line_number":3844,"context_line":"        # Decorate compute2 resource provider with volume image metadatz trait."},{"line_number":3845,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(self.compute2.host)"},{"line_number":3846,"context_line":"        self._set_provider_traits(rp_uuid, [\u0027HW_CPU_X86_VMX\u0027,"},{"line_number":3847,"context_line":"                                            \u0027HW_CPU_X86_SGX\u0027])"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_3c7dc77e","line":3844,"range":{"start_line":3844,"start_character":64,"end_line":3844,"end_character":72},"updated":"2018-05-10 20:29:53.000000000","message":"ditto","commit_id":"e97b0923d3df3721d970ecb49e0e69328dd3de1e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"89747feb01559ba213b712a5f7e1d5c9f4944030","unresolved":false,"context_lines":[{"line_number":3913,"context_line":""},{"line_number":3914,"context_line":"    def test_image_trait_on_volume_backed_instance_no_valid_host(self):"},{"line_number":3915,"context_line":"        \"\"\"Tests that when trying to launch a volume-backed instance with an"},{"line_number":3916,"context_line":"        image expressing traits, the traits from the image are ignored."},{"line_number":3917,"context_line":"        \"\"\""},{"line_number":3918,"context_line":"        self.useFixture(nova_fixtures.CinderFixtureNewAttachFlow(self))"},{"line_number":3919,"context_line":"        # Create our server with a volume"}],"source_content_type":"text/x-python","patch_set":14,"id":"5f7c97a3_dc7b7378","line":3916,"range":{"start_line":3916,"start_character":33,"end_line":3916,"end_character":70},"updated":"2018-05-10 20:29:53.000000000","message":"This isn\u0027t right; you\u0027re actually testing that the traits from the image cause the instance *not* to be scheduled to any host, because no host has those traits.","commit_id":"e97b0923d3df3721d970ecb49e0e69328dd3de1e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b20ff9396ea6a8754671d479728a4b9c1f52633e","unresolved":false,"context_lines":[{"line_number":3731,"context_line":"            flavor_id\u003dflavor_id, networks\u003d\u0027none\u0027)"},{"line_number":3732,"context_line":"        return self.api.post_server({\u0027server\u0027: server_req})"},{"line_number":3733,"context_line":""},{"line_number":3734,"context_line":"    def _create_server_with_volume(self, flavor_id, volume_id):"},{"line_number":3735,"context_line":"        \"\"\"Create a server with block device mapping(volume) with the given"},{"line_number":3736,"context_line":"        flavor and volume id\u0027s"},{"line_number":3737,"context_line":"        :param flavor_id: the flavor id"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_75f6df65","line":3734,"range":{"start_line":3734,"start_character":8,"end_line":3734,"end_character":34},"updated":"2018-05-11 20:55:20.000000000","message":"nit: I\u0027d rename this to _create_volume_backed_server_with_traits","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"dda902e78417dc9a046e7f9987560c355ddd35b0","unresolved":false,"context_lines":[{"line_number":3731,"context_line":"            flavor_id\u003dflavor_id, networks\u003d\u0027none\u0027)"},{"line_number":3732,"context_line":"        return self.api.post_server({\u0027server\u0027: server_req})"},{"line_number":3733,"context_line":""},{"line_number":3734,"context_line":"    def _create_server_with_volume(self, flavor_id, volume_id):"},{"line_number":3735,"context_line":"        \"\"\"Create a server with block device mapping(volume) with the given"},{"line_number":3736,"context_line":"        flavor and volume id\u0027s"},{"line_number":3737,"context_line":"        :param flavor_id: the flavor id"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_462457af","line":3734,"range":{"start_line":3734,"start_character":8,"end_line":3734,"end_character":34},"in_reply_to":"5f7c97a3_75f6df65","updated":"2018-05-11 23:38:46.000000000","message":"Done","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b20ff9396ea6a8754671d479728a4b9c1f52633e","unresolved":false,"context_lines":[{"line_number":3733,"context_line":""},{"line_number":3734,"context_line":"    def _create_server_with_volume(self, flavor_id, volume_id):"},{"line_number":3735,"context_line":"        \"\"\"Create a server with block device mapping(volume) with the given"},{"line_number":3736,"context_line":"        flavor and volume id\u0027s"},{"line_number":3737,"context_line":"        :param flavor_id: the flavor id"},{"line_number":3738,"context_line":"        :param volume_id: the volume id"},{"line_number":3739,"context_line":"        :return: create server response"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_15e76bae","line":3736,"updated":"2018-05-11 20:55:20.000000000","message":"Could probably mention in here that either the flavor or the image backing the volume have required traits.","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"dda902e78417dc9a046e7f9987560c355ddd35b0","unresolved":false,"context_lines":[{"line_number":3733,"context_line":""},{"line_number":3734,"context_line":"    def _create_server_with_volume(self, flavor_id, volume_id):"},{"line_number":3735,"context_line":"        \"\"\"Create a server with block device mapping(volume) with the given"},{"line_number":3736,"context_line":"        flavor and volume id\u0027s"},{"line_number":3737,"context_line":"        :param flavor_id: the flavor id"},{"line_number":3738,"context_line":"        :param volume_id: the volume id"},{"line_number":3739,"context_line":"        :return: create server response"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_e63c83c9","line":3736,"in_reply_to":"5f7c97a3_15e76bae","updated":"2018-05-11 23:38:46.000000000","message":"Done","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b20ff9396ea6a8754671d479728a4b9c1f52633e","unresolved":false,"context_lines":[{"line_number":3745,"context_line":"                \u0027flavorRef\u0027: flavor_id,"},{"line_number":3746,"context_line":"                \u0027name\u0027: \u0027test_image_trait_on_volume_backed\u0027,"},{"line_number":3747,"context_line":"                # We don\u0027t care about networking for this test. This"},{"line_number":3748,"context_line":"                # requires"},{"line_number":3749,"context_line":"                # microversion \u003e\u003d 2.37."},{"line_number":3750,"context_line":"                \u0027networks\u0027: \u0027none\u0027,"},{"line_number":3751,"context_line":"                \u0027block_device_mapping_v2\u0027: [{"},{"line_number":3752,"context_line":"                    \u0027boot_index\u0027: 0,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_95e13b9e","line":3749,"range":{"start_line":3748,"start_character":16,"end_line":3749,"end_character":39},"updated":"2018-05-11 20:55:20.000000000","message":"nit: squash into a single line","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"dda902e78417dc9a046e7f9987560c355ddd35b0","unresolved":false,"context_lines":[{"line_number":3745,"context_line":"                \u0027flavorRef\u0027: flavor_id,"},{"line_number":3746,"context_line":"                \u0027name\u0027: \u0027test_image_trait_on_volume_backed\u0027,"},{"line_number":3747,"context_line":"                # We don\u0027t care about networking for this test. This"},{"line_number":3748,"context_line":"                # requires"},{"line_number":3749,"context_line":"                # microversion \u003e\u003d 2.37."},{"line_number":3750,"context_line":"                \u0027networks\u0027: \u0027none\u0027,"},{"line_number":3751,"context_line":"                \u0027block_device_mapping_v2\u0027: [{"},{"line_number":3752,"context_line":"                    \u0027boot_index\u0027: 0,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_063adfca","line":3749,"range":{"start_line":3748,"start_character":16,"end_line":3749,"end_character":39},"in_reply_to":"5f7c97a3_95e13b9e","updated":"2018-05-11 23:38:46.000000000","message":"Done","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b20ff9396ea6a8754671d479728a4b9c1f52633e","unresolved":false,"context_lines":[{"line_number":3814,"context_line":"        # the required trait."},{"line_number":3815,"context_line":"        self.assertEqual(self.compute2.host, server[\u0027OS-EXT-SRV-ATTR:host\u0027])"},{"line_number":3816,"context_line":""},{"line_number":3817,"context_line":"    def test_image_trait_on_volume_backed_instance(self):"},{"line_number":3818,"context_line":"        \"\"\"Tests that when trying to launch a volume-backed instance with a"},{"line_number":3819,"context_line":"        required trait on the image, the instance ends up on the single compute"},{"line_number":3820,"context_line":"        node resource provider that also has that trait in Placement."}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_15b52b7e","line":3817,"updated":"2018-05-11 20:55:20.000000000","message":"nit: this would be more interesting if the compute hosts were weighted such that compute1 was weighed higher than compute2 all things equal, just to know that we\u0027re not getting lucky and are indeed picking compute2 because of the required trait on the image that backs the volume (which backs the server). But it could be done in a follow up, and gets kind of messy with adding a custom weigher to the scheduler and restarting the scheduler service. I suppose it\u0027s something you could do generically for these tests though - always weigh the non-traited compute higher than the one with traits so we\u0027re sure our servers are landing on the lower weighted host that does have the matching required traits.","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"dda902e78417dc9a046e7f9987560c355ddd35b0","unresolved":false,"context_lines":[{"line_number":3814,"context_line":"        # the required trait."},{"line_number":3815,"context_line":"        self.assertEqual(self.compute2.host, server[\u0027OS-EXT-SRV-ATTR:host\u0027])"},{"line_number":3816,"context_line":""},{"line_number":3817,"context_line":"    def test_image_trait_on_volume_backed_instance(self):"},{"line_number":3818,"context_line":"        \"\"\"Tests that when trying to launch a volume-backed instance with a"},{"line_number":3819,"context_line":"        required trait on the image, the instance ends up on the single compute"},{"line_number":3820,"context_line":"        node resource provider that also has that trait in Placement."}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_8b04b819","line":3817,"in_reply_to":"5f7c97a3_15b52b7e","updated":"2018-05-11 23:38:46.000000000","message":"yep...there is a chance that if a bug surfaces the test could still could intermittently succeed in all the TraitsBasedSchedulingTests. \n\ni am unsure how to add a custom weigher and \"fix\" the tests, should i add a todo?","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b20ff9396ea6a8754671d479728a4b9c1f52633e","unresolved":false,"context_lines":[{"line_number":3838,"context_line":""},{"line_number":3839,"context_line":"    def test_flavor_image_trait_on_volume_backed_instance(self):"},{"line_number":3840,"context_line":"        \"\"\"Tests that when trying to launch a volume-backed instance with a"},{"line_number":3841,"context_line":"        required trait on flavor AND a required trait on the image,"},{"line_number":3842,"context_line":"        the instance ends up on the single compute node resource provider that"},{"line_number":3843,"context_line":"        also has those traits in Placement."},{"line_number":3844,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_b5a55749","line":3841,"range":{"start_line":3841,"start_character":61,"end_line":3841,"end_character":66},"updated":"2018-05-11 20:55:20.000000000","message":"nit: on the image contained in the volume","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"dda902e78417dc9a046e7f9987560c355ddd35b0","unresolved":false,"context_lines":[{"line_number":3838,"context_line":""},{"line_number":3839,"context_line":"    def test_flavor_image_trait_on_volume_backed_instance(self):"},{"line_number":3840,"context_line":"        \"\"\"Tests that when trying to launch a volume-backed instance with a"},{"line_number":3841,"context_line":"        required trait on flavor AND a required trait on the image,"},{"line_number":3842,"context_line":"        the instance ends up on the single compute node resource provider that"},{"line_number":3843,"context_line":"        also has those traits in Placement."},{"line_number":3844,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_66295388","line":3841,"range":{"start_line":3841,"start_character":61,"end_line":3841,"end_character":66},"in_reply_to":"5f7c97a3_b5a55749","updated":"2018-05-11 23:38:46.000000000","message":"fixed in this and other places.\n\nNit: updated it to say image metadata contained within the volume\n\nadded \"on the image metadata contained within the volume\"","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b20ff9396ea6a8754671d479728a4b9c1f52633e","unresolved":false,"context_lines":[{"line_number":3842,"context_line":"        the instance ends up on the single compute node resource provider that"},{"line_number":3843,"context_line":"        also has those traits in Placement."},{"line_number":3844,"context_line":"        \"\"\""},{"line_number":3845,"context_line":"        # Decorate compute2 resource provider with volume image metadatz trait."},{"line_number":3846,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(self.compute2.host)"},{"line_number":3847,"context_line":"        self._set_provider_traits(rp_uuid, [\u0027HW_CPU_X86_VMX\u0027,"},{"line_number":3848,"context_line":"                                            \u0027HW_CPU_X86_SGX\u0027])"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_55640322","line":3845,"range":{"start_line":3845,"start_character":64,"end_line":3845,"end_character":72},"updated":"2018-05-11 20:55:20.000000000","message":"metadata","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"dda902e78417dc9a046e7f9987560c355ddd35b0","unresolved":false,"context_lines":[{"line_number":3842,"context_line":"        the instance ends up on the single compute node resource provider that"},{"line_number":3843,"context_line":"        also has those traits in Placement."},{"line_number":3844,"context_line":"        \"\"\""},{"line_number":3845,"context_line":"        # Decorate compute2 resource provider with volume image metadatz trait."},{"line_number":3846,"context_line":"        rp_uuid \u003d self._get_provider_uuid_by_host(self.compute2.host)"},{"line_number":3847,"context_line":"        self._set_provider_traits(rp_uuid, [\u0027HW_CPU_X86_VMX\u0027,"},{"line_number":3848,"context_line":"                                            \u0027HW_CPU_X86_SGX\u0027])"}],"source_content_type":"text/x-python","patch_set":15,"id":"5f7c97a3_862eef8f","line":3845,"range":{"start_line":3845,"start_character":64,"end_line":3845,"end_character":72},"in_reply_to":"5f7c97a3_55640322","updated":"2018-05-11 23:38:46.000000000","message":"Done","commit_id":"5f2b88b1aafb9a35638e54f796685f633428b6a5"}],"nova/tests/unit/image/fake.py":[{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"e7718fb1692976b03c5ae79a7ff59fa619904b00","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    \"\"\"Mock (fake) image service for unit testing.\"\"\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def __init__(self):"},{"line_number":41,"context_line":"        self.images \u003d collections.OrderedDict()"},{"line_number":42,"context_line":"        # NOTE(justinsb): The OpenStack API can\u0027t upload an image?"},{"line_number":43,"context_line":"        # So, make sure we\u0027ve got one.."},{"line_number":44,"context_line":"        timestamp \u003d datetime.datetime(2011, 1, 1, 1, 2, 3)"}],"source_content_type":"text/x-python","patch_set":7,"id":"9f6a8fd7_0e539f3a","line":41,"updated":"2018-04-25 07:41:37.000000000","message":"this change is need as the python2 functional tests will fail intermittently because the code references like below gets random image from this service. If the image they get is the SGX_TRAIT_IMAGE, a large number of other tests fail.\n\nPython 3 tests are not a problem because dicts under 3.6 or later maintain insertion order but using a orderedDict is recommended if we want to retain order\n\nhttps://docs.python.org/3/whatsnew/3.6.html#new-dict-implementation\n\n \u003e self.api.get_images()[0][\u0027id\u0027] under\ntests.functional.wsgi.test_interfaces.InterfaceFullstackWithNeutron#test_detach_interface_negative_invalid_state\n\nhttp://logs.openstack.org/96/560596/6/check/nova-tox-functional/44ea227/","commit_id":"d07c1e3a4a053ca45557ebf967a07eff163c035d"},{"author":{"_account_id":17190,"name":"Arvind Nadendla","email":"arvindn05@gmail.com","username":"arvindn05"},"change_message_id":"aa76ad82efcbe1b114e31f6e19f475f24af89139","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    \"\"\"Mock (fake) image service for unit testing.\"\"\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def __init__(self):"},{"line_number":41,"context_line":"        self.images \u003d collections.OrderedDict()"},{"line_number":42,"context_line":"        # NOTE(justinsb): The OpenStack API can\u0027t upload an image?"},{"line_number":43,"context_line":"        # So, make sure we\u0027ve got one.."},{"line_number":44,"context_line":"        timestamp \u003d datetime.datetime(2011, 1, 1, 1, 2, 3)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_2379b52e","line":41,"updated":"2018-04-26 16:45:09.000000000","message":"please do validate that this is OK, since it is a change in behaviour.\n\nPretty much till now when folks called get_images()[0][\u0027id\u0027](quite a few places where this is used) they got a random image from the list of images....now they will only get the image1 always.","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"cd717dbdbbb5e3565cd0dbcd2368a750e28b1deb","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    \"\"\"Mock (fake) image service for unit testing.\"\"\""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"    def __init__(self):"},{"line_number":41,"context_line":"        self.images \u003d collections.OrderedDict()"},{"line_number":42,"context_line":"        # NOTE(justinsb): The OpenStack API can\u0027t upload an image?"},{"line_number":43,"context_line":"        # So, make sure we\u0027ve got one.."},{"line_number":44,"context_line":"        timestamp \u003d datetime.datetime(2011, 1, 1, 1, 2, 3)"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_764a0984","line":41,"in_reply_to":"9f6a8fd7_2379b52e","updated":"2018-04-26 18:02:09.000000000","message":"It\u0027s just a change on the test side.  And tests pass, so... it should be fine.  Unless I\u0027m missing something.","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42f6b8ee9d0a6b9d10e725cf1f0c5aa29915777e","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                    \u0027architecture\u0027: obj_fields.Architecture.X86_64,"},{"line_number":151,"context_line":"                    \u0027auto_disk_config\u0027: \u0027True\u0027}}"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        image8 \u003d {\u0027id\u0027: SGX_TRAIT_IMAGE_UUID,"},{"line_number":154,"context_line":"                  \u0027name\u0027: \u0027fakeimage8\u0027,"},{"line_number":155,"context_line":"                  \u0027created_at\u0027: timestamp,"},{"line_number":156,"context_line":"                  \u0027updated_at\u0027: timestamp,"},{"line_number":157,"context_line":"                  \u0027deleted_at\u0027: None,"},{"line_number":158,"context_line":"                  \u0027deleted\u0027: False,"},{"line_number":159,"context_line":"                  \u0027status\u0027: \u0027active\u0027,"},{"line_number":160,"context_line":"                  \u0027is_public\u0027: False,"},{"line_number":161,"context_line":"                  \u0027container_format\u0027: \u0027ova\u0027,"},{"line_number":162,"context_line":"                  \u0027disk_format\u0027: \u0027vhd\u0027,"},{"line_number":163,"context_line":"                  \u0027size\u0027: \u002774185822\u0027,"},{"line_number":164,"context_line":"                  \u0027properties\u0027: {"},{"line_number":165,"context_line":"                      \u0027kernel_id\u0027: \u0027nokernel\u0027,"},{"line_number":166,"context_line":"                      \u0027ramdisk_id\u0027: \u0027nokernel\u0027,"},{"line_number":167,"context_line":"                      \u0027trait:HW_CPU_X86_SGX\u0027: \u0027required\u0027}}"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        self.create(None, image1)"},{"line_number":170,"context_line":"        self.create(None, image2)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9f6a8fd7_28687285","line":167,"range":{"start_line":153,"start_character":8,"end_line":167,"end_character":58},"updated":"2018-04-30 22:02:51.000000000","message":"You shouldn\u0027t *have* to do this. _FakeImageService.update should work if you\u0027re calling:\n\n  PUT /images/{image_id}/metadata\n\nOn one of the existing images, or create your own fake image for the test.\n\nHowever, you\u0027ll have to make sure to call that API with microversion \u003c 2.39, but that\u0027s pretty easy:\n\n  with nova.utils.temporary_mutation(self.api.microversion, \u00272.1\u0027):\n     self.api.api_put(\u0027/images/%s/metadata\u0027 % image[\u0027id\u0027], body)","commit_id":"e0b114dcf25e4c650dff7ce977975084e363a877"}],"nova/tests/unit/scheduler/test_utils.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"126794e0292d7ffde32b18d4b654b44a71bac19f","unresolved":false,"context_lines":[{"line_number":514,"context_line":"        )"},{"line_number":515,"context_line":"        self.assertResourceRequestsEqual("},{"line_number":516,"context_line":"            expected, utils.ResourceRequest.from_extra_specs(extra_specs,"},{"line_number":517,"context_line":"                                                             existing_req))"},{"line_number":518,"context_line":""},{"line_number":519,"context_line":"    def test_resource_request_from_image_props(self):"},{"line_number":520,"context_line":"        props \u003d {\u0027trait:CUSTOM_TRUSTED\u0027: \u0027required\u0027}"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_fdd7df4e","line":517,"range":{"start_line":517,"start_character":61,"end_line":517,"end_character":73},"updated":"2018-04-26 11:55:04.000000000","message":"name kwargs","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"126794e0292d7ffde32b18d4b654b44a71bac19f","unresolved":false,"context_lines":[{"line_number":563,"context_line":"        )"},{"line_number":564,"context_line":"        self.assertResourceRequestsEqual("},{"line_number":565,"context_line":"            expected, utils.ResourceRequest.from_image_props(image_meta_props,"},{"line_number":566,"context_line":"                                                             existing_req))"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"    def test_merge_resources(self):"},{"line_number":569,"context_line":"        resources \u003d {"}],"source_content_type":"text/x-python","patch_set":8,"id":"9f6a8fd7_bde1672d","line":566,"range":{"start_line":566,"start_character":61,"end_line":566,"end_character":73},"updated":"2018-04-26 11:55:04.000000000","message":"name kwargs","commit_id":"b4a4b070feb2b268c5dca1aeb079c8b3244fcf7c"}]}
