def METHOD_NAME(self, port_name):
    # Strip "Ethernet" off port name
    if not port_name.startswith(self.SONIC_PORT_NAME_PREFIX):
        return -1
    port_idx = int(port_name[len(self.SONIC_PORT_NAME_PREFIX):])
    return port_idx