def _supported_baremetal_transaction(self, context):
port = context.current<EOL>if self.trunk.is_trunk_subport_baremetal(port):<EOL><INDENT>return self._baremetal_set_binding(context)<EOL><DEDENT>if not nexus_help.is_baremetal(port):<EOL><INDENT>return False<EOL><DEDENT>if bc.portbindings.PROFILE not in port:<EOL><INDENT>return False<EOL><DEDENT>profile = port[bc.portbindings.PROFILE]<EOL>if '<STR_LIT>' not in profile:<EOL><INDENT>return False<EOL><DEDENT>all_link_info = profile['<STR_LIT>']<EOL>selected = False<EOL>for link_info in all_link_info:<EOL><INDENT>if '<STR_LIT>' not in link_info:<EOL><INDENT>return False<EOL><DEDENT>switch_info = self._get_baremetal_switch_info(<EOL>link_info)<EOL>if '<STR_LIT>' in switch_info:<EOL><INDENT>switch_ip = switch_info['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT>if self._switch_defined(switch_ip):<EOL><INDENT>selected = True<EOL><DEDENT>else:<EOL><INDENT>LOG.warning("<STR_LIT>"<EOL>"<STR_LIT>" % switch_ip)<EOL><DEDENT><DEDENT>if not selected:<EOL><INDENT>return False<EOL><DEDENT>selected = self._baremetal_set_binding(context, all_link_info)<EOL>if selected:<EOL><INDENT>self._init_baremetal_trunk_interfaces(<EOL>context.current, context.top_bound_segment)<EOL>if self.trunk.is_trunk_parentport(port):<EOL><INDENT>self.trunk.update_subports(port)<EOL><DEDENT><DEDENT>return selected<EOL>
Verify transaction is complete and for us.