canonical / python-libmaas

Unofficial python client library for MAAS
https://maas.io
Other
63 stars 71 forks source link

Build the URI using the original scheme of the url also store in the connection is insecure in the profile. Fixes #193. #220

Closed blakerouse closed 5 years ago

blakerouse commented 5 years ago

Previously the URI would always use http, even if the profiles URL was set to an https scheme. This ensures that the scheme is correct when building the URL for the request.

This branch also fixes another issue that I came across when testing this against a real MAAS server. The profile did not store if the connection was a secure SSL or insecure SSL. Once logged in then using the command line would fail, because the profile did not store that the connection should be allowed as insecure.

codecov-io commented 5 years ago

Codecov Report

Merging #220 into master will decrease coverage by <.01%. The diff coverage is 69.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #220      +/-   ##
==========================================
- Coverage   66.95%   66.94%   -0.01%     
==========================================
  Files          69       69              
  Lines        5634     5645      +11     
  Branches      972      973       +1     
==========================================
+ Hits         3772     3779       +7     
- Misses       1662     1665       +3     
- Partials      200      201       +1
Impacted Files Coverage Δ
maas/client/bones/helpers.py 96.61% <ø> (ø) :arrow_up:
maas/client/bones/__init__.py 76.52% <69.23%> (-0.65%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c67022b...a05cb5c. Read the comment docs.