redfish-interop-validator 2.2.2__tar.gz → 2.2.4__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.
Files changed (24) hide show
  1. redfish_interop_validator-2.2.4/LICENSE.md +29 -0
  2. {redfish_interop_validator-2.2.2/redfish_interop_validator.egg-info → redfish_interop_validator-2.2.4}/PKG-INFO +1 -1
  3. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator/RedfishInteropValidator.py +1 -1
  4. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator/config.py +2 -0
  5. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator/interop.py +22 -7
  6. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4/redfish_interop_validator.egg-info}/PKG-INFO +1 -1
  7. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/setup.py +1 -1
  8. redfish_interop_validator-2.2.2/LICENSE.md +0 -57
  9. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/AUTHORS.md +0 -0
  10. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/README.md +0 -0
  11. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator/RedfishLogo.py +0 -0
  12. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator/__init__.py +0 -0
  13. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator/profile.py +0 -0
  14. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator/redfish.py +0 -0
  15. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator/session.py +0 -0
  16. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator/tohtml.py +0 -0
  17. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator/traverseInterop.py +0 -0
  18. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator/validateResource.py +0 -0
  19. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator.egg-info/SOURCES.txt +0 -0
  20. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator.egg-info/dependency_links.txt +0 -0
  21. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator.egg-info/entry_points.txt +0 -0
  22. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator.egg-info/requires.txt +0 -0
  23. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/redfish_interop_validator.egg-info/top_level.txt +0 -0
  24. {redfish_interop_validator-2.2.2 → redfish_interop_validator-2.2.4}/setup.cfg +0 -0
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2017-2024, Contributing Member(s) of Distributed Management Task
4
+ Force, Inc.. All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without modification,
7
+ are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation and/or
14
+ other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its contributors
17
+ may be used to endorse or promote products derived from this software without
18
+ specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
24
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: redfish_interop_validator
3
- Version: 2.2.2
3
+ Version: 2.2.4
4
4
  Summary: Redfish Interop Validator
5
5
  Home-page: https://github.com/DMTF/Redfish-Interop-Validator
6
6
  Author: DMTF, https://www.dmtf.org/standards/feedback
@@ -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.2'
20
+ tool_version = '2.2.4'
21
21
 
22
22
  # Set up the custom debug levels
23
23
  VERBOSE1 = logging.INFO - 1
@@ -53,6 +53,8 @@ def convert_config_to_args(args, config):
53
53
  setattr(args, option, my_config[section][option].split(' '))
54
54
  else:
55
55
  setattr(args, option, my_config[section][option])
56
+ if option.lower() in ['password', 'token']:
57
+ my_config.set(section, option, '******')
56
58
  my_config_dict = config_parse_to_dict(my_config)
57
59
  import json
58
60
  print(json.dumps(my_config_dict, indent=4))
@@ -279,6 +279,7 @@ def checkComparison(val, compareType, target):
279
279
  else:
280
280
  continue
281
281
  paramPass = len(alltarget) == len(target)
282
+
282
283
  if compareType == "LinkToResource":
283
284
  if val == REDFISH_ABSENT:
284
285
  paramPass = False
@@ -300,7 +301,7 @@ def checkComparison(val, compareType, target):
300
301
  if compareType == "Present":
301
302
  paramPass = val != REDFISH_ABSENT
302
303
 
303
- if isinstance(target, list):
304
+ if isinstance(target, list) and val != REDFISH_ABSENT:
304
305
  if compareType == "Equal":
305
306
  paramPass = val in target
306
307
  elif compareType == "NotEqual":
@@ -317,6 +318,10 @@ def checkComparison(val, compareType, target):
317
318
  paramPass = val <= value
318
319
  if paramPass is False:
319
320
  break
321
+ elif compareType in ["Equal", "NotEqual", "GreaterThan", "GreaterThanOrEqual", "LessThan", "LessThanOrEqual"]:
322
+ if not isinstance(target, list):
323
+ my_logger.warn('CompareType {} requires a list of values'.format(compareType))
324
+
320
325
  my_logger.debug('\tpass ' + str(paramPass))
321
326
  return msgInterop('Comparison', target, compareType, val, paramPass),\
322
327
  paramPass
@@ -776,17 +781,27 @@ def validateInteropResource(propResourceObj, interop_profile, rf_payload):
776
781
 
777
782
  if "UseCases" in interop_profile:
778
783
  for use_case in interop_profile['UseCases']:
779
- entry_title = use_case.get("UseCaseTitle", "NoName").replace(' ','_')
780
- my_logger.debug('UseCase {}'.format(entry_title))
784
+ entry_title = use_case.get("UseCaseTitle", "NoName").replace(' ', '_')
785
+ entry_type = use_case.get("UseCaseType", "Normal")
786
+ my_logger.debug('UseCase {} {}'.format(entry_title, entry_type))
781
787
 
