#NEWLINE# def _translate_floating_ip_view( floating_ip ) : #NEWLINE# #INDENT# result = { #NEWLINE# #INDENT# 'id' : floating_ip [ 'id' ] , #NEWLINE# 'ip' : floating_ip [ 'address' ] , #NEWLINE# 'pool' : floating_ip [ 'pool' ] , #NEWLINE# #UNINDENT# } #NEWLINE# try : #NEWLINE# #INDENT# result [ 'fixed_ip' ] = floating_ip [ 'fixed_ip' ] [ 'address' ] #NEWLINE# #UNINDENT# except ( TypeError , KeyError , AttributeError ) : #NEWLINE# #INDENT# result [ 'fixed_ip' ] = None #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# result [ 'instance_id' ] = floating_ip [ 'fixed_ip' ] [ 'instance_uuid' ] #NEWLINE# #UNINDENT# except ( TypeError , KeyError , AttributeError ) : #NEWLINE# #INDENT# result [ 'instance_id' ] = None #NEWLINE# #UNINDENT# return { #NEWLINE# #INDENT# 'floating_ip' : result , #NEWLINE# #UNINDENT# }