#NEWLINE# def _get_association_data( self , lb , host ) : #NEWLINE# #INDENT# real_data = { #NEWLINE# #INDENT# 'vipid' : lb . id , #NEWLINE# #UNINDENT# } #NEWLINE# network_data = { #NEWLINE# #INDENT# 'vipid' : lb . id , #NEWLINE# #UNINDENT# } #NEWLINE# list_data = { #NEWLINE# #INDENT# 'id' : host . id , #NEWLINE# #UNINDENT# } #NEWLINE# if getattr ( lb , 'project_id' , None ) : #NEWLINE# #INDENT# list_data [ 'projectid' ] = real_data [ 'projectid' ] = network_data [ 'projectid' ] = lb . project_id #NEWLINE# #UNINDENT# vms = self . cs_client . listVirtualMachines ( list_data ) [ 'virtualmachine' ] #NEWLINE# nic = vms [ 0 ] [ 'nic' ] [ self . vip_network_index ] #NEWLINE# real_data [ 'nicid' ] = nic [ 'id' ] #NEWLINE# network_data [ 'networkid' ] = nic [ 'networkid' ] #NEWLINE# return ( real_data , network_data )