redfish-interop-validator 2.2.6__tar.gz → 2.2.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {redfish_interop_validator-2.2.6/redfish_interop_validator.egg-info → redfish_interop_validator-2.2.7}/PKG-INFO +1 -1
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator/RedfishInteropValidator.py +1 -1
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator/interop.py +34 -2
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator/validateResource.py +2 -3
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7/redfish_interop_validator.egg-info}/PKG-INFO +1 -1
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/setup.py +1 -1
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/AUTHORS.md +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/LICENSE.md +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/README.md +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator/RedfishLogo.py +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator/__init__.py +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator/config.py +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator/profile.py +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator/redfish.py +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator/session.py +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator/tohtml.py +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator/traverseInterop.py +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator.egg-info/SOURCES.txt +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator.egg-info/dependency_links.txt +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator.egg-info/entry_points.txt +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator.egg-info/requires.txt +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/redfish_interop_validator.egg-info/top_level.txt +0 -0
- {redfish_interop_validator-2.2.6 → redfish_interop_validator-2.2.7}/setup.cfg +0 -0
|
@@ -17,7 +17,7 @@ import redfish_interop_validator.traverseInterop as traverseInterop
|
|
|
17
17
|
from redfish_interop_validator.profile import getProfiles, checkProfileAgainstSchema, hashProfile
|
|
18
18
|
from redfish_interop_validator.validateResource import validateSingleURI, validateURITree
|
|
19
19
|
|
|
20
|
-
tool_version = '2.2.
|
|
20
|
+
tool_version = '2.2.7'
|
|
21
21
|
|
|
22
22
|
# Set up the custom debug levels
|
|
23
23
|
VERBOSE1 = logging.INFO - 1
|
|
@@ -767,6 +767,15 @@ def checkInteropURI(r_obj, profile_entry):
|
|
|
767
767
|
my_id, my_uri = r_obj.jsondata.get('Id'), r_obj.uri
|
|
768
768
|
return compareRedfishURI(profile_entry, my_uri)
|
|
769
769
|
|
|
770
|
+
# Expected Type, Key
|
|
771
|
+
entry_type_table = {
|
|
772
|
+
'ChassisType': ("Chassis", "ChassisType"),
|
|
773
|
+
'DriveProtocol': ("Drive", "Protocol"),
|
|
774
|
+
'MemoryType': ("Memory", "MemoryType"),
|
|
775
|
+
'PortProtocol': ("Port", "PortProtocol"),
|
|
776
|
+
'ProcessorType': ("Processor", "ProcessorType"),
|
|
777
|
+
}
|
|
778
|
+
|
|
770
779
|
|
|
771
780
|
def validateInteropResource(propResourceObj, interop_profile, rf_payload):
|
|
772
781
|
"""
|
|
@@ -783,11 +792,12 @@ def validateInteropResource(propResourceObj, interop_profile, rf_payload):
|
|
|
783
792
|
for use_case in interop_profile['UseCases']:
|
|
784
793
|
entry_title = use_case.get("UseCaseTitle", "NoName").replace(' ', '_')
|
|
785
794
|
entry_type = use_case.get("UseCaseType", "Normal")
|
|
795
|
+
my_parent = propResourceObj.parent
|
|
786
796
|
my_logger.debug('UseCase {} {}'.format(entry_title, entry_type))
|
|
787
797
|
|
|
788
798
|
# Check if we have a valid UseCase
|
|
789
|
-
if 'URIs' not in use_case and 'UseCaseKeyProperty' not in use_case and entry_type
|
|
790
|
-
my_logger.error('UseCase does not have URIs or
|
|
799
|
+
if ('URIs' not in use_case) and ('UseCaseKeyProperty' not in use_case) and (entry_type not in ['AbsentResource'] + list(entry_type_table.keys())):
|
|
800
|
+
my_logger.error('UseCase does not have URIs or valid UseCase...')
|
|
791
801
|
|
|
792
802
|
if entry_type == 'AbsentResource':
|
|
793
803
|
my_status = rf_payload.get('Status')
|
|
@@ -797,6 +807,28 @@ def validateInteropResource(propResourceObj, interop_profile, rf_payload):
|
|
|
797
807
|
use_case_applies = False
|
|
798
808
|
if 'URIs' in use_case:
|
|
799
809
|
use_case_applies = use_case_applies and checkInteropURI(propResourceObj, use_case['URIs'])
|
|
810
|
+
|
|
811
|
+
elif entry_type in entry_type_table:
|
|
812
|
+
target_type_found = False
|
|
813
|
+
target_type, entry_key = entry_type_table[entry_type]
|
|
814
|
+
entry_comparison, entry_values = use_case['UseCaseComparison'], use_case['UseCaseKeyValues']
|
|
815
|
+
|
|
816
|
+
# Iterate until we find our target type, if not found then use case cannot apply
|
|
817
|
+
while my_parent is not None and not target_type_found:
|
|
818
|
+
parent_type = getType(my_parent.jsondata.get('@odata.type', 'NoType'))
|
|
819
|
+
target_type_found = parent_type == target_type
|
|
820
|
+
if not target_type_found:
|
|
821
|
+
my_parent = my_parent.parent
|
|
822
|
+
|
|
823
|
+
if target_type_found:
|
|
824
|
+
target_payload = my_parent.jsondata
|
|
825
|
+
target_value = target_payload.get(entry_key)
|
|
826
|
+
|
|
827
|
+
_, use_case_applies = checkComparison(target_payload.get(entry_key, REDFISH_ABSENT), entry_comparison, entry_values)
|
|
828
|
+
else:
|
|
829
|
+
my_logger.verbose1('Type {} was not found in parent typechain'.format(target_type))
|
|
830
|
+
use_case_applies = False
|
|
831
|
+
|
|
800
832
|
|
|
801
833
|
elif 'UseCaseKeyProperty' in use_case:
|
|
802
834
|
entry_key, entry_comparison, entry_values = use_case['UseCaseKeyProperty'], use_case['UseCaseComparison'], use_case['UseCaseKeyValues']
|
|
@@ -168,7 +168,7 @@ def validateSingleURI(URI, profile, uriName='', expectedType=None, expectedSchem
|
|
|
168
168
|
profile_resources = profile_resources.get(SchemaType)
|
|
169
169
|
try:
|
|
170
170
|
propMessages, propCounts = interop.validateInteropResource(resource_obj, profile_resources, jsondata)
|
|
171
|
-
messages
|
|
171
|
+
messages.extend(propMessages)
|
|
172
172
|
counts.update(propCounts)
|
|
173
173
|
my_logger.info('{} of {} tests passed.'.format(counts['pass'] + counts['warn'], counts['totaltests']))
|
|
174
174
|
except Exception:
|
|
@@ -312,8 +312,7 @@ def validateURITree(URI, profile, uriName, expectedType=None, expectedSchema=Non
|
|
|
312
312
|
allLinks.add(link.rstrip('/'))
|
|
313
313
|
|
|
314
314
|
results.update(linkResults)
|
|
315
|
-
|
|
316
|
-
|
|
315
|
+
|
|
317
316
|
if not linkSuccess:
|
|
318
317
|
continue
|
|
319
318
|
|
|
@@ -11,7 +11,7 @@ with open("README.md", "r", "utf-8") as f:
|
|
|
11
11
|
|
|
12
12
|
setup(
|
|
13
13
|
name="redfish_interop_validator",
|
|
14
|
-
version="2.2.
|
|
14
|
+
version="2.2.7",
|
|
15
15
|
description="Redfish Interop Validator",
|
|
16
16
|
long_description=long_description,
|
|
17
17
|
long_description_content_type="text/markdown",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|