#NEWLINE# def get_record( self , zone_id , record_id ) : #NEWLINE# #INDENT# '\n        Return a Record instance.\n\n        :param zone_id: ID of the required zone\n        :type  zone_id: ``str``\n\n        :param record_id: ID of the required record\n        :type  record_id: ``str``\n\n        :rtype: :class:`Record`\n        ' #NEWLINE# schema_params = SCHEMA_BUILDER_MAP . get ( 'get_record' ) #NEWLINE# attributes = schema_params . get ( 'attributes' ) #NEWLINE# schema = api_schema_builder ( schema_params . get ( 'urn_nid' ) , schema_params . get ( 'method' ) , attributes ) #NEWLINE# params = { #NEWLINE# #INDENT# 'apiuser' : self . key , #NEWLINE# 'apikey' : self . secret , #NEWLINE# 'zonename' : zone_id , #NEWLINE# 'recordid' : record_id , #NEWLINE# #UNINDENT# } #NEWLINE# urn = schema . getchildren ( ) [ 0 ] #NEWLINE# for child in urn : #NEWLINE# #INDENT# key = child . tag . split ( ':' ) [ 2 ] #NEWLINE# if ( key in attributes ) : #NEWLINE# #INDENT# child . text = str ( params . get ( key ) ) #NEWLINE# #UNINDENT# #UNINDENT# req_data = tostring ( schema ) #NEWLINE# action = '/services/dns/getRecord.php?' #NEWLINE# params = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# headers = { #NEWLINE# #INDENT# 'SOAPAction' : 'urn:getRecordwsdl#getRecord' , #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# response = self . connection . request ( action = action , params = params , data = req_data , method = 'POST' , headers = headers ) #NEWLINE# #UNINDENT# except DurableDNSException : #NEWLINE# #INDENT# e = sys . exc_info ( ) [ 1 ] #NEWLINE# if ( 'Zone does not exist' in e . message ) : #NEWLINE# #INDENT# raise ZoneDoesNotExistError ( zone_id = zone_id , driver = self , value = e . message ) #NEWLINE# #UNINDENT# if ( 'Record does not exist' in e . message ) : #NEWLINE# #INDENT# raise RecordDoesNotExistError ( record_id = record_id , driver = self , value = e . message ) #NEWLINE# #UNINDENT# raise e #NEWLINE# #UNINDENT# zone = self . get_zone ( zone_id ) #NEWLINE# record = self . _to_record ( response . objects [ 0 ] , zone ) #NEWLINE# return record_id