Merge ~smoser/curtin:feature/subcommand-features into curtin:master

Proposed by Scott Moser
Status: Merged
Approved by: Scott Moser
Approved revision: 922e78315b010a3ac88d828a31fb0f557b53dbcf
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~smoser/curtin:feature/subcommand-features
Merge into: curtin:master
Diff against target: 41 lines (+23/-3)
2 files modified
curtin/commands/features.py (+20/-0)
curtin/commands/main.py (+3/-3)
Reviewer Review Type Date Requested Status
Ryan Harper (community) Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+352829@code.launchpad.net

Commit message

Add subcommand 'features'.

The 'features' subcommand just writes the curtin.FEATURES
to standard output, one per line.

Description of the change

see commit message

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

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/curtin/commands/features.py b/curtin/commands/features.py
0new file mode 1006440new file mode 100644
index 0000000..0f6085b
--- /dev/null
+++ b/curtin/commands/features.py
@@ -0,0 +1,20 @@
1# This file is part of curtin. See LICENSE file for copyright and license info.
2"""List the supported feature names to stdout."""
3
4import sys
5from .. import FEATURES
6from . import populate_one_subcmd
7
8CMD_ARGUMENTS = ((tuple()))
9
10
11def features_main(args):
12 sys.stdout.write("\n".join(sorted(FEATURES)) + "\n")
13 sys.exit(0)
14
15
16def POPULATE_SUBCMD(parser):
17 populate_one_subcmd(parser, CMD_ARGUMENTS, features_main)
18 parser.description = __doc__
19
20# vi: ts=4 expandtab syntax=python
diff --git a/curtin/commands/main.py b/curtin/commands/main.py
index 779bb03..bccfc51 100644
--- a/curtin/commands/main.py
+++ b/curtin/commands/main.py
@@ -16,9 +16,9 @@ VERSIONSTR = version.version_string()
16SUB_COMMAND_MODULES = [16SUB_COMMAND_MODULES = [
17 'apply_net', 'apt-config', 'block-attach-iscsi', 'block-detach-iscsi',17 'apply_net', 'apt-config', 'block-attach-iscsi', 'block-detach-iscsi',
18 'block-info', 'block-meta', 'block-wipe', 'clear-holders', 'curthooks',18 'block-info', 'block-meta', 'block-wipe', 'clear-holders', 'curthooks',
19 'collect-logs', 'extract', 'hook', 'install', 'mkfs', 'in-target',19 'collect-logs', 'extract', 'features',
20 'net-meta', 'pack', 'swap', 'system-install', 'system-upgrade', 'unmount',20 'hook', 'install', 'mkfs', 'in-target', 'net-meta', 'pack', 'swap',
21 'version',21 'system-install', 'system-upgrade', 'unmount', 'version',
22]22]
2323
2424

Subscribers

People subscribed via source and target branches