<s> from rack . api import common <EOL> from rack . openstack . common import log as logging <EOL> LOG = logging . getLogger ( __name__ ) <EOL> class ViewBuilder ( common . ViewBuilder ) : <EOL> """<STR_LIT>""" <EOL> def index ( self , keypair_list ) : <EOL> return dict ( keypairs = [ self . _base_response ( keypair ) <EOL> for keypair in keypair_list ] ) <EOL> def show ( self , keypair ) : <EOL> base = self . _base_response ( keypair ) <EOL> return dict ( keypair = base ) <EOL> def create ( self , keypair ) : <EOL> base = self . _base_response ( keypair ) <EOL> base . pop ( '<STR_LIT:status>' ) <EOL> return dict ( keypair = base ) <EOL> def update ( self , keypair ) : <EOL> base = self . _base_response ( keypair ) <EOL> base . pop ( "<STR_LIT:status>" ) <EOL> return dict ( keypair = base ) <EOL> def _base_response ( self , keypair ) : <EOL> return { <EOL> "<STR_LIT>" : keypair . get ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" : keypair . get ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" : keypair . get ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" : keypair . get ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" : keypair . get ( "<STR_LIT>" ) , <EOL> "<STR_LIT:name>" : keypair . get ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" : keypair . get ( "<STR_LIT>" ) , <EOL> "<STR_LIT>" : keypair . get ( "<STR_LIT>" ) , <EOL> "<STR_LIT:status>" : keypair . get ( "<STR_LIT:status>" ) <EOL> } </s>
