def ch_config(cmd, *args, **kwargs):
    '''
    This function is called by the
    :doc:`salt.modules.esxi.cmd </ref/modules/all/salt.modules.esxi>` shim.
    It then calls whatever is passed in ``cmd`` inside the
    :doc:`salt.modules.vsphere </ref/modules/all/salt.modules.vsphere>` module.
    Passes the return through from the vsphere module.

    cmd
        The command to call inside salt.modules.vsphere

    args
        Arguments that need to be passed to that command.

    kwargs
        Keyword arguments that need to be passed to that command.

    '''
    # Strip the __pub_ keys...is there a better way to do this?
    for k in kwargs.keys():
        if k.startswith('__pub_'):
            kwargs.pop(k)

    if 'vsphere.' + cmd not in __salt__:
        return {'retcode': -1, 'message': 'vsphere.' + cmd + ' is not available.'}
    else:
        return __salt__['vsphere.' + cmd](*args, **kwargs)
dataset/ETHPy150Open saltstack/salt/salt/proxy/esxi.py/ch_config/original