#NEWLINE# def _to_target( self , element ) : #NEWLINE# #INDENT# backup = findall ( element , 'backup' , TYPES_URN ) #NEWLINE# if ( len ( backup ) == 0 ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# extra = { #NEWLINE# #INDENT# 'description' : findtext ( element , 'description' , TYPES_URN ) , #NEWLINE# 'sourceImageId' : findtext ( element , 'sourceImageId' , TYPES_URN ) , #NEWLINE# 'datacenterId' : element . get ( 'datacenterId' ) , #NEWLINE# 'deployedTime' : findtext ( element , 'createTime' , TYPES_URN ) , #NEWLINE# 'servicePlan' : backup [ 0 ] . get ( 'servicePlan' ) , #NEWLINE# #UNINDENT# } #NEWLINE# n = BackupTarget ( id = backup [ 0 ] . get ( 'assetId' ) , name = findtext ( element , 'name' , TYPES_URN ) , address = element . get ( 'id' ) , driver = self . connection . driver , type = BackupTargetType . VIRTUAL , extra = extra ) #NEWLINE# return n