aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator
diff options
context:
space:
mode:
authorSteven Wright <sw3588@att.com>2019-09-24 14:53:57 +0000
committerGerrit Code Review <gerrit@onap.org>2019-09-24 14:53:57 +0000
commit1d319a416ba8f0cb764d86323f78318b0d3a8f4c (patch)
treef3fb90fddf7569d8c79132a9e9cc031f86bd543b /ice_validator
parent4094a7c292cf490564985f06a3574085df400372 (diff)
parentf5190cf61981eff1eb59157d4d2f8bd06acb3570 (diff)
Merge "added Is_nova_server method to helpers"
Diffstat (limited to 'ice_validator')
-rw-r--r--ice_validator/tests/helpers.py8
1 files changed, 8 insertions, 0 deletions
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"
+