Initial automated testing for os-resource-classes
Adjust tox settings for a reasonable set of job defaults. Turn on the usual templates in .zuul.yaml Correct small pep8 and docs issues to get tox jobs passing. Change-Id: Id0ebeab2ec2439d52defe59096b07c3d0b7bc66d
This commit is contained in:
parent
926cd1873e
commit
385310e1b0
|
@ -0,0 +1,10 @@
|
|||
- project:
|
||||
templates:
|
||||
- check-requirements
|
||||
- openstack-cover-jobs
|
||||
- openstack-python-jobs
|
||||
- openstack-python35-jobs
|
||||
- openstack-python36-jobs
|
||||
- openstack-python37-jobs
|
||||
- publish-openstack-docs-pti
|
||||
- release-notes-jobs-python3
|
|
@ -12,6 +12,7 @@ A list of standardized resource classes for OpenStack.
|
|||
* Documentation: https://docs.openstack.org/os-resource-classes/latest
|
||||
* Source: https://git.openstack.org/cgit/openstack/os-resource-classes
|
||||
* Bugs: https://bugs.launchpad.net/nova
|
||||
|
||||
--------
|
||||
|
||||
* TODO
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
"""Static symbols for resources classes used by OpenStack.
|
||||
|
||||
A resource class is a type of countable thing that exists in
|
||||
|
@ -47,6 +58,7 @@ ORDERED_CLASSES = [
|
|||
# Namespace used for custom resource classes
|
||||
CUSTOM_NAMESPACE = 'CUSTOM_'
|
||||
|
||||
|
||||
def is_custom(resource_class):
|
||||
return resource_class.startswith(CUSTOM_NAMESPACE)
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
|
@ -26,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.ORDERED_CLASSES[0])
|
||||
self.assertEqual('DISK_GB', rc.ORDERED_CLASSES[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.ORDERED_CLASSES[0])
|
||||
self.assertEqual(rc.DISK_GB, rc.ORDERED_CLASSES[2])
|
||||
|
|
Loading…
Reference in New Issue