<s> """<STR_LIT>""" <EOL> from lmi . scripts . common import command <EOL> from lmi . scripts import sssd <EOL> class List ( command . LmiLister ) : <EOL> COLUMNS = ( '<STR_LIT:Name>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> def execute ( self , ns , _enabled , _disabled ) : <EOL> kind = '<STR_LIT:all>' <EOL> if _enabled : <EOL> kind = '<STR_LIT>' <EOL> elif _disabled : <EOL> kind = '<STR_LIT>' <EOL> for s in sorted ( sssd . list_backends ( ns , kind ) , key = lambda i : i . Name ) : <EOL> yield ( s . Name , s . IsEnabled , sssd . debug_level ( s . DebugLevel ) , <EOL> sssd . get_provider ( ns , '<STR_LIT>' , s ) ) <EOL> class Show ( command . LmiShowInstance ) : <EOL> DYNAMIC_PROPERTIES = True <EOL> def execute ( self , ns , domain ) : <EOL> for backend in ns . LMI_SSSDBackend . instances ( ) : <EOL> if backend . Name == domain and not backend . IsEnabled : <EOL> columns = ( <EOL> '<STR_LIT:Name>' , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> return columns , backend <EOL> columns = ( <EOL> '<STR_LIT:Name>' , <EOL> ( '<STR_LIT>' , lambda i : True ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , lambda i : '<STR_LIT:U+002CU+0020>' . join ( i . PrimaryServers ) ) , <EOL> ( '<STR_LIT>' , lambda i : '<STR_LIT:U+002CU+0020>' . join ( i . BackupServers ) ) , <EOL> ( '<STR_LIT>' , lambda i : sssd . list_subdomains_comma_separated ( ns , i ) ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) ) <EOL> return columns , sssd . get_domain ( ns , domain ) <EOL> class Enable ( command . LmiCheckResult ) : <EOL> CALLABLE = sssd . enable_backend <EOL> EXPECT = <NUM_LIT:0> <EOL> class Disable ( command . LmiCheckResult ) : <EOL> CALLABLE = sssd . disable_backend <EOL> EXPECT = <NUM_LIT:0> <EOL> class DomainCommands ( command . LmiCommandMultiplexer ) : <EOL> COMMANDS = { <EOL> '<STR_LIT:list>' : List , <EOL> '<STR_LIT>' : Show , <EOL> '<STR_LIT>' : Enable , <EOL> '<STR_LIT>' : Disable <EOL> } <EOL> OWN_USAGE = __doc__ </s>
