)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"dd74b95178fb66c15ba52581a5209c4ccdfbde93","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ensure trunk status is acknowledged during subport operations"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Closes-bug: #372424"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I73127d7829c31ca66578eb8f7d76409b36c9dc6d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a8ec9b2_9892949e","line":9,"updated":"2016-09-19 21:07:16.000000000","message":"Wrong bug?","commit_id":"78798e28ba218e89aa7e31fa945b8515621f5cdf"},{"author":{"_account_id":16800,"name":"Rawlin Peters","email":"rawlin.peters@hpe.com","username":"rawlin"},"change_message_id":"b494734297b7e4edc54252ecc9d9d1edb9e6b17f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ensure trunk status is acknowledged during subport operations"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Closes-bug: #372424"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I73127d7829c31ca66578eb8f7d76409b36c9dc6d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a8ec9b2_c2c9865c","line":9,"in_reply_to":"7a8ec9b2_8225be5d","updated":"2016-09-19 21:45:10.000000000","message":"https://bugs.launchpad.net/neutron/+bug/1625135","commit_id":"78798e28ba218e89aa7e31fa945b8515621f5cdf"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"0581e778236ff66acb17f31b5829c6bb6dec7c0c","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Ensure trunk status is acknowledged during subport operations"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Closes-bug: #372424"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I73127d7829c31ca66578eb8f7d76409b36c9dc6d"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"7a8ec9b2_8225be5d","line":9,"in_reply_to":"7a8ec9b2_9892949e","updated":"2016-09-19 21:39:58.000000000","message":"I think I used a review ID","commit_id":"78798e28ba218e89aa7e31fa945b8515621f5cdf"}],"neutron/services/trunk/drivers/openvswitch/agent/driver.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c19f7d5eb1b64290c5d0a08d5d6aee664a422c26","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def handle_subports(self, subports, event_type):"},{"line_number":48,"context_line":"        if event_type not in (events.CREATED, events.DELETED):"},{"line_number":49,"context_line":"            LOG.error(_LE(\"Unknown event type %s\"), event_type)"},{"line_number":50,"context_line":"            raise NotImplementedError()"},{"line_number":51,"context_line":"        # Subports are always created with the same trunk_id and there is"},{"line_number":52,"context_line":"        # always at least one item in subports list"},{"line_number":53,"context_line":"        trunk_id \u003d subports[0].trunk_id"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_4e2c5899","line":50,"updated":"2016-09-21 12:39:26.000000000","message":"Should we rather put the message inside of the exception?\n\n raise NotImplementedError(\"%s event type is not supported\" % event_type)","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c392504d3158dac9cd3e098f9351487869dd8ea2","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def handle_subports(self, subports, event_type):"},{"line_number":48,"context_line":"        if event_type not in (events.CREATED, events.DELETED):"},{"line_number":49,"context_line":"            LOG.error(_LE(\"Unknown event type %s\"), event_type)"},{"line_number":50,"context_line":"            raise NotImplementedError()"},{"line_number":51,"context_line":"        # Subports are always created with the same trunk_id and there is"},{"line_number":52,"context_line":"        # always at least one item in subports list"},{"line_number":53,"context_line":"        trunk_id \u003d subports[0].trunk_id"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_514b1087","line":50,"in_reply_to":"7a8ec9b2_4e2c5899","updated":"2016-09-21 15:10:05.000000000","message":"I guess we could, the stacktrack with the LOG.error is eloquent enough IMO.","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"f01a4240af2e42236850d274ebd42e87dd9a388b","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def handle_subports(self, subports, event_type):"},{"line_number":48,"context_line":"        if event_type not in (events.CREATED, events.DELETED):"},{"line_number":49,"context_line":"            LOG.error(_LE(\"Unknown event type %s\"), event_type)"},{"line_number":50,"context_line":"            raise NotImplementedError()"},{"line_number":51,"context_line":"        # Subports are always created with the same trunk_id and there is"},{"line_number":52,"context_line":"        # always at least one item in subports list"},{"line_number":53,"context_line":"        trunk_id \u003d subports[0].trunk_id"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_595df613","line":50,"in_reply_to":"7a8ec9b2_514b1087","updated":"2016-09-21 15:33:55.000000000","message":"Do we really want to raise an exception here? If at some point in future versions we want to handle more events, to avoid the exception we will have to upgrade the agent before the neutron server...\nIf the agent gets an unknown event why is not enough to simply log the error?","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"140cf21953801e491af796b7aa9dc8de3ac72287","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def handle_subports(self, subports, event_type):"},{"line_number":48,"context_line":"        if event_type not in (events.CREATED, events.DELETED):"},{"line_number":49,"context_line":"            LOG.error(_LE(\"Unknown event type %s\"), event_type)"},{"line_number":50,"context_line":"            raise NotImplementedError()"},{"line_number":51,"context_line":"        # Subports are always created with the same trunk_id and there is"},{"line_number":52,"context_line":"        # always at least one item in subports list"},{"line_number":53,"context_line":"        trunk_id \u003d subports[0].trunk_id"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_59717643","line":50,"in_reply_to":"7a8ec9b2_595df613","updated":"2016-09-21 15:36:08.000000000","message":"That\u0027s a good point. I agree that the trace is not necessary in this case.","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f14f38c5271f95eb5328929e65040a5677c84011","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def handle_subports(self, subports, event_type):"},{"line_number":48,"context_line":"        if event_type not in (events.CREATED, events.DELETED):"},{"line_number":49,"context_line":"            LOG.error(_LE(\"Unknown event type %s\"), event_type)"},{"line_number":50,"context_line":"            raise NotImplementedError()"},{"line_number":51,"context_line":"        # Subports are always created with the same trunk_id and there is"},{"line_number":52,"context_line":"        # always at least one item in subports list"},{"line_number":53,"context_line":"        trunk_id \u003d subports[0].trunk_id"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_e8b18690","line":50,"in_reply_to":"7a8ec9b2_59717643","updated":"2016-09-21 16:44:25.000000000","message":"You\u0027d need to upgrade to avoid the error now wouldn\u0027t you?\n\nThe exception is raised and logged just like the ERROR message. it surely a bit more noise, but it\u0027s noise that shows up only when dealing with trunks.\n\nI think it makes sense to defer this (whether we raise or not) only if the trunk is managed by this host.","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a3f849df760769096934e2622ee9b3c7a6a8e935","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                self.ovsdb_handler.report_trunk_status(ctx, trunk_id, status)"},{"line_number":68,"context_line":"            except oslo_messaging.MessagingException as e:"},{"line_number":69,"context_line":"                LOG.error(_LE("},{"line_number":70,"context_line":"                    \"Got an error from trunk rpc when wiring subports \""},{"line_number":71,"context_line":"                    \"%(subports)s for trunk %(trunk_id)s: %(err)s\"),"},{"line_number":72,"context_line":"                    {\u0027subports\u0027: subports,"},{"line_number":73,"context_line":"                     \u0027trunk_id\u0027: trunk_id,"},{"line_number":74,"context_line":"                     \u0027err\u0027: e})"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def init_handler(resource, event, trigger, agent\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_a87930fe","line":74,"range":{"start_line":70,"start_character":20,"end_line":74,"end_character":31},"updated":"2016-09-21 21:54:28.000000000","message":"A few nits on this error message:\n- \u0027trunk\u0027 is mentioned a few times.\n- rpc should probably be RPC.\n- I believe this could also be an error from unwiring correct?\n\n\nMaybe we should consider a slight reword to something like::\n\n\"Unexpected RPC error %(operation)s trunk %(trunk_id)s for subports %(subports)s: %(err)s\"\n\n\n\nAbove I\u0027m assuming %(operation)s is either \u0027wired\u0027 or \u0027unwired\u0027.","commit_id":"36582fd34cdc39f6a71d63a274c56fd4377681d2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b499978ae34aadfbc1a9dcc7cce921930addb30e","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                self.ovsdb_handler.report_trunk_status(ctx, trunk_id, status)"},{"line_number":68,"context_line":"            except oslo_messaging.MessagingException as e:"},{"line_number":69,"context_line":"                LOG.error(_LE("},{"line_number":70,"context_line":"                    \"Got an error from trunk rpc when wiring subports \""},{"line_number":71,"context_line":"                    \"%(subports)s for trunk %(trunk_id)s: %(err)s\"),"},{"line_number":72,"context_line":"                    {\u0027subports\u0027: subports,"},{"line_number":73,"context_line":"                     \u0027trunk_id\u0027: trunk_id,"},{"line_number":74,"context_line":"                     \u0027err\u0027: e})"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"def init_handler(resource, event, trigger, agent\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_23f9c180","line":74,"range":{"start_line":70,"start_character":20,"end_line":74,"end_character":31},"in_reply_to":"7a8ec9b2_a87930fe","updated":"2016-09-21 22:04:25.000000000","message":"Done","commit_id":"36582fd34cdc39f6a71d63a274c56fd4377681d2"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"2fa2cde6eaab5645dad94701d9744824344a4ae0","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"            ctx \u003d self.ovsdb_handler.context"},{"line_number":58,"context_line":"            try:"},{"line_number":59,"context_line":"                LOG.debug(\"Event %s for subports: %s\", event_type, subports)"},{"line_number":60,"context_line":"                if event_type \u003d\u003d events.CREATED:"},{"line_number":61,"context_line":"                    status \u003d self.ovsdb_handler.wire_subports_for_trunk("},{"line_number":62,"context_line":"                            ctx, trunk_id, subports)"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a8bc5a2_34f3580c","line":59,"updated":"2016-09-22 11:38:52.000000000","message":"Supernit: I think this LOG should be outside of try block","commit_id":"4371ae010a7888220bb67ca9bd423e54c0239fd4"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"da105fe7fd4e69a76eeebfc85d13ca76ccf9b872","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                    \"Error on event %(event)s for subports \""},{"line_number":71,"context_line":"                    \"%(subports)s: %(err)s\"),"},{"line_number":72,"context_line":"                    {\u0027event\u0027: event_type, \u0027subports\u0027: subports,"},{"line_number":73,"context_line":"                     \u0027trunk_id\u0027: trunk_id, \u0027err\u0027: e})"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def init_handler(resource, event, trigger, agent\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a8bc5a2_31314f06","line":73,"updated":"2016-09-23 18:36:58.000000000","message":"Late to the game, but trunk_id is never used in the LOG statement.","commit_id":"4371ae010a7888220bb67ca9bd423e54c0239fd4"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"57c8bad57a88064da76dca797c6260ed99a5d325","unresolved":false,"context_lines":[{"line_number":70,"context_line":"                    \"Error on event %(event)s for subports \""},{"line_number":71,"context_line":"                    \"%(subports)s: %(err)s\"),"},{"line_number":72,"context_line":"                    {\u0027event\u0027: event_type, \u0027subports\u0027: subports,"},{"line_number":73,"context_line":"                     \u0027trunk_id\u0027: trunk_id, \u0027err\u0027: e})"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def init_handler(resource, event, trigger, agent\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"5a8bc5a2_67d4f51f","line":73,"in_reply_to":"5a8bc5a2_31314f06","updated":"2016-09-23 19:08:37.000000000","message":"oh","commit_id":"4371ae010a7888220bb67ca9bd423e54c0239fd4"}],"neutron/services/trunk/drivers/openvswitch/agent/ovsdb_handler.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c19f7d5eb1b64290c5d0a08d5d6aee664a422c26","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        try:"},{"line_number":198,"context_line":"            parent_port_id, trunk_id, subport_ids \u003d self._get_trunk_metadata("},{"line_number":199,"context_line":"                port)"},{"line_number":200,"context_line":"            # NOTE(status_police): we do not report changes in trunk status on"},{"line_number":201,"context_line":"            # removal to avoid potential races between agents in case the event"},{"line_number":202,"context_line":"            # is due to a live migration or reassociation of a trunk to a new"},{"line_number":203,"context_line":"            # VM."}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_2bde1e11","line":200,"range":{"start_line":200,"start_character":19,"end_line":200,"end_character":32},"updated":"2016-09-21 12:39:26.000000000","message":"Was the idea of status_police to put it where we DO report status?","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"fcbe841b52f4dac23a70d6204fb3880a5ca8ce7f","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        try:"},{"line_number":198,"context_line":"            parent_port_id, trunk_id, subport_ids \u003d self._get_trunk_metadata("},{"line_number":199,"context_line":"                port)"},{"line_number":200,"context_line":"            # NOTE(status_police): we do not report changes in trunk status on"},{"line_number":201,"context_line":"            # removal to avoid potential races between agents in case the event"},{"line_number":202,"context_line":"            # is due to a live migration or reassociation of a trunk to a new"},{"line_number":203,"context_line":"            # VM."}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_23dab7e8","line":200,"range":{"start_line":200,"start_character":19,"end_line":200,"end_character":32},"in_reply_to":"7a8ec9b2_112d08a8","updated":"2016-09-21 15:17:40.000000000","message":"I see, though one might grep for status_police to get all places where we change status and he\u0027ll get all such places and this one.  My comment was more a question whether this is indeed intended.","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c392504d3158dac9cd3e098f9351487869dd8ea2","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        try:"},{"line_number":198,"context_line":"            parent_port_id, trunk_id, subport_ids \u003d self._get_trunk_metadata("},{"line_number":199,"context_line":"                port)"},{"line_number":200,"context_line":"            # NOTE(status_police): we do not report changes in trunk status on"},{"line_number":201,"context_line":"            # removal to avoid potential races between agents in case the event"},{"line_number":202,"context_line":"            # is due to a live migration or reassociation of a trunk to a new"},{"line_number":203,"context_line":"            # VM."}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_112d08a8","line":200,"range":{"start_line":200,"start_character":19,"end_line":200,"end_character":32},"in_reply_to":"7a8ec9b2_2bde1e11","updated":"2016-09-21 15:10:05.000000000","message":"yes, though here it\u0027s worth noting the fact that NO status report is done and why :)","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c19f7d5eb1b64290c5d0a08d5d6aee664a422c26","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def wire_subports_for_trunk(self, context, trunk_id, subports,"},{"line_number":219,"context_line":"                                trunk_bridge\u003dNone, parent_port\u003dNone):"},{"line_number":220,"context_line":"        \"\"\"Create OVS ports associated to the logical subports.\"\"\""},{"line_number":221,"context_line":"        # Tell the server that subports must be bound to this host."},{"line_number":222,"context_line":"        subport_bindings \u003d self.trunk_rpc.update_subport_bindings("},{"line_number":223,"context_line":"            context, subports)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_ab7dce1d","line":220,"range":{"start_line":220,"start_character":11,"end_line":220,"end_character":63},"updated":"2016-09-21 12:39:26.000000000","message":"We should update the docstring that we return a trunk status.\n\nSuggestion: I\u0027m also thinking that semantically \"current_status \u003d wire_subports_for_trunk\" doesn\u0027t make much sense. Would it make more sense to raise some status exception instead and make caller handle setting the status? Like\n\n trunk_status \u003d ACTIVE\n try:\n     wire_subports_for_trunk\n except TrunkError:\n     trunk_status \u003d DEGRADED\n\n self.report_trunk_status(trunk_status)","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"fcbe841b52f4dac23a70d6204fb3880a5ca8ce7f","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def wire_subports_for_trunk(self, context, trunk_id, subports,"},{"line_number":219,"context_line":"                                trunk_bridge\u003dNone, parent_port\u003dNone):"},{"line_number":220,"context_line":"        \"\"\"Create OVS ports associated to the logical subports.\"\"\""},{"line_number":221,"context_line":"        # Tell the server that subports must be bound to this host."},{"line_number":222,"context_line":"        subport_bindings \u003d self.trunk_rpc.update_subport_bindings("},{"line_number":223,"context_line":"            context, subports)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_83ef0b86","line":220,"range":{"start_line":220,"start_character":11,"end_line":220,"end_character":63},"in_reply_to":"7a8ec9b2_63b91f15","updated":"2016-09-21 15:17:40.000000000","message":"Fair enough","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c392504d3158dac9cd3e098f9351487869dd8ea2","unresolved":false,"context_lines":[{"line_number":217,"context_line":""},{"line_number":218,"context_line":"    def wire_subports_for_trunk(self, context, trunk_id, subports,"},{"line_number":219,"context_line":"                                trunk_bridge\u003dNone, parent_port\u003dNone):"},{"line_number":220,"context_line":"        \"\"\"Create OVS ports associated to the logical subports.\"\"\""},{"line_number":221,"context_line":"        # Tell the server that subports must be bound to this host."},{"line_number":222,"context_line":"        subport_bindings \u003d self.trunk_rpc.update_subport_bindings("},{"line_number":223,"context_line":"            context, subports)"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_63b91f15","line":220,"range":{"start_line":220,"start_character":11,"end_line":220,"end_character":63},"in_reply_to":"7a8ec9b2_ab7dce1d","updated":"2016-09-21 15:10:05.000000000","message":"I personally can see this both ways. It\u0027s perfectly reasonable for an operation to have a return status. The use of exceptions makes this more awkward than it needs to be but both solutions are viable.","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c19f7d5eb1b64290c5d0a08d5d6aee664a422c26","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                          {\u0027subport_id\u0027: subport_id,"},{"line_number":271,"context_line":"                           \u0027trunk_id\u0027: trunk_id,"},{"line_number":272,"context_line":"                           \u0027err\u0027: te})"},{"line_number":273,"context_line":"        return self._get_current_status(subport_ids, ids)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def report_trunk_status(self, context, trunk_id, status):"},{"line_number":276,"context_line":"        \"\"\"Report trunk status to the server.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_ab26aecb","line":273,"range":{"start_line":273,"start_character":0,"end_line":273,"end_character":57},"updated":"2016-09-21 12:39:26.000000000","message":"Nit: A different approach could be:\n\n trunk_status \u003d ACTIVE\n for subport_id in subport_ids:\n     try:\n         self.trunk_manager.remove_sub_port()\n     except TrunkManagerError:\n         LOG.error()\n         trunk_status \u003d DEGRADED\n\n return trunk_status","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c392504d3158dac9cd3e098f9351487869dd8ea2","unresolved":false,"context_lines":[{"line_number":270,"context_line":"                          {\u0027subport_id\u0027: subport_id,"},{"line_number":271,"context_line":"                           \u0027trunk_id\u0027: trunk_id,"},{"line_number":272,"context_line":"                           \u0027err\u0027: te})"},{"line_number":273,"context_line":"        return self._get_current_status(subport_ids, ids)"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    def report_trunk_status(self, context, trunk_id, status):"},{"line_number":276,"context_line":"        \"\"\"Report trunk status to the server.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_034dbb3d","line":273,"range":{"start_line":273,"start_character":0,"end_line":273,"end_character":57},"in_reply_to":"7a8ec9b2_ab26aecb","updated":"2016-09-21 15:10:05.000000000","message":"see above.","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c19f7d5eb1b64290c5d0a08d5d6aee664a422c26","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        # NOTE(status_police): inform the server whether the operation"},{"line_number":327,"context_line":"        # was a partial or complete success."},{"line_number":328,"context_line":"        self.report_trunk_status(ctx, trunk.id, self.wire_subports_for_trunk("},{"line_number":329,"context_line":"            ctx, trunk.id, trunk.sub_ports, trunk_bridge\u003dtrunk_br,"},{"line_number":330,"context_line":"            parent_port\u003dport))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _set_trunk_metadata(self, trunk_bridge, port, trunk_id, subport_ids):"},{"line_number":333,"context_line":"        \"\"\"Set trunk metadata in OVS port for trunk parent port.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_eb5276dd","line":330,"range":{"start_line":328,"start_character":0,"end_line":330,"end_character":30},"updated":"2016-09-21 12:39:26.000000000","message":"Nit: Can we split function call per line? It\u0027s a PITA when you attach debugged and then want to step in report_trunk_status.\n\n current_status \u003dself.wire_subports_for_trunk()\n self.report_trunk_status()","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c392504d3158dac9cd3e098f9351487869dd8ea2","unresolved":false,"context_lines":[{"line_number":325,"context_line":""},{"line_number":326,"context_line":"        # NOTE(status_police): inform the server whether the operation"},{"line_number":327,"context_line":"        # was a partial or complete success."},{"line_number":328,"context_line":"        self.report_trunk_status(ctx, trunk.id, self.wire_subports_for_trunk("},{"line_number":329,"context_line":"            ctx, trunk.id, trunk.sub_ports, trunk_bridge\u003dtrunk_br,"},{"line_number":330,"context_line":"            parent_port\u003dport))"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"    def _set_trunk_metadata(self, trunk_bridge, port, trunk_id, subport_ids):"},{"line_number":333,"context_line":"        \"\"\"Set trunk metadata in OVS port for trunk parent port.\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_a30b27d5","line":330,"range":{"start_line":328,"start_character":0,"end_line":330,"end_character":30},"in_reply_to":"7a8ec9b2_eb5276dd","updated":"2016-09-21 15:10:05.000000000","message":"sure","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"}],"neutron/tests/unit/services/trunk/drivers/openvswitch/agent/test_driver.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a557dc55db6cbb1f6124fc707df593f5140194e9","unresolved":false,"context_lines":[{"line_number":108,"context_line":"        trunk_rpc.update_trunk_status.side_effect \u003d ("},{"line_number":109,"context_line":"            oslo_messaging.MessagingException)"},{"line_number":110,"context_line":"        self.skeleton.handle_subports(self.subports, event)"},{"line_number":111,"context_line":"        trunk_rpc.update_trunk_status.assert_called_once_with("},{"line_number":112,"context_line":"            mock.ANY, self.trunk_id, mock.ANY)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_handle_subports_created_trunk_rpc_error_on_trunk_update(self):"},{"line_number":115,"context_line":"        with mock.patch.object("}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_e6a7fd08","line":112,"range":{"start_line":111,"start_character":0,"end_line":112,"end_character":46},"updated":"2016-09-21 15:24:08.000000000","message":"Do we really intend to validate trunk_id was passed? I think this test aims more testing of a state rather than interactions. That said, we should just make sure we already called update_trunk_status which means exception was raised and handled.","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"f01a4240af2e42236850d274ebd42e87dd9a388b","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            oslo_messaging.MessagingException)"},{"line_number":110,"context_line":"        self.skeleton.handle_subports(self.subports, event)"},{"line_number":111,"context_line":"        trunk_rpc.update_trunk_status.assert_called_once_with("},{"line_number":112,"context_line":"            mock.ANY, self.trunk_id, mock.ANY)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_handle_subports_created_trunk_rpc_error_on_trunk_update(self):"},{"line_number":115,"context_line":"        with mock.patch.object("}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_069869bf","line":112,"range":{"start_line":112,"start_character":37,"end_line":112,"end_character":45},"updated":"2016-09-21 15:33:55.000000000","message":"supernit: we could check the status here","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a94fda302d268a5a644736f9d3b94c52d233971f","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            oslo_messaging.MessagingException)"},{"line_number":110,"context_line":"        self.skeleton.handle_subports(self.subports, event)"},{"line_number":111,"context_line":"        trunk_rpc.update_trunk_status.assert_called_once_with("},{"line_number":112,"context_line":"            mock.ANY, self.trunk_id, mock.ANY)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def test_handle_subports_created_trunk_rpc_error_on_trunk_update(self):"},{"line_number":115,"context_line":"        with mock.patch.object("}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_ccd05756","line":112,"range":{"start_line":112,"start_character":37,"end_line":112,"end_character":45},"in_reply_to":"7a8ec9b2_069869bf","updated":"2016-09-21 19:01:21.000000000","message":"The method returning the state is being mocked. All this test cares about is that the call to update the trunk status to the server is done.","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a3f849df760769096934e2622ee9b3c7a6a8e935","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        self.assertFalse(self.trunk_manager.unwire_subports_for_trunk.called)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test_handle_subports_unknown_event(self):"},{"line_number":95,"context_line":"        self.skeleton.handle_subports(self.subports, events.UPDATED)"},{"line_number":96,"context_line":"        trunk_rpc \u003d self.skeleton.ovsdb_handler.trunk_rpc"},{"line_number":97,"context_line":"        # unknown events should be ignored and thus lead to no updates"},{"line_number":98,"context_line":"        # and no trunk interactions"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_43db2d7c","line":95,"range":{"start_line":95,"start_character":8,"end_line":95,"end_character":68},"updated":"2016-09-21 21:54:28.000000000","message":"Should this call be done inside your \u0027with mock.patch...:\u0027 below?","commit_id":"36582fd34cdc39f6a71d63a274c56fd4377681d2"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b499978ae34aadfbc1a9dcc7cce921930addb30e","unresolved":false,"context_lines":[{"line_number":92,"context_line":"        self.assertFalse(self.trunk_manager.unwire_subports_for_trunk.called)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test_handle_subports_unknown_event(self):"},{"line_number":95,"context_line":"        self.skeleton.handle_subports(self.subports, events.UPDATED)"},{"line_number":96,"context_line":"        trunk_rpc \u003d self.skeleton.ovsdb_handler.trunk_rpc"},{"line_number":97,"context_line":"        # unknown events should be ignored and thus lead to no updates"},{"line_number":98,"context_line":"        # and no trunk interactions"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_a32b11ea","line":95,"range":{"start_line":95,"start_character":8,"end_line":95,"end_character":68},"in_reply_to":"7a8ec9b2_43db2d7c","updated":"2016-09-21 22:04:25.000000000","message":"doh","commit_id":"36582fd34cdc39f6a71d63a274c56fd4377681d2"}],"neutron/tests/unit/services/trunk/drivers/openvswitch/agent/test_ovsdb_handler.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a557dc55db6cbb1f6124fc707df593f5140194e9","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                resource_id\u003d\u0027id\u0027, resource_type\u003d\u0027type\u0027))"},{"line_number":222,"context_line":"        self.ovsdb_handler._wire_trunk(mock.Mock(), self.fake_port)"},{"line_number":223,"context_line":"        trunk_rpc \u003d self.ovsdb_handler.trunk_rpc"},{"line_number":224,"context_line":"        self.assertFalse(trunk_rpc.update_trunk_status.call_count)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def test__wire_trunk_create_trunk_failure(self):"},{"line_number":227,"context_line":"        self.trunk_manager.create_trunk.side_effect \u003d ("}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_c6c76196","line":224,"range":{"start_line":224,"start_character":55,"end_line":224,"end_character":65},"updated":"2016-09-21 15:24:08.000000000","message":"Nit: called","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a94fda302d268a5a644736f9d3b94c52d233971f","unresolved":false,"context_lines":[{"line_number":221,"context_line":"                resource_id\u003d\u0027id\u0027, resource_type\u003d\u0027type\u0027))"},{"line_number":222,"context_line":"        self.ovsdb_handler._wire_trunk(mock.Mock(), self.fake_port)"},{"line_number":223,"context_line":"        trunk_rpc \u003d self.ovsdb_handler.trunk_rpc"},{"line_number":224,"context_line":"        self.assertFalse(trunk_rpc.update_trunk_status.call_count)"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def test__wire_trunk_create_trunk_failure(self):"},{"line_number":227,"context_line":"        self.trunk_manager.create_trunk.side_effect \u003d ("}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_cc605738","line":224,"range":{"start_line":224,"start_character":55,"end_line":224,"end_character":65},"in_reply_to":"7a8ec9b2_c6c76196","updated":"2016-09-21 19:01:21.000000000","message":"Done","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"a557dc55db6cbb1f6124fc707df593f5140194e9","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                                  \u0027wire_subports_for_trunk\u0027):"},{"line_number":238,"context_line":"            self.ovsdb_handler._wire_trunk(mock.Mock(), self.fake_port)"},{"line_number":239,"context_line":"            trunk_rpc \u003d self.ovsdb_handler.trunk_rpc"},{"line_number":240,"context_line":"            self.assertTrue(trunk_rpc.update_trunk_status.call_count)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    @mock.patch(\u0027neutron.agent.common.ovs_lib.OVSBridge\u0027)"},{"line_number":243,"context_line":"    def test__set_trunk_metadata_with_None_params(self, br):"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_a63df590","line":240,"range":{"start_line":240,"start_character":58,"end_line":240,"end_character":68},"updated":"2016-09-21 15:24:08.000000000","message":"ditto","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"a94fda302d268a5a644736f9d3b94c52d233971f","unresolved":false,"context_lines":[{"line_number":237,"context_line":"                                  \u0027wire_subports_for_trunk\u0027):"},{"line_number":238,"context_line":"            self.ovsdb_handler._wire_trunk(mock.Mock(), self.fake_port)"},{"line_number":239,"context_line":"            trunk_rpc \u003d self.ovsdb_handler.trunk_rpc"},{"line_number":240,"context_line":"            self.assertTrue(trunk_rpc.update_trunk_status.call_count)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    @mock.patch(\u0027neutron.agent.common.ovs_lib.OVSBridge\u0027)"},{"line_number":243,"context_line":"    def test__set_trunk_metadata_with_None_params(self, br):"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_ec651345","line":240,"range":{"start_line":240,"start_character":58,"end_line":240,"end_character":68},"in_reply_to":"7a8ec9b2_a63df590","updated":"2016-09-21 19:01:21.000000000","message":"Done","commit_id":"21472f1b31d8f5c47c1907cd427527aa1ad99964"}]}
