-
Notifications
You must be signed in to change notification settings - Fork 554
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add code to build documentation for napalm-ansible (#535)
* Add code to build documentation for napalm-ansible * pep8 * Change placement in documentation tree * Change formatting * Fix formatting for return values * Sort parameters alphabetically * Text changes * Add script to clone napalm-ansible repo
- Loading branch information
Showing
9 changed files
with
155 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{{ name }} | ||
===================== | ||
|
||
{{ doc['description'][0] }} | ||
|
||
|
||
Parameters | ||
---------- | ||
|
||
.. raw:: html | ||
|
||
<table border="1" class="docutils"> | ||
<th>Parameter</th> | ||
<th>Required</th> | ||
<th>Default</th> | ||
<th>Choices</th> | ||
<th>Description</th> | ||
{% for p in doc['options']|sort %} | ||
<tr> | ||
<td>{{ p }}</td> | ||
<td>{{ doc['options'][p]['required'] }}</td> | ||
<td>N/A</td> | ||
<td>N/A</td> | ||
<td>{{ doc['options'][p]['description'][0] }}</td> | ||
</tr> | ||
{% endfor %} | ||
|
||
</table> | ||
|
||
|
||
Examples | ||
-------- | ||
|
||
.. code-block:: yaml | ||
|
||
{% for line in example_lines %} | ||
{{ line }} | ||
{% endfor %} | ||
|
||
{% if return_values %} | ||
|
||
Return | ||
------ | ||
.. raw:: html | ||
|
||
<table border="1" class="docutils"> | ||
<th>Name</th> | ||
<th>Description</th> | ||
<th>Returned</th> | ||
<th>Type</th> | ||
<th>Sample</th> | ||
{% for value in return_values %} | ||
<tr> | ||
<td>{{ value }}</td> | ||
<td>{{ return_values[value].description }}</td> | ||
<td>{{ return_values[value].returned }}</td> | ||
<td>{{ return_values[value].type }}</td> | ||
<td>{{ return_values[value].sample|replace('\n', '\\n') }}</td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
|
||
|
||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
CWD=`pwd` | ||
MODULES_OUTPUT="$CWD/integrations/ansible/modules/source" | ||
|
||
|
||
|
||
git clone https://github.com/napalm-automation/napalm-ansible.git napalm_ansible_repo | ||
cd napalm_ansible_repo | ||
|
||
# Change to master after next napalm-ansible release | ||
git checkout develop | ||
|
||
pip install -r requirements-dev.txt | ||
pip install . | ||
py.test | ||
cp module_docs/* $MODULES_OUTPUT/ | ||
|
||
cd $CWD | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,6 +60,7 @@ Documentation | |
base | ||
yang | ||
logs | ||
integrations/index | ||
contributing/index | ||
development/index | ||
hackathons/index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
napalm-ansible | ||
============== | ||
|
||
Below are the ansible modules which are currently available for NAPALM | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
modules/index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
modules | ||
======= | ||
|
||
Below are the ansible modules which are currently available for NAPALM | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:glob: | ||
|
||
napalm_*/index |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Integrations | ||
============ | ||
|
||
NAPALM can be integrated with automation frameworks such as Ansible or Salt. In order to use NAPALM with ansible you will need to install napalm-ansible. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
ansible/index |