diff options
author | stark, steven <steven.stark@att.com> | 2018-12-17 12:43:02 -0800 |
---|---|---|
committer | stark, steven <steven.stark@att.com> | 2018-12-17 13:04:00 -0800 |
commit | 1f4df7c7ad27b23773ad9cdbe4db1632ce388cf1 (patch) | |
tree | 8092104f8be23051ff81c9f71ee34116df4d33ba /ice_validator/tests/test_nova_servers_resource_ids.py | |
parent | ca9085f0f77d442d3741a8c754e65cc45b6a318d (diff) |
[VVP] updating validation scripts in dublin
- adding backlog of new validation scripts for dublin
- updating existing tests
- removing outdated tests
Issue-ID: VVP-123
Change-Id: Ib8260889ac957c1dd28d8ede450fc8edc6fb0ec0
Signed-off-by: stark, steven <steven.stark@att.com>
Diffstat (limited to 'ice_validator/tests/test_nova_servers_resource_ids.py')
-rw-r--r-- | ice_validator/tests/test_nova_servers_resource_ids.py | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/ice_validator/tests/test_nova_servers_resource_ids.py b/ice_validator/tests/test_nova_servers_resource_ids.py index dd3e156..9747e29 100644 --- a/ice_validator/tests/test_nova_servers_resource_ids.py +++ b/ice_validator/tests/test_nova_servers_resource_ids.py @@ -45,12 +45,11 @@ from .helpers import validates from .utils.vm_types import get_vm_type_for_nova_server -@validates('R-40499', - 'R-57282') +@validates("R-40499", "R-57282") def test_nova_servers_valid_resource_ids(yaml_file): - ''' + """ Make sure all nova servers have valid resource ids - ''' + """ with open(yaml_file) as fh: yml = yaml.load(fh) @@ -85,14 +84,27 @@ def test_nova_servers_valid_resource_ids(yaml_file): int(k1_suffix) except ValueError: # vm_type_index is not an integer - invalid_nova_servers.append({"resource": k1, "vm_type": vm_type, "vm_type_index": k1_suffix}) + invalid_nova_servers.append( + { + "resource": k1, + "vm_type": vm_type, + "vm_type_index": k1_suffix, + } + ) else: # vm_type_index not found - invalid_nova_servers.append({"resource": k1, "vm_type": vm_type, "vm_type_index": "none found"}) + invalid_nova_servers.append( + { + "resource": k1, + "vm_type": vm_type, + "vm_type_index": "none found", + } + ) - assert not invalid_nova_servers, \ - "Invalid OS::Nova::Server resource ids detected {}\n" \ - "OS::Nova::Server resource ids must be in the form " \ - "<vm_type>_server_<vm_type_index> \n" \ - "<vm_type> is derived from flavor, image and name properties " \ + assert not invalid_nova_servers, ( + "Invalid OS::Nova::Server resource ids detected {}\n" + "OS::Nova::Server resource ids must be in the form " + "<vm_type>_server_<vm_type_index> \n" + "<vm_type> is derived from flavor, image and name properties " "".format(invalid_nova_servers) + ) |