CloudCfg - datasource cloud_cfg

class insights.parsers.cloud_cfg.CloudCfg(context)[source]

Bases: insights.core.JSONParser

This parser parses the output of cloud_cfg datasource.

Typical output from the datasource is:

{"ssh_deletekeys": 1, "network": {"version": 1, "config": [{"type": "physical", "name": "eth0", "subnets": [{"type": "dhcp"}, {"type": "dhcp6"}]}]}, "debug": {"output": "/var/log/cloud-init-debug.log", "verbose": true}}
data

Cloud-init network configuration.

Type

dict

Examples

>>> cloud_cfg.data['network']['version'] == 1
True
>>> cloud_cfg.data['network']['config'] == [{"type": "physical", "name": "eth0", "subnets": [{"type": "dhcp"}, {"type": "dhcp6"}]}]
True