def cli(self, eauth):
        '''
        Execute the CLI options to fill in the extra data needed for the
        defined eauth system
        '''
        ret = {}
        if not eauth:
            print('External authentication system has not been specified')
            return ret
        fstr = '{0}.auth'.format(eauth)
        if fstr not in self.auth:
            print(('The specified external authentication system "{0}" is '
                   'not available').format(eauth))
            print("Available eauth types: {0}".format(", ".join(self.auth.file_mapping.keys())))
            return ret

        args = salt.utils.args.arg_lookup(self.auth[fstr])
        for arg in args['args']:
            if arg in self.opts:
                ret[arg] = self.opts[arg]
            elif arg.startswith('pass'):
                ret[arg] = getpass.getpass('{0}: '.format(arg))
            else:
                ret[arg] = input('{0}: '.format(arg))
        for kwarg, default in list(args['kwargs'].items()):
            if kwarg in self.opts:
                ret['kwarg'] = self.opts[kwarg]
            else:
                ret[kwarg] = input('{0} [{1}]: '.format(kwarg, default))

        # Use current user if empty
        if 'username' in ret and not ret['username']:
            ret['username'] = salt.utils.user.get_user()

        return ret
def cli ( self , eauth ) : ret = { } if not eauth : print ( 'External authentication system has not been specified' ) return ret fstr = '{0}.auth' . format ( eauth ) if fstr not in self . auth : print ( ( 'The specified external authentication system "{0}" is ' 'not available' ) . format ( eauth ) ) print ( "Available eauth types: {0}" . format ( ", " . join ( self . auth . file_mapping . keys ( ) ) ) ) return ret args = salt . utils . args . arg_lookup ( self . auth [ fstr ] ) for arg in args [ 'args' ] : if arg in self . opts : ret [ arg ] = self . opts [ arg ] elif arg . startswith ( 'pass' ) : ret [ arg ] = getpass . getpass ( '{0}: ' . format ( arg ) ) else : ret [ arg ] = input ( '{0}: ' . format ( arg ) ) for kwarg , default in list ( args [ 'kwargs' ] . items ( ) ) : if kwarg in self . opts : ret [ 'kwarg' ] = self . opts [ kwarg ] else : ret [ kwarg ] = input ( '{0} [{1}]: ' . format ( kwarg , default ) ) if 'username' in ret and not ret [ 'username' ] : ret [ 'username' ] = salt . utils . user . get_user ( ) return ret
Execute the CLI options to fill in the extra data needed for the
        defined eauth system