Oved Ourfali has posted comments on this change.

Change subject: Python Sample: first commit
......................................................................


Patch Set 2: (4 inline comments)

Some minor comments.
Nice work!

....................................................
File python/RestClient.py
Line 21:             req.add_header("Cookie", cookie)
Line 22: 
Line 23:         # run in user level API
Line 24:         req.add_header('filter', 'true')
Line 25:         # for using cookies
I'd say: "For using REST session via cookies, so we won't have to login on 
every request"
Line 26:         req.add_header('Prefer', 'persistent-auth')
Line 27:         response = urllib2.urlopen(req)
Line 28:         if not response.info().getheader('Set-Cookie') is None:
Line 29:             cookie = response.info().getheader('Set-Cookie')


....................................................
File python/RestCommand.py
Line 39:         try:
Line 40:             restClient.resetCookie()
Line 41:             xml = restClient.doGetMethod(self.baseUrl + '/api', 
userName, password)
Line 42:             return True
Line 43:         except: 
remove whitespace.
Line 44:             return False
Line 45: 
Line 46:     def getUserVms(self):
Line 47:         global restClient


....................................................
File python/WebHandler.py
Line 103:         <input type=button onclick='javascript:onConnect();' 
value='Connect'/>
Line 104:     </form>
Line 105: </body>
Line 106: </html>''' % (vm['address'], vm['port'], res['value'])
Line 107:             
remove whitespace.
Line 108:         return html
Line 109: 
Line 110:     def _ticketFirefox(self, vm, res):
Line 111:         html = '''<html>


Line 124:         <input type=button value='Connent' onclick='onConnect()'/>
Line 125:     </form>
Line 126: </body>
Line 127: </html>''' % (vm['address'], vm['port'], res['value'])
Line 128:             
remove whitespace
Line 129:         return html
Line 130: 
Line 131: 
Line 132:     def _uservms_method(self):


--
To view, visit http://gerrit.ovirt.org/9387
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I1d15dd5df8992c84b2c9529168919d05ba88bc33
Gerrit-PatchSet: 2
Gerrit-Project: samples-portals
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Shahar Havivi <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to