X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=ice_validator%2Ftests%2Fhelpers.py;h=764be11d9998419c59673d15938a46a2e7857098;hb=1d319a416ba8f0cb764d86323f78318b0d3a8f4c;hp=6266f086c9e835828f06d70ebec9c81ca9aa7eda;hpb=4094a7c292cf490564985f06a3574085df400372;p=vvp%2Fvalidation-scripts.git diff --git a/ice_validator/tests/helpers.py b/ice_validator/tests/helpers.py index 6266f08..764be11 100644 --- a/ice_validator/tests/helpers.py +++ b/ice_validator/tests/helpers.py @@ -415,3 +415,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" +