@lockutils.synchronized('<STR_LIT>')<EOL><INDENT>def create_port_postcommit(self, context):<DEDENT>
<EOL>vlan_segment, vxlan_segment = self._get_segments(<EOL>context.top_bound_segment,<EOL>context.bottom_bound_segment)<EOL>if not self._is_valid_segment(vlan_segment):<EOL><INDENT>return<EOL><DEDENT>port = context.current<EOL>if self._is_supported_deviceowner(port):<EOL><INDENT>if nexus_help.is_baremetal(context.current):<EOL><INDENT>all_switches, active_switches = (<EOL>self._get_baremetal_switches(context.current))<EOL><DEDENT>else:<EOL><INDENT>host_id = context.current.get(bc.portbindings.HOST_ID)<EOL>all_switches, active_switches = (<EOL>self._get_host_switches(host_id))<EOL><DEDENT>verified_active_switches = []<EOL>for switch_ip in active_switches:<EOL><INDENT>try:<EOL><INDENT>self.driver.get_nexus_type(switch_ip)<EOL>verified_active_switches.append(switch_ip)<EOL><DEDENT>except Exception as e:<EOL><INDENT>LOG.error("<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT>': switch_ip, '<STR_LIT>': e})<EOL><DEDENT><DEDENT>LOG.debug("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>",<EOL>{'<STR_LIT>': threading.current_thread().ident,<EOL>'<STR_LIT:all>': len(all_switches),<EOL>'<STR_LIT>': len(active_switches),<EOL>'<STR_LIT>': len(verified_active_switches)})<EOL>if all_switches and not verified_active_switches:<EOL><INDENT>raise excep.NexusConnectFailed(<EOL>nexus_host=all_switches[<NUM_LIT:0>], config="<STR_LIT:None>",<EOL>exc="<STR_LIT>"<EOL>"<STR_LIT>")<EOL><DEDENT><DEDENT>
Create port non-database commit event.