Modify format 2 so that it supports raw strings

Bug #1044632 reported by Jim Baker
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
Jim Baker
juju (Ubuntu)
Fix Released
Fix Released

Bug Description

This branch modifies the current format 2 support as follows:

 - 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

 - 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.

Related branches

Jim Baker (jimbaker)
Changed in juju:
assignee: nobody → Jim Baker (jimbaker)
milestone: none → honolulu
status: New → In Progress
Changed in juju:
importance: Undecided → Critical
Changed in juju:
status: In Progress → Fix Committed
Changed in juju (Ubuntu Quantal):
importance: Undecided → Critical
milestone: none → ubuntu-12.10-beta-2
milestone: ubuntu-12.10-beta-2 → ubuntu-12.10
Changed in juju:
status: Fix Committed → Fix Released
Changed in juju (Ubuntu Quantal):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers