diff options
author | Joshua Harlow <harlowja@gmail.com> | 2016-05-24 13:48:50 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2016-05-24 13:48:50 -0700 |
commit | 85a53d66ad0241b2d6453d902487bb2edc1512b8 (patch) | |
tree | f52cff059de9fdb0aab88ba3ecba3dc2f0badced /cloudinit/net/eni.py | |
parent | ef47b4f4c14ffe1337508f85f365b338a048a5a1 (diff) | |
download | vyos-cloud-init-85a53d66ad0241b2d6453d902487bb2edc1512b8.tar.gz vyos-cloud-init-85a53d66ad0241b2d6453d902487bb2edc1512b8.zip |
Fix up some of the net usage and restore imports and add a mini compat module
Diffstat (limited to 'cloudinit/net/eni.py')
-rw-r--r-- | cloudinit/net/eni.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cloudinit/net/eni.py b/cloudinit/net/eni.py index 18bae97a..f82c7f54 100644 --- a/cloudinit/net/eni.py +++ b/cloudinit/net/eni.py @@ -16,11 +16,11 @@ import glob import os import re -from cloudinit import net +from . import LINKS_FNAME_PREFIX +from . import ParserError +from . import write_file -from cloudinit.net import LINKS_FNAME_PREFIX -from cloudinit.net import ParserError -from cloudinit.net.udev import generate_udev_rule +from .udev import generate_udev_rule NET_CONFIG_COMMANDS = [ @@ -365,12 +365,11 @@ class Renderer(object): netrules='etc/udev/rules.d/70-persistent-net.rules'): fpeni = os.path.join(target, eni) - net.write_file(fpeni, self._render_interfaces(network_state)) + write_file(fpeni, self._render_interfaces(network_state)) if netrules: netrules = os.path.join(target, netrules) - net.write_file(netrules, - self._render_persistent_net(network_state)) + write_file(netrules, self._render_persistent_net(network_state)) if links_prefix: self._render_systemd_links(target, network_state, links_prefix) @@ -393,4 +392,4 @@ class Renderer(object): "Name=" + iface['name'], "" ]) - net.write_file(fname, content) + write_file(fname, content) |