Rename ORDERED_CLASSES to STANDARDS

In earlier review of the proof of concept, STANDARDS was the
preferred name as it was more aligned with expectations set by
in-nova use of resource classes.

Change-Id: I0cca8b0f3b61389dcba8597808e79e0524611dab
This commit is contained in:
Chris Dent 2018-12-11 11:42:46 +00:00
parent 385310e1b0
commit df251458bf
2 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ import sys
# Extend this list, if required, by adding **to the end of it**.
ORDERED_CLASSES = [
STANDARDS = [
# Virtual CPUs
'VCPU',
# Memory Megabytes
@ -65,5 +65,5 @@ def is_custom(resource_class):
# Set symbols that match resource class name strings.
package = sys.modules[__name__]
for resource_class in ORDERED_CLASSES:
for resource_class in STANDARDS:
setattr(package, resource_class, resource_class)

View File

@ -24,9 +24,9 @@ from os_resource_classes.tests import base
class TestOs_resource_classes(base.TestCase):
def test_id_mapping_strings(self):
self.assertEqual('VCPU', rc.ORDERED_CLASSES[0])
self.assertEqual('DISK_GB', rc.ORDERED_CLASSES[2])
self.assertEqual('VCPU', rc.STANDARDS[0])
self.assertEqual('DISK_GB', rc.STANDARDS[2])
def test_id_mapping_symbols(self):
self.assertEqual(rc.VCPU, rc.ORDERED_CLASSES[0])
self.assertEqual(rc.DISK_GB, rc.ORDERED_CLASSES[2])
self.assertEqual(rc.VCPU, rc.STANDARDS[0])
self.assertEqual(rc.DISK_GB, rc.STANDARDS[2])