#NEWLINE# def test__node_resources_unavailable( self ) : #NEWLINE# #INDENT# node_dicts = [ { #NEWLINE# #INDENT# 'uuid' : uuidutils . generate_uuid ( ) , #NEWLINE# 'maintenance' : True , #NEWLINE# 'power_state' : ironic_states . POWER_OFF , #NEWLINE# 'provision_state' : ironic_states . AVAILABLE , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'uuid' : uuidutils . generate_uuid ( ) , #NEWLINE# 'maintenance' : True , #NEWLINE# 'power_state' : ironic_states . ERROR , #NEWLINE# 'provision_state' : ironic_states . AVAILABLE , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'uuid' : uuidutils . generate_uuid ( ) , #NEWLINE# 'power_state' : ironic_states . NOSTATE , #NEWLINE# 'provision_state' : ironic_states . AVAILABLE , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'uuid' : uuidutils . generate_uuid ( ) , #NEWLINE# 'power_state' : ironic_states . POWER_ON , #NEWLINE# 'provision_state' : ironic_states . MANAGEABLE , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'uuid' : uuidutils . generate_uuid ( ) , #NEWLINE# 'power_state' : ironic_states . POWER_ON , #NEWLINE# 'provision_state' : ironic_states . CLEANING , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'uuid' : uuidutils . generate_uuid ( ) , #NEWLINE# 'power_state' : ironic_states . POWER_ON , #NEWLINE# 'provision_state' : ironic_states . CLEANWAIT , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'uuid' : uuidutils . generate_uuid ( ) , #NEWLINE# 'power_state' : ironic_states . POWER_ON , #NEWLINE# 'provision_state' : ironic_states . DELETING , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'uuid' : uuidutils . generate_uuid ( ) , #NEWLINE# 'power_state' : ironic_states . POWER_ON , #NEWLINE# 'provision_state' : ironic_states . DELETED , #NEWLINE# #UNINDENT# } ] #NEWLINE# for n in node_dicts : #NEWLINE# #INDENT# node = ironic_utils . get_test_node ( ** n ) #NEWLINE# self . assertTrue ( self . driver . _node_resources_unavailable ( node ) ) #NEWLINE# #UNINDENT# for ok_state in ( ironic_states . AVAILABLE , ironic_states . NOSTATE ) : #NEWLINE# #INDENT# avail_node = ironic_utils . get_test_node ( power_state = ironic_states . POWER_OFF , provision_state = ok_state ) #NEWLINE# unavailable = self . driver . _node_resources_unavailable ( avail_node ) #NEWLINE# self . assertFalse ( unavailable )