'Tests the scenario that we have fewer resource providers than
compute nodes which is a warning because we\'re underutilized.'

def test_check_resource_providers_fewer_rps_than_computes(self):

    self._setup_cells()
    ctxt = context.get_admin_context()
    for x in range(2):
        cn = objects.ComputeNode(context=ctxt, host=getattr(uuids, str(x)), vcpus=4, memory_mb=(8 * 1024), local_gb=40, vcpus_used=2, memory_mb_used=(2 * 1024), local_gb_used=10, hypervisor_type='fake', hypervisor_version=1, cpu_info='{"arch":    "x86_64"}')
        cn.create()
    self._create_resource_provider(FAKE_VCPU_INVENTORY)
    result = self.cmd._check_resource_providers()
    self.assertEqual(status.UpgradeCheckCode.WARNING, result.code)
    self.assertIn('There    are    1    compute    resource    providers    and    2    compute    nodes    in    the    deployment.', result.details)
