From f0c943994764a8d295f6241b659430d507ea55b9 Mon Sep 17 00:00:00 2001 From: Uggla Date: Sat, 13 Feb 2016 14:26:34 +0100 Subject: [PATCH] Add advices to connection failure --- redfish/exception.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/redfish/exception.py b/redfish/exception.py index 5152f80..d54feff 100644 --- a/redfish/exception.py +++ b/redfish/exception.py @@ -15,8 +15,13 @@ class RedfishException(Exception): class ConnectionFailureException(RedfishException): def __init__(self, message, **kwargs): super(ConnectionFailureException, self).__init__(message, **kwargs) - self.advices = '1- Check if the url is the correct one\n' + \ - '2- Check if your device is answering on the network\n' + self.advices = \ + '1- Check if the url is the correct one\n' + \ + '2- Check if your device is answering on the network\n' + \ + '3- Check if your device has a valid trusted certificat\n' + \ + ' You can use openssl to validate it using the command :\n' + \ + ' openssl s_client -showcerts -connect :443\n' + \ + '4- Use option "--insecure" to connect without checking certificate\n' class InvalidRedfishContentException(RedfishException):