Execute a prlsrvctl command

    .. versionadded:: 2016.11.0

    :param str sub_cmd:
        prlsrvctl subcommand to execute

    :param str args:
        The arguments supplied to ``prlsrvctl <sub_cmd>``

    :param str runas:
        The user that the prlsrvctl command will be run as

    Example:

    .. code-block:: bash

        salt '*' parallels.prlsrvctl info runas=macdev
        salt '*' parallels.prlsrvctl usb list runas=macdev
        salt -- '*' parallels.prlsrvctl set '--mem-limit auto' runas=macdev

def prlsrvctl(sub_cmd, args=None, runas=None):
    '''
    Execute a prlsrvctl command

    .. versionadded:: 2016.11.0

    :param str sub_cmd:
        prlsrvctl subcommand to execute

    :param str args:
        The arguments supplied to ``prlsrvctl <sub_cmd>``

    :param str runas:
        The user that the prlsrvctl command will be run as

    Example:

    .. code-block:: bash

        salt '*' parallels.prlsrvctl info runas=macdev
        salt '*' parallels.prlsrvctl usb list runas=macdev
        salt -- '*' parallels.prlsrvctl set '--mem-limit auto' runas=macdev
    '''
    if not salt.utils.path.which('prlsrvctl'):
        raise CommandExecutionError('prlsrvctl utility not available')

    # Construct command
    cmd = ['prlsrvctl', sub_cmd]
    if args:
        cmd.extend(_normalize_args(args))

    # Execute command and return output
    return __salt__['cmd.run'](cmd, runas=runas)