)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"014c018ae614545a1c87dab715b489e72a5703a5","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DistributedVirtualRouter mac address to OVO"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch introduces Oslo VersionedObject for the"},{"line_number":10,"context_line":"DistributedVirtualRouter mac address."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Change-Id: I3b8a213a7daf95d2492b48ae59d3ad534911e1bb"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":20,"id":"9a629dbe_e362393d","line":10,"range":{"start_line":9,"start_character":0,"end_line":10,"end_character":37},"updated":"2016-11-11 19:37:55.000000000","message":"this patch does include integration dvr ovo. please include it in the commit message","commit_id":"d7c982e34ca993e1821f596c18b606bb70a71924"}],"neutron/db/dvr_mac_db.py":[{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7bb4ef6624e8491ca7b2a73b0dabdd42d3f50275","unresolved":false,"context_lines":[{"line_number":33,"context_line":"from neutron.db import models_v2"},{"line_number":34,"context_line":"from neutron.extensions import dvr as ext_dvr"},{"line_number":35,"context_line":"from neutron.extensions import portbindings"},{"line_number":36,"context_line":"from neutron.objects import dvr as dvr_objs"},{"line_number":37,"context_line":"from neutron import manager"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"_deprecate._moved_global(\u0027DistributedVirtualRouterMacAddress\u0027,"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_1ab4d2cf","line":36,"updated":"2016-10-17 17:53:52.000000000","message":"This line has a wrong alphabetical order.","commit_id":"559b8eabad1cb84fbc41e8fb341b0aa74df143a3"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7bb4ef6624e8491ca7b2a73b0dabdd42d3f50275","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        # there are still agents on this host, don\u0027t mess with the mac entry"},{"line_number":69,"context_line":"        # until they are all deleted."},{"line_number":70,"context_line":"        return"},{"line_number":71,"context_line":"    try:"},{"line_number":72,"context_line":"        dvr_obj \u003d dvr_objs.DVRMacAddress.get_object("},{"line_number":73,"context_line":"            context,"},{"line_number":74,"context_line":"            host\u003dhost"},{"line_number":75,"context_line":"        )"},{"line_number":76,"context_line":"        dvr_obj.delete()"},{"line_number":77,"context_line":"    except exc.NoResultFound:"},{"line_number":78,"context_line":"        return"},{"line_number":79,"context_line":"    # notify remaining agents so they cleanup flows"},{"line_number":80,"context_line":"    dvr_macs \u003d plugin.get_dvr_mac_address_list(context)"},{"line_number":81,"context_line":"    plugin.notifier.dvr_mac_address_update(context, dvr_macs)"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_da7c1aee","line":78,"range":{"start_line":71,"start_character":0,"end_line":78,"end_character":14},"updated":"2016-10-17 17:53:52.000000000","message":"I don\u0027t think that you need to keep the try/expect section here .\n    dvr_obj \u003d dvr_objs.DVRMacAddress.get_objects(context, host\u003dhost)\n    if not dvr_obj:\n        return\n    dvr_obj.delete()","commit_id":"559b8eabad1cb84fbc41e8fb341b0aa74df143a3"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7bb4ef6624e8491ca7b2a73b0dabdd42d3f50275","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        return self._plugin"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def _get_dvr_mac_address_by_host(self, context, host):"},{"line_number":103,"context_line":"        try:"},{"line_number":104,"context_line":"            dvr_obj \u003d dvr_objs.DVRMacAddress.get_object("},{"line_number":105,"context_line":"                context,"},{"line_number":106,"context_line":"                host\u003dhost"},{"line_number":107,"context_line":"            )"},{"line_number":108,"context_line":"        except exc.NoResultFound:"},{"line_number":109,"context_line":"            raise ext_dvr.DVRMacAddressNotFound(host\u003dhost)"},{"line_number":110,"context_line":"        return dvr_obj"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    @utils.transaction_guard"},{"line_number":113,"context_line":"    @db_api.retry_if_session_inactive()"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_5a21eab3","line":110,"range":{"start_line":103,"start_character":8,"end_line":110,"end_character":22},"updated":"2016-10-17 17:53:52.000000000","message":"Similar thing of the line 71","commit_id":"559b8eabad1cb84fbc41e8fb341b0aa74df143a3"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7bb4ef6624e8491ca7b2a73b0dabdd42d3f50275","unresolved":false,"context_lines":[{"line_number":113,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":114,"context_line":"    def _create_dvr_mac_address_retry(self, context, host, base_mac):"},{"line_number":115,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":116,"context_line":"            mac_address \u003d utils.get_random_mac(base_mac)"},{"line_number":117,"context_line":"            dvr_mac_binding \u003d dvr_models.DistributedVirtualRouterMacAddress("},{"line_number":118,"context_line":"                host\u003dhost, mac_address\u003dmac_address)"},{"line_number":119,"context_line":"            context.session.add(dvr_mac_binding)"},{"line_number":120,"context_line":"            LOG.debug(\"Generated DVR mac for host %(host)s \""},{"line_number":121,"context_line":"                      \"is %(mac_address)s\","},{"line_number":122,"context_line":"                      {\u0027host\u0027: host, \u0027mac_address\u0027: mac_address})"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_f59e4fb7","line":119,"range":{"start_line":116,"start_character":12,"end_line":119,"end_character":48},"updated":"2016-10-17 17:53:52.000000000","message":"Do you have plans to replace these lines?","commit_id":"559b8eabad1cb84fbc41e8fb341b0aa74df143a3"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7bb4ef6624e8491ca7b2a73b0dabdd42d3f50275","unresolved":false,"context_lines":[{"line_number":137,"context_line":"        raise ext_dvr.MacAddressGenerationFailure(host\u003dhost)"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    def get_dvr_mac_address_list(self, context):"},{"line_number":140,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":141,"context_line":"            return (context.session."},{"line_number":142,"context_line":"                    query(dvr_models.DistributedVirtualRouterMacAddress).all())"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def get_dvr_mac_address_by_host(self, context, host):"},{"line_number":145,"context_line":"        \"\"\"Determine the MAC for the DVR port associated to host.\"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_d5ceabb6","line":142,"range":{"start_line":140,"start_character":8,"end_line":142,"end_character":79},"updated":"2016-10-17 17:53:52.000000000","message":"ditto: line 116","commit_id":"559b8eabad1cb84fbc41e8fb341b0aa74df143a3"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"014c018ae614545a1c87dab715b489e72a5703a5","unresolved":false,"context_lines":[{"line_number":32,"context_line":"from neutron.extensions import dvr as ext_dvr"},{"line_number":33,"context_line":"from neutron.extensions import portbindings"},{"line_number":34,"context_line":"from neutron import manager"},{"line_number":35,"context_line":"from neutron.objects import base"},{"line_number":36,"context_line":"from neutron.objects import dvr as dvr_objs"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"_deprecate._moved_global(\u0027DistributedVirtualRouterMacAddress\u0027,"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a629dbe_63570958","line":35,"range":{"start_line":35,"start_character":0,"end_line":35,"end_character":32},"updated":"2016-11-11 19:37:55.000000000","message":"from neutron.objects import exceptions","commit_id":"d7c982e34ca993e1821f596c18b606bb70a71924"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"014c018ae614545a1c87dab715b489e72a5703a5","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        base_mac \u003d cfg.CONF.dvr_base_mac.split(\u0027:\u0027)"},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            return self._create_dvr_mac_address_retry(context, host, base_mac)"},{"line_number":132,"context_line":"        except base.NeutronDbObjectDuplicateEntry:"},{"line_number":133,"context_line":"            LOG.error(_LE(\"MAC generation error after %s attempts\"),"},{"line_number":134,"context_line":"                      db_api.MAX_RETRIES)"},{"line_number":135,"context_line":"        raise ext_dvr.MacAddressGenerationFailure(host\u003dhost)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9a629dbe_a34841cd","line":132,"range":{"start_line":132,"start_character":15,"end_line":132,"end_character":49},"updated":"2016-11-11 19:37:55.000000000","message":"NeutronDbObjectDuplicateEntry has moved to [1]\n[1] https://github.com/openstack/neutron/blob/master/neutron/objects/exceptions.py","commit_id":"d7c982e34ca993e1821f596c18b606bb70a71924"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"428f3a97b0cbf13edb47acf8611a1050857450ac","unresolved":false,"context_lines":[{"line_number":129,"context_line":"        base_mac \u003d cfg.CONF.dvr_base_mac.split(\u0027:\u0027)"},{"line_number":130,"context_line":"        try:"},{"line_number":131,"context_line":"            return self._create_dvr_mac_address_retry(context, host, base_mac)"},{"line_number":132,"context_line":"        except base.NeutronDbObjectDuplicateEntry:"},{"line_number":133,"context_line":"            LOG.error(_LE(\"MAC generation error after %s attempts\"),"},{"line_number":134,"context_line":"                      db_api.MAX_RETRIES)"},{"line_number":135,"context_line":"        raise ext_dvr.MacAddressGenerationFailure(host\u003dhost)"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a77a97e_4afa5c44","line":132,"range":{"start_line":132,"start_character":15,"end_line":132,"end_character":49},"in_reply_to":"9a629dbe_a34841cd","updated":"2016-11-17 18:26:51.000000000","message":"Done","commit_id":"d7c982e34ca993e1821f596c18b606bb70a71924"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"9d33e1f4919f311f6a40306590c766f060618a13","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        raise ext_dvr.MacAddressGenerationFailure(host\u003dhost)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def get_dvr_mac_address_list(self, context):"},{"line_number":138,"context_line":"        return dvr_objs.DVRMacAddress.get_objects(context)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def get_dvr_mac_address_by_host(self, context, host):"},{"line_number":141,"context_line":"        \"\"\"Determine the MAC for the DVR port associated to host.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"9a629dbe_653c4d30","line":138,"range":{"start_line":138,"start_character":8,"end_line":138,"end_character":58},"updated":"2016-11-07 14:11:13.000000000","message":"The only concern is here we are returning the OVO to RPC layer, since tests are passing, we are safe.","commit_id":"d7c982e34ca993e1821f596c18b606bb70a71924"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"428f3a97b0cbf13edb47acf8611a1050857450ac","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        raise ext_dvr.MacAddressGenerationFailure(host\u003dhost)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    def get_dvr_mac_address_list(self, context):"},{"line_number":138,"context_line":"        return dvr_objs.DVRMacAddress.get_objects(context)"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"    def get_dvr_mac_address_by_host(self, context, host):"},{"line_number":141,"context_line":"        \"\"\"Determine the MAC for the DVR port associated to host.\"\"\""}],"source_content_type":"text/x-python","patch_set":20,"id":"7a77a97e_eaea4873","line":138,"range":{"start_line":138,"start_character":8,"end_line":138,"end_character":58},"in_reply_to":"9a629dbe_653c4d30","updated":"2016-11-17 18:26:51.000000000","message":"Done","commit_id":"d7c982e34ca993e1821f596c18b606bb70a71924"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"bdd3880abcaf4d9b4338a6f6ecb9ee9e5d4a398d","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        # until they are all deleted."},{"line_number":69,"context_line":"        return"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    dvr_obj \u003d dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)"},{"line_number":72,"context_line":"    if not dvr_obj:"},{"line_number":73,"context_line":"        return"},{"line_number":74,"context_line":"    dvr_obj.delete()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    # notify remaining agents so they cleanup flows"},{"line_number":77,"context_line":"    dvr_macs \u003d plugin.get_dvr_mac_address_list(context)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5a74a57a_7634e549","line":74,"range":{"start_line":71,"start_character":3,"end_line":74,"end_character":20},"updated":"2016-11-30 12:44:47.000000000","message":"As stated in other review, we may need session tracking when fetching the object and deleting it, since it can be deleted concurrently in other thread.\n\n    with context.session.begin(subtransactions\u003dTrue):\n        dvr_obj \u003d dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)\n        if dvr_obj:\n            dvr_obj.delete()\n\nI think that \u0027if not\u0027 statement is not needed here.","commit_id":"fc5668017ae6bf90529e870eae0fc6dfe28e3ffb"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7a849ee9a99eeb6aa7a31ac594936888f13c73f2","unresolved":false,"context_lines":[{"line_number":68,"context_line":"        # until they are all deleted."},{"line_number":69,"context_line":"        return"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    dvr_obj \u003d dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)"},{"line_number":72,"context_line":"    if not dvr_obj:"},{"line_number":73,"context_line":"        return"},{"line_number":74,"context_line":"    dvr_obj.delete()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    # notify remaining agents so they cleanup flows"},{"line_number":77,"context_line":"    dvr_macs \u003d plugin.get_dvr_mac_address_list(context)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5a74a57a_a9d0ceca","line":74,"range":{"start_line":71,"start_character":3,"end_line":74,"end_character":20},"in_reply_to":"5a74a57a_7634e549","updated":"2016-11-30 15:57:41.000000000","message":"https://review.openstack.org/#/c/358845/17/neutron/plugins/ml2/drivers/type_flat.py@115","commit_id":"fc5668017ae6bf90529e870eae0fc6dfe28e3ffb"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"9aa04e8a8aafdba355059b4bd6743b432528029e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        return"},{"line_number":70,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":71,"context_line":"        dvr_obj \u003d dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)"},{"line_number":72,"context_line":"        if not dvr_obj:"},{"line_number":73,"context_line":"            return"},{"line_number":74,"context_line":"        dvr_obj.delete()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    # notify remaining agents so they cleanup flows"},{"line_number":77,"context_line":"    dvr_macs \u003d plugin.get_dvr_mac_address_list(context)"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a74a57a_1dd1fbcd","line":74,"range":{"start_line":72,"start_character":8,"end_line":74,"end_character":24},"updated":"2016-11-30 17:06:02.000000000","message":"It can be:\n    if dvr_obj:\n        dvr_obj.delete()","commit_id":"ba2d1a94128d21319a4cffb8a12ad782327a8351"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"fb7b683dcdb87bb7b9403248d981448905b6cb95","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        return"},{"line_number":70,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":71,"context_line":"        dvr_obj \u003d dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)"},{"line_number":72,"context_line":"        if not dvr_obj:"},{"line_number":73,"context_line":"            return"},{"line_number":74,"context_line":"        dvr_obj.delete()"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    # notify remaining agents so they cleanup flows"},{"line_number":77,"context_line":"    dvr_macs \u003d plugin.get_dvr_mac_address_list(context)"}],"source_content_type":"text/x-python","patch_set":24,"id":"3a71b18c_639070ed","line":74,"range":{"start_line":72,"start_character":8,"end_line":74,"end_character":24},"in_reply_to":"5a74a57a_1dd1fbcd","updated":"2016-12-02 17:47:37.000000000","message":"Done","commit_id":"ba2d1a94128d21319a4cffb8a12ad782327a8351"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"84ff68f5c34c655ec6e4bb7001ff991316b0fcfa","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        # there are still agents on this host, don\u0027t mess with the mac entry"},{"line_number":68,"context_line":"        # until they are all deleted."},{"line_number":69,"context_line":"        return"},{"line_number":70,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":71,"context_line":"        dvr_obj \u003d dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)"},{"line_number":72,"context_line":"        if dvr_obj:"},{"line_number":73,"context_line":"            dvr_obj.delete()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # notify remaining agents so they cleanup flows"},{"line_number":76,"context_line":"    dvr_macs \u003d plugin.get_dvr_mac_address_list(context)"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a71b18c_6002c20b","line":73,"range":{"start_line":70,"start_character":4,"end_line":73,"end_character":28},"updated":"2016-12-06 09:44:52.000000000","message":"We can shorten those lines into calling delete_objects() when ready:\nhttps://review.openstack.org/#/c/403832\n\nTo be complementary to origin implementation, we should do something like:\n    if (not dvr_objs.DVRMacAddress.delete_objects(\n        context, host\u003dhost)):\n        return\n\nIf no result is found, the lines 76-77 should not execute.","commit_id":"ec090f9576246066f91ad4a72e4302b8beef04f5"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"8773a69d91c8041383f4b7e5b6567faef157b774","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        # there are still agents on this host, don\u0027t mess with the mac entry"},{"line_number":68,"context_line":"        # until they are all deleted."},{"line_number":69,"context_line":"        return"},{"line_number":70,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":71,"context_line":"        dvr_obj \u003d dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)"},{"line_number":72,"context_line":"        if dvr_obj:"},{"line_number":73,"context_line":"            dvr_obj.delete()"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # notify remaining agents so they cleanup flows"},{"line_number":76,"context_line":"    dvr_macs \u003d plugin.get_dvr_mac_address_list(context)"}],"source_content_type":"text/x-python","patch_set":25,"id":"3a71b18c_2a45c016","line":73,"range":{"start_line":70,"start_character":4,"end_line":73,"end_character":28},"in_reply_to":"3a71b18c_6002c20b","updated":"2016-12-27 05:10:29.000000000","message":"Done","commit_id":"ec090f9576246066f91ad4a72e4302b8beef04f5"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"a0ced794de385ac5d4992f3fe8d0c0a3b512204a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        # there are still agents on this host, don\u0027t mess with the mac entry"},{"line_number":68,"context_line":"        # until they are all deleted."},{"line_number":69,"context_line":"        return"},{"line_number":70,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":71,"context_line":"        if (not dvr_objs.DVRMacAddress.delete_objects(context, host\u003dhost)):"},{"line_number":72,"context_line":"            return"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ba5201f7_56cb2ba5","line":70,"updated":"2017-01-04 16:24:54.000000000","message":"This is not needed here as delete_objects has the transaction.","commit_id":"68b37520a948006b0807fd52154b2bd7db5e47a3"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"60983333b49b7ed290a32aeaa725ec74e4644487","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        # there are still agents on this host, don\u0027t mess with the mac entry"},{"line_number":68,"context_line":"        # until they are all deleted."},{"line_number":69,"context_line":"        return"},{"line_number":70,"context_line":"    with context.session.begin(subtransactions\u003dTrue):"},{"line_number":71,"context_line":"        if (not dvr_objs.DVRMacAddress.delete_objects(context, host\u003dhost)):"},{"line_number":72,"context_line":"            return"},{"line_number":73,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"ba5201f7_ef4821cf","line":70,"in_reply_to":"ba5201f7_56cb2ba5","updated":"2017-01-09 21:38:34.000000000","message":"Done","commit_id":"68b37520a948006b0807fd52154b2bd7db5e47a3"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"a0ced794de385ac5d4992f3fe8d0c0a3b512204a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return self._plugin"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _get_dvr_mac_address_by_host(self, context, host):"},{"line_number":98,"context_line":"        dvr_obj \u003d dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)"},{"line_number":99,"context_line":"        if not dvr_obj:"},{"line_number":100,"context_line":"            raise ext_dvr.DVRMacAddressNotFound(host\u003dhost)"},{"line_number":101,"context_line":"        return dvr_obj"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba5201f7_96e833e4","line":98,"updated":"2017-01-04 16:24:54.000000000","message":"You can use objects_exists here","commit_id":"68b37520a948006b0807fd52154b2bd7db5e47a3"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"60983333b49b7ed290a32aeaa725ec74e4644487","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return self._plugin"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _get_dvr_mac_address_by_host(self, context, host):"},{"line_number":98,"context_line":"        dvr_obj \u003d dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)"},{"line_number":99,"context_line":"        if not dvr_obj:"},{"line_number":100,"context_line":"            raise ext_dvr.DVRMacAddressNotFound(host\u003dhost)"},{"line_number":101,"context_line":"        return dvr_obj"}],"source_content_type":"text/x-python","patch_set":26,"id":"ba5201f7_cf3b5d37","line":98,"in_reply_to":"ba5201f7_96e833e4","updated":"2017-01-09 21:38:34.000000000","message":"Done","commit_id":"68b37520a948006b0807fd52154b2bd7db5e47a3"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"95954dc1ae400cd0f387e3aeaae40dda57f7dc76","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return self._plugin"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _get_dvr_mac_address_by_host(self, context, host):"},{"line_number":98,"context_line":"        if not dvr_objs.DVRMacAddress.objects_exist(context, host\u003dhost):"},{"line_number":99,"context_line":"            raise ext_dvr.DVRMacAddressNotFound(host\u003dhost)"},{"line_number":100,"context_line":"        return dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":103,"context_line":"    def _create_dvr_mac_address_retry(self, context, host, base_mac):"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a57fde8_be990522","line":100,"range":{"start_line":98,"start_character":8,"end_line":100,"end_character":68},"updated":"2017-01-12 11:05:40.000000000","message":"Does it make any sense to fetch the data twice? One time in objects_exist and then in get_object?\n\nIt should be:\n\n    mac \u003d dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)\n    if not mac:\n        raise\n    return mac","commit_id":"45d23266053fdfda11105b2415608491aeac8019"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"9dbaa6b5c9d0238eb9b5084f85cd8831773b01d8","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        return self._plugin"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    def _get_dvr_mac_address_by_host(self, context, host):"},{"line_number":98,"context_line":"        if not dvr_objs.DVRMacAddress.objects_exist(context, host\u003dhost):"},{"line_number":99,"context_line":"            raise ext_dvr.DVRMacAddressNotFound(host\u003dhost)"},{"line_number":100,"context_line":"        return dvr_objs.DVRMacAddress.get_object(context, host\u003dhost)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":103,"context_line":"    def _create_dvr_mac_address_retry(self, context, host, base_mac):"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a57fde8_b4a3ca9d","line":100,"range":{"start_line":98,"start_character":8,"end_line":100,"end_character":68},"in_reply_to":"9a57fde8_be990522","updated":"2017-01-12 20:10:57.000000000","message":"Done","commit_id":"45d23266053fdfda11105b2415608491aeac8019"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"95954dc1ae400cd0f387e3aeaae40dda57f7dc76","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":103,"context_line":"    def _create_dvr_mac_address_retry(self, context, host, base_mac):"},{"line_number":104,"context_line":"        mac_address \u003d utils.get_random_mac(base_mac)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        dvr_mac_binding \u003d dvr_objs.DVRMacAddress("},{"line_number":107,"context_line":"            context, host\u003dhost, mac_address\u003dmac_address)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a57fde8_a9b551d1","line":104,"updated":"2017-01-12 11:05:40.000000000","message":"Should it be netaddr.EUI value?","commit_id":"45d23266053fdfda11105b2415608491aeac8019"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"9dbaa6b5c9d0238eb9b5084f85cd8831773b01d8","unresolved":false,"context_lines":[{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":103,"context_line":"    def _create_dvr_mac_address_retry(self, context, host, base_mac):"},{"line_number":104,"context_line":"        mac_address \u003d utils.get_random_mac(base_mac)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        dvr_mac_binding \u003d dvr_objs.DVRMacAddress("},{"line_number":107,"context_line":"            context, host\u003dhost, mac_address\u003dmac_address)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a57fde8_fac8d976","line":104,"in_reply_to":"9a57fde8_a9b551d1","updated":"2017-01-12 20:10:57.000000000","message":"Done","commit_id":"45d23266053fdfda11105b2415608491aeac8019"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cfbb1a34b2274d1a315aa4f894a3723152ececbc","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # until they are all deleted."},{"line_number":70,"context_line":"        return"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    if (not router.DVRMacAddress.delete_objects(context, host\u003dhost)):"},{"line_number":73,"context_line":"        return"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # notify remaining agents so they cleanup flows"}],"source_content_type":"text/x-python","patch_set":30,"id":"7a3c09a3_62c0452b","line":72,"range":{"start_line":72,"start_character":33,"end_line":72,"end_character":47},"updated":"2017-01-17 10:20:53.000000000","message":"does this return anything?","commit_id":"60ea7214c521e631c5b49c7668eb8819f96afbbf"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"cfbb1a34b2274d1a315aa4f894a3723152ececbc","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # until they are all deleted."},{"line_number":70,"context_line":"        return"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    if (not router.DVRMacAddress.delete_objects(context, host\u003dhost)):"},{"line_number":73,"context_line":"        return"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # notify remaining agents so they cleanup flows"}],"source_content_type":"text/x-python","patch_set":30,"id":"7a3c09a3_c2a9f991","line":72,"updated":"2017-01-17 10:20:53.000000000","message":"nit - you do not need the brackets here","commit_id":"60ea7214c521e631c5b49c7668eb8819f96afbbf"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"34907f22a35c713195d06cb04f590dd7d5f13103","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # until they are all deleted."},{"line_number":70,"context_line":"        return"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    if (not router.DVRMacAddress.delete_objects(context, host\u003dhost)):"},{"line_number":73,"context_line":"        return"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # notify remaining agents so they cleanup flows"}],"source_content_type":"text/x-python","patch_set":30,"id":"7a3c09a3_8bae10e4","line":72,"range":{"start_line":72,"start_character":33,"end_line":72,"end_character":47},"in_reply_to":"7a3c09a3_62c0452b","updated":"2017-01-17 18:58:20.000000000","message":"No, it doesn\u0027t","commit_id":"60ea7214c521e631c5b49c7668eb8819f96afbbf"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"34907f22a35c713195d06cb04f590dd7d5f13103","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        # until they are all deleted."},{"line_number":70,"context_line":"        return"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    if (not router.DVRMacAddress.delete_objects(context, host\u003dhost)):"},{"line_number":73,"context_line":"        return"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    # notify remaining agents so they cleanup flows"}],"source_content_type":"text/x-python","patch_set":30,"id":"7a3c09a3_01891f75","line":72,"in_reply_to":"7a3c09a3_c2a9f991","updated":"2017-01-17 18:58:20.000000000","message":"Done","commit_id":"60ea7214c521e631c5b49c7668eb8819f96afbbf"},{"author":{"_account_id":20246,"name":"Aradhana Singh","email":"aradhanamailbox@gmail.com","username":"asingh"},"change_message_id":"defd8f1e8985b23ac35b28013579d11937ff701f","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    if not router.DVRMacAddress.delete_objects(context, host\u003dhost):"},{"line_number":69,"context_line":"        return"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    # notify remaining agents so they cleanup flows"},{"line_number":72,"context_line":"    dvr_macs \u003d plugin.get_dvr_mac_address_list(context)"},{"line_number":73,"context_line":"    plugin.notifier.dvr_mac_address_update(context, dvr_macs)"}],"source_content_type":"text/x-python","patch_set":34,"id":"ba2be162_c4974b46","line":70,"updated":"2017-03-02 21:41:37.000000000","message":"nit: extra line","commit_id":"452dc7809a7ca13857575a0b5fbeb91ebd5e99fc"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"e27379f4a99e0aa3062b63c218adaf86b1d73f34","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        :param context: rpc request context"},{"line_number":149,"context_line":"        :param host: host id to match and extract ports of interest"},{"line_number":150,"context_line":"        :param subnet: subnet id to match and extract ports of interest"},{"line_number":151,"context_line":"        :returns: list -- Ports on the given subnet in the input host"},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet]},"},{"line_number":154,"context_line":"                   portbindings.HOST_ID: [host]}"}],"source_content_type":"text/x-python","patch_set":35,"id":"ffe62b97_2fcce7ba","line":151,"updated":"2017-03-24 18:28:17.000000000","message":"Please use :rtype: to correctly document the return type. Ref: http://www.sphinx-doc.org/en/stable/domains.html#info-field-lists","commit_id":"499992d213f63ec885d103dad2de5c20d589fe5e"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"592808eca475b14ae1993129bc87d7dd66570546","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        :param context: rpc request context"},{"line_number":149,"context_line":"        :param host: host id to match and extract ports of interest"},{"line_number":150,"context_line":"        :param subnet: subnet id to match and extract ports of interest"},{"line_number":151,"context_line":"        :returns: list -- Ports on the given subnet in the input host"},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet]},"},{"line_number":154,"context_line":"                   portbindings.HOST_ID: [host]}"}],"source_content_type":"text/x-python","patch_set":35,"id":"ffe62b97_e7a7f0bc","line":151,"in_reply_to":"ffe62b97_2fcce7ba","updated":"2017-03-27 23:19:39.000000000","message":"I\u0027m agree about using it but this change is not creating or improving that method, so I\u0027m not sure if should be a good idea to improve it here or an isolated patch.","commit_id":"499992d213f63ec885d103dad2de5c20d589fe5e"},{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"c1d162b254e1db8e5e57409a333a19e1c60aa70a","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        :param context: rpc request context"},{"line_number":149,"context_line":"        :param host: host id to match and extract ports of interest"},{"line_number":150,"context_line":"        :param subnet: subnet id to match and extract ports of interest"},{"line_number":151,"context_line":"        :returns: list -- Ports on the given subnet in the input host"},{"line_number":152,"context_line":"        \"\"\""},{"line_number":153,"context_line":"        filters \u003d {\u0027fixed_ips\u0027: {\u0027subnet_id\u0027: [subnet]},"},{"line_number":154,"context_line":"                   portbindings.HOST_ID: [host]}"}],"source_content_type":"text/x-python","patch_set":35,"id":"ffe62b97_62b5f27d","line":151,"in_reply_to":"ffe62b97_e7a7f0bc","updated":"2017-03-28 13:47:15.000000000","message":"I overlooked that this was a rebase, my mistake. We should fix them all up in an isolated patch, I\u0027m sure there\u0027s more.","commit_id":"499992d213f63ec885d103dad2de5c20d589fe5e"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"52fcd828e4fb784b1c81e80e95b1b9c530156ffa","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            # there are still agents on this host, don\u0027t mess with the mac"},{"line_number":81,"context_line":"            # entry until they are all deleted."},{"line_number":82,"context_line":"            return"},{"line_number":83,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":84,"context_line":"            if not router.DVRMacAddress.delete_objects(context, host\u003dhost):"},{"line_number":85,"context_line":"                return"},{"line_number":86,"context_line":"        # notify remaining agents so they cleanup flows"}],"source_content_type":"text/x-python","patch_set":37,"id":"ffe62b97_e6710146","line":83,"updated":"2017-03-28 20:54:11.000000000","message":"Do we need the writer here? I found that it was removed in the test cases while using objects.","commit_id":"98aacb92b9737701f40c0d4f2c6138167f9547e7"},{"author":{"_account_id":22220,"name":"Anindita Das","email":"anindita.das@utexas.edu","username":"anudas"},"change_message_id":"52fcd828e4fb784b1c81e80e95b1b9c530156ffa","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":98,"context_line":"    def _create_dvr_mac_address_retry(self, context, host, base_mac):"},{"line_number":99,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":100,"context_line":"            mac_address \u003d utils.get_random_mac(base_mac)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            dvr_mac_binding \u003d router.DVRMacAddress("}],"source_content_type":"text/x-python","patch_set":37,"id":"ffe62b97_66b4d1d1","line":99,"updated":"2017-03-28 20:54:11.000000000","message":"ditto","commit_id":"98aacb92b9737701f40c0d4f2c6138167f9547e7"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"92d2569a42722839f24552dae609d401cc6dafbc","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":98,"context_line":"    def _create_dvr_mac_address_retry(self, context, host, base_mac):"},{"line_number":99,"context_line":"        with db_api.context_manager.writer.using(context):"},{"line_number":100,"context_line":"            mac_address \u003d utils.get_random_mac(base_mac)"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"            dvr_mac_binding \u003d router.DVRMacAddress("}],"source_content_type":"text/x-python","patch_set":37,"id":"7ffa3b31_67b10790","line":99,"in_reply_to":"ffe62b97_66b4d1d1","updated":"2017-04-15 01:11:44.000000000","message":"Yeah, we don\u0027t want to get rid of these right now because the base create uses autonested_transaction, which requires a session to be present on the context.\n\nSo until we change base create to use it\u0027s own context_manager, we should use these on the outside.","commit_id":"98aacb92b9737701f40c0d4f2c6138167f9547e7"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"87bea369b98fcdac2076ebc7332d9d7ced72ba0d","unresolved":false,"context_lines":[{"line_number":106,"context_line":"            raise ext_dvr.DVRMacAddressNotFound(host\u003dhost)"},{"line_number":107,"context_line":"        return dvrma"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    @utils.transaction_guard"},{"line_number":110,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":111,"context_line":"    def _create_dvr_mac_address_retry(self, context, host, base_mac):"},{"line_number":112,"context_line":"        with db_api.context_manager.writer.using(context):"}],"source_content_type":"text/x-python","patch_set":45,"id":"1f1a1f67_67b0e38c","side":"PARENT","line":109,"updated":"2017-07-20 17:40:51.000000000","message":"why did we lose the transaction guard here?","commit_id":"d37f0652b9856d3a974d6a6cb7bf8c455668aaff"}],"neutron/objects/dvr.py":[{"author":{"_account_id":19591,"name":"Saisrikiran Mudigonda","email":"saisrikiran.mudigonda@intel.com","username":"saisrikiran"},"change_message_id":"1c289dabcb4daaa9d5fdc876e82cd688a21f2a8d","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    db_model \u003d dvr_mac_db.DistributedVirtualRouterMacAddress"},{"line_number":32,"context_line":"    "},{"line_number":33,"context_line":"    fields \u003d {"},{"line_number":34,"context_line":"        \u0027host\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":35,"context_line":"        \u0027mac_address\u0027: common_types.MACAddressField(nullable\u003dFalse)"},{"line_number":36,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_7e8c5c35","line":35,"range":{"start_line":34,"start_character":0,"end_line":35,"end_character":67},"updated":"2016-04-13 16:30:23.000000000","message":"Doesn\u0027t nullable value be equal to TRUE? Because default values in DB are Null if none is provided.","commit_id":"0b2452f53d63d6824846dad0465bac38fb9aa322"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"1ca803c7f8d142f69ea8064329d80e10fc0e6e84","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    "},{"line_number":33,"context_line":"    fields \u003d {"},{"line_number":34,"context_line":"        \u0027host\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":35,"context_line":"        \u0027mac_address\u0027: common_types.MACAddressField(nullable\u003dFalse)"},{"line_number":36,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_2e89f675","line":35,"range":{"start_line":35,"start_character":52,"end_line":35,"end_character":66},"updated":"2016-04-14 06:56:20.000000000","message":"nullable\u003dFalse is by default in OVO.","commit_id":"0b2452f53d63d6824846dad0465bac38fb9aa322"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"70eb8d5f1ecfc78148b13dc5b9f9c3a6c6ca601a","unresolved":false,"context_lines":[{"line_number":32,"context_line":"    "},{"line_number":33,"context_line":"    fields \u003d {"},{"line_number":34,"context_line":"        \u0027host\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":35,"context_line":"        \u0027mac_address\u0027: common_types.MACAddressField(nullable\u003dFalse)"},{"line_number":36,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_5653f216","line":35,"range":{"start_line":35,"start_character":52,"end_line":35,"end_character":66},"in_reply_to":"5a18252c_2e89f675","updated":"2016-04-14 23:25:53.000000000","message":"Done. Addressed and left nullable\u003dFalse out.","commit_id":"0b2452f53d63d6824846dad0465bac38fb9aa322"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"70eb8d5f1ecfc78148b13dc5b9f9c3a6c6ca601a","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    db_model \u003d dvr_mac_db.DistributedVirtualRouterMacAddress"},{"line_number":32,"context_line":"    "},{"line_number":33,"context_line":"    fields \u003d {"},{"line_number":34,"context_line":"        \u0027host\u0027: fields.StringField(nullable\u003dFalse),"},{"line_number":35,"context_line":"        \u0027mac_address\u0027: common_types.MACAddressField(nullable\u003dFalse)"},{"line_number":36,"context_line":"    }"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a18252c_d638a2d5","line":35,"range":{"start_line":34,"start_character":0,"end_line":35,"end_character":67},"in_reply_to":"5a18252c_7e8c5c35","updated":"2016-04-14 23:25:53.000000000","message":"Done. Removed it and used default.","commit_id":"0b2452f53d63d6824846dad0465bac38fb9aa322"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"fcb3b96b4f2e5432ef3f8c7fff4295c28faec906","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027mac_address\u0027: common_types.MACAddressField()"},{"line_number":42,"context_line":"    }"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, context\u003dNone, **kwargs):"},{"line_number":45,"context_line":"        # (note:tonytan4ever): Reassign DB values, feels it is unnecessary"},{"line_number":46,"context_line":"        # used for passing unittest"},{"line_number":47,"context_line":"        if \u0027mac_address\u0027 in kwargs:"},{"line_number":48,"context_line":"            kwargs[\u0027mac_address\u0027] \u003d netaddr.EUI(kwargs[\u0027mac_address\u0027])"},{"line_number":49,"context_line":"        super(DistributedVirtualRouterMacAddress, self).__init__(context,"},{"line_number":50,"context_line":"                                                                 **kwargs)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @classmethod"},{"line_number":53,"context_line":"    def modify_fields_from_db(cls, db_obj):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a1531f4_34955040","line":50,"range":{"start_line":44,"start_character":4,"end_line":50,"end_character":73},"updated":"2016-04-15 08:22:04.000000000","message":"The object interface should accept only the netaddr.EUI object as mac_address argument passed, so the __init__ method should be removed. If unit tests are failing, please take a look it they are correct.","commit_id":"b8e199553e6c53f0cf639dbf33b94effca92c441"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"04b824c9e7fb4a87229e7e9666cd85a5a1974b05","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        \u0027mac_address\u0027: common_types.MACAddressField()"},{"line_number":42,"context_line":"    }"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def __init__(self, context\u003dNone, **kwargs):"},{"line_number":45,"context_line":"        # (note:tonytan4ever): Reassign DB values, feels it is unnecessary"},{"line_number":46,"context_line":"        # used for passing unittest"},{"line_number":47,"context_line":"        if \u0027mac_address\u0027 in kwargs:"},{"line_number":48,"context_line":"            kwargs[\u0027mac_address\u0027] \u003d netaddr.EUI(kwargs[\u0027mac_address\u0027])"},{"line_number":49,"context_line":"        super(DistributedVirtualRouterMacAddress, self).__init__(context,"},{"line_number":50,"context_line":"                                                                 **kwargs)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"    @classmethod"},{"line_number":53,"context_line":"    def modify_fields_from_db(cls, db_obj):"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_4ea4a456","line":50,"range":{"start_line":44,"start_character":4,"end_line":50,"end_character":73},"in_reply_to":"3a1531f4_34955040","updated":"2016-04-15 17:22:29.000000000","message":"Addressed in the test case","commit_id":"b8e199553e6c53f0cf639dbf33b94effca92c441"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bc615e3f79e6c1826761e7b1b94b8330c315e642","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (c) 2016 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_d605b0c2","line":1,"updated":"2016-04-18 14:13:43.000000000","message":"Please remove lines 1-3, you don\u0027t work for the foundation, right?","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bc615e3f79e6c1826761e7b1b94b8330c315e642","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License.\\"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_log import log"},{"line_number":19,"context_line":"from oslo_versionedobjects import base as obj_base"},{"line_number":20,"context_line":"from oslo_versionedobjects import fields as obj_fields"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_1659e8fe","line":17,"updated":"2016-04-18 14:13:43.000000000","message":"please remove the line, both netaddr and oslo libraries are 3parties.","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"7aff78b761c8a4bddfe61b39122ed364be7d70e1","unresolved":false,"context_lines":[{"line_number":14,"context_line":"#    under the License.\\"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import netaddr"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_log import log"},{"line_number":19,"context_line":"from oslo_versionedobjects import base as obj_base"},{"line_number":20,"context_line":"from oslo_versionedobjects import fields as obj_fields"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_b539cef4","line":17,"in_reply_to":"1a122d0e_1659e8fe","updated":"2016-04-19 18:09:30.000000000","message":"Done","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bc615e3f79e6c1826761e7b1b94b8330c315e642","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"@obj_base.VersionedObjectRegistry.register"},{"line_number":30,"context_line":"class DistributedVirtualRouterMacAddress(base.NeutronDbObject):"},{"line_number":31,"context_line":"    # Version 1.0: Initial version"},{"line_number":32,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_169a8863","line":30,"range":{"start_line":30,"start_character":6,"end_line":30,"end_character":40},"updated":"2016-04-18 14:13:43.000000000","message":"Can we shorten it, while we are at it? Into \u0027DvrMacAddress\u0027 maybe.","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"7aff78b761c8a4bddfe61b39122ed364be7d70e1","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"@obj_base.VersionedObjectRegistry.register"},{"line_number":30,"context_line":"class DistributedVirtualRouterMacAddress(base.NeutronDbObject):"},{"line_number":31,"context_line":"    # Version 1.0: Initial version"},{"line_number":32,"context_line":"    VERSION \u003d \u00271.0\u0027"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_496a63ef","line":30,"range":{"start_line":30,"start_character":6,"end_line":30,"end_character":40},"in_reply_to":"1a122d0e_169a8863","updated":"2016-04-19 18:09:30.000000000","message":"Done","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bc615e3f79e6c1826761e7b1b94b8330c315e642","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    primary_keys \u003d [\u0027host\u0027]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    fields \u003d {"},{"line_number":39,"context_line":"        \u0027host\u0027: obj_fields.StringField(),"},{"line_number":40,"context_line":"        \u0027mac_address\u0027: common_types.MACAddressField()"},{"line_number":41,"context_line":"    }"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_b6075480","line":39,"range":{"start_line":39,"start_character":16,"end_line":39,"end_character":41},"updated":"2016-04-18 14:13:43.000000000","message":"(Just curious, other reviewers, please chime in) Should we come up with a custom field type specifically for hostnames?","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"7aff78b761c8a4bddfe61b39122ed364be7d70e1","unresolved":false,"context_lines":[{"line_number":36,"context_line":"    primary_keys \u003d [\u0027host\u0027]"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    fields \u003d {"},{"line_number":39,"context_line":"        \u0027host\u0027: obj_fields.StringField(),"},{"line_number":40,"context_line":"        \u0027mac_address\u0027: common_types.MACAddressField()"},{"line_number":41,"context_line":"    }"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_84a8e2dc","line":39,"range":{"start_line":39,"start_character":16,"end_line":39,"end_character":41},"in_reply_to":"1a122d0e_b6075480","updated":"2016-04-19 18:09:30.000000000","message":"Agreed, long term it will probably be a better fix.","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bc615e3f79e6c1826761e7b1b94b8330c315e642","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            .modify_fields_from_db(db_obj)"},{"line_number":48,"context_line":"        )"},{"line_number":49,"context_line":"        if \u0027mac_address\u0027 in fields:"},{"line_number":50,"context_line":"            fields[\u0027mac_address\u0027] \u003d netaddr.EUI(fields[\u0027mac_address\u0027])"},{"line_number":51,"context_line":"        return fields"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_16de083f","line":50,"updated":"2016-04-18 14:13:43.000000000","message":"We probably need to use \u0027authentic\u0027 flavors of netaddr types to retain the format passed from API: https://review.openstack.org/#/c/287756/13/neutron/common/utils.py Please rebase on top of the patch and reuse the types here.\n\nThat said, how about we just switch the model field type to use sqlalchemytypes.MACAddress? Then we can avoid this code here. [Note that we still need to switch the sqlalchemytype to \u0027authentic\u0027 flavor of netaddr.","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"7aff78b761c8a4bddfe61b39122ed364be7d70e1","unresolved":false,"context_lines":[{"line_number":47,"context_line":"            .modify_fields_from_db(db_obj)"},{"line_number":48,"context_line":"        )"},{"line_number":49,"context_line":"        if \u0027mac_address\u0027 in fields:"},{"line_number":50,"context_line":"            fields[\u0027mac_address\u0027] \u003d netaddr.EUI(fields[\u0027mac_address\u0027])"},{"line_number":51,"context_line":"        return fields"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_04c4d25c","line":50,"in_reply_to":"1a122d0e_16de083f","updated":"2016-04-19 18:09:30.000000000","message":"I think switching MACAddress to sqlalchemytypes.MACAddress is a pretty good idea. Looked at the sqlalchemytypes.MACAddress code, looks like it is a longer strength of a string though (64) as oppose to current (36). Not sure if that affects any existing neutron users. \nI","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e9be04b427fc69301fb401056d5c3a178b51924e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License.\\"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import netaddr"},{"line_number":14,"context_line":"from oslo_log import log"},{"line_number":15,"context_line":"from oslo_versionedobjects import base as obj_base"},{"line_number":16,"context_line":"from oslo_versionedobjects import fields as obj_fields"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_55465b4f","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":14},"updated":"2016-04-20 07:06:41.000000000","message":"Import not used. Please remove.","commit_id":"d3e9aa30e5c398294250d0d792f6dcb36f80c926"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"11892ddfa0e8461d441f25d2ce33bc6760d20e73","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License.\\"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import netaddr"},{"line_number":14,"context_line":"from oslo_log import log"},{"line_number":15,"context_line":"from oslo_versionedobjects import base as obj_base"},{"line_number":16,"context_line":"from oslo_versionedobjects import fields as obj_fields"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_3949fab7","line":13,"range":{"start_line":13,"start_character":0,"end_line":13,"end_character":14},"in_reply_to":"1a122d0e_55465b4f","updated":"2016-04-20 15:28:03.000000000","message":"Done","commit_id":"d3e9aa30e5c398294250d0d792f6dcb36f80c926"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e9be04b427fc69301fb401056d5c3a178b51924e","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron.objects import base"},{"line_number":21,"context_line":"from neutron.objects import common_types"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@obj_base.VersionedObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_1567c3e9","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":29},"updated":"2016-04-20 07:06:41.000000000","message":"LOG is not used, please remove.","commit_id":"d3e9aa30e5c398294250d0d792f6dcb36f80c926"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"11892ddfa0e8461d441f25d2ce33bc6760d20e73","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron.objects import base"},{"line_number":21,"context_line":"from neutron.objects import common_types"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"@obj_base.VersionedObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_d9d0c6cb","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":29},"in_reply_to":"1a122d0e_1567c3e9","updated":"2016-04-20 15:28:03.000000000","message":"Done","commit_id":"d3e9aa30e5c398294250d0d792f6dcb36f80c926"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"e9be04b427fc69301fb401056d5c3a178b51924e","unresolved":false,"context_lines":[{"line_number":43,"context_line":"            super(DVRMacAddress, cls).modify_fields_from_db(db_obj)"},{"line_number":44,"context_line":"        )"},{"line_number":45,"context_line":"        if \u0027mac_address\u0027 in fields:"},{"line_number":46,"context_line":"            fields[\u0027mac_address\u0027] \u003d utils.AuthenticEUI(fields[\u0027mac_address\u0027])"},{"line_number":47,"context_line":"        return fields"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_79aef1e6","line":46,"range":{"start_line":46,"start_character":36,"end_line":46,"end_character":54},"updated":"2016-04-20 07:06:41.000000000","message":"please add a comment why you are using the AuthenticEUI.","commit_id":"d3e9aa30e5c398294250d0d792f6dcb36f80c926"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"11892ddfa0e8461d441f25d2ce33bc6760d20e73","unresolved":false,"context_lines":[{"line_number":43,"context_line":"            super(DVRMacAddress, cls).modify_fields_from_db(db_obj)"},{"line_number":44,"context_line":"        )"},{"line_number":45,"context_line":"        if \u0027mac_address\u0027 in fields:"},{"line_number":46,"context_line":"            fields[\u0027mac_address\u0027] \u003d utils.AuthenticEUI(fields[\u0027mac_address\u0027])"},{"line_number":47,"context_line":"        return fields"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a122d0e_19dfded9","line":46,"range":{"start_line":46,"start_character":36,"end_line":46,"end_character":54},"in_reply_to":"1a122d0e_79aef1e6","updated":"2016-04-20 15:28:03.000000000","message":"Done","commit_id":"d3e9aa30e5c398294250d0d792f6dcb36f80c926"},{"author":{"_account_id":19591,"name":"Saisrikiran Mudigonda","email":"saisrikiran.mudigonda@intel.com","username":"saisrikiran"},"change_message_id":"efc3c7ffb7295e1aaf376a272ca236681644c1e2","unresolved":false,"context_lines":[{"line_number":8,"context_line":"#    distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":9,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":10,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":11,"context_line":"#    under the License.\\"},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_versionedobjects import base as obj_base"},{"line_number":14,"context_line":"from oslo_versionedobjects import fields as obj_fields"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a122d0e_c9d90ef5","line":11,"range":{"start_line":11,"start_character":21,"end_line":11,"end_character":24},"updated":"2016-04-20 18:23:07.000000000","message":"nit: remove trailing backslash \\","commit_id":"199da04fb3e5841017a71b23cbfe9d6bd76379dc"},{"author":{"_account_id":6951,"name":"Brandon Logan","email":"brandon.logan@rackspace.com","username":"brandon-logan"},"change_message_id":"848e96a4d6543f1ca3ca730c84ac02c83fa4bf40","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        if \u0027mac_address\u0027 in fields:"},{"line_number":42,"context_line":"            # NOTE(tonytan4ever): Here uses AuthenticEUI to retain the format"},{"line_number":43,"context_line":"            # passed from API."},{"line_number":44,"context_line":"            fields[\u0027mac_address\u0027] \u003d utils.AuthenticEUI(fields[\u0027mac_address\u0027])"},{"line_number":45,"context_line":"        return fields"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a122d0e_535a572b","line":44,"updated":"2016-04-22 19:59:11.000000000","message":"Is this supposed to be done for DVR\u0027s mac address? As far as I can tell the mac address is auto generated in neutron and not able to provided by the neutron REST API.","commit_id":"980f5651f5544d274a18e5d16cf4254638c9d47e"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"7a69c6dc9570eecad3b78fdf1d736fbcd11e77a0","unresolved":false,"context_lines":[{"line_number":41,"context_line":"        if \u0027mac_address\u0027 in fields:"},{"line_number":42,"context_line":"            # NOTE(tonytan4ever): Here uses AuthenticEUI to retain the format"},{"line_number":43,"context_line":"            # passed from API."},{"line_number":44,"context_line":"            fields[\u0027mac_address\u0027] \u003d utils.AuthenticEUI(fields[\u0027mac_address\u0027])"},{"line_number":45,"context_line":"        return fields"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":9,"id":"9abb7d3a_61158b9a","line":44,"in_reply_to":"1a122d0e_535a572b","updated":"2016-06-01 16:30:41.000000000","message":"This is according to Ihar\u0027s comment:\nhttps://review.openstack.org/#/c/304873/4/neutron/objects/dvr.py@50, this could be used when the mac_address field out of database though.","commit_id":"980f5651f5544d274a18e5d16cf4254638c9d47e"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"370333dd1bb8e3be90452f61bf1019a673dce522","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    @classmethod"},{"line_number":37,"context_line":"    def modify_fields_from_db(cls, db_obj):"},{"line_number":38,"context_line":"        fields \u003d ("},{"line_number":39,"context_line":"            super(DVRMacAddress, cls).modify_fields_from_db(db_obj)"},{"line_number":40,"context_line":"        )"},{"line_number":41,"context_line":"        if \u0027mac_address\u0027 in fields:"},{"line_number":42,"context_line":"            # NOTE(tonytan4ever): Here uses AuthenticEUI to retain the format"},{"line_number":43,"context_line":"            # passed from API."}],"source_content_type":"text/x-python","patch_set":15,"id":"1a95cdbc_938f0b74","line":40,"range":{"start_line":38,"start_character":8,"end_line":40,"end_character":9},"updated":"2016-10-10 13:38:53.000000000","message":"this can fit in one line like:\n\n    fields \u003d super(DVRMacAddress, cls).modify_fields_from_db(db_obj)","commit_id":"74bf8dd8f84eaf9f7355be98738f05cb5eca713b"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"370333dd1bb8e3be90452f61bf1019a673dce522","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    @classmethod"},{"line_number":48,"context_line":"    def modify_fields_to_db(cls, fields):"},{"line_number":49,"context_line":"        result \u003d ("},{"line_number":50,"context_line":"            super(DVRMacAddress, cls)."},{"line_number":51,"context_line":"            modify_fields_to_db(fields)"},{"line_number":52,"context_line":"        )"},{"line_number":53,"context_line":"        if \u0027mac_address\u0027 in fields:"},{"line_number":54,"context_line":"            result[\u0027mac_address\u0027] \u003d str(result[\u0027mac_address\u0027])"},{"line_number":55,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a95cdbc_f3876f5e","line":52,"range":{"start_line":49,"start_character":8,"end_line":52,"end_character":9},"updated":"2016-10-10 13:38:53.000000000","message":"same thing:\n\n    result \u003d super(DVRMacAddress, cls).modify_fields_to_db(fields)","commit_id":"74bf8dd8f84eaf9f7355be98738f05cb5eca713b"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"370333dd1bb8e3be90452f61bf1019a673dce522","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            modify_fields_to_db(fields)"},{"line_number":52,"context_line":"        )"},{"line_number":53,"context_line":"        if \u0027mac_address\u0027 in fields:"},{"line_number":54,"context_line":"            result[\u0027mac_address\u0027] \u003d str(result[\u0027mac_address\u0027])"},{"line_number":55,"context_line":"        return result"}],"source_content_type":"text/x-python","patch_set":15,"id":"1a95cdbc_9361cbd5","line":54,"range":{"start_line":54,"start_character":36,"end_line":54,"end_character":39},"updated":"2016-10-10 13:38:53.000000000","message":"s/str/cls.filter_to_str","commit_id":"74bf8dd8f84eaf9f7355be98738f05cb5eca713b"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"95954dc1ae400cd0f387e3aeaae40dda57f7dc76","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"9a57fde8_c9e1b5d2","updated":"2017-01-12 11:05:40.000000000","message":"It can also be put in neutron/objects/router.py","commit_id":"45d23266053fdfda11105b2415608491aeac8019"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"9dbaa6b5c9d0238eb9b5084f85cd8831773b01d8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"9a57fde8_5aa645c2","in_reply_to":"9a57fde8_c9e1b5d2","updated":"2017-01-12 20:10:57.000000000","message":"Done","commit_id":"45d23266053fdfda11105b2415608491aeac8019"}],"neutron/tests/unit/objects/test_base.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bc615e3f79e6c1826761e7b1b94b8330c315e642","unresolved":false,"context_lines":[{"line_number":240,"context_line":"    common_types.ListOfIPNetworksField: get_list_of_random_networks,"},{"line_number":241,"context_line":"    common_types.IPVersionEnumField: tools.get_random_ip_version,"},{"line_number":242,"context_line":"    obj_fields.DateTimeField: timeutils.utcnow,"},{"line_number":243,"context_line":"    common_types.MACAddressField: tools.get_random_EUI"},{"line_number":244,"context_line":"}"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_b615949c","line":243,"updated":"2016-04-18 14:13:43.000000000","message":"nit: please add comma to the end so that the next patch adding a generator here does not need to modify this line.","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"7aff78b761c8a4bddfe61b39122ed364be7d70e1","unresolved":false,"context_lines":[{"line_number":240,"context_line":"    common_types.ListOfIPNetworksField: get_list_of_random_networks,"},{"line_number":241,"context_line":"    common_types.IPVersionEnumField: tools.get_random_ip_version,"},{"line_number":242,"context_line":"    obj_fields.DateTimeField: timeutils.utcnow,"},{"line_number":243,"context_line":"    common_types.MACAddressField: tools.get_random_EUI"},{"line_number":244,"context_line":"}"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_15eec2b3","line":243,"in_reply_to":"1a122d0e_b615949c","updated":"2016-04-19 18:09:30.000000000","message":"Done","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"216606cae98cb1f5b5306a2fd4cd7c8dd7a92ec8","unresolved":false,"context_lines":[{"line_number":247,"context_line":"    common_types.ListOfIPNetworksField: get_list_of_random_networks,"},{"line_number":248,"context_line":"    common_types.IPVersionEnumField: tools.get_random_ip_version,"},{"line_number":249,"context_line":"    obj_fields.DateTimeField: timeutils.utcnow,"},{"line_number":250,"context_line":"    obj_fields.IPAddressField: tools.get_random_ip_address,"},{"line_number":251,"context_line":"    common_types.MACAddressField: tools.get_random_EUI,"},{"line_number":252,"context_line":"    common_types.IPV6ModeEnumField: tools.get_random_ipv6_mode,"},{"line_number":253,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":11,"id":"9abb7d3a_dd0a381f","side":"PARENT","line":250,"range":{"start_line":250,"start_character":4,"end_line":250,"end_character":59},"updated":"2016-06-02 06:23:00.000000000","message":"Please do not remove the IPAddressField as it can be used somewhere else in objects code.","commit_id":"9d87c1fdca097e84166f6e52098f330adec1785a"}],"neutron/tests/unit/objects/test_dvr.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"bc615e3f79e6c1826761e7b1b94b8330c315e642","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_f60f0c86","line":1,"updated":"2016-04-18 14:13:43.000000000","message":"ditto","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"7aff78b761c8a4bddfe61b39122ed364be7d70e1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2016 OpenStack Foundation."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_e979afc9","line":1,"in_reply_to":"1a122d0e_f60f0c86","updated":"2016-04-19 18:09:30.000000000","message":"Done","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":15518,"name":"Artur Korzeniewski","email":"artur.korzen@wp.pl","username":"akorzeni"},"change_message_id":"1f2ea95e57c4eb0b6ca09d0a42d194efc1d70965","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        super(DistributedVirtualRouterMacAddressIfaceObjectTestCase, self).\\"},{"line_number":28,"context_line":"            setUp()"},{"line_number":29,"context_line":"        # NOTE(tonytan4ever): Need to convert mac address to netaddr.EUI type"},{"line_number":30,"context_line":"        self.db_objs \u003d [self._test_class.modify_fields_from_db(db_obj)"},{"line_number":31,"context_line":"                        for db_obj in self.db_objs]"},{"line_number":32,"context_line":"        self.db_obj \u003d self.db_objs[0]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class DistributedVirtualRouterMacAddressDbObjectTestCase("}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_21f03790","line":32,"range":{"start_line":30,"start_character":8,"end_line":32,"end_character":37},"updated":"2016-04-18 08:00:02.000000000","message":"This is not a valid operation since in self.db_objs we should have only the values which represents database types and corresponding values - meaning that MAC address in DB is a string.\n\nThe other structure was introduce in [1] obj_fields, which represents the values and types correct for the object implementation - meaning that obj_fields should have MAC address as netaddr.EUI type.\n\nPlease take a look at [2], where I have gather the needed fixed for your patch to pass the UT.\n\n[1] https://github.com/openstack/neutron/blob/master/neutron/tests/unit/objects/test_base.py#L266\n[2] https://review.openstack.org/306951","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"7aff78b761c8a4bddfe61b39122ed364be7d70e1","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        super(DistributedVirtualRouterMacAddressIfaceObjectTestCase, self).\\"},{"line_number":28,"context_line":"            setUp()"},{"line_number":29,"context_line":"        # NOTE(tonytan4ever): Need to convert mac address to netaddr.EUI type"},{"line_number":30,"context_line":"        self.db_objs \u003d [self._test_class.modify_fields_from_db(db_obj)"},{"line_number":31,"context_line":"                        for db_obj in self.db_objs]"},{"line_number":32,"context_line":"        self.db_obj \u003d self.db_objs[0]"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"class DistributedVirtualRouterMacAddressDbObjectTestCase("}],"source_content_type":"text/x-python","patch_set":4,"id":"1a122d0e_75be1666","line":32,"range":{"start_line":30,"start_character":8,"end_line":32,"end_character":37},"in_reply_to":"1a122d0e_21f03790","updated":"2016-04-19 18:09:30.000000000","message":"Looked into other patchset. Removed these lines.\nThanks.\nDone","commit_id":"17a605628c0ea0a996465861b1b5d4c356dc8e56"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7bb4ef6624e8491ca7b2a73b0dabdd42d3f50275","unresolved":false,"context_lines":[{"line_number":16,"context_line":""},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"class DVRMacAddressIfaceObjectTestCase("},{"line_number":19,"context_line":"        obj_test_base.BaseObjectIfaceTestCase):"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"    _test_class \u003d dvr.DVRMacAddress"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_5539bbd7","line":19,"range":{"start_line":19,"start_character":8,"end_line":19,"end_character":47},"updated":"2016-10-17 17:53:52.000000000","message":"nit: this line can easily fits in the previous one","commit_id":"559b8eabad1cb84fbc41e8fb341b0aa74df143a3"},{"author":{"_account_id":8726,"name":"Victor Morales","email":"chipahuac@hotmail.com","username":"electrocucaracha"},"change_message_id":"7bb4ef6624e8491ca7b2a73b0dabdd42d3f50275","unresolved":false,"context_lines":[{"line_number":21,"context_line":"    _test_class \u003d dvr.DVRMacAddress"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"class DVRMacAddressDbObjectTestCase("},{"line_number":25,"context_line":"        obj_test_base.BaseDbObjectTestCase, testlib_api.SqlTestCase):"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    _test_class \u003d dvr.DVRMacAddress"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa6399be_15566306","line":25,"range":{"start_line":24,"start_character":0,"end_line":25,"end_character":69},"updated":"2016-10-17 17:53:52.000000000","message":"nit: what about this format\n\nclass DVRMacAddressDbObjectTestCase(obj_test_base.BaseDbObjectTestCase,\n                                    testlib_api.SqlTestCase):","commit_id":"559b8eabad1cb84fbc41e8fb341b0aa74df143a3"}],"neutron/tests/unit/objects/test_objects.py":[{"author":{"_account_id":7037,"name":"John Perkins","email":"john.perkins@rackspace.com","username":"JPerkins"},"change_message_id":"60530d791f4ba773f1123e482b06d5b8f27962f1","unresolved":false,"context_lines":[{"line_number":26,"context_line":"# NOTE: The hashes in this list should only be changed if they come with a"},{"line_number":27,"context_line":"# corresponding version bump in the affected objects."},{"line_number":28,"context_line":"object_data \u003d {"},{"line_number":29,"context_line":"    \u0027DistributedVirtualRouterMacAddress\u0027: "},{"line_number":30,"context_line":"        \u00271.0-d3c61a8338d20da74db2364d4d6554f2\u0027,"},{"line_number":31,"context_line":"    \u0027ExtraDhcpOpt\u0027: \u00271.0-632f689cbeb36328995a7aed1d0a78d3\u0027,"},{"line_number":32,"context_line":"    \u0027PortSecurity\u0027: \u00271.0-cf5b382a0112080ec4e0f23f697c7ab2\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a18252c_568e522e","line":29,"updated":"2016-04-14 23:50:02.000000000","message":"remove extra space at end of line","commit_id":"b8e199553e6c53f0cf639dbf33b94effca92c441"},{"author":{"_account_id":12906,"name":"tonytan4ever","email":"tony.tan@rackspace.com","username":"tonytan4ever"},"change_message_id":"04b824c9e7fb4a87229e7e9666cd85a5a1974b05","unresolved":false,"context_lines":[{"line_number":26,"context_line":"# NOTE: The hashes in this list should only be changed if they come with a"},{"line_number":27,"context_line":"# corresponding version bump in the affected objects."},{"line_number":28,"context_line":"object_data \u003d {"},{"line_number":29,"context_line":"    \u0027DistributedVirtualRouterMacAddress\u0027: "},{"line_number":30,"context_line":"        \u00271.0-d3c61a8338d20da74db2364d4d6554f2\u0027,"},{"line_number":31,"context_line":"    \u0027ExtraDhcpOpt\u0027: \u00271.0-632f689cbeb36328995a7aed1d0a78d3\u0027,"},{"line_number":32,"context_line":"    \u0027PortSecurity\u0027: \u00271.0-cf5b382a0112080ec4e0f23f697c7ab2\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a122d0e_0ec10ce5","line":29,"in_reply_to":"5a18252c_568e522e","updated":"2016-04-15 17:22:29.000000000","message":"Done","commit_id":"b8e199553e6c53f0cf639dbf33b94effca92c441"}]}
