#NEWLINE# def test_assign_and_deassign_to_bonds( self ) : #NEWLINE# #INDENT# self . env . create_cluster ( api = True , editable_attributes = { #NEWLINE# #INDENT# 'public_network_assignment' : { #NEWLINE# #INDENT# 'assign_to_all_nodes' : { #NEWLINE# #INDENT# 'value' : True , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# cluster = self . env . clusters [ 0 ] #NEWLINE# ( node1 , macs1 ) = self . create_node_with_preset_macs ( cluster , [ 'controller' ] , 3 ) #NEWLINE# self . env . make_bond_via_api ( 'ovsbond0' , consts . BOND_MODES . balance_tcp , [ 'eth1' , 'eth2' ] , node1 [ 'id' ] ) #NEWLINE# ( node2 , macs2 ) = self . create_node_with_preset_macs ( cluster , [ 'cinder' ] , 3 ) #NEWLINE# self . env . make_bond_via_api ( 'ovsbond0' , consts . BOND_MODES . balance_tcp , [ 'eth1' , 'eth2' ] , node2 [ 'id' ] ) #NEWLINE# self . check_network_assigments ( node1 , { #NEWLINE# #INDENT# 'eth0' : self . default_networks , #NEWLINE# 'ovsbond0' : self . public_networks , #NEWLINE# #UNINDENT# } , key = 'name' ) #NEWLINE# self . check_network_assigments ( node2 , { #NEWLINE# #INDENT# 'eth0' : self . default_networks , #NEWLINE# 'ovsbond0' : self . public_networks , #NEWLINE# #UNINDENT# } , key = 'name' ) #NEWLINE# self . set_assign_public_to_all_nodes ( cluster , False ) #NEWLINE# self . check_network_assigments ( node1 , { #NEWLINE# #INDENT# 'eth0' : self . default_networks , #NEWLINE# 'ovsbond0' : self . public_networks , #NEWLINE# #UNINDENT# } , key = 'name' ) #NEWLINE# self . check_network_assigments ( node2 , { #NEWLINE# #INDENT# 'eth0' : self . default_networks , #NEWLINE# 'ovsbond0' : [ ] , #NEWLINE# #UNINDENT# } , key = 'name' ) #NEWLINE# self . set_assign_public_to_all_nodes ( cluster , True ) #NEWLINE# self . check_network_assigments ( node1 , { #NEWLINE# #INDENT# 'eth0' : self . default_networks , #NEWLINE# 'ovsbond0' : self . public_networks , #NEWLINE# #UNINDENT# } , key = 'name' ) #NEWLINE# self . check_network_assigments ( node2 , { #NEWLINE# #INDENT# 'eth0' : self . default_networks , #NEWLINE# 'ovsbond0' : self . public_networks , #NEWLINE# #UNINDENT# } , key = 'name' ) #NEWLINE# objects . Cluster . prepare_for_deployment ( cluster ) #NEWLINE# self . check_node_public_ip_assigment ( cluster , node1 , '172.16.0.2/24' ) #NEWLINE# self . check_node_public_ip_assigment ( cluster , macs2 , '172.16.0.3/24' )