def format_interface_name(self, intf_type, port, ch_grp=0):
        """Method to format interface name given type, port.

        Given interface type, port, and channel-group, this
        method formats an interface name.  If channel-group is
        non-zero, then port-channel is configured.

        :param intf_type: Such as 'ethernet' or 'port-channel'
        :param port: unique identification -- 1/32 or 1
        :ch_grp: If non-zero, ignore other params and format
                 port-channel<ch_grp>
        :returns: the full formatted interface name.
                  ex: ethernet:1/32, port-channel:1
        """
        if ch_grp > 0:
            return 'port-channel:%s' % str(ch_grp)

        return '%s:%s' % (intf_type, port)
dataset/ETHPy150Open openstack/networking-cisco/networking_cisco/plugins/ml2/drivers/cisco/nexus/mech_cisco_nexus.py/CiscoNexusMechanismDriver.format_interface_name/original