juju get <charm> displays description strangely when yaml uses | or > for multiline string literals

Bug #1356498 reported by Jay R. Wren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
New
Undecided
Unassigned

Bug Description

I'd like to be able to use | or > in the description field of a charm config.yaml

https://en.wikipedia.org/wiki/YAML#Newlines_preserved

If I use >, the output because quoted and has junk after the end:

output of juju get charmstore:

charm: charmstore
service: charmstore
settings:
  listen-port:
    default: true
    description: This is the tcp port on which the charmstore server will listen for
      connections.
    type: int
    value: 8080
  source:
    default: true
    description: 'Branch from where to get charmstore. Possible values are any branch
      names listed at github.com/juju/charmstore.

'
    type: string
    value: master
  use-local-mongo:
    default: true
    description: 'This is a flag which will trigger install of mongodb-server as part
      of this charm. The charmstore server will use this local mongodb instead of
      a related mongodb. With this option set to true, no mongodb relation will be
      required for this charm to function.

'
    type: boolean
    value: false

If I use | it is even worse:

charm: charmstore
service: charmstore
settings:
  listen-port:
    default: true
    description: This is the tcp port on which the charmstore server will listen for
      connections.
    type: int
    value: 8080
  source:
    default: true
    description: 'Branch from where to get charmstore. Possible values are any branch

      names listed at github.com/juju/charmstore.

'
    type: string
    value: master
  use-local-mongo:
    default: true
    description: 'This is a flag which will trigger install of mongodb-server as part

      of this charm. The charmstore server will use this local mongodb

      instead of a related mongodb. With this option set to true, no

      mongodb relation will be required for this charm to function.

'
    type: boolean
    value: false

A work around is to use a literal all on one line. The charm author should not have to go through such hoops to get nice output.

Tags: config
Curtis Hovey (sinzui)
tags: added: config
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.