You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This plugin is really nice, but I found that its not possible to set a default https value via RhnSatellite::Connection::Handler.default_https. I think its also not possible to set a different default_timeout as well due to the same logic.
So when I make a call to say RhnSatellite::System.details(1000001), its calling:
RhnSatellite::Connection::Handler.instance_for("System", nil, nil, nil, 30, true).default_call('system.getDetails',1000001)
Since true is being passed to instance_for, it'll always use HTTPS unless I specifically set RhnSatellite::System.https = false.
The fix is either not defaulting RhnSatellite::Connection::Base to a HTTPS value, or (personally I think this is better), adjusting RhnSatellite::Connect::Handler to respect the default_https if its set.
Thanks and let me know if you would like me to submit a pull request!
Brian
The text was updated successfully, but these errors were encountered:
Actually on second thought, it might be better to not default HTTPS to true on RhnSatellite::Connection::Base, which will pass nil to RhnSatellite::Connection::Handler.instance_for, which will always default to true (or false if you set default_https). I think the same applies to the timeout in RhnSatellite::Connection::Base as well. Hope this helps!
Hi there,
This plugin is really nice, but I found that its not possible to set a default https value via RhnSatellite::Connection::Handler.default_https. I think its also not possible to set a different default_timeout as well due to the same logic.
Because every RhnSatellite::X class extends RhnSatellite::Connection::Base, which will always default to https = true because of this line: https://github.com/duritong/ruby-rhn_satellite/blob/master/lib/rhn_satellite/connection/base.rb#L19
So when I make a call to say RhnSatellite::System.details(1000001), its calling:
RhnSatellite::Connection::Handler.instance_for("System", nil, nil, nil, 30, true).default_call('system.getDetails',1000001)
Here's the line that determines whether or not to use default_https: https://github.com/duritong/ruby-rhn_satellite/blob/master/lib/rhn_satellite/connection/handler.rb#L17
Since true is being passed to instance_for, it'll always use HTTPS unless I specifically set RhnSatellite::System.https = false.
The fix is either not defaulting RhnSatellite::Connection::Base to a HTTPS value, or (personally I think this is better), adjusting RhnSatellite::Connect::Handler to respect the default_https if its set.
Thanks and let me know if you would like me to submit a pull request!
Brian
The text was updated successfully, but these errors were encountered: