)]}'
{"id":"openstack%2Fpython-novaclient~409549","triplet_id":"openstack%2Fpython-novaclient~master~I6bf5a6e9c9eed4bbcf6678467df19dfea560b4de","project":"openstack/python-novaclient","branch":"master","topic":"bug/1648207","hashtags":[],"change_id":"I6bf5a6e9c9eed4bbcf6678467df19dfea560b4de","subject":"Fixed the __ne__ implementation in base.Resource","status":"MERGED","created":"2016-12-11 21:49:10.000000000","updated":"2016-12-21 01:24:06.000000000","submitted":"2016-12-21 01:24:06.000000000","submitter":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"total_comment_count":4,"unresolved_comment_count":0,"has_review_started":true,"meta_rev_id":"1fd3d94f032d5a9bda7ad4f97fcae9cc9f3f119b","_number":409549,"virtual_id_number":409549,"owner":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"actions":{},"labels":{"Verified":{"approved":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"all":[{"value":2,"date":"2016-12-21 01:24:06.000000000","post_submit":true,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"_account_id":10068,"name":"Welcome, new contributor!","username":"welcome-message"},{"value":0,"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},{"value":0,"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},{"value":0,"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},{"value":0,"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"}],"values":{"-2":"Fails","-1":"Doesn\u0027t seem to work"," 0":"No score","+1":"Works for me","+2":"Verified"},"description":"","default_value":0,"optional":true},"Code-Review":{"approved":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"all":[{"value":0,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"_account_id":10068,"name":"Welcome, new contributor!","username":"welcome-message"},{"value":2,"date":"2016-12-19 19:44:58.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},{"value":0,"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},{"value":2,"date":"2016-12-20 23:32:11.000000000","permitted_voting_range":{"min":2,"max":2},"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},{"value":0,"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"}],"values":{"-2":"Do not merge","-1":"This patch needs further work before it can be merged"," 0":"No score","+1":"Looks good to me, but someone else must approve","+2":"Looks good to me (core reviewer)"},"description":"","default_value":0,"optional":true},"Workflow":{"approved":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"all":[{"value":0,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"_account_id":10068,"name":"Welcome, new contributor!","username":"welcome-message"},{"value":0,"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},{"value":0,"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},{"value":1,"date":"2016-12-20 23:32:11.000000000","permitted_voting_range":{"min":1,"max":1},"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},{"value":0,"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"}],"values":{"-1":"Work in progress"," 0":"Ready for reviews","+1":"Approved"},"description":"","default_value":0,"optional":true},"Review-Priority":{"all":[{"value":0,"_account_id":3,"name":"Jenkins","username":"jenkins"},{"value":0,"_account_id":10068,"name":"Welcome, new contributor!","username":"welcome-message"},{"value":0,"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},{"value":0,"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},{"value":0,"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},{"value":0,"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"}],"values":{" 0":"Default Priority","+1":"Contributor Review Promise","+2":"Core Review Promise"},"description":"","default_value":0,"optional":true}},"removable_reviewers":[],"reviewers":{"REVIEWER":[{"_account_id":3,"name":"Jenkins","username":"jenkins"},{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},{"_account_id":10068,"name":"Welcome, new contributor!","username":"welcome-message"},{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"}]},"pending_reviewers":{},"reviewer_updates":[{"updated":"2016-12-11 21:49:21.000000000","updated_by":{"_account_id":10068,"name":"Welcome, new contributor!","username":"welcome-message"},"reviewer":{"_account_id":10068,"name":"Welcome, new contributor!","username":"welcome-message"},"state":"REVIEWER"},{"updated":"2016-12-19 14:07:52.000000000","updated_by":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"reviewer":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"state":"REVIEWER"},{"updated":"2016-12-19 19:44:58.000000000","updated_by":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"reviewer":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"state":"REVIEWER"},{"updated":"2016-12-20 23:32:11.000000000","updated_by":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"reviewer":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"state":"REVIEWER"},{"updated":"2016-12-21 01:24:06.000000000","updated_by":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"reviewer":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"state":"REVIEWER"}],"messages":[{"id":"1b8eadc665577482e12f085df70c26afad2bd689","author":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"date":"2016-12-11 21:49:10.000000000","message":"Uploaded patch set 1.","accounts_in_message":[],"_revision_number":1},{"id":"7ca33756953d7051e5aed92274830989c0bf6783","author":{"_account_id":10068,"name":"Welcome, new contributor!","username":"welcome-message"},"date":"2016-12-11 21:49:21.000000000","message":"Patch Set 1:\n\nThank you for your first contribution to OpenStack.\n\n    Your patch will now be tested automatically by OpenStack testing frameworks\n    and once the automatic tests pass, it will be reviewed by other friendly\n    developers. They will give you feedback and may require you to refine it.\n\n    People seldom get their patch approved on the first try, so don\u0027t be\n    concerned if requested to make corrections. Feel free to modify your patch\n    and resubmit a new change-set.\n\n    Patches usually take 3 to 7 days to be reviewed so be patient and be\n    available on IRC to ask and answer questions about your work. Also it\n    takes generally at least a couple of weeks for cores to get around to\n    reviewing code. The more you participate in the community the more\n    rewarding it is for you. You may also notice that the more you get to know\n    people and get to be known, the faster your patches will be reviewed and\n    eventually approved. Get to know others and become known by doing code\n    reviews: anybody can do it, and it\u0027s a great way to learn the code base.\n\n    Thanks again for supporting OpenStack, we look forward to working with you.\n\n    IRC: https://wiki.openstack.org/wiki/IRC\n    Workflow: http://docs.openstack.org/infra/manual/developers.html\n    Commit Messages: https://wiki.openstack.org/wiki/GitCommitMessages","accounts_in_message":[],"_revision_number":1},{"id":"20e406d0c5aac608bcf2323834901f22769ca9d2","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-12-11 22:55:01.000000000","message":"Patch Set 1: Verified+1\n\nBuild succeeded (check pipeline).\n\n- gate-python-novaclient-docs-ubuntu-xenial http://docs-draft.openstack.org/49/409549/1/check/gate-python-novaclient-docs-ubuntu-xenial/80c4e8f//doc/build/html/ : SUCCESS in 1m 24s\n- gate-python-novaclient-pep8-ubuntu-xenial http://logs.openstack.org/49/409549/1/check/gate-python-novaclient-pep8-ubuntu-xenial/ca3306a/ : SUCCESS in 1m 35s\n- gate-python-novaclient-python27-ubuntu-xenial http://logs.openstack.org/49/409549/1/check/gate-python-novaclient-python27-ubuntu-xenial/ca50ce8/ : SUCCESS in 2m 15s\n- gate-python-novaclient-python34 http://logs.openstack.org/49/409549/1/check/gate-python-novaclient-python34/8237dde/ : SUCCESS in 1m 47s\n- gate-python-novaclient-python35-nv http://logs.openstack.org/49/409549/1/check/gate-python-novaclient-python35-nv/af556ea/ : SUCCESS in 1m 50s (non-voting)\n- gate-tempest-dsvm-neutron-src-python-novaclient-ubuntu-xenial http://logs.openstack.org/49/409549/1/check/gate-tempest-dsvm-neutron-src-python-novaclient-ubuntu-xenial/f414b05/ : SUCCESS in 49m 27s\n- gate-novaclient-dsvm-functional-mitaka-ubuntu-trusty-nv http://logs.openstack.org/49/409549/1/check/gate-novaclient-dsvm-functional-mitaka-ubuntu-trusty-nv/aed72cd/ : SUCCESS in 26m 04s (non-voting)\n- gate-novaclient-dsvm-functional-identity-v3-only-ubuntu-xenial-nv http://logs.openstack.org/49/409549/1/check/gate-novaclient-dsvm-functional-identity-v3-only-ubuntu-xenial-nv/522a895/ : SUCCESS in 1h 05m 37s (non-voting)\n- gate-novaclient-dsvm-functional-neutron-ubuntu-xenial http://logs.openstack.org/49/409549/1/check/gate-novaclient-dsvm-functional-neutron-ubuntu-xenial/540745d/ : SUCCESS in 36m 55s","accounts_in_message":[],"_revision_number":1},{"id":"3930581aee15f27a26c863c350743f9439b370e8","author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"date":"2016-12-12 16:23:56.000000000","message":"Patch Set 1: Code-Review-1\n\n(1 comment)\n\nI don\u0027t believe this change fixes the referenced bug; all it does is change from a direct call to __eq__() to an exactly identical call using the \u0027\u003d\u003d\u0027 operator.  Further, this change lacks regression tests that verify that the bug is fixed, and the commit message needs significant expansion: I had to review the bug link to understand what the change was trying to do.\n\nFor the commit message, please reference [1] for how we like commit messages to be written.  As for fixing the bug, your first step should be to create a test that replicates the bug; once you have a test that fails, then you can modify the code to correct the problem.  If it\u0027s the correct change, the test will begin passing.\n\n[1] https://wiki.openstack.org/wiki/GitCommitMessages","accounts_in_message":[],"_revision_number":1},{"id":"360e2f0f56184339caa249b942e417a99256eba8","author":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"date":"2016-12-12 20:28:55.000000000","message":"Patch Set 1:\n\n\u003e (1 comment)\n \u003e \n \u003e I don\u0027t believe this change fixes the referenced bug; all it does\n \u003e is change from a direct call to __eq__() to an exactly identical\n \u003e call using the \u0027\u003d\u003d\u0027 operator.  Further, this change lacks\n \u003e regression tests that verify that the bug is fixed, and the commit\n \u003e message needs significant expansion: I had to review the bug link\n \u003e to understand what the change was trying to do.\n \u003e \n \u003e For the commit message, please reference [1] for how we like commit\n \u003e messages to be written.  As for fixing the bug, your first step\n \u003e should be to create a test that replicates the bug; once you have a\n \u003e test that fails, then you can modify the code to correct the\n \u003e problem.  If it\u0027s the correct change, the test will begin passing.\n \u003e \n \u003e [1] https://wiki.openstack.org/wiki/GitCommitMessages\n\nKevin,\n\nThanks for your review. I am new to openstack contributions and this is my first bug fix, so please help me with the doubts I have.\n\nThe __ne__ is returning not of NotImplemented and not of NotImplemented returns False (an expected python behavior). I had tested returning __eq__() directly and it gave the same behavior as \"not self \u003d\u003d other\", but I chose \"not self \u003d\u003d other\" because python-keystoneclient is also using this implementation for it\u0027s __ne__() method in base.Resource.\n\nFor the test case, can you please tell me whether I have to add a new test case for __ne__ in tests/unit/test_base.py that will have an implementation similar to __eq__ test case.\n\nI have seen the good practices of writing commit messages from the link you mentioned, and will update my commit message with the next review I send for this code.\n\nAlso, I don\u0027t know if I\u0027m supposed to ask my doubts in the review comments, so please let me know if there is some other place for such kind of discussions and doubt clarifications.","accounts_in_message":[],"_revision_number":1},{"id":"901a35fa10f80bad08786aaacc5ebe34ac02ca20","author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"date":"2016-12-13 18:31:07.000000000","message":"Patch Set 1:\n\nAh, I see now why using \u003d\u003d vs. __eq__() would in fact resolve the bug; I wasn\u0027t thinking about the behavior Python has when __eq__() returns NotImplemented.  (Makes me wonder how much of my personal code is affected by that issue?  Though I tend to implement __ne__() independently of __eq__()…)\n\nWhat I\u0027m expecting in terms of test cases is just a test that replicates the situation reported in the bug, where \"server !\u003d None\" incorrectly returns False.  It should be a test that fails without the fix, but works when the fix is applied.  Now, if you additionally add missing tests for __ne__() that are modeled on the ones for __eq__(), that\u0027s a plus, but not one I necessarily require.  (Still, that may be the best way to approach making that test…)\n\nYes, please do use the review comments for asking questions about a reviewer\u0027s review, or for asking other questions.  Occasionally you may be asked to raise an issue on the openstack-dev email list, but otherwise we prefer to keep discussion related to a specific review on that review, as that maintains context and allows others to learn from the responses :)","accounts_in_message":[],"_revision_number":1},{"id":"fff85e58132f092447e870e00c230b48af50d1c9","author":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"date":"2016-12-16 20:00:21.000000000","message":"Uploaded patch set 2.","accounts_in_message":[],"_revision_number":2},{"id":"4bf83d62b7996bf21889b8d29134fe6e152a4e7e","author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"date":"2016-12-16 20:40:03.000000000","message":"Patch Set 2: Code-Review-1\n\nThanks for providing a test that demonstrates the issue. If I revert the fix, I see:\n\n    novaclient.tests.unit.test_base.BaseTest.test_ne\n    ------------------------------------------------\n\n    Captured traceback:\n    ~~~~~~~~~~~~~~~~~~~\n    Traceback (most recent call last):\n      File \"test_base.py\", line 78, in test_ne\n        self.assertNotEqual(r1, r2)\n      File \"unittest2/case.py\", line 845, in assertNotEqual\n        raise self.failureException(msg)\n    AssertionError: \u003cResource id\u003d1, name\u003dtest\u003e \u003d\u003d None \n\nBefore:\n\n    \u003e\u003e\u003e from novaclient.v2 import servers\n    \u003e\u003e\u003e server \u003d servers.Server(manager\u003dNone, info\u003d{\u0027id\u0027: 1, \u0027name\u0027: \u0027test\u0027})\n    \u003e\u003e\u003e server\n    \u003cServer: test\u003e\n    \u003e\u003e\u003e server is None\n    False\n    \u003e\u003e\u003e server \u003d\u003d None\n    False\n    \u003e\u003e\u003e server !\u003d None\n    False\n    \u003e\u003e\u003e server is not None\n    True\n\nAfter:\n\n    \u003e\u003e\u003e from novaclient.v2 import servers\n    \u003e\u003e\u003e server \u003d servers.Server(manager\u003dNone, info\u003d{\u0027id\u0027: 1, \u0027name\u0027: \u0027test\u0027})\n    \u003e\u003e\u003e server\n    \u003cServer: test\u003e\n    \u003e\u003e\u003e server is None\n    False\n    \u003e\u003e\u003e server \u003d\u003d None\n    False\n    \u003e\u003e\u003e server !\u003d None\n    True\n    \u003e\u003e\u003e server is not None\n    True\n\nThat said, \"is\" should be used when comparing to \"None\".\n\n\"Comparisons to singletons like None should always be done with is or is not , never the equality operators.\" -- pep8 [1]\n\n[1] https://www.python.org/dev/peps/pep-0008/#programming-recommendations","accounts_in_message":[],"_revision_number":2},{"id":"27ae432094e532e6738d09224a494f4b3ed0ef9d","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-12-16 21:16:31.000000000","message":"Patch Set 2: Verified+1\n\nBuild succeeded (check pipeline).\n\n- gate-python-novaclient-docs-ubuntu-xenial http://docs-draft.openstack.org/49/409549/2/check/gate-python-novaclient-docs-ubuntu-xenial/6ec613d//doc/build/html/ : SUCCESS in 1m 34s\n- gate-python-novaclient-pep8-ubuntu-xenial http://logs.openstack.org/49/409549/2/check/gate-python-novaclient-pep8-ubuntu-xenial/7f45c98/ : SUCCESS in 2m 26s\n- gate-python-novaclient-python27-ubuntu-xenial http://logs.openstack.org/49/409549/2/check/gate-python-novaclient-python27-ubuntu-xenial/e091340/ : SUCCESS in 4m 47s\n- gate-python-novaclient-python35-nv http://logs.openstack.org/49/409549/2/check/gate-python-novaclient-python35-nv/8118aad/ : SUCCESS in 3m 13s (non-voting)\n- gate-tempest-dsvm-neutron-src-python-novaclient-ubuntu-xenial http://logs.openstack.org/49/409549/2/check/gate-tempest-dsvm-neutron-src-python-novaclient-ubuntu-xenial/3fbfdea/ : SUCCESS in 1h 12m 28s\n- gate-novaclient-dsvm-functional-mitaka-ubuntu-trusty-nv http://logs.openstack.org/49/409549/2/check/gate-novaclient-dsvm-functional-mitaka-ubuntu-trusty-nv/49a4b64/ : FAILURE in 13m 29s (non-voting)\n- gate-novaclient-dsvm-functional-identity-v3-only-ubuntu-xenial-nv http://logs.openstack.org/49/409549/2/check/gate-novaclient-dsvm-functional-identity-v3-only-ubuntu-xenial-nv/b582d13/ : SUCCESS in 1h 08m 36s (non-voting)\n- gate-novaclient-dsvm-functional-neutron-ubuntu-xenial http://logs.openstack.org/49/409549/2/check/gate-novaclient-dsvm-functional-neutron-ubuntu-xenial/6f502c1/ : SUCCESS in 1h 11m 39s","accounts_in_message":[],"_revision_number":2},{"id":"c8335f530abee8d70dcbc39683d6271117f403dd","author":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"date":"2016-12-16 21:22:30.000000000","message":"Patch Set 2:\n\n\u003e Thanks for providing a test that demonstrates the issue. If I\n \u003e revert the fix, I see:\n \u003e \n \u003e novaclient.tests.unit.test_base.BaseTest.test_ne\n \u003e ------------------------------------------------\n \u003e \n \u003e Captured traceback:\n \u003e ~~~~~~~~~~~~~~~~~~~\n \u003e Traceback (most recent call last):\n \u003e File \"test_base.py\", line 78, in test_ne\n \u003e self.assertNotEqual(r1, r2)\n \u003e File \"unittest2/case.py\", line 845, in assertNotEqual\n \u003e raise self.failureException(msg)\n \u003e AssertionError: \u003cResource id\u003d1, name\u003dtest\u003e \u003d\u003d None\n \u003e \n \u003e Before:\n \u003e \n \u003e \u003e\u003e\u003e from novaclient.v2 import servers\n \u003e \u003e\u003e\u003e server \u003d servers.Server(manager\u003dNone, info\u003d{\u0027id\u0027: 1, \u0027name\u0027:\n \u003e \u0027test\u0027})\n \u003e \u003e\u003e\u003e server\n \u003e \u003cServer: test\u003e\n \u003e \u003e\u003e\u003e server is None\n \u003e False\n \u003e \u003e\u003e\u003e server \u003d\u003d None\n \u003e False\n \u003e \u003e\u003e\u003e server !\u003d None\n \u003e False\n \u003e \u003e\u003e\u003e server is not None\n \u003e True\n \u003e \n \u003e After:\n \u003e \n \u003e \u003e\u003e\u003e from novaclient.v2 import servers\n \u003e \u003e\u003e\u003e server \u003d servers.Server(manager\u003dNone, info\u003d{\u0027id\u0027: 1, \u0027name\u0027:\n \u003e \u0027test\u0027})\n \u003e \u003e\u003e\u003e server\n \u003e \u003cServer: test\u003e\n \u003e \u003e\u003e\u003e server is None\n \u003e False\n \u003e \u003e\u003e\u003e server \u003d\u003d None\n \u003e False\n \u003e \u003e\u003e\u003e server !\u003d None\n \u003e True\n \u003e \u003e\u003e\u003e server is not None\n \u003e True\n \u003e \n \u003e That said, \"is\" should be used when comparing to \"None\".\n \u003e \n \u003e \"Comparisons to singletons like None should always be done with is\n \u003e or is not , never the equality operators.\" -- pep8 [1]\n \u003e \n \u003e [1] https://www.python.org/dev/peps/pep-0008/#programming-recommendations\n\nHi Diana,\n\nThank you for your review and reply. I may have given the example with \"server!\u003dNone\", but this issue occurs when a Resource object is checked for equality against any object of of a different class. \n\nFor example, if an object of client.Client class is equated for equality with an object of base.Resource, the result gives False (as expected). But the \u0027!\u003d\u0027 of these two objects also gives False.","accounts_in_message":[],"_revision_number":2},{"id":"7ecca11aaa4320e1a9677ad4791d92a26ca556cf","author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"date":"2016-12-16 21:38:28.000000000","message":"Patch Set 2:\n\n(2 comments)","accounts_in_message":[],"_revision_number":2},{"id":"84a5fb21428857a0f2f6784039cd916d88f0d2e9","author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"date":"2016-12-16 21:45:01.000000000","message":"Patch Set 2:\n\n\u003e Thank you for your review and reply. I may have given the example\n \u003e with \"server!\u003dNone\", but this issue occurs when a Resource object\n \u003e is checked for equality against any object of of a different class.\n \u003e \n \u003e For example, if an object of client.Client class is equated for\n \u003e equality with an object of base.Resource, the result gives False\n \u003e (as expected). But the \u0027!\u003d\u0027 of these two objects also gives False.\n\nHmm... perhaps my Friday brain isn\u0027t working, but I get the same results before and after the change.\n\n    \u003e\u003e\u003e from novaclient.v2 import usage\n    \u003e\u003e\u003e from novaclient.v2 import servers\n    \u003e\u003e\u003e u \u003d usage \u003d usage.Usage(manager\u003dNone, info\u003d{})\n    \u003e\u003e\u003e s \u003d servers.Server(manager\u003dNone, info\u003d{})\n    \u003e\u003e\u003e u \u003d\u003d s\n    False\n    \u003e\u003e\u003e u !\u003d s\n    True\n\n    \u003e\u003e\u003e from novaclient.v2 import servers\n    \u003e\u003e\u003e from novaclient import base\n    \u003e\u003e\u003e b \u003d base.Resource(manager\u003dNone, info\u003d{})\n    \u003e\u003e\u003e s \u003d servers.Server(manager\u003dNone, info\u003d{})\n    \u003e\u003e\u003e b \u003d\u003d s\n    False\n    \u003e\u003e\u003e b !\u003d s\n    True","accounts_in_message":[],"_revision_number":2},{"id":"b2ab83f2e20632deb84ce3a83a05bc6c0bc79a8c","author":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"date":"2016-12-16 21:47:11.000000000","message":"Patch Set 2:\n\n\u003e (2 comments)\n\nHi Kevin,\nI will add the comments for the next patchset. A quick question for your second comment, should I use the object type or add an object of another type, for instance clients.Clients Or some other type that doesn\u0027t inherit the base.Resource class?","accounts_in_message":[],"_revision_number":2},{"id":"648b2dba81c0fbd4c7f7c450dd64184bc2563b8f","author":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"date":"2016-12-16 21:50:47.000000000","message":"Patch Set 2:\n\n\u003e \u003e Thank you for your review and reply. I may have given the example\n \u003e \u003e with \"server!\u003dNone\", but this issue occurs when a Resource object\n \u003e \u003e is checked for equality against any object of of a different\n \u003e class.\n \u003e \u003e\n \u003e \u003e For example, if an object of client.Client class is equated for\n \u003e \u003e equality with an object of base.Resource, the result gives False\n \u003e \u003e (as expected). But the \u0027!\u003d\u0027 of these two objects also gives\n \u003e False.\n \u003e \n \u003e Hmm... perhaps my Friday brain isn\u0027t working, but I get the same\n \u003e results before and after the change.\n \u003e \n \u003e \u003e\u003e\u003e from novaclient.v2 import usage\n \u003e \u003e\u003e\u003e from novaclient.v2 import servers\n \u003e \u003e\u003e\u003e u \u003d usage \u003d usage.Usage(manager\u003dNone, info\u003d{})\n \u003e \u003e\u003e\u003e s \u003d servers.Server(manager\u003dNone, info\u003d{})\n \u003e \u003e\u003e\u003e u \u003d\u003d s\n \u003e False\n \u003e \u003e\u003e\u003e u !\u003d s\n \u003e True\n \u003e \n \u003e \u003e\u003e\u003e from novaclient.v2 import servers\n \u003e \u003e\u003e\u003e from novaclient import base\n \u003e \u003e\u003e\u003e b \u003d base.Resource(manager\u003dNone, info\u003d{})\n \u003e \u003e\u003e\u003e s \u003d servers.Server(manager\u003dNone, info\u003d{})\n \u003e \u003e\u003e\u003e b \u003d\u003d s\n \u003e False\n \u003e \u003e\u003e\u003e b !\u003d s\n \u003e True\n\nThis is because Usage and Servers both inherit the base.Resource class. The NotImplemented return will not occur until the type of the other object and resource object are different (this is how __eq__ implementation is written). If you try with an object of a class that doesn\u0027t inherit base.Resource, you will False for both \u0027\u003d\u003d\u0027 and \u0027!\u003d\u0027.","accounts_in_message":[],"_revision_number":2},{"id":"ae27d63c39e7e4a1eac4f1f815f034d58fe43a58","author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"date":"2016-12-17 14:07:56.000000000","message":"Patch Set 2:\n\nYou should just be able to use an instance of the primitive type \"object\", e.g.:\n\n    r2 \u003d object()","accounts_in_message":[],"_revision_number":2},{"id":"1f432000c856280231b920eded7fad418b89c1b2","author":{"_account_id":16907,"name":"Diana Clarke","email":"diana.joan.clarke@gmail.com","username":"diana-clarke"},"date":"2016-12-19 14:07:52.000000000","message":"Patch Set 2: -Code-Review\n\n\u003e This is because Usage and Servers both inherit the base.Resource\n \u003e class. The NotImplemented return will not occur until the type of\n \u003e the other object and resource object are different (this is how\n \u003e __eq__ implementation is written). If you try with an object of a\n \u003e class that doesn\u0027t inherit base.Resource, you will False for both\n \u003e \u0027\u003d\u003d\u0027 and \u0027!\u003d\u0027.\n\nAh, I see now.\n\nIn that case, I wonder if __ne__ needs similar logic to __eq__:\n\n        if not isinstance(other, Resource):\n            return NotImplemented\n\nI also wonder if there is git history of interest in the old oslo-incubator version of this code. I\u0027d be curious to see the annotations \u0026 tests for the various changes to __ne__ and __eq__.\n\nPS. Removing my -1 since I\u0027ll be offline for the next couple of weeks.","accounts_in_message":[],"_revision_number":2},{"id":"558f5228c207e2fb6665324e6fa5430fa412a2f9","author":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"date":"2016-12-19 16:39:59.000000000","message":"Patch Set 2:\n\n\u003e \u003e This is because Usage and Servers both inherit the base.Resource\n \u003e \u003e class. The NotImplemented return will not occur until the type of\n \u003e \u003e the other object and resource object are different (this is how\n \u003e \u003e __eq__ implementation is written). If you try with an object of a\n \u003e \u003e class that doesn\u0027t inherit base.Resource, you will False for both\n \u003e \u003e \u0027\u003d\u003d\u0027 and \u0027!\u003d\u0027.\n \u003e \n \u003e Ah, I see now.\n \u003e \n \u003e In that case, I wonder if __ne__ needs similar logic to __eq__:\n \u003e \n \u003e if not isinstance(other, Resource):\n \u003e return NotImplemented\n \u003e \n \u003e I also wonder if there is git history of interest in the old\n \u003e oslo-incubator version of this code. I\u0027d be curious to see the\n \u003e annotations \u0026 tests for the various changes to __ne__ and __eq__.\n \u003e \n \u003e PS. Removing my -1 since I\u0027ll be offline for the next couple of\n \u003e weeks.\n\nDiane, we can discuss this once you\u0027re back from your holidays. Till then I\u0027ll make changes according to Kevin\u0027s comments.\nHave a Merry Christmas and a very Happy New Year.","accounts_in_message":[],"_revision_number":2},{"id":"e92ad5a3c7e4bfb3e133058354af686d9906eb6e","author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"date":"2016-12-19 16:42:14.000000000","message":"Patch Set 2:\n\nand given the use of \u003d\u003d, which is already using the underlying Python logic for handling NotImplemented, it should work (and appears to be working) fine.","accounts_in_message":[],"_revision_number":2},{"id":"f8707fc7423681616287396c2e109ed0b56a303d","author":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"date":"2016-12-19 16:51:49.000000000","message":"Uploaded patch set 3.","accounts_in_message":[],"_revision_number":3},{"id":"e3f338ba9b56922336ab18adb7e30f542476759b","author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"date":"2016-12-19 17:58:34.000000000","message":"Patch Set 3: Code-Review+2\n\n(1 comment)","accounts_in_message":[],"_revision_number":3},{"id":"7f4ff784608dd29bdcd6e84099f773186d898bbf","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-12-19 18:08:37.000000000","message":"Patch Set 3: Verified+1\n\nBuild succeeded (check pipeline).\n\n- gate-python-novaclient-docs-ubuntu-xenial http://docs-draft.openstack.org/49/409549/3/check/gate-python-novaclient-docs-ubuntu-xenial/6f0a18a//doc/build/html/ : SUCCESS in 1m 39s\n- gate-python-novaclient-pep8-ubuntu-xenial http://logs.openstack.org/49/409549/3/check/gate-python-novaclient-pep8-ubuntu-xenial/16eb85f/ : SUCCESS in 1m 48s\n- gate-python-novaclient-python27-ubuntu-xenial http://logs.openstack.org/49/409549/3/check/gate-python-novaclient-python27-ubuntu-xenial/f14908e/ : SUCCESS in 2m 48s\n- gate-python-novaclient-python35-nv http://logs.openstack.org/49/409549/3/check/gate-python-novaclient-python35-nv/0d97a96/ : SUCCESS in 1m 57s (non-voting)\n- gate-tempest-dsvm-neutron-src-python-novaclient-ubuntu-xenial http://logs.openstack.org/49/409549/3/check/gate-tempest-dsvm-neutron-src-python-novaclient-ubuntu-xenial/58621a5/ : SUCCESS in 1h 15m 17s\n- gate-novaclient-dsvm-functional-mitaka-ubuntu-trusty-nv http://logs.openstack.org/49/409549/3/check/gate-novaclient-dsvm-functional-mitaka-ubuntu-trusty-nv/6a96f80/ : SUCCESS in 27m 40s (non-voting)\n- gate-novaclient-dsvm-functional-identity-v3-only-ubuntu-xenial-nv http://logs.openstack.org/49/409549/3/check/gate-novaclient-dsvm-functional-identity-v3-only-ubuntu-xenial-nv/4dbb2c4/ : SUCCESS in 54m 43s (non-voting)\n- gate-novaclient-dsvm-functional-neutron-ubuntu-xenial http://logs.openstack.org/49/409549/3/check/gate-novaclient-dsvm-functional-neutron-ubuntu-xenial/9a3f8e0/ : SUCCESS in 39m 59s","accounts_in_message":[],"_revision_number":3},{"id":"9cb3bf6e147366da9ad41e7b115f713e8b2c07b2","author":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"date":"2016-12-19 18:09:39.000000000","message":"Uploaded patch set 4.","accounts_in_message":[],"_revision_number":4},{"id":"c833fabf903c772ab7acedcb2ac8e809119bcd22","author":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"date":"2016-12-19 18:10:02.000000000","message":"Patch Set 4:\n\n\u003e (1 comment)\n\nSorry about that, added now.","accounts_in_message":[],"_revision_number":4},{"id":"0334ff3fab641fd51b3115956d8c72edea742e4b","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-12-19 19:09:24.000000000","message":"Patch Set 4: Verified+1\n\nBuild succeeded (check pipeline).\n\n- gate-python-novaclient-docs-ubuntu-xenial http://docs-draft.openstack.org/49/409549/4/check/gate-python-novaclient-docs-ubuntu-xenial/15107be//doc/build/html/ : SUCCESS in 1m 43s\n- gate-python-novaclient-pep8-ubuntu-xenial http://logs.openstack.org/49/409549/4/check/gate-python-novaclient-pep8-ubuntu-xenial/d34ca23/ : SUCCESS in 1m 53s\n- gate-python-novaclient-python27-ubuntu-xenial http://logs.openstack.org/49/409549/4/check/gate-python-novaclient-python27-ubuntu-xenial/07448e3/ : SUCCESS in 3m 48s\n- gate-python-novaclient-python35-nv http://logs.openstack.org/49/409549/4/check/gate-python-novaclient-python35-nv/4b75fd9/ : SUCCESS in 2m 48s (non-voting)\n- gate-tempest-dsvm-neutron-src-python-novaclient-ubuntu-xenial http://logs.openstack.org/49/409549/4/check/gate-tempest-dsvm-neutron-src-python-novaclient-ubuntu-xenial/305c441/ : SUCCESS in 53m 09s\n- gate-novaclient-dsvm-functional-mitaka-ubuntu-trusty-nv http://logs.openstack.org/49/409549/4/check/gate-novaclient-dsvm-functional-mitaka-ubuntu-trusty-nv/89f734e/ : SUCCESS in 44m 56s (non-voting)\n- gate-novaclient-dsvm-functional-identity-v3-only-ubuntu-xenial-nv http://logs.openstack.org/49/409549/4/check/gate-novaclient-dsvm-functional-identity-v3-only-ubuntu-xenial-nv/13a1f3a/ : SUCCESS in 58m 02s (non-voting)\n- gate-novaclient-dsvm-functional-neutron-ubuntu-xenial http://logs.openstack.org/49/409549/4/check/gate-novaclient-dsvm-functional-neutron-ubuntu-xenial/350ccd6/ : SUCCESS in 41m 08s","accounts_in_message":[],"_revision_number":4},{"id":"eb99bd81c71c09b93d8f3b24a4cac1dc81c7374a","author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"date":"2016-12-19 19:44:58.000000000","message":"Patch Set 4: Code-Review+2","accounts_in_message":[],"_revision_number":4},{"id":"f991b95348dea34498514ef02024c1599cd5b44c","author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"date":"2016-12-20 23:32:11.000000000","message":"Patch Set 4: Code-Review+2 Workflow+1","accounts_in_message":[],"_revision_number":4},{"id":"1feac11d54ba6631d7dadc531f050561e758bf15","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-12-20 23:32:22.000000000","message":"Patch Set 4: -Verified\n\nStarting gate jobs.\nhttp://status.openstack.org/zuul/","accounts_in_message":[],"_revision_number":4},{"id":"1ed533c6bc7c32b6580dc399c689cf558e299470","date":"2016-12-21 01:24:06.000000000","message":"Change has been successfully merged into the git repository by Jenkins","accounts_in_message":[],"_revision_number":4},{"id":"078ff51eb7178a3eb3685472599b79c3023de9e4","author":{"_account_id":3,"name":"Jenkins","username":"jenkins"},"date":"2016-12-21 01:24:06.000000000","message":"Patch Set 4: Verified+2\n\nBuild succeeded (gate pipeline).\n\n- gate-python-novaclient-docs-ubuntu-xenial http://docs-draft.openstack.org/49/409549/4/gate/gate-python-novaclient-docs-ubuntu-xenial/5d9aff8//doc/build/html/ : SUCCESS in 2m 26s\n- gate-python-novaclient-pep8-ubuntu-xenial http://logs.openstack.org/49/409549/4/gate/gate-python-novaclient-pep8-ubuntu-xenial/71b21a2/ : SUCCESS in 1m 42s\n- gate-python-novaclient-python27-ubuntu-xenial http://logs.openstack.org/49/409549/4/gate/gate-python-novaclient-python27-ubuntu-xenial/1e1ae66/ : SUCCESS in 1m 53s\n- gate-python-novaclient-python35 http://logs.openstack.org/49/409549/4/gate/gate-python-novaclient-python35/0f10f85/ : SUCCESS in 1m 49s\n- gate-tempest-dsvm-neutron-src-python-novaclient-ubuntu-xenial http://logs.openstack.org/49/409549/4/gate/gate-tempest-dsvm-neutron-src-python-novaclient-ubuntu-xenial/3b790be/ : SUCCESS in 1h 51m 15s\n- gate-novaclient-dsvm-functional-neutron-ubuntu-xenial http://logs.openstack.org/49/409549/4/gate/gate-novaclient-dsvm-functional-neutron-ubuntu-xenial/5d70495/ : SUCCESS in 1h 27m 41s","accounts_in_message":[],"_revision_number":4}],"current_revision_number":4,"current_revision":"78e621faf757e3bf4bd8475c29090bb1c83bc0cd","revisions":{"5fc18ecdc6b8f78522c37cca4fbcb0d9404f44fe":{"kind":"REWORK","_number":1,"created":"2016-12-11 21:49:10.000000000","uploader":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"ref":"refs/changes/49/409549/1","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-novaclient","ref":"refs/changes/49/409549/1","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/1 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/1 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/1 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/1"}}},"commit":{"parents":[{"commit":"56bb3dae5ff2a3a51e54d8fa42277602e7b50710","subject":"Replace six.iteritems() with .items()","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/56bb3dae5ff2a3a51e54d8fa42277602e7b50710"}]}],"author":{"name":"Akshil Verma","email":"akshilverma4@gmail.com","date":"2016-12-11 19:37:25.000000000","tz":-360},"committer":{"name":"Akshil Verma","email":"akshilverma4@gmail.com","date":"2016-12-11 19:38:21.000000000","tz":-360},"subject":"Fixed !\u003d in base.Resource","message":"Fixed !\u003d in base.Resource\n\nChange-Id: I6bf5a6e9c9eed4bbcf6678467df19dfea560b4de\nCloses-Bug: #1648207\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/5fc18ecdc6b8f78522c37cca4fbcb0d9404f44fe"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/5fc18ecdc6b8f78522c37cca4fbcb0d9404f44fe"}]},"branch":"refs/heads/master"},"41dd64e90394cde3fd7706c2bb2aec7e85b934b8":{"kind":"REWORK","_number":2,"created":"2016-12-16 20:00:21.000000000","uploader":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"ref":"refs/changes/49/409549/2","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-novaclient","ref":"refs/changes/49/409549/2","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/2 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/2 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/2 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/2"}}},"commit":{"parents":[{"commit":"56bb3dae5ff2a3a51e54d8fa42277602e7b50710","subject":"Replace six.iteritems() with .items()","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/56bb3dae5ff2a3a51e54d8fa42277602e7b50710"}]}],"author":{"name":"Akshil Verma","email":"akshilverma4@gmail.com","date":"2016-12-11 19:37:25.000000000","tz":-360},"committer":{"name":"Akshil Verma","email":"akshilverma4@gmail.com","date":"2016-12-16 19:59:52.000000000","tz":-360},"subject":"Fixed the __ne__ implementation in base.Resource","message":"Fixed the __ne__ implementation in base.Resource\n\nAny object of Resource class or its child class do not compare with\nNone as expected. For example if a server has been found and is\nclearly not None, the test \"server!\u003dNone\" will be False.\n\nThis was occuring because the __eq__ implementation was returning the\n\u0027NotImplemented\u0027 keyword and the __ne__ implementation was returning\nthe not of __eq__, which in this case will return False as the\nexpected python behavior for a the not of NotImplemented is False.\n\nChanged the __ne__ implementation to return the correct boolean value\nand added the test case that fails with the older implementation and\npasses in the current fix.\n\nChange-Id: I6bf5a6e9c9eed4bbcf6678467df19dfea560b4de\nCloses-Bug: #1648207\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/41dd64e90394cde3fd7706c2bb2aec7e85b934b8"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/41dd64e90394cde3fd7706c2bb2aec7e85b934b8"}]},"branch":"refs/heads/master"},"734a6558e2640fca766ded0fdbd2ce0a6708e07e":{"kind":"REWORK","_number":3,"created":"2016-12-19 16:51:49.000000000","uploader":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"ref":"refs/changes/49/409549/3","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-novaclient","ref":"refs/changes/49/409549/3","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/3 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/3 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/3 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/3"}}},"commit":{"parents":[{"commit":"56bb3dae5ff2a3a51e54d8fa42277602e7b50710","subject":"Replace six.iteritems() with .items()","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/56bb3dae5ff2a3a51e54d8fa42277602e7b50710"}]}],"author":{"name":"Akshil Verma","email":"akshilverma4@gmail.com","date":"2016-12-11 19:37:25.000000000","tz":-360},"committer":{"name":"Akshil Verma","email":"akshilverma4@gmail.com","date":"2016-12-19 16:50:36.000000000","tz":-360},"subject":"Fixed the __ne__ implementation in base.Resource","message":"Fixed the __ne__ implementation in base.Resource\n\nAny object of Resource class or its child class do not compare with\nNone as expected. For example if a server has been found and is\nclearly not None, the test \"server!\u003dNone\" will be False.\n\nThis was occuring because the __eq__ implementation was returning the\n\u0027NotImplemented\u0027 keyword and the __ne__ implementation was returning\nthe not of __eq__, which in this case will return False as the\nexpected python behavior for a the not of NotImplemented is False.\n\nChanged the __ne__ implementation to return the correct boolean value\nand added the test case that fails with the older implementation and\npasses in the current fix.\n\nChange-Id: I6bf5a6e9c9eed4bbcf6678467df19dfea560b4de\nCloses-Bug: #1648207\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/734a6558e2640fca766ded0fdbd2ce0a6708e07e"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/734a6558e2640fca766ded0fdbd2ce0a6708e07e"}]},"branch":"refs/heads/master"},"78e621faf757e3bf4bd8475c29090bb1c83bc0cd":{"kind":"REWORK","_number":4,"created":"2016-12-19 18:09:39.000000000","uploader":{"_account_id":24215,"name":"Akshil Verma","email":"akshilverma4@gmail.com","username":"akshilv"},"ref":"refs/changes/49/409549/4","fetch":{"anonymous http":{"url":"https://review.opendev.org/openstack/python-novaclient","ref":"refs/changes/49/409549/4","commands":{"Checkout":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/4 \u0026\u0026 git checkout FETCH_HEAD","Cherry Pick":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/4 \u0026\u0026 git cherry-pick FETCH_HEAD","Format Patch":"git fetch https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/4 \u0026\u0026 git format-patch -1 --stdout FETCH_HEAD","Pull":"git pull https://review.opendev.org/openstack/python-novaclient refs/changes/49/409549/4"}}},"commit":{"parents":[{"commit":"56bb3dae5ff2a3a51e54d8fa42277602e7b50710","subject":"Replace six.iteritems() with .items()","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/56bb3dae5ff2a3a51e54d8fa42277602e7b50710"}]}],"author":{"name":"Akshil Verma","email":"akshilverma4@gmail.com","date":"2016-12-11 19:37:25.000000000","tz":-360},"committer":{"name":"Akshil Verma","email":"akshilverma4@gmail.com","date":"2016-12-19 18:10:03.000000000","tz":-360},"subject":"Fixed the __ne__ implementation in base.Resource","message":"Fixed the __ne__ implementation in base.Resource\n\nAny object of Resource class or its child class do not compare with\nNone as expected. For example if a server has been found and is\nclearly not None, the test \"server!\u003dNone\" will be False.\n\nThis was occuring because the __eq__ implementation was returning the\n\u0027NotImplemented\u0027 keyword and the __ne__ implementation was returning\nthe not of __eq__, which in this case will return False as the\nexpected python behavior for a the not of NotImplemented is False.\n\nChanged the __ne__ implementation to return the correct boolean value\nand added the test case that fails with the older implementation and\npasses in the current fix.\n\nChange-Id: I6bf5a6e9c9eed4bbcf6678467df19dfea560b4de\nCloses-Bug: #1648207\n","web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/78e621faf757e3bf4bd8475c29090bb1c83bc0cd"}],"resolve_conflicts_web_links":[{"name":"gitea","tooltip":"Open in GitWeb","url":"https://opendev.org/openstack/python-novaclient/commit/78e621faf757e3bf4bd8475c29090bb1c83bc0cd"}]},"branch":"refs/heads/master"}},"requirements":[],"submit_records":[],"submit_requirements":[]}
