yaml datatype for charm configuration settings

Bug #1320080 reported by Stuart Bishop
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned
juju-core
Won't Fix
Low
Unassigned

Bug Description

Charm configuration in config.yaml allows integer, boolean and string datatypes. Some charms require more complex data structures for their configuration, for example a list of (database_name, user_name, access_type) tuples or charm-helper's install_sources and install_keys lists.

One current work around, used by charm-helpers, is to use the 'string' type and allow the user to embed a fragment of yaml. This works, but requires the yaml fragment to be quoted as a string and does not have basic validation.

Other more common work arounds are comma separated lists, space separated lists, base64 and other arbitrary, inconsistent and ad-hoc methods.

It would be lovely if 'yaml' could be specified as a config item datatype, allowing an arbitrary yaml data structure to be embedded as configuration. This would bring consistency, and reduce bugs in charms' custom serialization routines.

Stuart Bishop (stub)
description: updated
Curtis Hovey (sinzui)
Changed in juju-core:
importance: Wishlist → Low
status: New → Triaged
tags: added: charm config
Revision history for this message
Evan (ev) wrote :

We'd also like to see this in UE, as we keep having to do grotty things like:

$ juju set uci-ci-tarmac branches="'lp:uci-engine':
    verify_command: '/usr/bin/env python bin/called-by-tarmac.py'
    commit_message_template: '[r=<approved_by>] <commit_message>'
    voting_criteria: 'Approve >= 1'
'lp:uci-team':
    commit_message_template: '[r=<approved_by>] <commit_message>'
    voting_criteria: 'Approve >= 1'"

tags: added: ubuntu-engineering
Changed in juju-core:
status: Triaged → Won't Fix
Stuart Bishop (stub)
tags: added: canonical-is cpe-onsite
Revision history for this message
Anastasia (anastasia-macmood) wrote :

@Stuart Bishop (stub),

This is currently against 'juju-core' project which is limited to Juju 1.25.x.

Since you have added new tags, I am guessing you wanted it on 'juju' project for Juju 2.x. I'll add a project and will triage this report as Wishlist item.

Changed in juju:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Canonical Juju QA Bot (juju-qa-bot) wrote :

This bug has not been updated in 2 years, so we're marking it Low importance. If you believe this is incorrect, please update the importance.

Changed in juju:
importance: Wishlist → Low
tags: added: expirebugs-bot
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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