)]}'
{"nova_powervm/virt/powervm/vif.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"295c18f86670921e7783e5509223ab5507b69555","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        # The networking-powervm neutron agent will also send it, if so via"},{"line_number":336,"context_line":"        # the vif details."},{"line_number":337,"context_line":"        vlan \u003d vif[\u0027network\u0027][\u0027meta\u0027].get(\u0027vlan\u0027, None)"},{"line_number":338,"context_line":"        if not vlan:"},{"line_number":339,"context_line":"            vlan \u003d int(vif[\u0027details\u0027][\u0027vlan\u0027])"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        LOG.debug(\"Creating SEA based VIF with VLAN %s\" % str(vlan))"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_ba59de5c","line":338,"range":{"start_line":338,"start_character":11,"end_line":338,"end_character":19},"updated":"2016-08-26 21:11:55.000000000","message":"This would include a vlan of zero.  Is that a legitimate case where we want to get it from details?\n\n(If so, you could stuff the rhs of the next line into the second get() arg and save 2LOC ;-)","commit_id":"9d74bcb9aaf1701639892b1fe0b3e52d59dfcc33"},{"author":{"_account_id":14581,"name":"ymadhavi@in.ibm.com","email":"ymadhavi@in.ibm.com","username":"ymadhavi"},"change_message_id":"bc4a85ae48201e75ec4e1dec055b1bea0ea42340","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        # The networking-powervm neutron agent will also send it, if so via"},{"line_number":336,"context_line":"        # the vif details."},{"line_number":337,"context_line":"        vlan \u003d vif[\u0027network\u0027][\u0027meta\u0027].get(\u0027vlan\u0027, None)"},{"line_number":338,"context_line":"        if not vlan:"},{"line_number":339,"context_line":"            vlan \u003d int(vif[\u0027details\u0027][\u0027vlan\u0027])"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        LOG.debug(\"Creating SEA based VIF with VLAN %s\" % str(vlan))"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_0db93d2e","line":338,"range":{"start_line":338,"start_character":11,"end_line":338,"end_character":19},"in_reply_to":"fa7ab95a_201f3f60","updated":"2016-08-30 06:56:30.000000000","message":"As you mentioned if vlan is not there in network meta, vlan would be None and CNA creation will proceed with vlan as None? or we should stop creating CNA or default to something?","commit_id":"9d74bcb9aaf1701639892b1fe0b3e52d59dfcc33"},{"author":{"_account_id":8190,"name":"Drew Thorstensen (thorst)","email":"thorst@us.ibm.com","username":"thorst"},"change_message_id":"643b17168d376e84f9994a08eb526b98e6beeecf","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        # The networking-powervm neutron agent will also send it, if so via"},{"line_number":336,"context_line":"        # the vif details."},{"line_number":337,"context_line":"        vlan \u003d vif[\u0027network\u0027][\u0027meta\u0027].get(\u0027vlan\u0027, None)"},{"line_number":338,"context_line":"        if not vlan:"},{"line_number":339,"context_line":"            vlan \u003d int(vif[\u0027details\u0027][\u0027vlan\u0027])"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        LOG.debug(\"Creating SEA based VIF with VLAN %s\" % str(vlan))"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_201f3f60","line":338,"range":{"start_line":338,"start_character":11,"end_line":338,"end_character":19},"in_reply_to":"fa7ab95a_ba59de5c","updated":"2016-08-28 13:26:38.000000000","message":"So, I initially did stick it in the second line of the None.\n\nBut here\u0027s the thing, vif[\u0027details\u0027][\u0027vlan\u0027] would then get invoked first.  And that is not guaranteed to be there (unless using neutron and sea agent).\n\nI could have made it...\n\nvlan \u003d vif[\u0027network\u0027][\u0027meta\u0027].get(\u0027vlan\u0027,\n    int(vif[\u0027details\u0027].get(\u0027vlan\u0027, 0))\n\nBut I felt that was more confusing.","commit_id":"9d74bcb9aaf1701639892b1fe0b3e52d59dfcc33"}]}
