def initialize_baremetal_switch_interfaces(self, interfaces):
if not interfaces:<EOL><INDENT>return<EOL><DEDENT>max_ifs = len(interfaces)<EOL>starttime = time.time()<EOL>learned, nexus_ip_list = self._build_host_list_and_verify_chgrp(<EOL>interfaces)<EOL>if not nexus_ip_list:<EOL><INDENT>return<EOL><DEDENT>if max_ifs > <NUM_LIT:1>:<EOL><INDENT>if learned:<EOL><INDENT>ch_grp = interfaces[<NUM_LIT:0>][-<NUM_LIT:1>]<EOL>self._configure_learned_port_channel(<EOL>nexus_ip_list, ch_grp)<EOL><DEDENT>else:<EOL><INDENT>ch_grp = self._get_new_baremetal_portchannel_id(nexus_ip_list)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>ch_grp = <NUM_LIT:0><EOL><DEDENT>for i, (nexus_host, intf_type, nexus_port, is_native,<EOL>ch_grp_saved) in enumerate(interfaces):<EOL><INDENT>if max_ifs > <NUM_LIT:1>:<EOL><INDENT>if learned:<EOL><INDENT>ch_grp = ch_grp_saved<EOL><DEDENT>else:<EOL><INDENT>self._config_new_baremetal_portchannel(<EOL>ch_grp, nexus_host, intf_type, nexus_port)<EOL>self._replace_interface_ch_grp(interfaces, i, ch_grp)<EOL><DEDENT>intf_type = '<STR_LIT>'<EOL>nexus_port = str(ch_grp)<EOL><DEDENT>else:<EOL><INDENT>self._replace_interface_ch_grp(interfaces, i, ch_grp)<EOL><DEDENT>trunk_mode_present, vlan_present = (<EOL>self._get_interface_switch_trunk_present(<EOL>nexus_host, intf_type, nexus_port))<EOL>if not vlan_present:<EOL><INDENT>self.send_enable_vlan_on_trunk_int(<EOL>nexus_host, "<STR_LIT>", intf_type, nexus_port, False,<EOL>not trunk_mode_present)<EOL><DEDENT>elif not trunk_mode_present:<EOL><INDENT>LOG.warning(TRUNK_MODE_NOT_FOUND, nexus_host,<EOL>nexus_help.format_interface_name(<EOL>intf_type, nexus_port))<EOL><DEDENT><DEDENT>self.capture_and_print_timeshot(<EOL>starttime, "<STR_LIT>",<EOL>switch=nexus_host)<EOL>
Initialize Nexus interfaces and for initial baremetal event.

        This get/create port channel number, applies channel-group to
        ethernet interface, and initializes trunking on interface.

        :param interfaces: Receive a list of interfaces containing:
            nexus_host: IP address of Nexus switch
            intf_type: String which specifies interface type. example: ethernet
            interface: String indicating which interface. example: 1/19
            is_native: Whether native vlan must be configured.
            ch_grp: May replace port channel to each entry.  channel number is
            0 if none