19
19
import os
20
20
import re
21
21
import sys
22
+ import traceback
22
23
import yaml
23
24
24
25
from redfish .ris import RmcApp
@@ -46,6 +47,7 @@ def run_test( user, password, rhost, openapi ):
46
47
openapi_data = yaml .load ( openapi_file , Loader = yaml .FullLoader )
47
48
except :
48
49
print ( "ERROR: Could not open {}" .format ( openapi ) )
50
+ print ( traceback .format_exc () )
49
51
return None
50
52
51
53
# Creating RMC object
@@ -58,7 +60,7 @@ def run_test( user, password, rhost, openapi ):
58
60
59
61
# If current cache exist try to log it out
60
62
if os .path .isdir ( cachedir ):
61
- RMCOBJ .logout
63
+ RMCOBJ .logout ()
62
64
63
65
# Login into the server, create a session, and download all resources
64
66
print ( "Service URI: {}" .format ( rhost ) )
@@ -67,14 +69,15 @@ def run_test( user, password, rhost, openapi ):
67
69
RMCOBJ .login ( base_url = rhost , username = user , password = password )
68
70
except :
69
71
print ( "ERROR: Could not log into {} with credentials '{}':'{}'" .format ( rhost , user , password ) )
72
+ print ( traceback .format_exc () )
70
73
return None
71
74
72
75
# Get all resources
73
76
RMCOBJ .select ( [ '"*"' ] )
74
77
response = RMCOBJ .get ()
75
78
76
79
# Go through each response and check the @odata.type and @odata.id properties against the OpenAPI file
77
- print ( "Generating results..." );
80
+ print ( "Generating results..." )
78
81
results = {}
79
82
results ["URIs" ] = {}
80
83
results ["Orphans" ] = []
0 commit comments