Beispiel #1
0
 def parse_netplan_configs(self, netplan_root):
     self.config = netplan.Config()
     self.config.load_from_root(netplan_root)
     for typ, key in ('vlan', 'vlans'), ('bond', 'bonds'):
         network = self.config.config.get('network', {})
         for name, config in network.get(key, {}).items():
             dev = self.devices_by_name.get(name)
             if dev is None:
                 dev = self.devices_by_name[name] = NetworkDev(
                     self, name, typ)
             # XXX What to do if types don't match??
             dev.config = config
Beispiel #2
0
 def parse_netplan_configs(self, netplan_root):
     config = netplan.Config()
     config.load_from_root(netplan_root)
     self.config = config