def _validate_netconfig(self, conf):
nets = conf.get('<STR_LIT>', {})<EOL>if len(nets) == <NUM_LIT:0>:<EOL><INDENT>raise LagoInitException('<STR_LIT>')<EOL><DEDENT>no_mgmt_dns = [<EOL>name for name, net in nets.items()<EOL>if net.get('<STR_LIT>', None) is None and<EOL>(net.get('<STR_LIT>') or net.get('<STR_LIT>'))<EOL>]<EOL>if len(no_mgmt_dns) > <NUM_LIT:0> and len(list(nets.keys())) > <NUM_LIT:1>:<EOL><INDENT>raise LagoInitException(<EOL>(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>).format('<STR_LIT:U+002C>'.join(no_mgmt_dns))<EOL>)<EOL><DEDENT>for dom_name, dom_spec in list(conf['<STR_LIT>'].items()):<EOL><INDENT>mgmts = []<EOL>for nic in dom_spec['<STR_LIT>']:<EOL><INDENT>net = self._get_net(conf, dom_name, nic)<EOL>if net.get('<STR_LIT>', False) is True:<EOL><INDENT>mgmts.append(nic['<STR_LIT>'])<EOL><DEDENT><DEDENT>if len(mgmts) == <NUM_LIT:0>:<EOL><INDENT>raise LagoInitException(<EOL>(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>).format(dom_name)<EOL>)<EOL><DEDENT>if len(mgmts) > <NUM_LIT:1>:<EOL><INDENT>raise LagoInitException(<EOL>(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>).format(dom_name, '<STR_LIT:U+002C>'.join(mgmts))<EOL>)<EOL><DEDENT><DEDENT>
Validate network configuration

Args:
    conf(dict): spec

Returns:
    None


Raises:
    :exc:`~lago.utils.LagoInitException`: If a VM has more than
    one management network configured, or a network which is not
    management has DNS attributes, or a VM is configured with a
    none-existence NIC, or a VM has no management network.