def initialize_all_switch_interfaces(self, interfaces):

        if not interfaces:
            return

        starttime = time.time()
        ifs = []
        for i in range(len(interfaces)):
            nexus_host, intf_type, nexus_port, is_native = interfaces[i]
            response = self.get_interface_switch(
                           nexus_host, intf_type, nexus_port)
            # Collect the port-channel number from response
            mo = re.search("channel-group\s(\d*)\s", response)
            try:
                ch_grp = int(mo.group(1))
            except Exception:
                ch_grp = 0
            if ch_grp is not 0:
                # if channel-group returned, init port-channel
                # instead of the provided ethernet interface
                intf_type = 'port-channel'
                nexus_port = str(ch_grp)
            interfaces[i] += (ch_grp,)
            if (response and
               "switchport trunk allowed vlan" in response):
                pass
            else:
                ifs.append(self.build_intf_confstr(
                           snipp.CMD_INT_VLAN_SNIPPET,
                           intf_type, nexus_port, 'None'))
        if ifs:
            confstr = self.create_xml_snippet(''.join(ifs))
            self._edit_config(nexus_host, target='running',
                              config=confstr)
        self.capture_and_print_timeshot(
            starttime, "get_allif", switch=nexus_host)
Returns whether or not a public key is currently authorized.
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/plugins/ml2/drivers/cisco/nexus/nexus_network_driver.py/CiscoNexusDriver.initialize_all_switch_interfaces--crossover with--dataset/ETHPy150Open reviewboard/reviewboard/reviewboard/ssh/client.py/SSHClient.is_key_authorized