[placement] Unregister the Inventory object
Unregister the Inventory object because we do not need RPC and versioning for the objects in nova.objects.resource_provider. There are two primary changes here: * unregistering the Inventory class * where objects.Inventory is used, point directly to the nova.objects.resource_provider package instead Partially-Implements: bp placement-deregister-objects Change-Id: Ideca0f09f5dc4ba6bb194a2413ed93cf592dd963
This commit is contained in:
parent
52243451ec
commit
8f39507996
|
@ -150,7 +150,7 @@ def _make_inventory_object(resource_provider, resource_class, **data):
|
|||
# 0) for non-negative integers. It's not clear if that is
|
||||
# duplication or decoupling so leaving it as this for now.
|
||||
try:
|
||||
inventory = objects.Inventory(
|
||||
inventory = rp_obj.Inventory(
|
||||
resource_provider=resource_provider,
|
||||
resource_class=resource_class, **data)
|
||||
except (ValueError, TypeError) as exc:
|
||||
|
|
|
@ -21,7 +21,6 @@ from oslo_concurrency import lockutils
|
|||
from oslo_db import api as oslo_db_api
|
||||
from oslo_db import exception as db_exc
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import versionutils
|
||||
import six
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy import func
|
||||
|
@ -1366,12 +1365,8 @@ def _update_inventory_in_db(context, id_, updates):
|
|||
raise exception.NotFound()
|
||||
|
||||
|
||||
@base.NovaObjectRegistry.register
|
||||
@base.NovaObjectRegistry.register_if(False)
|
||||
class Inventory(_HasAResourceProvider):
|
||||
# Version 1.0: Initial version
|
||||
# Version 1.1: Changed resource_class to allow custom strings
|
||||
# Version 1.2: Turn off remotable
|
||||
VERSION = '1.2'
|
||||
|
||||
fields = {
|
||||
'id': fields.IntegerField(read_only=True),
|
||||
|
@ -1385,13 +1380,6 @@ class Inventory(_HasAResourceProvider):
|
|||
'allocation_ratio': fields.NonNegativeFloatField(default=1.0),
|
||||
}
|
||||
|
||||
def obj_make_compatible(self, primitive, target_version):
|
||||
super(Inventory, self).obj_make_compatible(primitive, target_version)
|
||||
target_version = versionutils.convert_version_to_tuple(target_version)
|
||||
if target_version < (1, 1) and 'resource_class' in primitive:
|
||||
rc = primitive['resource_class']
|
||||
rc_cache.raise_if_custom_resource_class_pre_v1_1(rc)
|
||||
|
||||
@property
|
||||
def capacity(self):
|
||||
"""Inventory capacity, adjusted by allocation_ratio."""
|
||||
|
@ -1459,7 +1447,7 @@ class InventoryList(base.ObjectListBase, base.NovaObject):
|
|||
def get_all_by_resource_provider_uuid(cls, context, rp_uuid):
|
||||
db_inventory_list = cls._get_all_by_resource_provider(context,
|
||||
rp_uuid)
|
||||
return base.obj_make_list(context, cls(context), objects.Inventory,
|
||||
return base.obj_make_list(context, cls(context), Inventory,
|
||||
db_inventory_list)
|
||||
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ class AllocationFixture(APIFixture):
|
|||
# Each set of allocations must have the same consumer_id because only
|
||||
# the first allocation is used for the project/user association.
|
||||
consumer_id = uuidutils.generate_uuid()
|
||||
inventory = objects.Inventory(
|
||||
inventory = rp_obj.Inventory(
|
||||
self.context, resource_provider=rp,
|
||||
resource_class='DISK_GB', total=2048,
|
||||
step_size=10, min_unit=10, max_unit=600)
|
||||
|
@ -150,7 +150,7 @@ class AllocationFixture(APIFixture):
|
|||
# Each set of allocations must have the same consumer_id because only
|
||||
# the first allocation is used for the project/user association.
|
||||
consumer_id = uuidutils.generate_uuid()
|
||||
inventory = objects.Inventory(
|
||||
inventory = rp_obj.Inventory(
|
||||
self.context, resource_provider=rp,
|
||||
resource_class='VCPU', total=10,
|
||||
max_unit=4)
|
||||
|
@ -238,7 +238,7 @@ class SharedStorageFixture(APIFixture):
|
|||
|
||||
# Populate compute node inventory for VCPU and RAM
|
||||
for cn in (cn1, cn2):
|
||||
vcpu_inv = objects.Inventory(
|
||||
vcpu_inv = rp_obj.Inventory(
|
||||
self.context,
|
||||
resource_provider=cn,
|
||||
resource_class='VCPU',
|
||||
|
@ -249,7 +249,7 @@ class SharedStorageFixture(APIFixture):
|
|||
step_size=1,
|
||||
allocation_ratio=16.0)
|
||||
vcpu_inv.obj_set_defaults()
|
||||
ram_inv = objects.Inventory(
|
||||
ram_inv = rp_obj.Inventory(
|
||||
self.context,
|
||||
resource_provider=cn,
|
||||
resource_class='MEMORY_MB',
|
||||
|
@ -264,7 +264,7 @@ class SharedStorageFixture(APIFixture):
|
|||
cn.set_inventory(inv_list)
|
||||
|
||||
# Populate shared storage provider with DISK_GB inventory
|
||||
disk_inv = objects.Inventory(
|
||||
disk_inv = rp_obj.Inventory(
|
||||
self.context,
|
||||
resource_provider=ss,
|
||||
resource_class='DISK_GB',
|
||||
|
|
|
@ -61,7 +61,7 @@ class ResourceProviderBaseCase(test.NoDBTestCase):
|
|||
name=rp_uuid)
|
||||
rp.create()
|
||||
inv_dict = inv_dict or DISK_INVENTORY
|
||||
disk_inv = objects.Inventory(context=self.ctx,
|
||||
disk_inv = rp_obj.Inventory(context=self.ctx,
|
||||
resource_provider=rp, **inv_dict)
|
||||
disk_inv.create()
|
||||
inv_list = rp_obj.InventoryList(objects=[disk_inv])
|
||||
|
@ -146,7 +146,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
name=uuidsentinel.fake_resource_name,
|
||||
)
|
||||
resource_provider.create()
|
||||
disk_inventory = objects.Inventory(
|
||||
disk_inventory = rp_obj.Inventory(
|
||||
context=self.ctx,
|
||||
resource_provider=resource_provider,
|
||||
**DISK_INVENTORY
|
||||
|
@ -165,7 +165,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
context=self.ctx,
|
||||
uuid=uuidsentinel.inventory_resource_provider
|
||||
)
|
||||
disk_inventory = objects.Inventory(
|
||||
disk_inventory = rp_obj.Inventory(
|
||||
context=self.ctx,
|
||||
resource_provider=resource_provider,
|
||||
**DISK_INVENTORY
|
||||
|
@ -181,7 +181,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
)
|
||||
resource_provider.create()
|
||||
resource_class = fields.ResourceClass.DISK_GB
|
||||
disk_inventory = objects.Inventory(
|
||||
disk_inventory = rp_obj.Inventory(
|
||||
context=self.ctx,
|
||||
resource_provider=resource_provider,
|
||||
**DISK_INVENTORY
|
||||
|
@ -223,7 +223,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
)
|
||||
rp.create()
|
||||
|
||||
inv = objects.Inventory(
|
||||
inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class='UNKNOWN',
|
||||
total=1024,
|
||||
|
@ -250,7 +250,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
)
|
||||
rp.create()
|
||||
|
||||
inv = objects.Inventory(
|
||||
inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class='VCPU',
|
||||
total=12,
|
||||
|
@ -277,7 +277,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
)
|
||||
alloc_list.create_all()
|
||||
|
||||
inv = objects.Inventory(
|
||||
inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class='MEMORY_MB',
|
||||
total=1024,
|
||||
|
@ -300,7 +300,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
name=uuidsentinel.rp_name)
|
||||
rp.create()
|
||||
|
||||
disk_inv = objects.Inventory(
|
||||
disk_inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=2048,
|
||||
|
@ -309,7 +309,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
max_unit=600,
|
||||
step_size=10,
|
||||
allocation_ratio=1.0)
|
||||
vcpu_inv = objects.Inventory(
|
||||
vcpu_inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
total=12,
|
||||
|
@ -348,7 +348,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
rp.create()
|
||||
saved_generation = rp.generation
|
||||
|
||||
disk_inv = objects.Inventory(
|
||||
disk_inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=1024,
|
||||
|
@ -358,7 +358,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
step_size=10,
|
||||
allocation_ratio=1.0)
|
||||
|
||||
vcpu_inv = objects.Inventory(
|
||||
vcpu_inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
total=12,
|
||||
|
@ -400,7 +400,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
self.assertEqual(1024, new_inv_list[0].total)
|
||||
|
||||
# update existing disk inv to new settings
|
||||
disk_inv = objects.Inventory(
|
||||
disk_inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=2048,
|
||||
|
@ -421,7 +421,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
self.assertEqual(2048, new_inv_list[0].total)
|
||||
|
||||
# fail when inventory bad
|
||||
disk_inv = objects.Inventory(
|
||||
disk_inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=2048,
|
||||
|
@ -501,9 +501,9 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
uuid=uuidsentinel.rp_uuid,
|
||||
name=uuidsentinel.rp_name)
|
||||
rp.create()
|
||||
disk_inv = objects.Inventory(resource_provider=rp,
|
||||
resource_class='DISK_GB',
|
||||
total=2048)
|
||||
disk_inv = rp_obj.Inventory(resource_provider=rp,
|
||||
resource_class='DISK_GB',
|
||||
total=2048)
|
||||
disk_inv.obj_set_defaults()
|
||||
error = self.assertRaises(exception.NotFound, rp.update_inventory,
|
||||
disk_inv)
|
||||
|
@ -519,7 +519,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
# attempt to set inventory to less than currently allocated
|
||||
# amounts
|
||||
new_total = 1
|
||||
disk_inv = objects.Inventory(
|
||||
disk_inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB, total=new_total)
|
||||
disk_inv.obj_set_defaults()
|
||||
|
@ -540,7 +540,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
uuid=uuidsentinel.rp_uuid,
|
||||
name=uuidsentinel.rp_name)
|
||||
rp.create()
|
||||
disk_inv = objects.Inventory(
|
||||
disk_inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=1024, reserved=2048)
|
||||
|
@ -557,7 +557,7 @@ class ResourceProviderTestCase(ResourceProviderBaseCase):
|
|||
rp = objects.ResourceProvider(context=self.ctx,
|
||||
uuid=uuidsentinel.inventory_resource_provider, name='foo')
|
||||
rp.create()
|
||||
inv = objects.Inventory(context=self.ctx, resource_provider=rp,
|
||||
inv = rp_obj.Inventory(context=self.ctx, resource_provider=rp,
|
||||
**DISK_INVENTORY)
|
||||
inv.create()
|
||||
expected_gen = rp.generation + 1
|
||||
|
@ -599,7 +599,7 @@ class ResourceProviderListTestCase(ResourceProviderBaseCase):
|
|||
name = 'rp_name_' + rp_i
|
||||
rp = objects.ResourceProvider(self.ctx, name=name, uuid=uuid)
|
||||
rp.create()
|
||||
inv = objects.Inventory(
|
||||
inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
min_unit=1,
|
||||
|
@ -608,7 +608,7 @@ class ResourceProviderListTestCase(ResourceProviderBaseCase):
|
|||
allocation_ratio=1.0)
|
||||
inv.obj_set_defaults()
|
||||
|
||||
inv2 = objects.Inventory(
|
||||
inv2 = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=1024, reserved=2,
|
||||
|
@ -618,7 +618,7 @@ class ResourceProviderListTestCase(ResourceProviderBaseCase):
|
|||
inv2.obj_set_defaults()
|
||||
|
||||
# Write that specific inventory for testing min/max units and steps
|
||||
inv3 = objects.Inventory(
|
||||
inv3 = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.MEMORY_MB,
|
||||
total=1024, reserved=2,
|
||||
|
@ -822,7 +822,7 @@ class TestAllocation(ResourceProviderBaseCase):
|
|||
)
|
||||
resource_provider.create()
|
||||
resource_class = fields.ResourceClass.DISK_GB
|
||||
inv = objects.Inventory(context=self.ctx,
|
||||
inv = rp_obj.Inventory(context=self.ctx,
|
||||
resource_provider=resource_provider, **DISK_INVENTORY)
|
||||
inv.create()
|
||||
disk_allocation = rp_obj.Allocation(
|
||||
|
@ -883,7 +883,7 @@ class TestAllocation(ResourceProviderBaseCase):
|
|||
|
||||
# Add same inventory to both source and destination host
|
||||
for cn in (cn_source, cn_dest):
|
||||
cpu_inv = objects.Inventory(
|
||||
cpu_inv = rp_obj.Inventory(
|
||||
context=self.ctx,
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
|
@ -893,7 +893,7 @@ class TestAllocation(ResourceProviderBaseCase):
|
|||
max_unit=24,
|
||||
step_size=1,
|
||||
allocation_ratio=16.0)
|
||||
ram_inv = objects.Inventory(
|
||||
ram_inv = rp_obj.Inventory(
|
||||
context=self.ctx,
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.MEMORY_MB,
|
||||
|
@ -1053,15 +1053,15 @@ class TestAllocationListCreateDelete(ResourceProviderBaseCase):
|
|||
self.ctx, name=rp1_name, uuid=rp1_uuid)
|
||||
rp1.create()
|
||||
|
||||
inv = objects.Inventory(resource_provider=rp1,
|
||||
resource_class=rp1_class,
|
||||
total=1024, max_unit=max_unit)
|
||||
inv = rp_obj.Inventory(resource_provider=rp1,
|
||||
resource_class=rp1_class,
|
||||
total=1024, max_unit=max_unit)
|
||||
inv.obj_set_defaults()
|
||||
|
||||
inv2 = objects.Inventory(resource_provider=rp1,
|
||||
resource_class=rp2_class,
|
||||
total=255, reserved=2,
|
||||
max_unit=max_unit)
|
||||
inv2 = rp_obj.Inventory(resource_provider=rp1,
|
||||
resource_class=rp2_class,
|
||||
total=255, reserved=2,
|
||||
max_unit=max_unit)
|
||||
inv2.obj_set_defaults()
|
||||
inv_list = rp_obj.InventoryList(objects=[inv, inv2])
|
||||
rp1.set_inventory(inv_list)
|
||||
|
@ -1142,9 +1142,9 @@ class TestAllocationListCreateDelete(ResourceProviderBaseCase):
|
|||
|
||||
# Add inventory for one of the two resource providers. This should also
|
||||
# fail, since rp2 has no inventory.
|
||||
inv = objects.Inventory(resource_provider=rp1,
|
||||
resource_class=rp1_class,
|
||||
total=1024)
|
||||
inv = rp_obj.Inventory(resource_provider=rp1,
|
||||
resource_class=rp1_class,
|
||||
total=1024)
|
||||
inv.obj_set_defaults()
|
||||
inv_list = rp_obj.InventoryList(objects=[inv])
|
||||
rp1.set_inventory(inv_list)
|
||||
|
@ -1152,9 +1152,9 @@ class TestAllocationListCreateDelete(ResourceProviderBaseCase):
|
|||
allocation_list.create_all)
|
||||
|
||||
# Add inventory for the second resource provider
|
||||
inv = objects.Inventory(resource_provider=rp2,
|
||||
resource_class=rp2_class,
|
||||
total=255, reserved=2)
|
||||
inv = rp_obj.Inventory(resource_provider=rp2,
|
||||
resource_class=rp2_class,
|
||||
total=255, reserved=2)
|
||||
inv.obj_set_defaults()
|
||||
inv_list = rp_obj.InventoryList(objects=[inv])
|
||||
rp2.set_inventory(inv_list)
|
||||
|
@ -1162,12 +1162,12 @@ class TestAllocationListCreateDelete(ResourceProviderBaseCase):
|
|||
# Now the allocations will still fail because max_unit 1
|
||||
self.assertRaises(exception.InvalidAllocationConstraintsViolated,
|
||||
allocation_list.create_all)
|
||||
inv1 = objects.Inventory(resource_provider=rp1,
|
||||
inv1 = rp_obj.Inventory(resource_provider=rp1,
|
||||
resource_class=rp1_class,
|
||||
total=1024, max_unit=max_unit)
|
||||
inv1.obj_set_defaults()
|
||||
rp1.set_inventory(rp_obj.InventoryList(objects=[inv1]))
|
||||
inv2 = objects.Inventory(resource_provider=rp2,
|
||||
inv2 = rp_obj.Inventory(resource_provider=rp2,
|
||||
resource_class=rp2_class,
|
||||
total=255, reserved=2, max_unit=max_unit)
|
||||
inv2.obj_set_defaults()
|
||||
|
@ -1224,9 +1224,9 @@ class TestAllocationListCreateDelete(ResourceProviderBaseCase):
|
|||
rp = objects.ResourceProvider(
|
||||
self.ctx, name=rp_name, uuid=rp_uuid)
|
||||
rp.create()
|
||||
inv = objects.Inventory(resource_provider=rp,
|
||||
total=1024, allocation_ratio=1,
|
||||
reserved=0, **kwargs)
|
||||
inv = rp_obj.Inventory(resource_provider=rp,
|
||||
total=1024, allocation_ratio=1,
|
||||
reserved=0, **kwargs)
|
||||
inv.obj_set_defaults()
|
||||
rp.set_inventory(rp_obj.InventoryList(objects=[inv]))
|
||||
return rp
|
||||
|
@ -1372,9 +1372,9 @@ class UsageListTestCase(ResourceProviderBaseCase):
|
|||
|
||||
def test_get_all_one_allocation(self):
|
||||
db_rp, _ = self._make_allocation(rp_uuid=uuidsentinel.rp_uuid)
|
||||
inv = objects.Inventory(resource_provider=db_rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=1024)
|
||||
inv = rp_obj.Inventory(resource_provider=db_rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=1024)
|
||||
inv.obj_set_defaults()
|
||||
inv_list = rp_obj.InventoryList(objects=[inv])
|
||||
db_rp.set_inventory(inv_list)
|
||||
|
@ -1391,9 +1391,9 @@ class UsageListTestCase(ResourceProviderBaseCase):
|
|||
name=uuidsentinel.rp_no_inv,
|
||||
uuid=uuidsentinel.rp_no_inv)
|
||||
db_rp.create()
|
||||
inv = objects.Inventory(resource_provider=db_rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=1024)
|
||||
inv = rp_obj.Inventory(resource_provider=db_rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=1024)
|
||||
inv.obj_set_defaults()
|
||||
inv_list = rp_obj.InventoryList(objects=[inv])
|
||||
db_rp.set_inventory(inv_list)
|
||||
|
@ -1410,11 +1410,11 @@ class UsageListTestCase(ResourceProviderBaseCase):
|
|||
name=uuidsentinel.rp_no_inv,
|
||||
uuid=uuidsentinel.rp_no_inv)
|
||||
db_rp.create()
|
||||
disk_inv = objects.Inventory(
|
||||
disk_inv = rp_obj.Inventory(
|
||||
resource_provider=db_rp,
|
||||
resource_class=fields.ResourceClass.DISK_GB, total=1024)
|
||||
disk_inv.obj_set_defaults()
|
||||
vcpu_inv = objects.Inventory(
|
||||
vcpu_inv = rp_obj.Inventory(
|
||||
resource_provider=db_rp,
|
||||
resource_class=fields.ResourceClass.VCPU, total=24)
|
||||
vcpu_inv.obj_set_defaults()
|
||||
|
@ -1627,7 +1627,7 @@ class ResourceClassTestCase(ResourceProviderBaseCase):
|
|||
uuid=uuidsentinel.rp,
|
||||
)
|
||||
rp.create()
|
||||
inv = objects.Inventory(
|
||||
inv = rp_obj.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class='CUSTOM_IRON_NFV',
|
||||
total=1,
|
||||
|
@ -2007,7 +2007,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
|
||||
# Populate the two compute node providers with inventory, sans DISK_GB
|
||||
for cn in (cn1, cn2):
|
||||
vcpu = objects.Inventory(
|
||||
vcpu = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
total=24,
|
||||
|
@ -2017,7 +2017,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
step_size=1,
|
||||
allocation_ratio=16.0,
|
||||
)
|
||||
memory_mb = objects.Inventory(
|
||||
memory_mb = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.MEMORY_MB,
|
||||
total=32768,
|
||||
|
@ -2040,7 +2040,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
ss.create()
|
||||
|
||||
# Give the shared storage pool some inventory of DISK_GB
|
||||
disk_gb = objects.Inventory(
|
||||
disk_gb = rp_obj.Inventory(
|
||||
resource_provider=ss,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=2000,
|
||||
|
@ -2096,7 +2096,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
|
||||
# Populate the two compute node providers with inventory, sans DISK_GB
|
||||
for cn in (cn1, cn2):
|
||||
vcpu = objects.Inventory(
|
||||
vcpu = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
total=24,
|
||||
|
@ -2106,7 +2106,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
step_size=1,
|
||||
allocation_ratio=16.0,
|
||||
)
|
||||
memory_mb = objects.Inventory(
|
||||
memory_mb = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.MEMORY_MB,
|
||||
total=1024,
|
||||
|
@ -2129,7 +2129,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
ss.create()
|
||||
|
||||
# Give the shared storage pool some inventory of DISK_GB
|
||||
disk_gb = objects.Inventory(
|
||||
disk_gb = rp_obj.Inventory(
|
||||
resource_provider=ss,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=2000,
|
||||
|
@ -2186,7 +2186,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
uuid=cn3_uuid,
|
||||
)
|
||||
cn3.create()
|
||||
vcpu = objects.Inventory(
|
||||
vcpu = rp_obj.Inventory(
|
||||
resource_provider=cn3,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
total=24,
|
||||
|
@ -2196,7 +2196,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
step_size=1,
|
||||
allocation_ratio=1.0,
|
||||
)
|
||||
memory_mb = objects.Inventory(
|
||||
memory_mb = rp_obj.Inventory(
|
||||
resource_provider=cn3,
|
||||
resource_class=fields.ResourceClass.MEMORY_MB,
|
||||
total=1024,
|
||||
|
@ -2206,7 +2206,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
step_size=1,
|
||||
allocation_ratio=1.0,
|
||||
)
|
||||
disk_gb = objects.Inventory(
|
||||
disk_gb = rp_obj.Inventory(
|
||||
resource_provider=cn3,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=500,
|
||||
|
@ -2304,7 +2304,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
|
||||
# Populate the two compute node providers with inventory, sans DISK_GB
|
||||
for cn in (cn4, cn5):
|
||||
vcpu = objects.Inventory(
|
||||
vcpu = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
total=24,
|
||||
|
@ -2314,7 +2314,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
step_size=1,
|
||||
allocation_ratio=16.0,
|
||||
)
|
||||
memory_mb = objects.Inventory(
|
||||
memory_mb = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.MEMORY_MB,
|
||||
total=1024,
|
||||
|
@ -2338,7 +2338,7 @@ class SharedProviderTestCase(ResourceProviderBaseCase):
|
|||
ns.create()
|
||||
|
||||
# Give the shared storage pool some inventory of DISK_GB
|
||||
disk_gb = objects.Inventory(
|
||||
disk_gb = rp_obj.Inventory(
|
||||
resource_provider=ns,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=2000,
|
||||
|
@ -2444,7 +2444,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
cn3.create()
|
||||
|
||||
for cn in (cn1, cn2, cn3):
|
||||
vcpu = objects.Inventory(
|
||||
vcpu = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
total=24,
|
||||
|
@ -2454,7 +2454,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
step_size=1,
|
||||
allocation_ratio=16.0,
|
||||
)
|
||||
memory_mb = objects.Inventory(
|
||||
memory_mb = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.MEMORY_MB,
|
||||
total=32768,
|
||||
|
@ -2465,7 +2465,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
allocation_ratio=1.5,
|
||||
)
|
||||
if cn.uuid == cn3_uuid:
|
||||
disk_gb = objects.Inventory(
|
||||
disk_gb = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=1000,
|
||||
|
@ -2476,7 +2476,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
allocation_ratio=1.0,
|
||||
)
|
||||
else:
|
||||
disk_gb = objects.Inventory(
|
||||
disk_gb = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=2000,
|
||||
|
@ -2595,7 +2595,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
|
||||
# Populate the two compute node providers with inventory, sans DISK_GB
|
||||
for cn in (cn1, cn2):
|
||||
vcpu = objects.Inventory(
|
||||
vcpu = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
total=24,
|
||||
|
@ -2605,7 +2605,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
step_size=1,
|
||||
allocation_ratio=16.0,
|
||||
)
|
||||
memory_mb = objects.Inventory(
|
||||
memory_mb = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.MEMORY_MB,
|
||||
total=1024,
|
||||
|
@ -2628,7 +2628,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
ss.create()
|
||||
|
||||
# Give the shared storage pool some inventory of DISK_GB
|
||||
disk_gb = objects.Inventory(
|
||||
disk_gb = rp_obj.Inventory(
|
||||
resource_provider=ss,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=2000,
|
||||
|
@ -2833,7 +2833,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
|
||||
# Populate the two compute node providers with inventory
|
||||
for cn in (cn1, cn2):
|
||||
vcpu = objects.Inventory(
|
||||
vcpu = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
total=24,
|
||||
|
@ -2843,7 +2843,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
step_size=1,
|
||||
allocation_ratio=16.0,
|
||||
)
|
||||
memory_mb = objects.Inventory(
|
||||
memory_mb = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.MEMORY_MB,
|
||||
total=1024,
|
||||
|
@ -2873,7 +2873,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
magic_p.create()
|
||||
|
||||
# Give the provider some MAGIC
|
||||
magic = objects.Inventory(
|
||||
magic = rp_obj.Inventory(
|
||||
resource_provider=magic_p,
|
||||
resource_class=magic_rc.name,
|
||||
total=2048,
|
||||
|
@ -3013,7 +3013,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
|
||||
# Populate the two compute node providers with inventory
|
||||
for cn in (cn1, cn2, cn3):
|
||||
vcpu = objects.Inventory(
|
||||
vcpu = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
total=24,
|
||||
|
@ -3023,7 +3023,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
step_size=1,
|
||||
allocation_ratio=16.0,
|
||||
)
|
||||
memory_mb = objects.Inventory(
|
||||
memory_mb = rp_obj.Inventory(
|
||||
resource_provider=cn,
|
||||
resource_class=fields.ResourceClass.MEMORY_MB,
|
||||
total=1024,
|
||||
|
@ -3033,7 +3033,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
step_size=1,
|
||||
allocation_ratio=1.5,
|
||||
)
|
||||
disk_gb = objects.Inventory(
|
||||
disk_gb = rp_obj.Inventory(
|
||||
resource_provider=cn3,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=2000,
|
||||
|
@ -3060,7 +3060,7 @@ class AllocationCandidatesTestCase(ResourceProviderBaseCase):
|
|||
ss.create()
|
||||
|
||||
# Give the shared storage pool some inventory of DISK_GB
|
||||
disk_gb = objects.Inventory(
|
||||
disk_gb = rp_obj.Inventory(
|
||||
resource_provider=ss,
|
||||
resource_class=fields.ResourceClass.DISK_GB,
|
||||
total=2000,
|
||||
|
|
|
@ -32,6 +32,7 @@ from nova import context
|
|||
# in the tests, we don't use them in the actual CLI.
|
||||
from nova import objects
|
||||
from nova.objects import fields
|
||||
from nova.objects import resource_provider as rp_obj
|
||||
from nova import test
|
||||
from nova.tests import fixtures as nova_fixtures
|
||||
from nova.tests import uuidsentinel as uuids
|
||||
|
@ -553,7 +554,7 @@ class TestUpgradeCheckResourceProviders(test.NoDBTestCase):
|
|||
name=rp_uuid,
|
||||
uuid=rp_uuid)
|
||||
rp.create()
|
||||
inventory = objects.Inventory(
|
||||
inventory = rp_obj.Inventory(
|
||||
context=ctxt,
|
||||
resource_provider=rp,
|
||||
**inventory)
|
||||
|
|
|
@ -1117,7 +1117,6 @@ object_data = {
|
|||
'InstanceNUMATopology': '1.3-ec0030cb0402a49c96da7051c037082a',
|
||||
'InstancePCIRequest': '1.1-b1d75ebc716cb12906d9d513890092bf',
|
||||
'InstancePCIRequests': '1.1-65e38083177726d806684cb1cc0136d2',
|
||||
'Inventory': '1.2-7f681fb6fb7b75fabceab3c4d0f8ce0c',
|
||||
'LibvirtLiveMigrateBDMInfo': '1.0-252aabb723ca79d5469fa56f64b57811',
|
||||
'LibvirtLiveMigrateData': '1.3-2795e5646ee21e8c7f1c3e64fb6c80a3',
|
||||
'KeyPair': '1.4-1244e8d1b103cc69d038ed78ab3a8cc6',
|
||||
|
|
|
@ -146,20 +146,20 @@ class TestInventoryNoDB(test_objects._LocalTest):
|
|||
|
||||
@mock.patch('nova.objects.resource_provider._ensure_rc_cache',
|
||||
side_effect=_fake_ensure_cache)
|
||||
@mock.patch('nova.objects.Inventory._create_in_db',
|
||||
@mock.patch('nova.objects.resource_provider.Inventory._create_in_db',
|
||||
return_value=_INVENTORY_DB)
|
||||
def test_create(self, mock_db_create, mock_ensure_cache):
|
||||
rp = objects.ResourceProvider(id=_RESOURCE_PROVIDER_ID,
|
||||
uuid=_RESOURCE_PROVIDER_UUID)
|
||||
obj = objects.Inventory(context=self.context,
|
||||
resource_provider=rp,
|
||||
resource_class=_RESOURCE_CLASS_NAME,
|
||||
total=16,
|
||||
reserved=2,
|
||||
min_unit=1,
|
||||
max_unit=8,
|
||||
step_size=1,
|
||||
allocation_ratio=1.0)
|
||||
obj = resource_provider.Inventory(context=self.context,
|
||||
resource_provider=rp,
|
||||
resource_class=_RESOURCE_CLASS_NAME,
|
||||
total=16,
|
||||
reserved=2,
|
||||
min_unit=1,
|
||||
max_unit=8,
|
||||
step_size=1,
|
||||
allocation_ratio=1.0)
|
||||
obj.create()
|
||||
self.assertEqual(_INVENTORY_ID, obj.id)
|
||||
expected = dict(_INVENTORY_DB)
|
||||
|
@ -168,12 +168,12 @@ class TestInventoryNoDB(test_objects._LocalTest):
|
|||
|
||||
@mock.patch('nova.objects.resource_provider._ensure_rc_cache',
|
||||
side_effect=_fake_ensure_cache)
|
||||
@mock.patch('nova.objects.Inventory._update_in_db',
|
||||
@mock.patch('nova.objects.resource_provider.Inventory._update_in_db',
|
||||
return_value=_INVENTORY_DB)
|
||||
def test_save(self, mock_db_save, mock_ensure_cache):
|
||||
obj = objects.Inventory(context=self.context,
|
||||
id=_INVENTORY_ID,
|
||||
reserved=4)
|
||||
obj = resource_provider.Inventory(context=self.context,
|
||||
id=_INVENTORY_ID,
|
||||
reserved=4)
|
||||
obj.save()
|
||||
mock_db_save.assert_called_once_with(self.context,
|
||||
_INVENTORY_ID,
|
||||
|
@ -210,7 +210,7 @@ class TestInventoryNoDB(test_objects._LocalTest):
|
|||
max_unit=-8,
|
||||
step_size=1,
|
||||
allocation_ratio=1.0)
|
||||
self.assertRaises(ValueError, objects.Inventory,
|
||||
self.assertRaises(ValueError, resource_provider.Inventory,
|
||||
**kwargs)
|
||||
|
||||
def test_set_defaults(self):
|
||||
|
@ -219,7 +219,7 @@ class TestInventoryNoDB(test_objects._LocalTest):
|
|||
kwargs = dict(resource_provider=rp,
|
||||
resource_class=_RESOURCE_CLASS_NAME,
|
||||
total=16)
|
||||
inv = objects.Inventory(self.context, **kwargs)
|
||||
inv = resource_provider.Inventory(self.context, **kwargs)
|
||||
|
||||
inv.obj_set_defaults()
|
||||
self.assertEqual(0, inv.reserved)
|
||||
|
@ -235,7 +235,7 @@ class TestInventoryNoDB(test_objects._LocalTest):
|
|||
resource_class=_RESOURCE_CLASS_NAME,
|
||||
total=16,
|
||||
reserved=16)
|
||||
inv = objects.Inventory(self.context, **kwargs)
|
||||
inv = resource_provider.Inventory(self.context, **kwargs)
|
||||
inv.obj_set_defaults()
|
||||
|
||||
self.assertEqual(0, inv.capacity)
|
||||
|
@ -261,21 +261,21 @@ class TestInventory(test_objects._LocalTest):
|
|||
resource_provider_id=rp_id)
|
||||
updates.pop('id')
|
||||
updates.update(records)
|
||||
return objects.Inventory._create_in_db(
|
||||
return resource_provider.Inventory._create_in_db(
|
||||
self.context, updates)
|
||||
|
||||
def test_create_in_db(self):
|
||||
updates = dict(_INVENTORY_DB)
|
||||
updates.pop('id')
|
||||
db_inventory = objects.Inventory._create_in_db(
|
||||
db_inventory = resource_provider.Inventory._create_in_db(
|
||||
self.context, updates)
|
||||
self.assertEqual(_INVENTORY_DB['total'], db_inventory.total)
|
||||
|
||||
def test_update_in_db(self):
|
||||
db_rp, db_inventory = self._make_inventory()
|
||||
objects.Inventory._update_in_db(self.context,
|
||||
db_inventory.id,
|
||||
{'total': 32})
|
||||
resource_provider.Inventory._update_in_db(self.context,
|
||||
db_inventory.id,
|
||||
{'total': 32})
|
||||
inventories = resource_provider.InventoryList.\
|
||||
get_all_by_resource_provider_uuid(self.context, db_rp.uuid)
|
||||
self.assertEqual(32, inventories[0].total)
|
||||
|
@ -283,7 +283,7 @@ class TestInventory(test_objects._LocalTest):
|
|||
def test_update_in_db_fails_bad_id(self):
|
||||
db_rp, db_inventory = self._make_inventory()
|
||||
self.assertRaises(exception.NotFound,
|
||||
objects.Inventory._update_in_db,
|
||||
resource_provider.Inventory._update_in_db,
|
||||
self.context, 99, {'total': 32})
|
||||
|
||||
def test_get_all_by_resource_provider_uuid(self):
|
||||
|
@ -312,9 +312,9 @@ class TestInventory(test_objects._LocalTest):
|
|||
db_rp1, db_inv1 = self._make_inventory(uuids.fake_1)
|
||||
db_rp2, db_inv2 = self._make_inventory(uuids.fake_2)
|
||||
|
||||
objects.Inventory._update_in_db(self.context,
|
||||
db_inv2.id,
|
||||
{'total': 32})
|
||||
resource_provider.Inventory._update_in_db(self.context,
|
||||
db_inv2.id,
|
||||
{'total': 32})
|
||||
|
||||
# Create IPV4_ADDRESS resources for each provider.
|
||||
self._create_inventory_in_db(db_rp1.id,
|
||||
|
@ -361,8 +361,8 @@ class TestInventory(test_objects._LocalTest):
|
|||
inventory_dict.pop('resource_provider_id')
|
||||
inventory_dict.pop('resource_class_id')
|
||||
inventory_dict['resource_class'] = _RESOURCE_CLASS_NAME
|
||||
inventory = objects.Inventory(context=self.context,
|
||||
**inventory_dict)
|
||||
inventory = resource_provider.Inventory(context=self.context,
|
||||
**inventory_dict)
|
||||
error = self.assertRaises(exception.ObjectActionError,
|
||||
inventory.create)
|
||||
self.assertIn('resource_provider required', str(error))
|
||||
|
@ -375,8 +375,8 @@ class TestInventory(test_objects._LocalTest):
|
|||
inventory_dict.pop('resource_provider_id')
|
||||
inventory_dict.pop('resource_class_id')
|
||||
inventory_dict['resource_provider'] = rp
|
||||
inventory = objects.Inventory(context=self.context,
|
||||
**inventory_dict)
|
||||
inventory = resource_provider.Inventory(context=self.context,
|
||||
**inventory_dict)
|
||||
error = self.assertRaises(exception.ObjectActionError,
|
||||
inventory.create)
|
||||
self.assertIn('resource_provider required', str(error))
|
||||
|
@ -391,30 +391,30 @@ class TestInventory(test_objects._LocalTest):
|
|||
inventory_dict.pop('resource_provider_id')
|
||||
inventory_dict.pop('resource_class_id')
|
||||
inventory_dict['resource_provider'] = rp
|
||||
inventory = objects.Inventory(context=self.context,
|
||||
**inventory_dict)
|
||||
inventory = resource_provider.Inventory(context=self.context,
|
||||
**inventory_dict)
|
||||
error = self.assertRaises(exception.ObjectActionError,
|
||||
inventory.create)
|
||||
self.assertIn('resource_class required', str(error))
|
||||
|
||||
def test_create_id_fails(self):
|
||||
inventory = objects.Inventory(self.context, **_INVENTORY_DB)
|
||||
inventory = resource_provider.Inventory(self.context, **_INVENTORY_DB)
|
||||
self.assertRaises(exception.ObjectActionError, inventory.create)
|
||||
|
||||
def test_save_without_id_fails(self):
|
||||
inventory_dict = dict(_INVENTORY_DB)
|
||||
inventory_dict.pop('id')
|
||||
inventory = objects.Inventory(self.context, **inventory_dict)
|
||||
inventory = resource_provider.Inventory(self.context, **inventory_dict)
|
||||
self.assertRaises(exception.ObjectActionError, inventory.save)
|
||||
|
||||
def test_find(self):
|
||||
rp = objects.ResourceProvider(uuid=uuids.rp_uuid)
|
||||
inv_list = resource_provider.InventoryList(objects=[
|
||||
objects.Inventory(
|
||||
resource_provider.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.VCPU,
|
||||
total=24),
|
||||
objects.Inventory(
|
||||
resource_provider.Inventory(
|
||||
resource_provider=rp,
|
||||
resource_class=fields.ResourceClass.MEMORY_MB,
|
||||
total=10240),
|
||||
|
@ -437,28 +437,6 @@ class TestInventory(test_objects._LocalTest):
|
|||
# Use an invalid string...
|
||||
self.assertIsNone(inv_list.find('HOUSE'))
|
||||
|
||||
def test_custom_resource_raises(self):
|
||||
"""Ensure that if we send an inventory object to a backversioned 1.0
|
||||
receiver, that we raise ValueError if the inventory record contains a
|
||||
custom (non-standardized) resource class.
|
||||
"""
|
||||
values = {
|
||||
# NOTE(danms): We don't include an actual resource provider
|
||||
# here because chained backporting of that is handled by
|
||||
# the infrastructure and requires us to have a manifest
|
||||
'resource_class': 'custom_resource',
|
||||
'total': 1,
|
||||
'reserved': 0,
|
||||
'min_unit': 1,
|
||||
'max_unit': 1,
|
||||
'step_size': 1,
|
||||
'allocation_ratio': 1.0,
|
||||
}
|
||||
bdm = objects.Inventory(context=self.context, **values)
|
||||
self.assertRaises(ValueError,
|
||||
bdm.obj_to_primitive,
|
||||
target_version='1.0')
|
||||
|
||||
|
||||
class TestAllocation(test_objects._LocalTest):
|
||||
USES_DB = True
|
||||
|
@ -470,15 +448,15 @@ class TestAllocation(test_objects._LocalTest):
|
|||
uuid=_RESOURCE_PROVIDER_UUID,
|
||||
name=_RESOURCE_PROVIDER_NAME)
|
||||
rp.create()
|
||||
inv = objects.Inventory(context=self.context,
|
||||
resource_provider=rp,
|
||||
resource_class=_RESOURCE_CLASS_NAME,
|
||||
total=16,
|
||||
reserved=2,
|
||||
min_unit=1,
|
||||
max_unit=8,
|
||||
step_size=1,
|
||||
allocation_ratio=1.0)
|
||||
inv = resource_provider.Inventory(context=self.context,
|
||||
resource_provider=rp,
|
||||
resource_class=_RESOURCE_CLASS_NAME,
|
||||
total=16,
|
||||
reserved=2,
|
||||
min_unit=1,
|
||||
max_unit=8,
|
||||
step_size=1,
|
||||
allocation_ratio=1.0)
|
||||
inv.create()
|
||||
obj = resource_provider.Allocation(context=self.context,
|
||||
resource_provider=rp,
|
||||
|
@ -496,7 +474,7 @@ class TestAllocation(test_objects._LocalTest):
|
|||
uuid=_RESOURCE_PROVIDER_UUID,
|
||||
name=_RESOURCE_PROVIDER_NAME)
|
||||
rp.create()
|
||||
inv = objects.Inventory(context=self.context,
|
||||
inv = resource_provider.Inventory(context=self.context,
|
||||
resource_provider=rp,
|
||||
resource_class=_RESOURCE_CLASS_NAME,
|
||||
total=16,
|
||||
|
|
Loading…
Reference in New Issue