summaryrefslogtreecommitdiff
path: root/doc/rtd/topics
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2017-08-14 11:40:54 -0500
committerRyan Harper <ryan.harper@canonical.com>2017-08-15 10:42:02 -0500
commit385d1cae1023ed89c3830a148aea02807240a07d (patch)
tree8012badfe8913671371d2660e9ec641ffbd1cacb /doc/rtd/topics
parent1f8183ff4750cc7f8798749987ef10912719544d (diff)
downloadvyos-cloud-init-385d1cae1023ed89c3830a148aea02807240a07d.tar.gz
vyos-cloud-init-385d1cae1023ed89c3830a148aea02807240a07d.zip
doc: update capabilities with features available, link doc reference, cli example
Diffstat (limited to 'doc/rtd/topics')
-rw-r--r--doc/rtd/topics/capabilities.rst50
1 files changed, 40 insertions, 10 deletions
diff --git a/doc/rtd/topics/capabilities.rst b/doc/rtd/topics/capabilities.rst
index 2c8770bd..b8034b07 100644
--- a/doc/rtd/topics/capabilities.rst
+++ b/doc/rtd/topics/capabilities.rst
@@ -31,19 +31,49 @@ support. This allows other applications to detect what features the installed
cloud-init supports without having to parse its version number. If present,
this list of features will be located at ``cloudinit.version.FEATURES``.
-When checking if cloud-init supports a feature, in order to not break the
-detection script on older versions of cloud-init without the features list, a
-script similar to the following should be used. Note that this will exit 0 if
-the feature is supported and 1 otherwise::
+Currently defined feature names include:
- import sys
- from cloudinit import version
- sys.exit('<FEATURE_NAME>' not in getattr(version, 'FEATURES', []))
+ - ``NETWORK_CONFIG_V1`` support for v1 networking configuration,
+ see :ref:`network_config_v1` documentation for examples.
+ - ``NETWORK_CONFIG_V2`` support for v2 networking configuration,
+ see :ref:`network_config_v2` documentation for examples.
-Currently defined feature names include:
- - ``NETWORK_CONFIG_V1`` support for v1 networking configuration, see curtin
- documentation for examples.
+CLI Interface :
+
+``cloud-init features`` will print out each feature supported. If cloud-init
+does not have the features subcommand, it also does not support any features
+described in this document.
+
+.. code-block:: bash
+
+ % cloud-init --help
+ usage: cloud-init [-h] [--version] [--file FILES] [--debug] [--force]
+ {init,modules,query,single,dhclient-hook,features} ...
+
+ positional arguments:
+ {init,modules,query,single,dhclient-hook,features}
+ init initializes cloud-init and performs initial modules
+ modules activates modules using a given configuration key
+ query query information stored in cloud-init
+ single run a single module
+ dhclient-hook run the dhclient hookto record network info
+ features list defined features
+
+ optional arguments:
+ -h, --help show this help message and exit
+ --version, -v show program's version number and exit
+ --file FILES, -f FILES
+ additional yaml configuration files to use
+ --debug, -d show additional pre-action logging (default: False)
+ --force force running even if no datasource is found (use at
+ your own risk)
+
+
+ % cloud-init features
+ NETWORK_CONFIG_V1
+ NETWORK_CONFIG_V2
+
.. _Cloud-init: https://launchpad.net/cloud-init
.. vi: textwidth=78