)]}'
{"networking_powervm/plugins/ibm/agent/powervm/utils.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a1e435e27b8738d1638c4a14b8dd894b051ced53","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        return [vif for vif in vif_list if"},{"line_number":272,"context_line":"                ((isinstance(vm_wrap, pvm_lpar.LPAR) or"},{"line_number":273,"context_line":"                  not getattr(vif, \u0027is_tagged_vlan_supported\u0027, False)) and"},{"line_number":274,"context_line":"                 not getattr(vif, \u0027vswitch_id\u0027, None) in vs_exclu)]"},{"line_number":275,"context_line":"    except pvm_exc.HttpError as e:"},{"line_number":276,"context_line":"        # If it is a 404 (not found) then just skip."},{"line_number":277,"context_line":"        if e.response is not None and e.response.status \u003d\u003d 404:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_c1941f47","line":274,"range":{"start_line":274,"start_character":17,"end_line":274,"end_character":65},"updated":"2017-05-18 20:14:01.000000000","message":"The preferred syntax is `A not in L` (as opposed to `not A in L`), i.e.:\n\n getattr(...) not in vs_exclu\n\nNot really relevant to this change, but since you\u0027re here...","commit_id":"8d130f439b6069bb3dce95d13d57c4cb88cd02ae"}],"networking_powervm/tests/unit/plugins/ibm/powervm/test_utils.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"a1e435e27b8738d1638c4a14b8dd894b051ced53","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    def test_find_vifs(self, mock_rmlog):"},{"line_number":105,"context_line":"        mock_vif_class \u003d mock.Mock()"},{"line_number":106,"context_line":"        vea1 \u003d mock.Mock(uuid\u003d\u00271\u0027, is_tagged_vlan_supported\u003dTrue, vswitch_id\u003d2)"},{"line_number":107,"context_line":"        vea2 \u003d mock.Mock(uuid\u003d\u00272\u0027, is_tagged_vlan_supported\u003dFalse)"},{"line_number":108,"context_line":"        mock_vif_class.get.return_value \u003d [vea1, vea2]"},{"line_number":109,"context_line":"        lpar \u003d mock.Mock(spec\u003dpvm_lpar.LPAR)"},{"line_number":110,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ff0f0b1f_c1e65f17","line":107,"range":{"start_line":107,"start_character":0,"end_line":107,"end_character":66},"updated":"2017-05-18 20:14:01.000000000","message":"Actually, getattr(vea2, \u0027vswitch_id\u0027) will succeed (will return another Mock).  You can enforce an inclusive list of attr names on the mock by using the \u0027spec\u0027 kwarg, e.g.:\n\n vea2 \u003d mock.Mock(uuid\u003d\u00272\u0027, is_tagged_vlan_supported\u003dFalse, spec\u003d[\u0027uuid\u0027, \u0027is_tagged_vlan_supported\u0027])","commit_id":"8d130f439b6069bb3dce95d13d57c4cb88cd02ae"}]}
