<s> from openstack . compute import compute_service <EOL> from openstack import resource <EOL> class Keypair ( resource . Resource ) : <EOL> id_attribute = '<STR_LIT:name>' <EOL> name_attribute = None <EOL> resource_key = '<STR_LIT>' <EOL> resources_key = '<STR_LIT>' <EOL> base_path = '<STR_LIT>' <EOL> service = compute_service . ComputeService ( ) <EOL> allow_create = True <EOL> allow_retrieve = True <EOL> allow_update = True <EOL> allow_delete = True <EOL> allow_list = True <EOL> fingerprint = resource . prop ( '<STR_LIT>' ) <EOL> name = resource . prop ( '<STR_LIT:name>' ) <EOL> private_key = resource . prop ( '<STR_LIT>' ) <EOL> public_key = resource . prop ( '<STR_LIT>' ) <EOL> def __init__ ( self , attrs = None , loaded = False ) : <EOL> if attrs is not None : <EOL> if '<STR_LIT>' in attrs : <EOL> attrs = attrs [ '<STR_LIT>' ] <EOL> super ( Keypair , self ) . __init__ ( attrs , loaded = loaded ) <EOL> def create ( self , session ) : <EOL> """<STR_LIT>""" <EOL> resp = self . create_by_id ( session , self . _attrs ) <EOL> self . _attrs = resp <EOL> self . _reset_dirty ( ) <EOL> return self </s>
