X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vvp%2Fvalidation-scripts.git;a=blobdiff_plain;f=ice_validator%2Ftests%2Fhelpers.py;h=291464def3d19971787327166ea77c24fd9f967c;hp=fefa8de6108704efb0b6f7257f0f54e0e412886f;hb=46382c6e444d2448705da25e1e4266603158318b;hpb=083e8d0575d80d5d539a4ef83d8f4800074b7bcd diff --git a/ice_validator/tests/helpers.py b/ice_validator/tests/helpers.py index fefa8de..291464d 100644 --- a/ice_validator/tests/helpers.py +++ b/ice_validator/tests/helpers.py @@ -412,3 +412,11 @@ def remove(sequence, exclude, key=None): key_func = key if key else lambda x: x result = (s for s in sequence if key_func(s) not in exclude) return set(result) if isinstance(sequence, Set) else list(result) + + +def is_nova_server(resource): + """ + checks resource is a nova server + """ + return isinstance(resource, dict) and "type" in resource and "properties" in resource and resource.get("type") == "OS::Nova::Server" +