782
788
  # Check if we have a valid UseCase
783
- if 'URIs' not in use_case and 'UseCaseKeyProperty' not in use_case:
789
+ if 'URIs' not in use_case and 'UseCaseKeyProperty' not in use_case and entry_type != 'AbsentResource':
784
790
  my_logger.error('UseCase does not have URIs or UseCaseKeyProperty...')
785
791
 
786
- if 'UseCaseKeyProperty' in use_case:
792
+ if entry_type == 'AbsentResource':
793
+ my_status = rf_payload.get('Status')
794
+ if my_status:
795
+ use_case_applies = my_status.get('State') == 'Absent'
796
+ else:
797
+ use_case_applies = False
798
+ if 'URIs' in use_case:
799
+ use_case_applies = use_case_applies and checkInteropURI(propResourceObj, use_case['URIs'])
800
+
801
+ elif 'UseCaseKeyProperty' in use_case:
787
802
  entry_key, entry_comparison, entry_values = use_case['UseCaseKeyProperty'], use_case['UseCaseComparison'], use_case['UseCaseKeyValues']
788
803
 
789
- _, use_case_applies = checkComparison(rf_payload.get(entry_key), entry_comparison, entry_values)
804
+ _, use_case_applies = checkComparison(rf_payload.get(entry_key, REDFISH_ABSENT), entry_comparison, entry_values)
790
805
 
791
806
  # Check if URI applies to this usecase as well
792
807
  if 'URIs' in use_case:
@@ -794,7 +809,7 @@ def validateInteropResource(propResourceObj, interop_profile, rf_payload):
794
809
 
795
810
  elif 'URIs' in use_case:
796
811
  use_case_applies = checkInteropURI(propResourceObj, use_case['URIs'])
797
-
812
+
798
813
  else:
799
814
  use_case_applies = False
800
815
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: redfish_interop_validator
3
- Version: 2.2.2
3
+ Version: 2.2.4
4
4
  Summary: Redfish Interop Validator
5
5
  Home-page: https://github.com/DMTF/Redfish-Interop-Validator
6
6
  Author: DMTF, https://www.dmtf.org/standards/feedback
@@ -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.2",
14
+ version="2.2.4",
15
15
  description="Redfish Interop Validator",
16
16
  long_description=long_description,
17
17
  long_description_content_type="text/markdown",
@@ -1,57 +0,0 @@
1
- The Distributed Management Task Force (DMTF) grants rights under copyright in
2
- this software on the terms of the BSD 3-Clause License as set forth below; no
3
- other rights are granted by DMTF. This software might be subject to other rights
4
- (such as patent rights) of other parties.
5
-
6
-
7
- ### Copyrights.
8
-
9
- Copyright (c) 2016, Contributing Member(s) of Distributed Management Task Force,
10
- Inc.. All rights reserved.
11
-
12
- Redistribution and use in source and binary forms, with or without modification,
13
- are permitted provided that the following conditions are met:
14
-
15
- * Redistributions of source code must retain the above copyright notice, this
16
- list of conditions and the following disclaimer.
17
- * Redistributions in binary form must reproduce the above copyright notice, this
18
- list of conditions and the following disclaimer in the documentation and/or
19
- other materials provided with the distribution.
20
- * Neither the name of the Distributed Management Task Force (DMTF) nor the names
21
- of its contributors may be used to endorse or promote products derived from this
22
- software without specific prior written permission.
23
-
24
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
25
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27
- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
28
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
31
- ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
-
35
-
36
- ### Patents.
37
-
38
- This software may be subject to third party patent rights, including provisional
39
- patent rights ("patent rights"). DMTF makes no representations to users of the
40
- standard as to the existence of such rights, and is not responsible to
41
- recognize, disclose, or identify any or all such third party patent right,
42
- owners or claimants, nor for any incomplete or inaccurate identification or
43
- disclosure of such rights, owners or claimants. DMTF shall have no liability to
44
- any party, in any manner or circumstance, under any legal theory whatsoever, for
45
- failure to recognize, disclose, or identify any such third party patent rights,
46
- or for such party's reliance on the software or incorporation thereof in its
47
- product, protocols or testing procedures. DMTF shall have no liability to any
48
- party using such software, whether such use is foreseeable or not, nor to any
49
- patent owner or claimant, and shall have no liability or responsibility for
50
- costs or losses incurred if software is withdrawn or modified after publication,
51
- and shall be indemnified and held harmless by any party using the software from
52
- any and all claims of infringement by a patent owner for such use.
53
-
54
- DMTF Members that contributed to this software source code might have made
55
- patent licensing commitments in connection with their participation in the DMTF.
56
- For details, see http://dmtf.org/sites/default/files/patent-10-18-01.pdf and
57
- http://www.dmtf.org/about/policies/disclosures.