summaryrefslogtreecommitdiff
path: root/cloudinit/net/network_state.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-06-06 18:42:29 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-06-06 18:42:29 -0700
commitf640797e342b6efbfb838a6350b312935222e992 (patch)
tree4e893298101cf3141d80b4bf2a2d6e009462502d /cloudinit/net/network_state.py
parent85a53d66ad0241b2d6453d902487bb2edc1512b8 (diff)
parentbc9bd58d1533d996029770da758f73217c15af33 (diff)
downloadvyos-cloud-init-f640797e342b6efbfb838a6350b312935222e992.tar.gz
vyos-cloud-init-f640797e342b6efbfb838a6350b312935222e992.zip
Rebase against master
Diffstat (limited to 'cloudinit/net/network_state.py')
-rw-r--r--cloudinit/net/network_state.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/cloudinit/net/network_state.py b/cloudinit/net/network_state.py
index 32c48229..1e82e75d 100644
--- a/cloudinit/net/network_state.py
+++ b/cloudinit/net/network_state.py
@@ -20,8 +20,8 @@ import functools
import logging
from . import compat
-from . import dump_yaml
-from . import read_yaml_file
+
+from cloudinit import util
LOG = logging.getLogger(__name__)
@@ -49,7 +49,7 @@ def parse_net_config(path, skip_broken=True):
"""Parses a curtin network configuration file and
return network state"""
ns = None
- net_config = read_yaml_file(path)
+ net_config = util.read_conf(path)
if 'network' in net_config:
ns = parse_net_config_data(net_config.get('network'),
skip_broken=skip_broken)
@@ -58,7 +58,7 @@ def parse_net_config(path, skip_broken=True):
def from_state_file(state_file):
network_state = None
- state = read_yaml_file(state_file)
+ state = util.read_conf(state_file)
network_state = NetworkState()
network_state.load(state)
return network_state
@@ -136,7 +136,7 @@ class NetworkState(object):
'config': self.config,
'network_state': self.network_state,
}
- return dump_yaml(state)
+ return util.yaml_dumps(state)
def load(self, state):
if 'version' not in state:
@@ -155,7 +155,7 @@ class NetworkState(object):
setattr(self, key, state[key])
def dump_network_state(self):
- return dump_yaml(self.network_state)
+ return util.yaml_dumps(self.network_state)
def parse_config(self, skip_broken=True):
# rebuild network state