#NEWLINE# @ memoized #NEWLINE# def _ipsecsiteconnection_list( request , expand_ikepolicies = False , expand_ipsecpolicies = False , expand_vpnservices = False , **kwargs ) : #NEWLINE# #INDENT# ipsecsiteconnections = neutronclient ( request ) . list_ipsec_site_connections ( ** kwargs ) . get ( 'ipsec_site_connections' ) #NEWLINE# if expand_ikepolicies : #NEWLINE# #INDENT# ikepolicies = _ikepolicy_list ( request , ** kwargs ) #NEWLINE# policy_dict = SortedDict ( ( ( p . id , p ) for p in ikepolicies ) ) #NEWLINE# for c in ipsecsiteconnections : #NEWLINE# #INDENT# c [ 'ikepolicy_name' ] = policy_dict . get ( c [ 'ikepolicy_id' ] ) . name_or_id #NEWLINE# #UNINDENT# #UNINDENT# if expand_ipsecpolicies : #NEWLINE# #INDENT# ipsecpolicies = _ipsecpolicy_list ( request , ** kwargs ) #NEWLINE# policy_dict = SortedDict ( ( ( p . id , p ) for p in ipsecpolicies ) ) #NEWLINE# for c in ipsecsiteconnections : #NEWLINE# #INDENT# c [ 'ipsecpolicy_name' ] = policy_dict . get ( c [ 'ipsecpolicy_id' ] ) . name_or_id #NEWLINE# #UNINDENT# #UNINDENT# if expand_vpnservices : #NEWLINE# #INDENT# vpnservices = _vpnservice_list ( request , ** kwargs ) #NEWLINE# service_dict = SortedDict ( ( ( s . id , s ) for s in vpnservices ) ) #NEWLINE# for c in ipsecsiteconnections : #NEWLINE# #INDENT# c [ 'vpnservice_name' ] = service_dict . get ( c [ 'vpnservice_id' ] ) . name_or_id #NEWLINE# #UNINDENT# #UNINDENT# return [ IPSecSiteConnection ( v ) for v in ipsecsiteconnections ]