DescriptionModify format 2 so that it supports raw strings
This branch modifies the current format 2 support as follows:
config-get/set:
- type int: Reads "1"; Writes "1" (no quotes)
- type float: Reads "1" or "1.0"; Writes "1.0" (no quotes)
- type boolean: Reads lower(v) in "true" or "false"; Writes "true" or "false"
- type string: Reads raw data; Writes raw data
relation-get/set
- String: Reads raw data; Writes raw data
relation-get -
- YAML output with string keys and raw data values (no nesting!)
- JSON output with string keys and raw data values (no nesting!) -
however, high byte strings that are not legal Unicode are base64
encoded. This should be the same as seen in golang and seems to be
a fairly common standard
I have tested this with format 1 and format 2 charms interoperating,
as well as various scenarios of raw string input/ouput to ensure that
no extraneous bytes are added, or bytes are lost, and have added
appropriate unit tests. In particular, this branch ensures the support
of null bytes in raw strings. Note that bash can be tricky to use with
null bytes, but this is not a limitation of Juju itself.
https://code.launchpad.net/~jimbaker/juju/format-2-raw/+merge/122380
(do not edit description out of merge proposal)
Patch Set 1 #
Total comments: 1
MessagesTotal messages: 2
|