def get_newly_added_slot_name_cmd(mts, lpar_id, slotnum):
    """
    run cfgdev of the newly configured virtual slot and return the
    VIOS device name for that slot.

    :param mts: PowerVM MTS string for virtual adapter
    :param lpar_id: LPAR id
    :param slotnum: virtual slot number
    :returns: A VIOS command that returns the device name based on physloc
    """
    return ('ioscli cfgdev -dev vio0 && ioscli lsdev -plc '
            '%(mts)s-V%(lparid)s-C%(slot)s-T1 -fmt : '
            ' -field name' %
            {'mts': mts,
             'lparid': lpar_id,
             'slot': slotnum})