Francesco Romani has posted comments on this change.

Change subject: contrib: schema converter
......................................................................


Patch Set 35:

(8 comments)

Still pending to review (just glanced):
- schema-converter
- vdsm-api.yml - the virt parts, another pass.
Looks good however

https://gerrit.ovirt.org/#/c/52864/35/tests/schemaValidationTest.py
File tests/schemaValidationTest.py:

PS35, Line 216:              if name not in params:
              :                     raise Exception("parameters do not match 
for %s.%s"
              :                                     % (command, method))
why not 

assertNotIn()

?


PS35, Line 221:         path = schemaapi.find_schema()
              :         gluster_path = schemaapi.find_schema('vdsm-api-gluster')
              :         cache = schemaapi.Schema([path, gluster_path])
maybe move into setUp() and set cache as instance variable?


PS35, Line 228:             if not y_ret:
              :                 if ret:
              :                     raise Exception("Return value do not match")
              :                 continue
self.assertTrue(ret and y_ret)

?

not sure it is more expressive, but current code is pretty opaque too


PS35, Line 234:                 if not isinstance(ret, list):
              :                     raise Exception("Return expected to be 
list")
self.assertTrue(isinstance(ret, list))

?


PS35, Line 242:             if ret_type != self.swap_types(ret):
              :                 raise Exception("Return type do not match")
self.assertEquals(ret_type, swap_types(ret))

?


PS35, Line 245: test_types
same as previous methods, in each place you raise Exception


PS35, Line 285: with self.assertRaises(schemaapi.MethodNotFound):
we prefer:


self.assertRaises(schemaapi.MethodNotFound,
                  cache.get_method,
                  'Missing_class',
                  'missing_method')


PS35, Line 293: assertRaises
same


-- 
To view, visit https://gerrit.ovirt.org/52864
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I3921cebb7f550f63849f3bc5c80636b6e9495c92
Gerrit-PatchSet: 35
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Darshan N <[email protected]>
Gerrit-Reviewer: Edward Haas <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Polednik <[email protected]>
Gerrit-Reviewer: Martin Sivák <[email protected]>
Gerrit-Reviewer: Milan Zamazal <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Sahina Bose <[email protected]>
Gerrit-Reviewer: Vinzenz Feenstra <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to