Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-devtools / python / files / python-redfishtool / 0001-Adapt-redfishtool-to-python2.patch
1 From ecaf5c44da357e2ee5279a3f84a060f7af2c9dd1 Mon Sep 17 00:00:00 2001
2 From: zhipengl <zhipengs.liu@intel.com>
3 Date: Fri, 21 Jun 2019 01:50:14 +0800
4 Subject: [PATCH] Adapt-redfishtool-to-python2
5
6 Signed-off-by: zhipengl <zhipengs.liu@intel.com>
7 ---
8  redfishtool/AccountService.py       | 18 +++++++++---------
9  redfishtool/Chassis.py              | 22 +++++++++++-----------
10  redfishtool/Managers.py             | 29 ++++++++++++++---------------
11  redfishtool/ServiceRoot.py          |  2 +-
12  redfishtool/SessionService.py       | 10 +++++-----
13  redfishtool/Systems.py              | 36 ++++++++++++++++++------------------
14  redfishtool/raw.py                  |  2 +-
15  redfishtool/redfishtoolTransport.py | 29 ++++++++++++++---------------
16  setup.py                            |  1 +
17  9 files changed, 74 insertions(+), 75 deletions(-)
18
19 diff --git a/redfishtool/AccountService.py b/redfishtool/AccountService.py
20 index e0ec106..bfb17f8 100644
21 --- a/redfishtool/AccountService.py
22 +++ b/redfishtool/AccountService.py
23 @@ -34,7 +34,7 @@ import getopt
24  import re
25  import sys
26  from    .ServiceRoot import RfServiceRoot
27 -from   urllib.parse import urljoin
28 +from   urlparse import urljoin
29  
30  class RfAccountServiceMain():
31      def __init__(self):
32 @@ -259,13 +259,13 @@ class RfAccountServiceOperations():
33              #loop through the members and create the list sub-operation response
34              rc,r,j,d=rft.listCollection(rft, r, d, prop="UserName")
35              if(rc==0):
36 -                rft.printVerbose(1," list {} Collection member info: Id, URI, UserName".format(collName,skip1=True, printV12=cmdTop))
37 +                rft.printVerbose(1," list {} Collection member info: Id, URI, UserName".format(collName), skip1=True, printV12=cmdTop)
38  
39          # else: check if no account was specified.  If not, return the collection
40          elif(rft.IdLevel2OptnCount==0):
41              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=accountsLink, prop=prop)
42              if(rc==0):
43 -                rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
44 +                rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
45  
46          # else:  check if the -a (all) option is set. If not, return the session specific by -i or -m or -l
47          # search collection to find path using getPath2 
48 @@ -287,14 +287,14 @@ class RfAccountServiceOperations():
49              elif( r is None ):
50                  rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
51                  if(rc==0):
52 -                    rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
53 +                    rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
54  
55          # else, return ALL of the Accounts members
56          else:
57              rft.printVerbose(4,"getting expanded Accounts Collection")
58              rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=accountsLink)
59              if(rc==0):
60 -                rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
61 +                rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
62          
63          return(rc,r,j,d)
64  
65 @@ -324,13 +324,13 @@ class RfAccountServiceOperations():
66              #loop through the members and create the list sub-operation response
67              rc,r,j,d=rft.listCollection(rft, r, d, prop="IsPredefined")
68              if(rc==0):
69 -                rft.printVerbose(1," list {} Collection member info: Id, URI, IsPredefined".format(collName,skip1=True, printV12=cmdTop))
70 +                rft.printVerbose(1," list {} Collection member info: Id, URI, IsPredefined".format(collName), skip1=True, printV12=cmdTop)
71  
72          # else: check if no account was specified.  If not, return the collection
73          elif(rft.IdLevel2OptnCount==0):
74              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=rolesLink, prop=prop)
75              if(rc==0):
76 -                rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
77 +                rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
78  
79          # else:  check if the -a (all) option is set. If not, return the session specific by -i or -m or -l
80          # search collection to find path using getPath2 
81 @@ -352,14 +352,14 @@ class RfAccountServiceOperations():
82              elif( r is None ):
83                  rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
84                  if(rc==0):
85 -                    rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
86 +                    rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
87  
88          # else, return ALL of the Accounts members
89          else:
90              rft.printVerbose(4,"getting expanded Roles Collection")
91              rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=rolesLink)
92              if(rc==0):
93 -                rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
94 +                rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
95          
96          return(rc,r,j,d)
97  
98 diff --git a/redfishtool/Chassis.py b/redfishtool/Chassis.py
99 index d8f0bf5..0494bd9 100644
100 --- a/redfishtool/Chassis.py
101 +++ b/redfishtool/Chassis.py
102 @@ -37,7 +37,7 @@ import getopt
103  import re
104  import sys
105  from    .ServiceRoot import RfServiceRoot
106 -from   urllib.parse import urljoin
107 +from   urlparse import urljoin
108  
109  class RfChassisMain():
110      def __init__(self):
111 @@ -208,7 +208,7 @@ class RfChassisOperations():
112              rft.printVerbose(4,"Expand Chassis collection to return ALL Chassis collection members fully expanded in response")
113              rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=systemsLink)
114              if(rc==0):
115 -                rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
116 +                rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
117  
118          # otherwise, just return the collection
119          # now read the /Chassis collection
120 @@ -217,7 +217,7 @@ class RfChassisOperations():
121              if cmdTop is True:   prop=rft.prop
122              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=systemsLink, prop=prop)
123              if(rc==0):
124 -                rft.printVerbose(1," Chassis Collection:",skip1=True, printV12=cmdTop)
125 +                rft.printVerbose(1," Chassis Collection:", skip1=True, printV12=cmdTop)
126                  
127          return(rc,r,j,d)
128  
129 @@ -262,7 +262,7 @@ class RfChassisOperations():
130          #loop through the members and create the list sub-operation response
131          rc,r,j,d=rft.listCollection(rft, r, d, prop="AssetTag")
132          if(rc==0):
133 -            rft.printVerbose(1," list {} Collection member info: Id, URI, AssetTag".format(collName,skip1=True, printV12=cmdTop))
134 +            rft.printVerbose(1," list {} Collection member info: Id, URI, AssetTag".format(collName), skip1=True, printV12=cmdTop)
135          return(rc,r,j,d)
136  
137  
138 @@ -439,7 +439,7 @@ class RfChassisOperations():
139  
140          rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=resLink, prop=prop)
141          if(rc==0):
142 -            rft.printVerbose(1," {} Resource ".format(resName,skip1=True, printV12=cmdTop))
143 +            rft.printVerbose(1," {} Resource ".format(resName), skip1=True, printV12=cmdTop)
144  
145          return(rc,r,j,d)
146  
147 @@ -464,7 +464,7 @@ class RfChassisOperations():
148          
149          rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=resLink, prop=prop)
150          if(rc==0):
151 -            rft.printVerbose(1," {} Resource ".format(resName,skip1=True, printV12=cmdTop))
152 +            rft.printVerbose(1," {} Resource ".format(resName), skip1=True, printV12=cmdTop)
153              
154          return(rc,r,j,d)
155  
156 @@ -521,13 +521,13 @@ class RfChassisOperations():
157              if( prop in powerControl[indx] ):
158                  respDataVal=powerControl[indx][prop]
159                  respData={prop: respDataVal}
160 -                rft.printVerbose(1," Get Current Power consumption (PowerConsumedWatts) of PowerControl[{}] resource".format(indx,skip1=True, printV12=cmdTop))
161 +                rft.printVerbose(1," Get Current Power consumption (PowerConsumedWatts) of PowerControl[{}] resource".format(indx), skip1=True, printV12=cmdTop)
162              else:
163                  rft.printErr("Error: Property {} not not returned in PowerControl[{}] resource".format(prop,indx))
164                  return(4,r,j,d)
165          else:
166              respData=powerControl[indx]  #return the full powerControl array
167 -            rft.printVerbose(1," Chassis PowerControl[{}] array:".format(indx,skip1=True, printV12=cmdTop))
168 +            rft.printVerbose(1," Chassis PowerControl[{}] array:".format(indx), skip1=True, printV12=cmdTop)
169          
170          return(rc,r,j,respData)
171  
172 @@ -684,13 +684,13 @@ class RfChassisOperations():
173              #loop through the members and create the list sub-operation response
174              rc,r,j,d=rft.listCollection(rft, r, d, prop="Name")
175              if(rc==0):
176 -                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
177 +                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
178  
179          # else: check if no Log was specified.  If not, return the collection
180          elif(rft.IdLevel2OptnCount==0):
181              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=logLink, prop=prop)
182              if(rc==0):
183 -                rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
184 +                rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
185  
186          # else:  check if the -a (all) option is set. If not, return the proc specific by -i or -m
187          # search collection to find path using getPath2 
188 @@ -712,7 +712,7 @@ class RfChassisOperations():
189              elif( r is None ):
190                  rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
191                  if(rc==0):
192 -                    rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
193 +                    rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
194  
195              # If '--Entries' specified, get "Entries" nav link and read it
196              if rc == 0 and rft.gotEntriesOptn:
197 diff --git a/redfishtool/Managers.py b/redfishtool/Managers.py
198 index 586a871..400dad7 100644
199 --- a/redfishtool/Managers.py
200 +++ b/redfishtool/Managers.py
201 @@ -37,7 +37,7 @@ import getopt
202  import re
203  import sys
204  from    .ServiceRoot import RfServiceRoot
205 -from   urllib.parse import urljoin
206 +from   urlparse import urljoin
207  
208  class RfManagersMain():
209      def __init__(self):
210 @@ -211,7 +211,7 @@ class RfManagersOperations():
211              rft.printVerbose(4,"Expand Managers collection to return ALL Managers collection members fully expanded in response")
212              rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=systemsLink)
213              if(rc==0):
214 -                rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
215 +                rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
216  
217          # otherwise, just return the collection
218          # now read the /Managers collection
219 @@ -467,7 +467,7 @@ class RfManagersOperations():
220  
221          rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=resLink, prop=prop)
222          if(rc==0):
223 -            rft.printVerbose(1," {} Resource ".format(resName,skip1=True, printV12=cmdTop))
224 +            rft.printVerbose(1," {} Resource ".format(resName), skip1=True, printV12=cmdTop)
225  
226          return(rc,r,j,d)
227  
228 @@ -503,13 +503,13 @@ class RfManagersOperations():
229              #loop through the members and create the list sub-operation response
230              rc,r,j,d=rft.listCollection(rft, r, d, prop="Name")
231              if(rc==0):
232 -                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
233 +                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
234  
235          # else: check if no NIC was specified.  If not, return the collection
236          elif(rft.IdLevel2OptnCount==0):
237              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=nicLink, prop=prop)
238              if(rc==0):
239 -                rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
240 +                rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
241  
242          # else:  check if the -a (all) option is set. If not, return the proc specific by -i or -m
243          # search collection to find path using getPath2 
244 @@ -531,14 +531,14 @@ class RfManagersOperations():
245              elif( r is None ):
246                  rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
247                  if(rc==0):
248 -                    rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
249 +                    rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
250  
251          # else, return ALL of the EthernetInterfaces members
252          else:
253              rft.printVerbose(4,"getting expanded EthernetInterfaces Collection")
254              rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=nicLink)
255              if(rc==0):
256 -                rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
257 +                rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
258          
259          return(rc,r,j,d)
260  
261 @@ -568,13 +568,13 @@ class RfManagersOperations():
262              #loop through the members and create the list sub-operation response
263              rc,r,j,d=rft.listCollection(rft, r, d, prop="Name" )
264              if(rc==0):
265 -                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
266 +                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
267  
268          # else: check if no SerialInterfaces controller was specified.  If not, return the collection
269          elif(rft.IdLevel2OptnCount==0):
270              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=cntlrLink, prop=prop)
271              if(rc==0):
272 -                rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
273 +                rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
274  
275          # else:  check if the -a (all) option is set. If not, return the proc specific by -i or -m
276          # search collection to find path using getPath2 
277 @@ -596,14 +596,14 @@ class RfManagersOperations():
278              elif( r is None ):
279                  rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
280                  if(rc==0):
281 -                    rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
282 +                    rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
283  
284          # else, return ALL of the SerialInterfaces members
285          else:
286              rft.printVerbose(4,"getting expanded SerialInterfaces Collection")
287              rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=cntlrLink)
288              if(rc==0):
289 -                rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
290 +                rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
291          
292          return(rc,r,j,d)
293  
294 @@ -633,13 +633,12 @@ class RfManagersOperations():
295              #loop through the members and create the list sub-operation response
296              rc,r,j,d=rft.listCollection(rft, r, d, prop="Name")
297              if(rc==0):
298 -                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
299 -
300 +                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
301          # else: check if no Log was specified.  If not, return the collection
302          elif(rft.IdLevel2OptnCount==0):
303              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=logLink, prop=prop)
304              if(rc==0):
305 -                rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
306 +                rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
307  
308          # else:  check if the -a (all) option is set. If not, return the proc specific by -i or -m
309          # search collection to find path using getPath2 
310 @@ -661,7 +660,7 @@ class RfManagersOperations():
311              elif( r is None ):
312                  rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
313                  if(rc==0):
314 -                    rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
315 +                    rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
316  
317              # If '--Entries' specified, get "Entries" nav link and read it
318              if rc == 0 and rft.gotEntriesOptn:
319 diff --git a/redfishtool/ServiceRoot.py b/redfishtool/ServiceRoot.py
320 index 5d85b5d..9395b83 100644
321 --- a/redfishtool/ServiceRoot.py
322 +++ b/redfishtool/ServiceRoot.py
323 @@ -12,7 +12,7 @@
324  #
325  import requests
326  import json
327 -from urllib.parse import urljoin, urlparse, urlunparse
328 +from urlparse import urljoin, urlparse, urlunparse
329  
330  class RfServiceRoot:
331      def __init__(self):
332 diff --git a/redfishtool/SessionService.py b/redfishtool/SessionService.py
333 index 7a07811..c7a1624 100644
334 --- a/redfishtool/SessionService.py
335 +++ b/redfishtool/SessionService.py
336 @@ -30,7 +30,7 @@ import getopt
337  import re
338  import sys
339  from    .ServiceRoot import RfServiceRoot
340 -from   urllib.parse import urljoin
341 +from   urlparse import urljoin
342  
343  class RfSessionServiceMain():
344      def __init__(self):
345 @@ -267,13 +267,13 @@ class RfSessionServiceOperations():
346              #loop through the members and create the list sub-operation response
347              rc,r,j,d=rft.listCollection(rft, r, d, prop="UserName")
348              if(rc==0):
349 -                rft.printVerbose(1," list {} Collection member info: Id, URI, Socket".format(collName,skip1=True, printV12=cmdTop))
350 +                rft.printVerbose(1," list {} Collection member info: Id, URI, Socket".format(collName), skip1=True, printV12=cmdTop)
351  
352          # else: check if no session was specified.  If not, return the collection
353          elif(rft.IdLevel2OptnCount==0):
354              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=sessionsLink, prop=prop)
355              if(rc==0):
356 -                rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
357 +                rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
358  
359          # else:  check if the -a (all) option is set. If not, return the session specific by -i or -m or -l
360          # search collection to find path using getPath2 
361 @@ -295,14 +295,14 @@ class RfSessionServiceOperations():
362              elif( r is None ):
363                  rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
364                  if(rc==0):
365 -                    rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
366 +                    rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
367  
368          # else, return ALL of the Sessions members
369          else:
370              rft.printVerbose(4,"getting expanded Sessions Collection")
371              rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=sessionsLink)
372              if(rc==0):
373 -                rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
374 +                rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
375          
376          return(rc,r,j,d)
377  
378 diff --git a/redfishtool/Systems.py b/redfishtool/Systems.py
379 index 9a7dfbe..9a9148a 100644
380 --- a/redfishtool/Systems.py
381 +++ b/redfishtool/Systems.py
382 @@ -39,7 +39,7 @@ import getopt
383  import re
384  import sys
385  from    .ServiceRoot import RfServiceRoot
386 -from   urllib.parse import urljoin
387 +from   urlparse import urljoin
388  
389  class RfSystemsMain():
390      def __init__(self):
391 @@ -216,7 +216,7 @@ class RfSystemsOperations():
392              rft.printVerbose(4,"Expand Systems collection to return ALL Systems collection members fully expanded in response")
393              rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=systemsLink)
394              if(rc==0):
395 -                rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
396 +                rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
397  
398          # otherwise, just return the collection
399          # now read the /Systems collection
400 @@ -419,7 +419,7 @@ class RfSystemsOperations():
401                                           reqData=reqPostData)
402                     
403          if(rc==0):
404 -            rft.printVerbose(1," Systems reset: ", resetType, skip1=True, printV12=cmdTop)
405 +            rft.printVerbose(1,(" Systems reset: {}").format(resetType), skip1=True, printV12=cmdTop)
406              resetd=None
407              return(rc,r,False,resetd)
408          else: return(rc,r,False,None)
409 @@ -623,13 +623,13 @@ class RfSystemsOperations():
410              #loop through the members and create the list sub-operation response
411              rc,r,j,d=rft.listCollection(rft, r, d, prop="Socket")
412              if(rc==0):
413 -                rft.printVerbose(1," list {} Collection member info: Id, URI, Socket".format(collName,skip1=True, printV12=cmdTop))
414 +                rft.printVerbose(1," list {} Collection member info: Id, URI, Socket".format(collName), skip1=True, printV12=cmdTop)
415  
416          # else: check if no proc was specified.  If not, return the collection
417          elif(rft.IdLevel2OptnCount==0):
418              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=procsLink, prop=prop)
419              if(rc==0):
420 -                rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
421 +                rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
422  
423          # else:  check if the -a (all) option is set. If not, return the proc specific by -i or -m
424          # search collection to find path using getPath2 
425 @@ -651,14 +651,14 @@ class RfSystemsOperations():
426              elif( r is None ):
427                  rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
428                  if(rc==0):
429 -                    rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
430 +                    rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
431  
432          # else, return ALL of the processor members
433          else:
434              rft.printVerbose(4,"getting expanded Processor Collection")
435              rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=procsLink)
436              if(rc==0):
437 -                rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
438 +                rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
439          
440          return(rc,r,j,d)
441  
442 @@ -688,13 +688,13 @@ class RfSystemsOperations():
443              #loop through the members and create the list sub-operation response
444              rc,r,j,d=rft.listCollection(rft, r, d, prop="Name")
445              if(rc==0):
446 -                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
447 +                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
448  
449          # else: check if no NIC was specified.  If not, return the collection
450          elif(rft.IdLevel2OptnCount==0):
451              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=nicLink, prop=prop)
452              if(rc==0):
453 -                rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
454 +                rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
455  
456          # else:  check if the -a (all) option is set. If not, return the proc specific by -i or -m
457          # search collection to find path using getPath2 
458 @@ -716,14 +716,14 @@ class RfSystemsOperations():
459              elif( r is None ):
460                  rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
461                  if(rc==0):
462 -                    rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
463 +                    rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
464  
465          # else, return ALL of the EthernetInterfaces members
466          else:
467              rft.printVerbose(4,"getting expanded EthernetInterfaces Collection")
468              rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=nicLink)
469              if(rc==0):
470 -                rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
471 +                rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
472          
473          return(rc,r,j,d)
474  
475 @@ -753,13 +753,13 @@ class RfSystemsOperations():
476              #loop through the members and create the list sub-operation response
477              rc,r,j,d=rft.listCollection(rft, r, d, prop="Name" )
478              if(rc==0):
479 -                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
480 +                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
481  
482          # else: check if no SimpleStorage controller was specified.  If not, return the collection
483          elif(rft.IdLevel2OptnCount==0):
484              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=cntlrLink, prop=prop)
485              if(rc==0):
486 -                rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
487 +                rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
488  
489          # else:  check if the -a (all) option is set. If not, return the proc specific by -i or -m
490          # search collection to find path using getPath2 
491 @@ -781,14 +781,14 @@ class RfSystemsOperations():
492              elif( r is None ):
493                  rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
494                  if(rc==0):
495 -                    rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
496 +                    rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
497  
498          # else, return ALL of the SimpleStorage members
499          else:
500              rft.printVerbose(4,"getting expanded SimpleStorage Collection")
501              rc,r,j,d=rft.getAllCollectionMembers(rft, r.url, relPath=cntlrLink)
502              if(rc==0):
503 -                rft.printVerbose(1," Get ALL {} Collection Members".format(collName,skip1=True, printV12=cmdTop))
504 +                rft.printVerbose(1," Get ALL {} Collection Members".format(collName), skip1=True, printV12=cmdTop)
505          
506          return(rc,r,j,d)
507  
508 @@ -818,13 +818,13 @@ class RfSystemsOperations():
509              #loop through the members and create the list sub-operation response
510              rc,r,j,d=rft.listCollection(rft, r, d, prop="Name")
511              if(rc==0):
512 -                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName,skip1=True, printV12=cmdTop))
513 +                rft.printVerbose(1," list {} Collection member info: Id, URI, Name".format(collName), skip1=True, printV12=cmdTop)
514  
515          # else: check if no Log was specified.  If not, return the collection
516          elif(rft.IdLevel2OptnCount==0):
517              rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', r.url, relPath=logLink, prop=prop)
518              if(rc==0):
519 -                rft.printVerbose(1," {} Collection ".format(collName,skip1=True, printV12=cmdTop))
520 +                rft.printVerbose(1," {} Collection ".format(collName), skip1=True, printV12=cmdTop)
521  
522          # else:  check if the -a (all) option is set. If not, return the proc specific by -i or -m
523          # search collection to find path using getPath2 
524 @@ -846,7 +846,7 @@ class RfSystemsOperations():
525              elif( r is None ):
526                  rc,r,j,d=rft.rftSendRecvRequest(rft.AUTHENTICATED_API, 'GET', collUrl, relPath=path2, prop=prop)
527                  if(rc==0):
528 -                    rft.printVerbose(1," {} Collection Member ".format(collName,skip1=True, printV12=cmdTop))
529 +                    rft.printVerbose(1," {} Collection Member ".format(collName), skip1=True, printV12=cmdTop)
530  
531              # If '--Entries' specified, get "Entries" nav link and read it
532              if rc == 0 and rft.gotEntriesOptn:
533 diff --git a/redfishtool/raw.py b/redfishtool/raw.py
534 index bfb617c..1b32d0b 100644
535 --- a/redfishtool/raw.py
536 +++ b/redfishtool/raw.py
537 @@ -30,7 +30,7 @@ import getopt
538  import re
539  import sys
540  #from    .ServiceRoot import RfServiceRoot
541 -from   urllib.parse import urljoin, urlparse, urlunparse
542 +from   urlparse import urljoin, urlparse, urlunparse
543  
544  class RfRawMain():
545      def __init__(self):
546 diff --git a/redfishtool/redfishtoolTransport.py b/redfishtool/redfishtoolTransport.py
547 index 017fa11..f157eff 100644
548 --- a/redfishtool/redfishtoolTransport.py
549 +++ b/redfishtool/redfishtoolTransport.py
550 @@ -39,7 +39,7 @@ import json
551  import sys
552  import socket
553  import time
554 -from urllib.parse import urljoin, urlparse, urlunparse
555 +from urlparse import urljoin, urlparse, urlunparse
556  from requests.auth import HTTPBasicAuth, AuthBase
557  from .ServiceRoot import RfServiceRoot
558  
559 @@ -730,31 +730,32 @@ class RfTransport():
560           return(0)
561  
562  
563 -    def printVerbose(self,v,*argv, skip1=False, printV12=True,**kwargs): 
564 +    def printVerbose(self,v, argv, skip1=False, printV12=True):
565          if(self.quiet):
566              return(0)
567          if( (v==1 or v==2) and (printV12 is True) and (self.verbose >= v )):
568              if(skip1 is True):  print("#")
569 -            print("#",*argv, **kwargs)
570 +            print("#", argv)
571          elif( (v==1 or v==2) and (self.verbose >4 )):
572              if(skip1 is True):  print("#")
573 -            print("#",*argv, **kwargs)            
574 +            print("#", argv)
575          elif((v==3 ) and (printV12 is True) and (self.verbose >=v)):
576              if(skip1 is True):  print("#")
577 -            print("#REQUEST:",*argv,file=sys.stdout,**kwargs)
578 +            sys.stdout.write("#REQUEST:",argv)
579 +            # print("#REQUEST:",argv,file=sys.stdout)
580          elif((v==4 or v==5) and (self.verbose >=v)):
581              if(skip1 is True):  print("#")
582 -            print("#DB{}:".format(v),*argv,file=sys.stdout,**kwargs)
583 +            sys.stdout.write("#DB{}:".format(v),argv)
584 +            # print("#DB{}:".format(v),argv,file=sys.stdout)
585          elif( v==0):  #print no mater value of verbose, but not if quiet=1
586              if(skip1 is True):  print("")
587 -            print(*argv, **kwargs)
588 +            print(argv)
589          else:
590              pass
591  
592          sys.stdout.flush()
593          #if you set v= anything except 0,1,2,3,4,5 it is ignored
594  
595 -
596      def printStatus(self, s, r=None, hdrs=None, authMsg=None, addSessionLoginInfo=False): 
597          if(self.quiet):
598              return(0)
599 @@ -785,22 +786,20 @@ class RfTransport():
600          sys.stdout.flush()
601          
602  
603 -
604 -
605 -    def printErr(self,*argv,noprog=False,prepend="",**kwargs):
606 +    def printErr(self,argv,noprog=False,prepend=""):
607          if( self.quiet == False):
608              if(noprog is True):
609 -                print(prepend,*argv, file=sys.stderr, **kwargs)
610 +                sys.stderr.write("{}{}".format(prepend,argv))
611              else:
612 -                print(prepend,"  {}:".format(self.program),*argv, file=sys.stderr, **kwargs)
613 +                sys.stderr.write("{}  {}:{}".format(prepend, self.program, argv))
614          else:
615              pass
616 -        
617 +
618          sys.stderr.flush()
619          return(0)
620  
621  
622 -    def printStatusErr4xx(self, status_code,*argv,noprog=False, prepend="",**kwargs):
623 +    def printStatusErr4xx(self, status_code):
624          if(self.quiet):
625              return(0)
626          if( status_code < 400 ):
627 diff --git a/setup.py b/setup.py
628 index d37d099..481f429 100644
629 --- a/setup.py
630 +++ b/setup.py
631 @@ -1,5 +1,6 @@
632  from setuptools import setup
633  from os import path
634 +from io import open
635  
636  this_directory = path.abspath(path.dirname(__file__))
637  with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
638 -- 
639 2.7.4
640