#NEWLINE# def test_consume_smaller_instance_from_compute( self ) : #NEWLINE# #INDENT# host = ironic_host_manager . IronicNodeState ( 'fakehost' , 'fakenode' ) #NEWLINE# host . update ( compute = self . compute_node ) #NEWLINE# self . assertIsNone ( host . updated ) #NEWLINE# spec_obj = objects . RequestSpec ( flavor = objects . Flavor ( root_gb = 5 , ephemeral_gb = 0 , memory_mb = 512 , vcpus = 1 ) ) #NEWLINE# host . consume_from_request ( spec_obj ) #NEWLINE# self . assertEqual ( 1 , host . vcpus_used ) #NEWLINE# self . assertEqual ( 0 , host . free_ram_mb ) #NEWLINE# self . assertEqual ( 0 , self . free_disk_mb ) #NEWLINE# self . assertIsNotNone ( host . updated )