← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~chad.smith/cloud-init:unify-datasource-get-data into cloud-init:master

 

The proposal to merge ~chad.smith/cloud-init:unify-datasource-get-data into cloud-init:master has been updated.

Description changed to:

Datasources: Create DataSource.get_data method in parent and write json
metadata

Each DataSource subclass must define its own get_data method. This branch
formalizes our DataSource class to require that subclasses override the
_get_data method or a NotImplementedError is raised. The branch also
introduces a json data file written to /run/cloud-init/instance-data.json.
This file dumps all meta-data, user-data and vendor-data in a json blob
which other utilities with root-access could make use of. Because the some
meta-data or user-data is potentially sensitive the file is only readable by root.

Generally most metadata content types should be json serializable. If specific keys or values are not serializable, those specific values will be redacted with a 'Warning' in the instance-data.json. If json writing fails due to other TypeErrors, a warning log will be emitted to /var/log/cloud-init.log and no instance-data.json will be created.
~

For more details, see:
https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/330115
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~chad.smith/cloud-init:unify-datasource-get-data into cloud-init:master.


References