diff options
author | Chad Smith <chad.smith@canonical.com> | 2018-09-26 21:18:24 +0000 |
---|---|---|
committer | Server Team CI Bot <josh.powers+server-team-bot@canonical.com> | 2018-09-26 21:18:24 +0000 |
commit | fd873fa83fb5ca9c6d5f22a7bec6a308448c77ff (patch) | |
tree | c9ac65b46b43098cb31e882a567737c7f4ae5b6d /cloudinit/sources/__init__.py | |
parent | 27ff9c45744d4d5de44046b8b85ba0d10cd3e3f6 (diff) | |
download | vyos-cloud-init-fd873fa83fb5ca9c6d5f22a7bec6a308448c77ff.tar.gz vyos-cloud-init-fd873fa83fb5ca9c6d5f22a7bec6a308448c77ff.zip |
docs: surface experimental doc in instance-data.json
Diffstat (limited to 'cloudinit/sources/__init__.py')
-rw-r--r-- | cloudinit/sources/__init__.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cloudinit/sources/__init__.py b/cloudinit/sources/__init__.py index 730e8174..5ac98826 100644 --- a/cloudinit/sources/__init__.py +++ b/cloudinit/sources/__init__.py @@ -38,6 +38,11 @@ DEP_FILESYSTEM = "FILESYSTEM" DEP_NETWORK = "NETWORK" DS_PREFIX = 'DataSource' +EXPERIMENTAL_TEXT = ( + "EXPERIMENTAL: The structure and format of content scoped under the 'ds'" + " key may change in subsequent releases of cloud-init.") + + # File in which public available instance meta-data is written # security-sensitive key values are redacted from this world-readable file INSTANCE_JSON_FILE = 'instance-data.json' @@ -243,8 +248,8 @@ class DataSource(object): @return True on successful write, False otherwise. """ instance_data = { - 'ds': { - 'meta_data': self.metadata}} + 'ds': {'_doc': EXPERIMENTAL_TEXT, + 'meta_data': self.metadata}} if hasattr(self, 'network_json'): network_json = getattr(self, 'network_json') if network_json != UNSET: |