<s> from cinderclient import base <EOL> class QuotaSet ( base . Resource ) : <EOL> @ property <EOL> def id ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . tenant_id <EOL> def update ( self , * args , ** kwargs ) : <EOL> return self . manager . update ( self . tenant_id , * args , ** kwargs ) <EOL> class QuotaSetManager ( base . Manager ) : <EOL> resource_class = QuotaSet <EOL> def get ( self , tenant_id , usage = False ) : <EOL> if hasattr ( tenant_id , '<STR_LIT>' ) : <EOL> tenant_id = tenant_id . tenant_id <EOL> return self . _get ( "<STR_LIT>" % ( tenant_id , usage ) , <EOL> "<STR_LIT>" ) <EOL> def update ( self , tenant_id , ** updates ) : <EOL> body = { '<STR_LIT>' : { '<STR_LIT>' : tenant_id } } <EOL> for update in updates : <EOL> body [ '<STR_LIT>' ] [ update ] = updates [ update ] <EOL> result = self . _update ( '<STR_LIT>' % ( tenant_id ) , body ) <EOL> return self . resource_class ( self , result [ '<STR_LIT>' ] , loaded = True ) <EOL> def defaults ( self , tenant_id ) : <EOL> return self . _get ( '<STR_LIT>' % tenant_id , <EOL> '<STR_LIT>' ) <EOL> def delete ( self , tenant_id ) : <EOL> if hasattr ( tenant_id , '<STR_LIT>' ) : <EOL> tenant_id = tenant_id . tenant_id <EOL> return self . _delete ( "<STR_LIT>" % tenant_id ) </s>
