Remove last use of rc_fields

Remove the last (except for the placement code) use of rc_fields
so that it can be safely removed in the next patch.

We can't remove it in this patch because some of the placement
code (being removed in the next patch) still uses it.

Change-Id: I6c5b584020708d13c85fa0c60aae1ee8ab8676ad
This commit is contained in:
Chris Dent 2019-03-23 11:06:25 +00:00
parent 926753ee6b
commit 179a1937fe
1 changed files with 7 additions and 13 deletions

View File

@ -22,6 +22,7 @@ import zlib
from keystoneauth1 import adapter
import mock
import os_resource_classes as orc
import os_traits
from oslo_config import cfg
from oslo_log import log as logging
@ -39,7 +40,6 @@ from nova import context
from nova import exception
from nova import objects
from nova.objects import block_device as block_device_obj
from nova import rc_fields
from nova.scheduler import weights
from nova import test
from nova.tests import fixtures as nova_fixtures
@ -5998,10 +5998,8 @@ class PortResourceRequestBasedSchedulingTestBase(
self._set_provider_inventories(
ovs_bridge_rp_uuid,
{"inventories": {
rc_fields.ResourceClass.NET_BW_IGR_KILOBIT_PER_SEC:
{"total": 10000},
rc_fields.ResourceClass.NET_BW_EGR_KILOBIT_PER_SEC:
{"total": 10000},
orc.NET_BW_IGR_KILOBIT_PER_SEC: {"total": 10000},
orc.NET_BW_EGR_KILOBIT_PER_SEC: {"total": 10000},
}})
self._create_trait(self.CUSTOM_VNIC_TYPE_NORMAL)
@ -6066,10 +6064,8 @@ class PortResourceRequestBasedSchedulingTestBase(
self.sriov_pf1_rp_uuid = getattr(uuids, sriov_agent_rp_uuid + 'PF1')
inventories = {
rc_fields.ResourceClass.NET_BW_IGR_KILOBIT_PER_SEC:
{"total": 100000},
rc_fields.ResourceClass.NET_BW_EGR_KILOBIT_PER_SEC:
{"total": 100000},
orc.NET_BW_IGR_KILOBIT_PER_SEC: {"total": 100000},
orc.NET_BW_EGR_KILOBIT_PER_SEC: {"total": 100000},
}
traits = [self.CUSTOM_VNIC_TYPE_DIRECT, self.CUSTOM_PHYSNET1]
self._create_pf_device_rp(
@ -6078,10 +6074,8 @@ class PortResourceRequestBasedSchedulingTestBase(
self.sriov_pf2_rp_uuid = getattr(uuids, sriov_agent_rp_uuid + 'PF2')
inventories = {
rc_fields.ResourceClass.NET_BW_IGR_KILOBIT_PER_SEC:
{"total": 100000},
rc_fields.ResourceClass.NET_BW_EGR_KILOBIT_PER_SEC:
{"total": 100000},
orc.NET_BW_IGR_KILOBIT_PER_SEC: {"total": 100000},
orc.NET_BW_EGR_KILOBIT_PER_SEC: {"total": 100000},
}
traits = [self.CUSTOM_VNIC_TYPE_DIRECT, self.CUSTOM_PHYSNET2]
self._create_pf_device_rp(