Merge lp:~danilo/landscape-charm/license-file-plain-text into lp:~landscape/landscape-charm/trunk
Status: | Merged |
---|---|
Approved by: | Данило Шеган |
Approved revision: | 314 |
Merged at revision: | 315 |
Proposed branch: | lp:~danilo/landscape-charm/license-file-plain-text |
Merge into: | lp:~landscape/landscape-charm/trunk |
Diff against target: |
186 lines (+94/-27) 2 files modified
lib/callbacks/filesystem.py (+19/-2) lib/callbacks/tests/test_filesystem.py (+75/-25) |
To merge this branch: | bzr merge lp:~danilo/landscape-charm/license-file-plain-text |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Björn Tillenius (community) | Approve | ||
Geoff Teale (community) | Approve | ||
🤖 Landscape Builder | test results | Approve | |
Review via email: mp+261837@code.launchpad.net |
Commit message
Allow license files to be put in as plain text as well
After some discussion, we've decided to support both plain text and base64-encoded data for license-file charm config option (along with URLs to fetch the license from).
This means that we need to base64-decode only when really needed, and base64 module is not helping there.
Description of the change
Allow license files to be put in as plain text as well
After some discussion, we've decided to support both plain text and base64-encoded data for license-file charm config option (along with URLs to fetch the license from).
This means that we need to base64-decode only when really needed, and base64 module is not helping there.
To test, you can use landscape.yaml from https:/
juju-deployer -vdW -w90 -c landscape.yaml landscape
/etc/landscape/
To allow people to input license-file field with newlines and accidental padding, we are also allowing whitespaces (\t\r\n and space) in our base64 alphabet. Maybe that's too broad.
Note: there seems to be a Python documentation bug. https:/
https:/
I might be missing something, but this seems like an incredible brittle way to decide whether something is base64 encoded or not.