README.md in knife-topo-1.0.1 vs README.md in knife-topo-1.1.0
- old
+ new
@@ -29,11 +29,12 @@
or install knife-topo as a gem
$ gem install knife-topo
-You may need to use `sudo gem install knife-topo`, depending on your setup.
+You may need to use `chef gem install knife-topo` (to install into the
+embedded chefdk gem path), and you may need `sudo` depending on your setup.
This plugin has been tested with Chef Version 11.12 and 12.0.3 on Ubuntu 12.04 and 14.04 LTS,
and run on Windows and Mac.
Note: I've encountered a case (on a Mac) where knife was not configured to use
@@ -347,13 +348,15 @@
remove them from the topology by removing the `['topo']['name']` attribute
which is used by `knife topo search`.
## knife topo export <a name="export"></a>
- knife topo export [ TOPOLOGY [ NODE ... ]
+ knife topo export [ NODE ... ]
-Exports the specified topology as JSON. If the topology does not already exist,
+Exports the nodes into a topology JSON.
+
+If the topology does not already exist,
an outline for a new topology will be exported. The exported JSON
can be used as the basis for a new topology definition.
If nodes are specified, these will be exported in addition
to any nodes that are in the topology.
@@ -364,26 +367,29 @@
The knife topo export subcommand supports the following additional options.
Option | Description
------------ | -----------
+--topo | Name of the topology to export (defaults to 'topo1')
+--all | Export all topologies
--min-priority | Only export attributes with a priority equal or above this priority.
### Examples:
-The following will export the data for nodes n1 and n2 as part of a topology called 'new_topo':
+The following will export the data for nodes n1 and n2 as part of a
+topology called 'my_topo':
- $ knife topo export new_topo n1 n2 > new_topo.json
+ $ knife topo export n1 n2 --topo=my_topo > new_topo.json
+
-
The following will export all topologies to a file called 'all_topos.json'.
- $ knife topo export > all_topos.json
+ $ knife topo export --all > all_topos.json
-The following will create an outline for a new topology called 'christine_test':
+The following will create an outline for a new topology called
+'christine_test', or export the current details if it already exists:
- $ knife topo export christine_test > christine_test.json
-
+ $ knife topo export --topo=christine_test > christine_test.json
## knife topo import <a name="import"></a>
knife topo import [ TOPOLOGY_FILE [ TOPOLOGY ... ]]