summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-03-21 16:33:14 -0400
committerScott Moser <smoser@brickies.net>2017-03-22 11:12:33 -0400
commitde63d664a664cb06cefcd7c68c5b3428279a9995 (patch)
tree4d38a776f975942c97608d9dc6bb48cd0de75725
parente1a1854e3f30bed18467e6c0feb896338ad4419a (diff)
downloadvyos-cloud-init-de63d664a664cb06cefcd7c68c5b3428279a9995.tar.gz
vyos-cloud-init-de63d664a664cb06cefcd7c68c5b3428279a9995.zip
advertise network config v2 support (NETWORK_CONFIG_V2) in features.
ef18b8ac4c added support for handing network config v2 (aka netplan format). This just adds that feature to the list of supported features.
-rw-r--r--cloudinit/version.py2
-rw-r--r--tests/unittests/test_version.py14
2 files changed, 16 insertions, 0 deletions
diff --git a/cloudinit/version.py b/cloudinit/version.py
index e61597d2..dff4af04 100644
--- a/cloudinit/version.py
+++ b/cloudinit/version.py
@@ -9,6 +9,8 @@ __VERSION__ = "0.7.9"
FEATURES = [
# supports network config version 1
'NETWORK_CONFIG_V1',
+ # supports network config version 2 (netplan)
+ 'NETWORK_CONFIG_V2',
]
diff --git a/tests/unittests/test_version.py b/tests/unittests/test_version.py
new file mode 100644
index 00000000..1662ce09
--- /dev/null
+++ b/tests/unittests/test_version.py
@@ -0,0 +1,14 @@
+# This file is part of cloud-init. See LICENSE file for license information.
+
+from .helpers import CiTestCase
+from cloudinit import version
+
+
+class TestExportsFeatures(CiTestCase):
+ def test_has_network_config_v1(self):
+ self.assertIn('NETWORK_CONFIG_V1', version.FEATURES)
+
+ def test_has_network_config_v2(self):
+ self.assertIn('NETWORK_CONFIG_V2', version.FEATURES)
+
+# vi: ts=4 expandtab