<s> from novaclient import base <EOL> from novaclient import utils <EOL> class ListExtResource ( base . Resource ) : <EOL> @ property <EOL> def summary ( self ) : <EOL> descr = self . description . strip ( ) <EOL> if not descr : <EOL> return '<STR_LIT>' <EOL> lines = descr . split ( "<STR_LIT:\n>" ) <EOL> if len ( lines ) == <NUM_LIT:1> : <EOL> return lines [ <NUM_LIT:0> ] <EOL> else : <EOL> return lines [ <NUM_LIT:0> ] + "<STR_LIT>" <EOL> class ListExtManager ( base . Manager ) : <EOL> resource_class = ListExtResource <EOL> def show_all ( self ) : <EOL> return self . _list ( "<STR_LIT>" , '<STR_LIT>' ) <EOL> def do_list_extensions ( client , _args ) : <EOL> """<STR_LIT>""" <EOL> extensions = client . list_extensions . show_all ( ) <EOL> fields = [ "<STR_LIT:Name>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] <EOL> utils . print_list ( extensions , fields ) </s>
