'Tests that inventory records of all standard resource classes are
passed to the report client\'s _update_inventory() method.'

@mock.patch('nova.scheduler.client.report.SchedulerReportClient._update_inventory')
@mock.patch('nova.scheduler.client.report.SchedulerReportClient._delete_inventory')
@mock.patch('nova.scheduler.client.report.SchedulerReportClient._ensure_resource_class')
@mock.patch('nova.scheduler.client.report.SchedulerReportClient._get_or_create_resource_class')
@mock.patch('nova.scheduler.client.report.SchedulerReportClient._ensure_resource_provider')
def test_set_inventory_for_provider_no_custom(self, mock_erp, mock_gocr, mock_erc, mock_del, mock_upd):

    inv_data = {'VCPU': {'total': 24, 'reserved': 0, 'min_unit': 1, 'max_unit': 24, 'step_size': 1, 'allocation_ratio': 1.0}, 'MEMORY_MB': {'total': 1024, 'reserved': 0, 'min_unit': 1, 'max_unit': 1024, 'step_size': 1, 'allocation_ratio': 1.0}, 'DISK_GB': {'total': 100, 'reserved': 0, 'min_unit': 1, 'max_unit': 100, 'step_size': 1, 'allocation_ratio': 1.0}}
    self.client.set_inventory_for_provider(mock.sentinel.rp_uuid, mock.sentinel.rp_name, inv_data)
    mock_erp.assert_called_once_with(mock.sentinel.rp_uuid, mock.sentinel.rp_name)
    self.assertFalse(mock_erc.called)
    self.assertFalse(mock_gocr.called)
    mock_upd.assert_called_once_with(mock.sentinel.rp_uuid, inv_data)
    self.assertFalse(mock_del.called)
