Merge ~smoser/cloud-init:feature/feature-flag-v2 into cloud-init:master

Proposed by Scott Moser
Status: Merged
Merged at revision: de63d664a664cb06cefcd7c68c5b3428279a9995
Proposed branch: ~smoser/cloud-init:feature/feature-flag-v2
Merge into: cloud-init:master
Diff against target: 33 lines (+16/-0)
2 files modified
cloudinit/version.py (+2/-0)
tests/unittests/test_version.py (+14/-0)
Reviewer Review Type Date Requested Status
Ryan Harper Approve
Server Team CI bot continuous-integration Needs Fixing
Review via email: mp+320555@code.launchpad.net

Commit message

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.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ryan Harper (raharper) :
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Scott Moser (smoser) wrote :

addressed Ryan's review comments.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Ryan Harper (raharper) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/cloudinit/version.py b/cloudinit/version.py
2index e61597d..dff4af0 100644
3--- a/cloudinit/version.py
4+++ b/cloudinit/version.py
5@@ -9,6 +9,8 @@ __VERSION__ = "0.7.9"
6 FEATURES = [
7 # supports network config version 1
8 'NETWORK_CONFIG_V1',
9+ # supports network config version 2 (netplan)
10+ 'NETWORK_CONFIG_V2',
11 ]
12
13
14diff --git a/tests/unittests/test_version.py b/tests/unittests/test_version.py
15new file mode 100644
16index 0000000..1662ce0
17--- /dev/null
18+++ b/tests/unittests/test_version.py
19@@ -0,0 +1,14 @@
20+# This file is part of cloud-init. See LICENSE file for license information.
21+
22+from .helpers import CiTestCase
23+from cloudinit import version
24+
25+
26+class TestExportsFeatures(CiTestCase):
27+ def test_has_network_config_v1(self):
28+ self.assertIn('NETWORK_CONFIG_V1', version.FEATURES)
29+
30+ def test_has_network_config_v2(self):
31+ self.assertIn('NETWORK_CONFIG_V2', version.FEATURES)
32+
33+# vi: ts=4 expandtab

Subscribers

People subscribed via source and target branches