DMTF / Redfish-Service-Validator

The Redfish Service Validator is a Python3 tool for checking conformance of any "device" with a Redfish service interface against Redfish CSDL schema
Other
38 stars 33 forks source link

When Constructing metadata, Got [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed #521

Closed HanCJiang closed 1 year ago

HanCJiang commented 1 year ago

image Is it possible to apply this patch to solve this problem?

diff --git a/redfish_service_validator/traverse.py b/redfish_service_validator/traverse.py
index 22dad7e..31c198f 100644
--- a/redfish_service_validator/traverse.py
+++ b/redfish_service_validator/traverse.py
@@ -165,7 +165,7 @@ class rfService():
             startTick = datetime.now()
             mockup_file_path = os.path.join(config['mockup'], URLDest.replace('/redfish/v1/', '', 1).strip('/'), 'index.json')
             if not inService:
-                req = requests.get(URLDest, proxies=self.ext_proxies)
+                req = requests.get(URLDest, proxies=self.ext_proxies, verify=False)
                 content = req.json if not isXML else req.text
                 response = rf.rest.v1.StaticRestResponse(Status=req.status_code, Headers={x:req.headers[x] for x in req.headers}, Content=req.text)
             elif config['mockup'] != '' and os.path.isfile(mockup_file_path): 
mraineri commented 1 year ago

Yes, feel free to make a pull request with the change.

mraineri commented 1 year ago

Closing; PR merged