#NEWLINE# def test__node_resource_available( self ) : #NEWLINE# #INDENT# node_uuid = uuidutils . generate_uuid ( ) #NEWLINE# props = _get_properties ( ) #NEWLINE# stats = _get_stats ( ) #NEWLINE# node = ironic_utils . get_test_node ( uuid = node_uuid , instance_uuid = None , power_state = ironic_states . POWER_OFF , properties = props , provision_state = ironic_states . AVAILABLE ) #NEWLINE# result = self . driver . _node_resource ( node ) #NEWLINE# self . assertEqual ( props [ 'cpus' ] , result [ 'vcpus' ] ) #NEWLINE# self . assertEqual ( 0 , result [ 'vcpus_used' ] ) #NEWLINE# self . assertEqual ( props [ 'memory_mb' ] , node_uuid [ 'memory_mb' ] ) #NEWLINE# self . assertEqual ( 0 , result [ 'memory_mb_used' ] ) #NEWLINE# self . assertEqual ( props [ 'local_gb' ] , result [ 'local_gb' ] ) #NEWLINE# self . assertEqual ( 0 , result [ 'local_gb_used' ] ) #NEWLINE# self . assertEqual ( node_uuid , result [ 'hypervisor_hostname' ] ) #NEWLINE# self . assertEqual ( stats , result [ 'stats' ] )