Alex Lourie has posted comments on this change. Change subject: packaging: Fixed creating objects in an insecure way ......................................................................
Patch Set 2: (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") Keith, I don't argue about the general concept of the exclusive params. Additionally, self.configuration.get("insecure") works fine in our code. The problem is not there. Currently SDK prefers 'ca_file' over 'insecure', thus leading us to a problem in hand. Previously, we always provided ca_file ( as you can see in previous code), and as result of that our "--insecure" option has no effect on creating an API object, because once 'ca_file' provided, 'insecure' is ignored by the SDK. So, I see there are 2 possible solutions to this problem: 1. SDK stays the same. We check the --insecure flag in tools. If it is provided on command line/config, we supply it to the API and DO NOT supply ca_file. If '--insecure' is not provided, we DO SUPPLY ca_file to the API. This is what I do in this patch. 2. SDK is altered so that if insecure=True supplied, it would ignore ca_file parameter. In this case our tools do not have to change. Throwing an exception from SDK in case of exclusive parameters as the only action will not solve anything, as we still would have to only provide correct params (either 'ca_file' or 'insecure'). 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 <alou...@redhat.com> Gerrit-Reviewer: Alex Lourie <alou...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com> Gerrit-Reviewer: Keith Robertson <krobe...@redhat.com> Gerrit-Reviewer: Kiril Nesenko <knese...@redhat.com> Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com> Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches