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:

{"version": 1, "config": [{"type": "physical", "name": "eth0", "subnets": [{"type": "dhcp"}, {"type": "dhcp6"}]}]}
data

Cloud-init network configuration.

Type

dict

Examples

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