)]}'
{"ironic/tests/api/test_chassis.py":[{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"7803afc402ac8079422363a5027ef9952ce785bc","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        extra \u003d {\"foo1\": \"bar1\", \"foo2\": \"bar2\", \"foo3\": \"bar3\"}"},{"line_number":182,"context_line":"        cdict \u003d dbutils.get_test_chassis(extra\u003dextra,"},{"line_number":183,"context_line":"                                         uuid\u003dutils.generate_uuid(),"},{"line_number":184,"context_line":"                                         id\u003dNone)"},{"line_number":185,"context_line":"        self.dbapi.create_chassis(cdict)"},{"line_number":186,"context_line":"        new_value \u003d \u0027new value\u0027"},{"line_number":187,"context_line":"        response \u003d self.patch_json(\u0027/chassis/%s\u0027 % cdict[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FFUs%3D","line":184,"updated":"2014-01-17 16:08:04.000000000","message":"It\u0027s not clear for me why ids are set to None here and bellow?","commit_id":"6e5369800e26b6a8a7ae85e467d7b93110056e97"},{"author":{"_account_id":6623,"name":"Roman Prykhodchenko","email":"me@romcheg.me","username":"prykhodchenko"},"change_message_id":"8702138a172c1fa7be33bbfe1a84162185d26151","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        extra \u003d {\"foo1\": \"bar1\", \"foo2\": \"bar2\", \"foo3\": \"bar3\"}"},{"line_number":182,"context_line":"        cdict \u003d dbutils.get_test_chassis(extra\u003dextra,"},{"line_number":183,"context_line":"                                         uuid\u003dutils.generate_uuid(),"},{"line_number":184,"context_line":"                                         id\u003dNone)"},{"line_number":185,"context_line":"        self.dbapi.create_chassis(cdict)"},{"line_number":186,"context_line":"        new_value \u003d \u0027new value\u0027"},{"line_number":187,"context_line":"        response \u003d self.patch_json(\u0027/chassis/%s\u0027 % cdict[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2B51A%3D","line":184,"in_reply_to":"AAAAUH%2F%2FFRU%3D","updated":"2014-01-20 21:59:03.000000000","message":"Ah, that makes sense. Thanks.","commit_id":"6e5369800e26b6a8a7ae85e467d7b93110056e97"},{"author":{"_account_id":7625,"name":"Martyn Taylor","email":"mtaylor@redhat.com","username":"mtaylor"},"change_message_id":"451a6074848922b3bed7b94a84a23663176975a7","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        extra \u003d {\"foo1\": \"bar1\", \"foo2\": \"bar2\", \"foo3\": \"bar3\"}"},{"line_number":182,"context_line":"        cdict \u003d dbutils.get_test_chassis(extra\u003dextra,"},{"line_number":183,"context_line":"                                         uuid\u003dutils.generate_uuid(),"},{"line_number":184,"context_line":"                                         id\u003dNone)"},{"line_number":185,"context_line":"        self.dbapi.create_chassis(cdict)"},{"line_number":186,"context_line":"        new_value \u003d \u0027new value\u0027"},{"line_number":187,"context_line":"        response \u003d self.patch_json(\u0027/chassis/%s\u0027 % cdict[\u0027uuid\u0027],"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2FFRU%3D","line":184,"in_reply_to":"AAAAUH%2F%2FFUs%3D","updated":"2014-01-20 14:43:00.000000000","message":"get_test_chassis specifies an ID in the dict that is returned.  When persisting the object to the DB it will try to use the ID returned via the dict.  Which may cause primary key violations.  I\u0027ve over ridden ID in some cases when primary key conflicts have occurred and repeated where I think appropriate.\n\nI\u0027ve submitted a bug: \"https://bugs.launchpad.net/ironic/+bug/1268589\"\n\nWe should clean up the get_test_\u003cresource\u003e_methods (removing the ID field) then override ID when duplicates are needed for testing.","commit_id":"6e5369800e26b6a8a7ae85e467d7b93110056e97"}],"ironic/tests/api/test_nodes.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d282bc2bc706f362200dde2e58558c49ec401d08","unresolved":false,"context_lines":[{"line_number":515,"context_line":"                          ndict)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    def test_vendor_passthru_ok(self):"},{"line_number":518,"context_line":"        ndict \u003d post_get_test_node()"},{"line_number":519,"context_line":"        self.dbapi.create_node(ndict)"},{"line_number":520,"context_line":"        uuid \u003d ndict[\u0027uuid\u0027]"},{"line_number":521,"context_line":"        info \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FvM4%3D","line":518,"updated":"2014-01-09 03:04:27.000000000","message":"The changes in this file look good, except for this. It looks like post_get_test_node() was written, to handle the post_json call. So it might be cleaner to do something like \n    ndict \u003d dbutils.get_test_node()\nin all the places where you made the switch to.dbapi. create_node().\n\nIn theory, it should work ;)","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":7625,"name":"Martyn Taylor","email":"mtaylor@redhat.com","username":"mtaylor"},"change_message_id":"0ba7b3752d870d978e4945832c1c83be3e24912f","unresolved":false,"context_lines":[{"line_number":515,"context_line":"                          ndict)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    def test_vendor_passthru_ok(self):"},{"line_number":518,"context_line":"        ndict \u003d post_get_test_node()"},{"line_number":519,"context_line":"        self.dbapi.create_node(ndict)"},{"line_number":520,"context_line":"        uuid \u003d ndict[\u0027uuid\u0027]"},{"line_number":521,"context_line":"        info \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fs9U%3D","line":518,"in_reply_to":"AAAAUH%2F%2Fs%2Fk%3D","updated":"2014-01-09 12:39:28.000000000","message":"Sure.  If this works I\u0027ll make the changes.  If it requires a lot of refactoring I\u0027ll follow up with a subsequent patch.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"65cb0e01579c731c943978978297bfcb4370950d","unresolved":false,"context_lines":[{"line_number":515,"context_line":"                          ndict)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    def test_vendor_passthru_ok(self):"},{"line_number":518,"context_line":"        ndict \u003d post_get_test_node()"},{"line_number":519,"context_line":"        self.dbapi.create_node(ndict)"},{"line_number":520,"context_line":"        uuid \u003d ndict[\u0027uuid\u0027]"},{"line_number":521,"context_line":"        info \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fs%2Fk%3D","line":518,"in_reply_to":"AAAAUH%2F%2FvM4%3D","updated":"2014-01-09 12:26:20.000000000","message":"+1","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d76199924592f34f6edcc01668b15a1fce4a0647","unresolved":false,"context_lines":[{"line_number":515,"context_line":"                          ndict)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    def test_vendor_passthru_ok(self):"},{"line_number":518,"context_line":"        ndict \u003d post_get_test_node()"},{"line_number":519,"context_line":"        self.dbapi.create_node(ndict)"},{"line_number":520,"context_line":"        uuid \u003d ndict[\u0027uuid\u0027]"},{"line_number":521,"context_line":"        info \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FUkM%3D","line":518,"updated":"2014-01-15 02:52:09.000000000","message":"Hi, did you try replacing this with ndict \u003d dbutils.get_test_node(). I just tried it and it worked.\n\nWould you please try changing it in all the places where you made the change to self.dbapi.create_node()?","commit_id":"164f8b14bc50af128c5b77921453b9127977fdab"},{"author":{"_account_id":7625,"name":"Martyn Taylor","email":"mtaylor@redhat.com","username":"mtaylor"},"change_message_id":"26848db7ac66f3eb8fa04f7c2bc2b7bc883a597f","unresolved":false,"context_lines":[{"line_number":515,"context_line":"                          ndict)"},{"line_number":516,"context_line":""},{"line_number":517,"context_line":"    def test_vendor_passthru_ok(self):"},{"line_number":518,"context_line":"        ndict \u003d post_get_test_node()"},{"line_number":519,"context_line":"        self.dbapi.create_node(ndict)"},{"line_number":520,"context_line":"        uuid \u003d ndict[\u0027uuid\u0027]"},{"line_number":521,"context_line":"        info \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FS8A%3D","line":518,"in_reply_to":"AAAAUH%2F%2FUkM%3D","updated":"2014-01-15 11:22:12.000000000","message":"Ah, thanks Ruby.  It looks like I didn\u0027t update this file.  I am going to resend with changes.  Good catch.","commit_id":"164f8b14bc50af128c5b77921453b9127977fdab"}],"ironic/tests/api/test_ports.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d282bc2bc706f362200dde2e58558c49ec401d08","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        ndict \u003d dbutils.get_test_node()"},{"line_number":138,"context_line":"        self.node \u003d self.dbapi.create_node(ndict)"},{"line_number":139,"context_line":"        self.pdict \u003d post_get_test_port()"},{"line_number":140,"context_line":"        self.post_json(\u0027/ports\u0027, self.pdict)"},{"line_number":141,"context_line":"        self.addCleanup(timeutils.clear_time_override)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def test_update_byid(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FvMo%3D","line":140,"updated":"2014-01-09 03:04:27.000000000","message":"Was wondering why you didn\u0027t convert this one.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":7625,"name":"Martyn Taylor","email":"mtaylor@redhat.com","username":"mtaylor"},"change_message_id":"0ba7b3752d870d978e4945832c1c83be3e24912f","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        ndict \u003d dbutils.get_test_node()"},{"line_number":138,"context_line":"        self.node \u003d self.dbapi.create_node(ndict)"},{"line_number":139,"context_line":"        self.pdict \u003d post_get_test_port()"},{"line_number":140,"context_line":"        self.post_json(\u0027/ports\u0027, self.pdict)"},{"line_number":141,"context_line":"        self.addCleanup(timeutils.clear_time_override)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def test_update_byid(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Ftbo%3D","line":140,"in_reply_to":"AAAAUH%2F%2FvMo%3D","updated":"2014-01-09 12:39:28.000000000","message":"Must have slipped through the net.  Good catch thanks.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d282bc2bc706f362200dde2e58558c49ec401d08","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self.assertEqual(result[\u0027address\u0027], address)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def test_replace_address_already_exist(self):"},{"line_number":192,"context_line":"        pdict1 \u003d dbutils.get_test_port(address\u003d\u0027aa:aa:aa:aa:aa:aa\u0027,"},{"line_number":193,"context_line":"                                       uuid\u003dutils.generate_uuid(),"},{"line_number":194,"context_line":"                                       id\u003dNone)"},{"line_number":195,"context_line":"        self.dbapi.create_port(pdict1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FvLw%3D","line":192,"updated":"2014-01-09 03:04:27.000000000","message":"Just wondering. Why did you lower-case the address here and below?","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5b0dfd460fd4ce72dc96d57cb0231b8a66a43286","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self.assertEqual(result[\u0027address\u0027], address)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def test_replace_address_already_exist(self):"},{"line_number":192,"context_line":"        pdict1 \u003d dbutils.get_test_port(address\u003d\u0027aa:aa:aa:aa:aa:aa\u0027,"},{"line_number":193,"context_line":"                                       uuid\u003dutils.generate_uuid(),"},{"line_number":194,"context_line":"                                       id\u003dNone)"},{"line_number":195,"context_line":"        self.dbapi.create_port(pdict1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fstg%3D","line":192,"in_reply_to":"AAAAUH%2F%2Fs4Q%3D","updated":"2014-01-09 13:49:10.000000000","message":"Thanks for explaining! I think you mean https://bugs.launchpad.net/ironic/+bug/1265518 :-)","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":7625,"name":"Martyn Taylor","email":"mtaylor@redhat.com","username":"mtaylor"},"change_message_id":"e026bc4a0f768ca55c28c4e62b55f6666efdcd7b","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self.assertEqual(result[\u0027address\u0027], address)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def test_replace_address_already_exist(self):"},{"line_number":192,"context_line":"        pdict1 \u003d dbutils.get_test_port(address\u003d\u0027aa:aa:aa:aa:aa:aa\u0027,"},{"line_number":193,"context_line":"                                       uuid\u003dutils.generate_uuid(),"},{"line_number":194,"context_line":"                                       id\u003dNone)"},{"line_number":195,"context_line":"        self.dbapi.create_port(pdict1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fs4Q%3D","line":192,"in_reply_to":"AAAAUH%2F%2FtaQ%3D","updated":"2014-01-09 13:02:59.000000000","message":"That bug URL should be: https://bugs.launchpad.net/ironic/+bug/1265518","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"65cb0e01579c731c943978978297bfcb4370950d","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self.assertEqual(result[\u0027address\u0027], address)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def test_replace_address_already_exist(self):"},{"line_number":192,"context_line":"        pdict1 \u003d dbutils.get_test_port(address\u003d\u0027aa:aa:aa:aa:aa:aa\u0027,"},{"line_number":193,"context_line":"                                       uuid\u003dutils.generate_uuid(),"},{"line_number":194,"context_line":"                                       id\u003dNone)"},{"line_number":195,"context_line":"        self.dbapi.create_port(pdict1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FtBI%3D","line":192,"in_reply_to":"AAAAUH%2F%2FvLw%3D","updated":"2014-01-09 12:26:20.000000000","message":"It\u0027s because the API will normalize the MAC address to lower case before inserting in the db.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":7625,"name":"Martyn Taylor","email":"mtaylor@redhat.com","username":"mtaylor"},"change_message_id":"0ba7b3752d870d978e4945832c1c83be3e24912f","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self.assertEqual(result[\u0027address\u0027], address)"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def test_replace_address_already_exist(self):"},{"line_number":192,"context_line":"        pdict1 \u003d dbutils.get_test_port(address\u003d\u0027aa:aa:aa:aa:aa:aa\u0027,"},{"line_number":193,"context_line":"                                       uuid\u003dutils.generate_uuid(),"},{"line_number":194,"context_line":"                                       id\u003dNone)"},{"line_number":195,"context_line":"        self.dbapi.create_port(pdict1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FtaQ%3D","line":192,"in_reply_to":"AAAAUH%2F%2FvLw%3D","updated":"2014-01-09 12:39:28.000000000","message":"When writing straight to the database the MAC addresses are not converted to lower case.  There is currently a bug (https://bugs.launchpad.net/ironic/+bug/1265518) that does not recognised duplicate MAC addresses when comparing upper and lower case versions of the same MAC address.  \n\nMAC addresses are forced to lower case during the POST / PUT phase.  To mirror the same behaviour and to avoid the bug described above surfacing in these tests we use lower case.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d282bc2bc706f362200dde2e58558c49ec401d08","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def test_replace_multi(self):"},{"line_number":222,"context_line":"        extra \u003d {\"foo1\": \"bar1\", \"foo2\": \"bar2\", \"foo3\": \"bar3\"}"},{"line_number":223,"context_line":"        pdict \u003d post_get_test_port(extra\u003dextra,"},{"line_number":224,"context_line":"                                   address\u003d\"AA:BB:CC:DD:EE:FF\","},{"line_number":225,"context_line":"                                   uuid\u003dutils.generate_uuid(),"},{"line_number":226,"context_line":"                                   id\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FvI8%3D","line":223,"updated":"2014-01-09 03:04:27.000000000","message":"why not pdict \u003d dbutils.get_test_port(...)","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":7625,"name":"Martyn Taylor","email":"mtaylor@redhat.com","username":"mtaylor"},"change_message_id":"0ba7b3752d870d978e4945832c1c83be3e24912f","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def test_replace_multi(self):"},{"line_number":222,"context_line":"        extra \u003d {\"foo1\": \"bar1\", \"foo2\": \"bar2\", \"foo3\": \"bar3\"}"},{"line_number":223,"context_line":"        pdict \u003d post_get_test_port(extra\u003dextra,"},{"line_number":224,"context_line":"                                   address\u003d\"AA:BB:CC:DD:EE:FF\","},{"line_number":225,"context_line":"                                   uuid\u003dutils.generate_uuid(),"},{"line_number":226,"context_line":"                                   id\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fs8U%3D","line":223,"in_reply_to":"AAAAUH%2F%2FvI8%3D","updated":"2014-01-09 12:39:28.000000000","message":"Same comment as previous.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d282bc2bc706f362200dde2e58558c49ec401d08","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"    def test_remove_multi(self):"},{"line_number":241,"context_line":"        extra \u003d {\"foo1\": \"bar1\", \"foo2\": \"bar2\", \"foo3\": \"bar3\"}"},{"line_number":242,"context_line":"        pdict \u003d post_get_test_port(extra\u003dextra,"},{"line_number":243,"context_line":"                                   address\u003d\"aa:bb:cc:dd:ee:ff\","},{"line_number":244,"context_line":"                                   uuid\u003dutils.generate_uuid(),"},{"line_number":245,"context_line":"                                   id\u003dNone)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FvH0%3D","line":242,"updated":"2014-01-09 03:04:27.000000000","message":"ditto.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d282bc2bc706f362200dde2e58558c49ec401d08","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        self.assertEqual(result[\u0027address\u0027], pdict[\u0027address\u0027])"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def test_remove_mandatory_field(self):"},{"line_number":270,"context_line":"        pdict \u003d post_get_test_port(address\u003d\"AA:BB:CC:DD:EE:FF\","},{"line_number":271,"context_line":"                                   uuid\u003dutils.generate_uuid(),"},{"line_number":272,"context_line":"                                   id\u003dNone)"},{"line_number":273,"context_line":"        self.dbapi.create_port(pdict)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FvGQ%3D","line":270,"updated":"2014-01-09 03:04:27.000000000","message":"I think these two lines are not necessary since a port already exists (created in setUp()). You should be able to delete them and change pdict[\u0027uuid\u0027] to self.pdict[\u0027uuid\u0027] in the .patch_json() call below.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5b0dfd460fd4ce72dc96d57cb0231b8a66a43286","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        self.assertEqual(result[\u0027address\u0027], pdict[\u0027address\u0027])"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def test_remove_mandatory_field(self):"},{"line_number":270,"context_line":"        pdict \u003d post_get_test_port(address\u003d\"AA:BB:CC:DD:EE:FF\","},{"line_number":271,"context_line":"                                   uuid\u003dutils.generate_uuid(),"},{"line_number":272,"context_line":"                                   id\u003dNone)"},{"line_number":273,"context_line":"        self.dbapi.create_port(pdict)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fss8%3D","line":270,"in_reply_to":"AAAAUH%2F%2Fs84%3D","updated":"2014-01-09 13:49:10.000000000","message":"Yes, that\u0027s true. It is up to you -- change to use dbutils.get_test_port() or just delete these lines, etc :-)","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":7625,"name":"Martyn Taylor","email":"mtaylor@redhat.com","username":"mtaylor"},"change_message_id":"0ba7b3752d870d978e4945832c1c83be3e24912f","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        self.assertEqual(result[\u0027address\u0027], pdict[\u0027address\u0027])"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def test_remove_mandatory_field(self):"},{"line_number":270,"context_line":"        pdict \u003d post_get_test_port(address\u003d\"AA:BB:CC:DD:EE:FF\","},{"line_number":271,"context_line":"                                   uuid\u003dutils.generate_uuid(),"},{"line_number":272,"context_line":"                                   id\u003dNone)"},{"line_number":273,"context_line":"        self.dbapi.create_port(pdict)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fs84%3D","line":270,"in_reply_to":"AAAAUH%2F%2FvGQ%3D","updated":"2014-01-09 12:39:28.000000000","message":"I agree.  Though the idea of this patch is really about replacing the POST calls with database create calls.  Refactoring the tests can be followed up in subsequent patch.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d282bc2bc706f362200dde2e58558c49ec401d08","unresolved":false,"context_lines":[{"line_number":318,"context_line":"    def test_update_address_invalid_format(self):"},{"line_number":319,"context_line":"        pdict \u003d post_get_test_port(address\u003d\"AA:BB:CC:DD:EE:FF\","},{"line_number":320,"context_line":"                                   uuid\u003dutils.generate_uuid())"},{"line_number":321,"context_line":"        self.post_json(\u0027/ports\u0027, pdict)"},{"line_number":322,"context_line":"        response \u003d self.patch_json(\u0027/ports/%s\u0027 % pdict[\u0027uuid\u0027],"},{"line_number":323,"context_line":"                                   [{\u0027path\u0027: \u0027/address\u0027,"},{"line_number":324,"context_line":"                                     \u0027value\u0027: \u0027invalid-format\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FvFo%3D","line":321,"updated":"2014-01-09 03:04:27.000000000","message":"Why didn\u0027t you convert this? But...\n\nI think these two lines are not necessary since a port already exists (created in setUp()). You should be able to delete them and change pdict[\u0027uuid\u0027] to self.pdict[\u0027uuid\u0027] in the .patch_json() call below.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":7625,"name":"Martyn Taylor","email":"mtaylor@redhat.com","username":"mtaylor"},"change_message_id":"e026bc4a0f768ca55c28c4e62b55f6666efdcd7b","unresolved":false,"context_lines":[{"line_number":318,"context_line":"    def test_update_address_invalid_format(self):"},{"line_number":319,"context_line":"        pdict \u003d post_get_test_port(address\u003d\"AA:BB:CC:DD:EE:FF\","},{"line_number":320,"context_line":"                                   uuid\u003dutils.generate_uuid())"},{"line_number":321,"context_line":"        self.post_json(\u0027/ports\u0027, pdict)"},{"line_number":322,"context_line":"        response \u003d self.patch_json(\u0027/ports/%s\u0027 % pdict[\u0027uuid\u0027],"},{"line_number":323,"context_line":"                                   [{\u0027path\u0027: \u0027/address\u0027,"},{"line_number":324,"context_line":"                                     \u0027value\u0027: \u0027invalid-format\u0027,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fs4E%3D","line":321,"in_reply_to":"AAAAUH%2F%2FvFo%3D","updated":"2014-01-09 13:02:59.000000000","message":"This one must have slipped as well.  I will convert the POST to DB create but keep the same behaviour.  We can follow this patch up with refactor tests patch to fix these issues.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d282bc2bc706f362200dde2e58558c49ec401d08","unresolved":false,"context_lines":[{"line_number":455,"context_line":"        super(TestDelete, self).setUp()"},{"line_number":456,"context_line":"        ndict \u003d dbutils.get_test_node()"},{"line_number":457,"context_line":"        self.node \u003d self.dbapi.create_node(ndict)"},{"line_number":458,"context_line":"        pdict \u003d post_get_test_port(id\u003dNone)"},{"line_number":459,"context_line":"        self.dbapi.create_port(pdict)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def test_delete_port_byid(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FvBY%3D","line":458,"updated":"2014-01-09 03:04:27.000000000","message":"pdict \u003d dbutils.get_test_port()? \n\nno need to specify id\u003dNone?","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"5b0dfd460fd4ce72dc96d57cb0231b8a66a43286","unresolved":false,"context_lines":[{"line_number":455,"context_line":"        super(TestDelete, self).setUp()"},{"line_number":456,"context_line":"        ndict \u003d dbutils.get_test_node()"},{"line_number":457,"context_line":"        self.node \u003d self.dbapi.create_node(ndict)"},{"line_number":458,"context_line":"        pdict \u003d post_get_test_port(id\u003dNone)"},{"line_number":459,"context_line":"        self.dbapi.create_port(pdict)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def test_delete_port_byid(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2FssE%3D","line":458,"in_reply_to":"AAAAUH%2F%2Fs8c%3D","updated":"2014-01-09 13:49:10.000000000","message":"Makes sense to have a cleanup patch for id and not specify id\u003dNone here.","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":7625,"name":"Martyn Taylor","email":"mtaylor@redhat.com","username":"mtaylor"},"change_message_id":"0ba7b3752d870d978e4945832c1c83be3e24912f","unresolved":false,"context_lines":[{"line_number":455,"context_line":"        super(TestDelete, self).setUp()"},{"line_number":456,"context_line":"        ndict \u003d dbutils.get_test_node()"},{"line_number":457,"context_line":"        self.node \u003d self.dbapi.create_node(ndict)"},{"line_number":458,"context_line":"        pdict \u003d post_get_test_port(id\u003dNone)"},{"line_number":459,"context_line":"        self.dbapi.create_port(pdict)"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def test_delete_port_byid(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2Fs8c%3D","line":458,"in_reply_to":"AAAAUH%2F%2FvBY%3D","updated":"2014-01-09 12:39:28.000000000","message":"Test ports specify the ID by default.  Since we are using the database call direct here, we\u0027d like to leave the database to autogenerate an ID.  However, this could be followed up in a test clean up patch (it\u0027s not directly related to the bug this patch addresses).","commit_id":"e1bd9cd04130df3420f467932eb3fdc676679931"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"d76199924592f34f6edcc01668b15a1fce4a0647","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    def test_replace_multi(self):"},{"line_number":219,"context_line":"        extra \u003d {\"foo1\": \"bar1\", \"foo2\": \"bar2\", \"foo3\": \"bar3\"}"},{"line_number":220,"context_line":"        pdict \u003d dbutils.get_test_port(extra\u003dextra,"},{"line_number":221,"context_line":"                                   address\u003d\"AA:BB:CC:DD:EE:FF\","},{"line_number":222,"context_line":"                                   uuid\u003dutils.generate_uuid())"},{"line_number":223,"context_line":"        self.dbapi.create_port(pdict)"},{"line_number":224,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FUl4%3D","line":221,"updated":"2014-01-15 02:52:09.000000000","message":"in test_replace_address_already_exist, you lowercased the address, but not here, or in some of the other tests below. I guess I didn\u0027t quite understand your explanation in the previous patch set. Not that it really matters, I guess.","commit_id":"164f8b14bc50af128c5b77921453b9127977fdab"},{"author":{"_account_id":7625,"name":"Martyn Taylor","email":"mtaylor@redhat.com","username":"mtaylor"},"change_message_id":"26848db7ac66f3eb8fa04f7c2bc2b7bc883a597f","unresolved":false,"context_lines":[{"line_number":218,"context_line":"    def test_replace_multi(self):"},{"line_number":219,"context_line":"        extra \u003d {\"foo1\": \"bar1\", \"foo2\": \"bar2\", \"foo3\": \"bar3\"}"},{"line_number":220,"context_line":"        pdict \u003d dbutils.get_test_port(extra\u003dextra,"},{"line_number":221,"context_line":"                                   address\u003d\"AA:BB:CC:DD:EE:FF\","},{"line_number":222,"context_line":"                                   uuid\u003dutils.generate_uuid())"},{"line_number":223,"context_line":"        self.dbapi.create_port(pdict)"},{"line_number":224,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FS8U%3D","line":221,"in_reply_to":"AAAAUH%2F%2FUl4%3D","updated":"2014-01-15 11:22:12.000000000","message":"Hi Ruby,\n\nYes.  The main reason for that is that the test_replace_address_already_exist is testing to see that if we do enter 2 of the same MAC addresses then the API throws an error.  Because we are specifically testing the MAC address duplication here, we need to create a scenario when the MAC duplication check fails (or returns false).  The bug I pointed at earlier, means that for PATCH, the MAC duplication is not caught when storing upper case MACs straight in the DB.\n\nIn the test above we are only testing that the replace operation works in Patch.  (We do not want the MAC address check to fail).  So we do not need to lower case the address.","commit_id":"164f8b14bc50af128c5b77921453b9127977fdab"}]}
