)]}'
{"nova/scheduler/filters/compute_filter.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6882355c0fa88dd5f41f900c8c15db44eea6218b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        # Not supported if an instance property is requested but nothing"},{"line_number":42,"context_line":"        # advertised by the host."},{"line_number":43,"context_line":"        if not supp_instances:"},{"line_number":44,"context_line":"            return False"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        def _compare_props(props, other_props):"},{"line_number":47,"context_line":"            for i in props:"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAALH%2F%2F74s%3D","line":44,"updated":"2012-07-31 17:58:03.000000000","message":"Throughout this function it would be useful to have a LOG.debug() message that explains why a True or False is returned... that way it is easy to diagnose why a particular request spec failed or succeeded to schedule on a particular host.","commit_id":"3abd3e67ff31c5a225965528469688404877d7d1"},{"author":{"_account_id":693,"name":"Christopher MacGown","email":"chris@pistoncloud.com","username":"0x44"},"change_message_id":"6c576d19b7e447627a806f8fba90b10f8107ba2c","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        inst_props_req \u003d [inst_arch, inst_h_type, inst_vm_mode]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        # Supported if no compute-related instance properties are specified"},{"line_number":37,"context_line":"        if not [p for p in inst_props_req if p]:"},{"line_number":38,"context_line":"            return True"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        supp_instances \u003d capabilities.get(\u0027supported_instances\u0027, None)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAALH%2F%2F5OY%3D","line":37,"updated":"2012-08-03 18:37:09.000000000","message":"femto-nit, but this looks like it would be clearer if it was:\n\nif not any(inst_prop_req):\n    return True","commit_id":"5fe909f3a5e6846534743a4cc64b2674308dc59f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d364a89b686d9eccf53f4b30b244e81dc26456b6","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        inst_arch \u003d instance_meta.get(\u0027image_architecture\u0027, None)"},{"line_number":34,"context_line":"        inst_h_type \u003d instance_meta.get(\u0027image_hypervisor_type\u0027, None)"},{"line_number":35,"context_line":"        inst_vm_mode \u003d instance_meta.get(\u0027image_vm_mode\u0027, None)"},{"line_number":36,"context_line":"        inst_props_req \u003d [inst_arch, inst_h_type, inst_vm_mode]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # Supported if no compute-related instance properties are specified"},{"line_number":39,"context_line":"        if not any(inst_props_req):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2Fwdc%3D","line":36,"updated":"2012-08-14 15:52:13.000000000","message":"Again, I think a tuple makes more sense here","commit_id":"2ff2fcecfa92647d3526dcc723c9022a3230f242"},{"author":{"_account_id":2697,"name":"Jim Fehlig","email":"jfehlig@suse.com","username":"jfehlig"},"change_message_id":"0b2508df050644cc3fa5b548c0b6d0f447913a48","unresolved":false,"context_lines":[{"line_number":33,"context_line":"        inst_arch \u003d instance_meta.get(\u0027image_architecture\u0027, None)"},{"line_number":34,"context_line":"        inst_h_type \u003d instance_meta.get(\u0027image_hypervisor_type\u0027, None)"},{"line_number":35,"context_line":"        inst_vm_mode \u003d instance_meta.get(\u0027image_vm_mode\u0027, None)"},{"line_number":36,"context_line":"        inst_props_req \u003d [inst_arch, inst_h_type, inst_vm_mode]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"        # Supported if no compute-related instance properties are specified"},{"line_number":39,"context_line":"        if not any(inst_props_req):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2Fupk%3D","line":36,"in_reply_to":"AAAALH%2F%2Fwdc%3D","updated":"2012-08-15 20:15:17.000000000","message":"Nod.  I\u0027ll fix this.","commit_id":"2ff2fcecfa92647d3526dcc723c9022a3230f242"},{"author":{"_account_id":4460,"name":"Vincent Untz","email":"vuntz@opensuse.org","username":"vuntz"},"change_message_id":"fe5339f8209780f37938aa980fac7951b355d788","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        # Not supported if an instance property is requested but nothing"},{"line_number":44,"context_line":"        # advertised by the host."},{"line_number":45,"context_line":"        if not supp_instances:"},{"line_number":46,"context_line":"            LOG.debug(_(\"Instance contains properties %(instance_meta)s, \""},{"line_number":47,"context_line":"                        \"but no corresponding capabilities are advertised \""},{"line_number":48,"context_line":"                        \"by the compute node\"), locals())"},{"line_number":49,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2F1FQ%3D","line":46,"updated":"2012-08-09 06:32:32.000000000","message":"I\u0027m probably missing something obvious, but where is instance_meta defined?","commit_id":"2ff2fcecfa92647d3526dcc723c9022a3230f242"},{"author":{"_account_id":2697,"name":"Jim Fehlig","email":"jfehlig@suse.com","username":"jfehlig"},"change_message_id":"2cad5d2859ce1f303363195cd22266c565d5f025","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        # Not supported if an instance property is requested but nothing"},{"line_number":44,"context_line":"        # advertised by the host."},{"line_number":45,"context_line":"        if not supp_instances:"},{"line_number":46,"context_line":"            LOG.debug(_(\"Instance contains properties %(instance_meta)s, \""},{"line_number":47,"context_line":"                        \"but no corresponding capabilities are advertised \""},{"line_number":48,"context_line":"                        \"by the compute node\"), locals())"},{"line_number":49,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FyGE%3D","line":46,"in_reply_to":"AAAALH%2F%2F1FQ%3D","updated":"2012-08-13 05:33:59.000000000","message":"It is a parameter of _instance_supported().  AFAICT, locals() includes method parameters.","commit_id":"2ff2fcecfa92647d3526dcc723c9022a3230f242"},{"author":{"_account_id":4460,"name":"Vincent Untz","email":"vuntz@opensuse.org","username":"vuntz"},"change_message_id":"6e014eb0f7391965302a120526bdfeba407d6c74","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        # Not supported if an instance property is requested but nothing"},{"line_number":44,"context_line":"        # advertised by the host."},{"line_number":45,"context_line":"        if not supp_instances:"},{"line_number":46,"context_line":"            LOG.debug(_(\"Instance contains properties %(instance_meta)s, \""},{"line_number":47,"context_line":"                        \"but no corresponding capabilities are advertised \""},{"line_number":48,"context_line":"                        \"by the compute node\"), locals())"},{"line_number":49,"context_line":"            return False"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FyBc%3D","line":46,"in_reply_to":"AAAALH%2F%2FyGE%3D","updated":"2012-08-13 06:55:03.000000000","message":"Doh, no idea how I managed to not see it there :/ Thanks for the answer :-)","commit_id":"2ff2fcecfa92647d3526dcc723c9022a3230f242"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"d364a89b686d9eccf53f4b30b244e81dc26456b6","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            return True"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        for supp_inst in supp_instances:"},{"line_number":58,"context_line":"            if _compare_props(inst_props_req, supp_inst):"},{"line_number":59,"context_line":"                LOG.debug(_(\"Instance properties %(instance_meta)s \""},{"line_number":60,"context_line":"                            \"are satisfied by compute host capabilities \""},{"line_number":61,"context_line":"                            \"%(capabilities)s\"), locals())"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FwdU%3D","line":58,"updated":"2012-08-14 15:52:13.000000000","message":"Can we not use a tuple/list equality check? e.g.\n\n  if inst_props_req \u003d\u003d supp_inst:\n      ...","commit_id":"2ff2fcecfa92647d3526dcc723c9022a3230f242"},{"author":{"_account_id":2697,"name":"Jim Fehlig","email":"jfehlig@suse.com","username":"jfehlig"},"change_message_id":"0b2508df050644cc3fa5b548c0b6d0f447913a48","unresolved":false,"context_lines":[{"line_number":55,"context_line":"            return True"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        for supp_inst in supp_instances:"},{"line_number":58,"context_line":"            if _compare_props(inst_props_req, supp_inst):"},{"line_number":59,"context_line":"                LOG.debug(_(\"Instance properties %(instance_meta)s \""},{"line_number":60,"context_line":"                            \"are satisfied by compute host capabilities \""},{"line_number":61,"context_line":"                            \"%(capabilities)s\"), locals())"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FupQ%3D","line":58,"in_reply_to":"AAAALH%2F%2FwdU%3D","updated":"2012-08-15 20:15:17.000000000","message":"I don\u0027t think so.  inst_props_req can potentially contain only a subset of supp_inst.  E.g. user might have set only architecture on the image, in which case inst_props_req would be e.g. (x86_64, None, None), but supp_inst contains (x86_64, kvm, hvm).  In this case, a tuple equality check would fail when the compute node can actually support it.","commit_id":"2ff2fcecfa92647d3526dcc723c9022a3230f242"}],"nova/tests/scheduler/test_host_filters.py":[{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"cc3f6b9913bd8f7b43acb7460354ce1d7fa50bea","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        filt_cls \u003d self.class_map[\u0027ComputeFilter\u0027]()"},{"line_number":426,"context_line":"        inst_meta \u003d {\u0027system_metadata\u0027: {\u0027image_architecture\u0027: \u0027x86_64\u0027,"},{"line_number":427,"context_line":"                                         \u0027image_hypervisor_type\u0027: \u0027kvm\u0027,"},{"line_number":428,"context_line":"                                         \u0027image_vm_mode\u0027: \u0027hvm\u0027}}"},{"line_number":429,"context_line":"        req_spec \u003d {\u0027instance_properties\u0027: inst_meta}"},{"line_number":430,"context_line":"        filter_properties \u003d {\u0027instance_type\u0027: {\u0027memory_mb\u0027: 1024},"},{"line_number":431,"context_line":"                             \u0027request_spec\u0027: req_spec}"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2F6NE%3D","line":428,"updated":"2012-08-02 16:36:15.000000000","message":"I think it is desirable to add another test to validate behaviour when only *some* of the image props are set. eg if you have\n\n   inst_meta \u003d {\u0027system_metadata\u0027: {\u0027image_architecture\u0027: \u0027x86_64\u0027,\n                                                \u0027image_vm_mode\u0027: \u0027hvm\u0027}}\n\nThis should match any node advertising \u0027x86_64\u0027 + \u0027hvm\u0027 whether it is KVM or QEMU (or even Xen HVM).","commit_id":"6ad8b028197bd9a89b7f6cea4de1117379628441"},{"author":{"_account_id":2697,"name":"Jim Fehlig","email":"jfehlig@suse.com","username":"jfehlig"},"change_message_id":"23338eb8bb39ca9e1cd02a0aad61bdb187c85289","unresolved":false,"context_lines":[{"line_number":425,"context_line":"        filt_cls \u003d self.class_map[\u0027ComputeFilter\u0027]()"},{"line_number":426,"context_line":"        inst_meta \u003d {\u0027system_metadata\u0027: {\u0027image_architecture\u0027: \u0027x86_64\u0027,"},{"line_number":427,"context_line":"                                         \u0027image_hypervisor_type\u0027: \u0027kvm\u0027,"},{"line_number":428,"context_line":"                                         \u0027image_vm_mode\u0027: \u0027hvm\u0027}}"},{"line_number":429,"context_line":"        req_spec \u003d {\u0027instance_properties\u0027: inst_meta}"},{"line_number":430,"context_line":"        filter_properties \u003d {\u0027instance_type\u0027: {\u0027memory_mb\u0027: 1024},"},{"line_number":431,"context_line":"                             \u0027request_spec\u0027: req_spec}"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAALH%2F%2F6Ak%3D","line":428,"in_reply_to":"AAAALH%2F%2F6NE%3D","updated":"2012-08-02 19:12:59.000000000","message":"Yes, good idea.  Adding test_compute_filter_passes_partial_props() and test_compute_filter_fails_partial_props()","commit_id":"6ad8b028197bd9a89b7f6cea4de1117379628441"}]}
