Keith Robertson has posted comments on this change.

Change subject: packaging: Fixed creating objects in an insecure way
......................................................................


Patch Set 2: Verified; Looks good to me, approved

(1 inline comment)

....................................................
File src/engine-iso-uploader.py
Line 413:                 if self.configuration.get("insecure"):
Line 414:                     params["insecure"] = True
Line 415:                 # Otherwise, use ca_file
Line 416:                 else:
Line 417:                     params["ca_file"] = 
self.configuration.get("engine_ca")
Alex,

Comments on Solution 1.

I do not like this option.  I think that the SDK needs to do parameter 
validation on these two mutually exclusive options (ie. insecure and ca_file)

Comments on Solution 2.

This would work fine and I ACK this.

There is also a third option.  The API could adopt a policy of throwing 
exceptions on invalid/inconsistent constructor arguments as there could be 
other cases beyond this current example.  If the API did this then all 3 tools 
would need to handle the exception but, in the long term, it might be the best 
policy. Example:

try:
 api = API(arg, arg,..., arg)
except Exception, e:
 logging.error(e)
Line 418: 
Line 419:                 # Create an API object
Line 420:                 self.api = API(**params)
Line 421: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I015c6b5441f0d1e33bb3aae378a59ad8557f9da5
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-iso-uploader
Gerrit-Branch: master
Gerrit-Owner: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Keith Robertson <[email protected]>
Gerrit-Reviewer: Kiril Nesenko <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ofer Schreiber <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to