rbeapi 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/CHANGELOG.md +20 -0
- data/Gemfile +1 -1
- data/README.md +11 -11
- data/Rakefile +19 -0
- data/guide/Makefile +177 -0
- data/guide/_static/arista_logo_11-trans-w.png +0 -0
- data/guide/_static/arista_logo_jpg-11.jpg +0 -0
- data/guide/_static/favicon.ico +0 -0
- data/guide/conf.py +279 -0
- data/guide/cookbook.rst +4 -0
- data/guide/developing.rst +4 -0
- data/guide/faq.rst +4 -0
- data/guide/index.rst +23 -0
- data/guide/installation.rst +4 -0
- data/guide/license.rst +5 -0
- data/guide/overview.rst +20 -0
- data/guide/quickstart.rst +4 -0
- data/guide/release-notes-0.5.0.rst +60 -0
- data/guide/release-notes.rst +6 -0
- data/guide/testing.rst +4 -0
- data/guide/troubleshooting.rst +1 -0
- data/lib/rbeapi/api/aaa.rb +54 -18
- data/lib/rbeapi/api/acl.rb +60 -2
- data/lib/rbeapi/api/bgp.rb +81 -0
- data/lib/rbeapi/api/dns.rb +48 -2
- data/lib/rbeapi/api/interfaces.rb +97 -32
- data/lib/rbeapi/api/ipinterfaces.rb +13 -2
- data/lib/rbeapi/api/logging.rb +11 -2
- data/lib/rbeapi/api/mlag.rb +20 -10
- data/lib/rbeapi/api/ntp.rb +4 -3
- data/lib/rbeapi/api/ospf.rb +102 -10
- data/lib/rbeapi/api/prefixlists.rb +47 -4
- data/lib/rbeapi/api/radius.rb +9 -9
- data/lib/rbeapi/api/routemaps.rb +7 -5
- data/lib/rbeapi/api/snmp.rb +13 -4
- data/lib/rbeapi/api/staticroutes.rb +1 -1
- data/lib/rbeapi/api/stp.rb +39 -14
- data/lib/rbeapi/api/switchports.rb +126 -2
- data/lib/rbeapi/api/system.rb +24 -3
- data/lib/rbeapi/api/tacacs.rb +9 -10
- data/lib/rbeapi/api/users.rb +12 -3
- data/lib/rbeapi/api/varp.rb +40 -8
- data/lib/rbeapi/api/vlans.rb +15 -5
- data/lib/rbeapi/client.rb +19 -11
- data/lib/rbeapi/eapilib.rb +8 -0
- data/lib/rbeapi/utils.rb +10 -0
- data/lib/rbeapi/version.rb +1 -1
- data/spec/fixtures/eapi.conf.yaml +6 -0
- data/spec/fixtures/empty.conf +0 -0
- data/spec/fixtures/env_path.conf +5 -0
- data/spec/fixtures/test.conf +39 -0
- data/spec/fixtures/wildcard.conf +43 -0
- data/spec/system/rbeapi/api/aaa_groups_spec.rb +122 -0
- data/spec/system/rbeapi/api/aaa_spec.rb +90 -0
- data/spec/system/{api_acl_spec.rb → rbeapi/api/acl_spec.rb} +0 -0
- data/spec/system/rbeapi/api/bgp_neighbors_spec.rb +354 -0
- data/spec/system/rbeapi/api/bgp_spec.rb +275 -0
- data/spec/system/rbeapi/api/dns_spec.rb +17 -1
- data/spec/system/rbeapi/api/interfaces_base_spec.rb +46 -5
- data/spec/system/rbeapi/api/interfaces_ethernet_spec.rb +14 -0
- data/spec/system/rbeapi/api/interfaces_portchannel_spec.rb +68 -0
- data/spec/system/rbeapi/api/interfaces_vxlan_spec.rb +0 -1
- data/spec/system/{api_ospf_interfaces_spec.rb → rbeapi/api/ospf_interfaces_spec.rb} +3 -2
- data/spec/system/{api_ospf_spec.rb → rbeapi/api/ospf_spec.rb} +11 -2
- data/spec/system/rbeapi/api/routemaps_spec.rb +3 -4
- data/spec/system/rbeapi/api/snmp_spec.rb +65 -0
- data/spec/system/rbeapi/api/staticroutes_spec.rb +177 -0
- data/spec/system/rbeapi/api/stp_instances_spec.rb +20 -0
- data/spec/system/rbeapi/api/stp_interfaces_spec.rb +7 -0
- data/spec/system/rbeapi/api/switchports_spec.rb +86 -16
- data/spec/system/rbeapi/api/users_spec.rb +324 -0
- data/spec/system/rbeapi/api/varp_interfaces_spec.rb +34 -0
- data/spec/system/rbeapi/api/vrrp_spec.rb +707 -0
- data/spec/system/rbeapi/client_spec.rb +367 -0
- data/spec/unit/rbeapi/api/aaa/aaa_groups_spec.rb +111 -0
- data/spec/unit/rbeapi/api/aaa/aaa_spec.rb +77 -0
- data/spec/unit/rbeapi/api/aaa/fixture_aaa.text +3 -0
- data/spec/unit/rbeapi/api/switchports/default_spec.rb +249 -0
- data/spec/unit/rbeapi/api/switchports/fixture_switchports.text +284 -0
- data/spec/unit/rbeapi/api/users/default_spec.rb +1 -1
- data/spec/unit/rbeapi/client_spec.rb +211 -0
- metadata +65 -10
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,26 @@
|
|
1
1
|
Ruby Client for eAPI
|
2
2
|
====================
|
3
3
|
|
4
|
+
## v0.5.0, January, 2016
|
5
|
+
|
6
|
+
- Add optional ‘mode’ parameter to set_members() method in port-channel
|
7
|
+
interfaces API
|
8
|
+
- Add support for trunk groups
|
9
|
+
- Ensure multiple connections based on the wildcard settings do not clobber
|
10
|
+
each other.
|
11
|
+
- Add ‘terminal’ to the ‘configure’ command to workaround AAA issue
|
12
|
+
- Fix issue where ‘enablepw’ in the eapi.conf was not properly used
|
13
|
+
- Catch errors and syslog them when parsing eapi conf file.
|
14
|
+
In the event of an unparsable eapi.conf, a syslog warning will be generated
|
15
|
+
but the app will continue to attempt to utilize the default localhost conn.
|
16
|
+
- Ensure that nil is returned when getting nonexistent username
|
17
|
+
- Ensure all parse methods are private
|
18
|
+
- Add tests for timeout values
|
19
|
+
- Update framework tests
|
20
|
+
- Add unit tests for switchports
|
21
|
+
- Address code coverage gaps
|
22
|
+
|
23
|
+
|
4
24
|
## v0.4.0, November, 2015
|
5
25
|
|
6
26
|
- New users API
|
data/Gemfile
CHANGED
@@ -24,7 +24,7 @@ group :development, :test do
|
|
24
24
|
gem 'pry', require: false
|
25
25
|
gem 'pry-doc', require: false
|
26
26
|
gem 'pry-stack_explorer', require: false
|
27
|
-
gem 'rbeapi', '0.
|
27
|
+
gem 'rbeapi', '0.5.0', path: '.'
|
28
28
|
gem 'ci_reporter_rspec', require: false
|
29
29
|
gem 'simplecov-json', require: false
|
30
30
|
gem 'simplecov-rcov', require: false
|
data/README.md
CHANGED
@@ -230,21 +230,21 @@ Copy the RPMs to an EOS device then run the 'swix create' command.
|
|
230
230
|
Examples:
|
231
231
|
Puppet Open Source:
|
232
232
|
cd /mnt/flash; \
|
233
|
-
swix create rbeapi-0.
|
234
|
-
rubygem-rbeapi-0.
|
233
|
+
swix create rbeapi-0.5.0-1.swix \
|
234
|
+
rubygem-rbeapi-0.5.0-1.eos4.noarch.rpm \
|
235
235
|
rubygem-inifile-3.0.0-3.eos4.noarch.rpm \
|
236
236
|
rubygem-netaddr-1.5.0-2.eos4.noarch.rpm \
|
237
237
|
rubygem-net_http_unix-0.2.1-3.eos4.noarch.rpm
|
238
238
|
Puppet-enterprise agent (3.x):
|
239
239
|
cd/mnt/flash; \
|
240
|
-
swix create rbeapi-puppet3-0.
|
241
|
-
rubygem-rbeapi-puppet3-0.
|
240
|
+
swix create rbeapi-puppet3-0.5.0-1.swix \
|
241
|
+
rubygem-rbeapi-puppet3-0.5.0-1.eos4.noarch.rpm \
|
242
242
|
rubygem-inifile-puppet3-3.0.0-3.eos4.noarch.rpm \
|
243
243
|
rubygem-netaddr-puppet3-1.5.0-2.eos4.noarch.rpm
|
244
244
|
Puppet-All-in-one agent (2015.x/4.x):
|
245
245
|
cd/mnt/flash; \
|
246
|
-
swix create rbeapi-puppet-aio-0.
|
247
|
-
rubygem-rbeapi-puppet-aio-0.
|
246
|
+
swix create rbeapi-puppet-aio-0.5.0-1.swix \
|
247
|
+
rubygem-rbeapi-puppet-aio-0.5.0-1.eos4.noarch.rpm \
|
248
248
|
rubygem-inifile-puppet-aio-3.0.0-3.eos4.noarch.rpm \
|
249
249
|
rubygem-netaddr-puppet-aio-1.5.0-2.eos4.noarch.rpm \
|
250
250
|
rubygem-net_http_unix-puppet-aio-0.2.1-3.eos4.noarch.rpm
|
@@ -255,13 +255,13 @@ Copy the RPMs to an EOS device then run the 'swix create' command.
|
|
255
255
|
Arista# copy <URI-to-RPMs> flash:
|
256
256
|
Arista# bash
|
257
257
|
-bash-4.1# cd /mnt/flash/
|
258
|
-
-bash-4.1# swix create rbeapi-puppet3-0.
|
259
|
-
rubygem-rbeapi-puppet3-0.
|
258
|
+
-bash-4.1# swix create rbeapi-puppet3-0.5.0-1.swix \
|
259
|
+
rubygem-rbeapi-puppet3-0.5.0-1.eos4.noarch.rpm \
|
260
260
|
rubygem-inifile-puppet3-3.0.0-1.eos4.noarch.rpm \
|
261
261
|
rubygem-netaddr-puppet3-1.5.0-1.eos4.noarch.rpm
|
262
262
|
-bash-4.1# exit
|
263
|
-
Arista# copy flash:rbeapi-puppet3-0.
|
264
|
-
Arista# extension rbeapi-puppet3-0.
|
263
|
+
Arista# copy flash:rbeapi-puppet3-0.5.0-1.swix extension:
|
264
|
+
Arista# extension rbeapi-puppet3-0.5.0-1.swix
|
265
265
|
Arista# copy installed-extensions boot-extensions
|
266
266
|
```
|
267
267
|
|
@@ -270,7 +270,7 @@ Copy the RPMs to an EOS device then run the 'swix create' command.
|
|
270
270
|
On EOS:
|
271
271
|
```
|
272
272
|
Arista# no extension pe-rbeapi-0.3.0-1.swix
|
273
|
-
Arista# extension rbeapi-puppet3-0.
|
273
|
+
Arista# extension rbeapi-puppet3-0.5.0-1.swix
|
274
274
|
Arista# copy installed-extensions boot-extensions
|
275
275
|
```
|
276
276
|
|
data/Rakefile
CHANGED
@@ -155,3 +155,22 @@ task ci_spec: [:ci_prep, 'ci:setup:rspec', :spec]
|
|
155
155
|
|
156
156
|
require 'rspec/core/rake_task'
|
157
157
|
RSpec::Core::RakeTask.new(:spec)
|
158
|
+
|
159
|
+
desc 'Generate typedoc.rst for the guide'
|
160
|
+
task :typedoc do
|
161
|
+
system 'rbeapi doc -r type \
|
162
|
+
| awk \'/This page/{flag=1}/augeas/{flag=0}/eos_/{flag=1}/ exec/\
|
163
|
+
{flag=0}/\*This page/{flag=1}flag\' \
|
164
|
+
| pandoc --from=markdown --to=rst --output=- \
|
165
|
+
> guide/typedoc.rst'
|
166
|
+
end
|
167
|
+
|
168
|
+
desc 'Generate Getting Started Guide HTML'
|
169
|
+
task guide: [:typedoc] do
|
170
|
+
system 'make -C guide html'
|
171
|
+
end
|
172
|
+
|
173
|
+
desc 'Clean Getting Started docs'
|
174
|
+
task :guide_clean do
|
175
|
+
system 'make -C guide clean'
|
176
|
+
end
|
data/guide/Makefile
ADDED
@@ -0,0 +1,177 @@
|
|
1
|
+
# Makefile for Sphinx documentation
|
2
|
+
#
|
3
|
+
|
4
|
+
# You can set these variables from the command line.
|
5
|
+
SPHINXOPTS =
|
6
|
+
SPHINXBUILD = sphinx-build
|
7
|
+
PAPER =
|
8
|
+
BUILDDIR = _build
|
9
|
+
|
10
|
+
# User-friendly check for sphinx-build
|
11
|
+
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
12
|
+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
13
|
+
endif
|
14
|
+
|
15
|
+
# Internal variables.
|
16
|
+
PAPEROPT_a4 = -D latex_paper_size=a4
|
17
|
+
PAPEROPT_letter = -D latex_paper_size=letter
|
18
|
+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
19
|
+
# the i18n builder cannot share the environment and doctrees with the others
|
20
|
+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
21
|
+
|
22
|
+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
|
23
|
+
|
24
|
+
help:
|
25
|
+
@echo "Please use \`make <target>' where <target> is one of"
|
26
|
+
@echo " html to make standalone HTML files"
|
27
|
+
@echo " dirhtml to make HTML files named index.html in directories"
|
28
|
+
@echo " singlehtml to make a single large HTML file"
|
29
|
+
@echo " pickle to make pickle files"
|
30
|
+
@echo " json to make JSON files"
|
31
|
+
@echo " htmlhelp to make HTML files and a HTML help project"
|
32
|
+
@echo " qthelp to make HTML files and a qthelp project"
|
33
|
+
@echo " devhelp to make HTML files and a Devhelp project"
|
34
|
+
@echo " epub to make an epub"
|
35
|
+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
36
|
+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
37
|
+
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
38
|
+
@echo " text to make text files"
|
39
|
+
@echo " man to make manual pages"
|
40
|
+
@echo " texinfo to make Texinfo files"
|
41
|
+
@echo " info to make Texinfo files and run them through makeinfo"
|
42
|
+
@echo " gettext to make PO message catalogs"
|
43
|
+
@echo " changes to make an overview of all changed/added/deprecated items"
|
44
|
+
@echo " xml to make Docutils-native XML files"
|
45
|
+
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
46
|
+
@echo " linkcheck to check all external links for integrity"
|
47
|
+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
48
|
+
|
49
|
+
clean:
|
50
|
+
rm -rf $(BUILDDIR)/*
|
51
|
+
|
52
|
+
html:
|
53
|
+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
54
|
+
@echo
|
55
|
+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
56
|
+
|
57
|
+
dirhtml:
|
58
|
+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
59
|
+
@echo
|
60
|
+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
61
|
+
|
62
|
+
singlehtml:
|
63
|
+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
64
|
+
@echo
|
65
|
+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
66
|
+
|
67
|
+
pickle:
|
68
|
+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
69
|
+
@echo
|
70
|
+
@echo "Build finished; now you can process the pickle files."
|
71
|
+
|
72
|
+
json:
|
73
|
+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
74
|
+
@echo
|
75
|
+
@echo "Build finished; now you can process the JSON files."
|
76
|
+
|
77
|
+
htmlhelp:
|
78
|
+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
79
|
+
@echo
|
80
|
+
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
81
|
+
".hhp project file in $(BUILDDIR)/htmlhelp."
|
82
|
+
|
83
|
+
qthelp:
|
84
|
+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
85
|
+
@echo
|
86
|
+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
87
|
+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
88
|
+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Rbeapi.qhcp"
|
89
|
+
@echo "To view the help file:"
|
90
|
+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Rbeapi.qhc"
|
91
|
+
|
92
|
+
devhelp:
|
93
|
+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
94
|
+
@echo
|
95
|
+
@echo "Build finished."
|
96
|
+
@echo "To view the help file:"
|
97
|
+
@echo "# mkdir -p $$HOME/.local/share/devhelp/Rbeapi"
|
98
|
+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Rbeapi"
|
99
|
+
@echo "# devhelp"
|
100
|
+
|
101
|
+
epub:
|
102
|
+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
103
|
+
@echo
|
104
|
+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
105
|
+
|
106
|
+
latex:
|
107
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
108
|
+
@echo
|
109
|
+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
110
|
+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
111
|
+
"(use \`make latexpdf' here to do that automatically)."
|
112
|
+
|
113
|
+
latexpdf:
|
114
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
115
|
+
@echo "Running LaTeX files through pdflatex..."
|
116
|
+
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
117
|
+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
118
|
+
|
119
|
+
latexpdfja:
|
120
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
121
|
+
@echo "Running LaTeX files through platex and dvipdfmx..."
|
122
|
+
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
123
|
+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
124
|
+
|
125
|
+
text:
|
126
|
+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
127
|
+
@echo
|
128
|
+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
129
|
+
|
130
|
+
man:
|
131
|
+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
132
|
+
@echo
|
133
|
+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
134
|
+
|
135
|
+
texinfo:
|
136
|
+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
137
|
+
@echo
|
138
|
+
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
139
|
+
@echo "Run \`make' in that directory to run these through makeinfo" \
|
140
|
+
"(use \`make info' here to do that automatically)."
|
141
|
+
|
142
|
+
info:
|
143
|
+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
144
|
+
@echo "Running Texinfo files through makeinfo..."
|
145
|
+
make -C $(BUILDDIR)/texinfo info
|
146
|
+
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
147
|
+
|
148
|
+
gettext:
|
149
|
+
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
150
|
+
@echo
|
151
|
+
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
152
|
+
|
153
|
+
changes:
|
154
|
+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
155
|
+
@echo
|
156
|
+
@echo "The overview file is in $(BUILDDIR)/changes."
|
157
|
+
|
158
|
+
linkcheck:
|
159
|
+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
160
|
+
@echo
|
161
|
+
@echo "Link check complete; look for any errors in the above output " \
|
162
|
+
"or in $(BUILDDIR)/linkcheck/output.txt."
|
163
|
+
|
164
|
+
doctest:
|
165
|
+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
166
|
+
@echo "Testing of doctests in the sources finished, look at the " \
|
167
|
+
"results in $(BUILDDIR)/doctest/output.txt."
|
168
|
+
|
169
|
+
xml:
|
170
|
+
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
171
|
+
@echo
|
172
|
+
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
173
|
+
|
174
|
+
pseudoxml:
|
175
|
+
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
176
|
+
@echo
|
177
|
+
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
Binary file
|
Binary file
|
Binary file
|
data/guide/conf.py
ADDED
@@ -0,0 +1,279 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
#
|
3
|
+
# Rbeapi documentation build configuration file, created by
|
4
|
+
# sphinx-quickstart on Fri Jan 8 11:04:02 2016.
|
5
|
+
#
|
6
|
+
# This file is execfile()d with the current directory set to its
|
7
|
+
# containing dir.
|
8
|
+
#
|
9
|
+
# Note that not all possible configuration values are present in this
|
10
|
+
# autogenerated file.
|
11
|
+
#
|
12
|
+
# All configuration values have a default; values that are commented out
|
13
|
+
# serve to show the default.
|
14
|
+
|
15
|
+
import sys
|
16
|
+
import os
|
17
|
+
|
18
|
+
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
|
19
|
+
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
20
|
+
|
21
|
+
if not on_rtd: # only import and set the theme if we're building docs locally
|
22
|
+
import sphinx_rtd_theme
|
23
|
+
html_theme = 'sphinx_rtd_theme'
|
24
|
+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
25
|
+
|
26
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
27
|
+
# add these directories to sys.path here. If the directory is relative to the
|
28
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
29
|
+
#sys.path.insert(0, os.path.abspath('.'))
|
30
|
+
|
31
|
+
# -- General configuration ------------------------------------------------
|
32
|
+
|
33
|
+
# If your documentation needs a minimal Sphinx version, state it here.
|
34
|
+
#needs_sphinx = '1.0'
|
35
|
+
|
36
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
37
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
38
|
+
# ones.
|
39
|
+
extensions = [
|
40
|
+
'sphinx.ext.viewcode',
|
41
|
+
]
|
42
|
+
|
43
|
+
# Add any paths that contain templates here, relative to this directory.
|
44
|
+
templates_path = ['_templates']
|
45
|
+
|
46
|
+
# The suffix of source filenames.
|
47
|
+
source_suffix = '.rst'
|
48
|
+
|
49
|
+
# The encoding of source files.
|
50
|
+
#source_encoding = 'utf-8-sig'
|
51
|
+
|
52
|
+
# The master toctree document.
|
53
|
+
master_doc = 'index'
|
54
|
+
|
55
|
+
# General information about the project.
|
56
|
+
project = u'Rbeapi'
|
57
|
+
copyright = u'2016, Arista Networks - EOS+ Consulting Services'
|
58
|
+
|
59
|
+
# The version info for the project you're documenting, acts as replacement for
|
60
|
+
# |version| and |release|, also used in various other places throughout the
|
61
|
+
# built documents.
|
62
|
+
#
|
63
|
+
import re
|
64
|
+
p = re.compile("version\": \"(.*)\"")
|
65
|
+
with open("../metadata.json") as f:
|
66
|
+
data = f.read()
|
67
|
+
ver = p.search(data)
|
68
|
+
if ver:
|
69
|
+
version = ver.group(1)
|
70
|
+
|
71
|
+
#print "Version: {}".format(version)
|
72
|
+
|
73
|
+
# The short X.Y version.
|
74
|
+
# version = '0.5.0'
|
75
|
+
# The full version, including alpha/beta/rc tags.
|
76
|
+
# release = '0.5.0'
|
77
|
+
release = version
|
78
|
+
|
79
|
+
# The language for content autogenerated by Sphinx. Refer to documentation
|
80
|
+
# for a list of supported languages.
|
81
|
+
#language = None
|
82
|
+
|
83
|
+
# There are two options for replacing |today|: either, you set today to some
|
84
|
+
# non-false value, then it is used:
|
85
|
+
#today = ''
|
86
|
+
# Else, today_fmt is used as the format for a strftime call.
|
87
|
+
#today_fmt = '%B %d, %Y'
|
88
|
+
|
89
|
+
# List of patterns, relative to source directory, that match files and
|
90
|
+
# directories to ignore when looking for source files.
|
91
|
+
exclude_patterns = ['_build']
|
92
|
+
|
93
|
+
# The reST default role (used for this markup: `text`) to use for all
|
94
|
+
# documents.
|
95
|
+
#default_role = None
|
96
|
+
|
97
|
+
# If true, '()' will be appended to :func: etc. cross-reference text.
|
98
|
+
#add_function_parentheses = True
|
99
|
+
|
100
|
+
# If true, the current module name will be prepended to all description
|
101
|
+
# unit titles (such as .. function::).
|
102
|
+
#add_module_names = True
|
103
|
+
|
104
|
+
# If true, sectionauthor and moduleauthor directives will be shown in the
|
105
|
+
# output. They are ignored by default.
|
106
|
+
#show_authors = False
|
107
|
+
|
108
|
+
# The name of the Pygments (syntax highlighting) style to use.
|
109
|
+
pygments_style = 'sphinx'
|
110
|
+
|
111
|
+
# A list of ignored prefixes for module index sorting.
|
112
|
+
#modindex_common_prefix = []
|
113
|
+
|
114
|
+
# If true, keep warnings as "system message" paragraphs in the built documents.
|
115
|
+
#keep_warnings = False
|
116
|
+
|
117
|
+
|
118
|
+
# -- Options for HTML output ----------------------------------------------
|
119
|
+
|
120
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
121
|
+
# a list of builtin themes.
|
122
|
+
html_theme = 'default'
|
123
|
+
|
124
|
+
# Theme options are theme-specific and customize the look and feel of a theme
|
125
|
+
# further. For a list of options available for each theme, see the
|
126
|
+
# documentation.
|
127
|
+
#html_theme_options = {}
|
128
|
+
|
129
|
+
# Add any paths that contain custom themes here, relative to this directory.
|
130
|
+
#html_theme_path = []
|
131
|
+
|
132
|
+
# The name for this set of Sphinx documents. If None, it defaults to
|
133
|
+
# "<project> v<release> documentation".
|
134
|
+
#html_title = None
|
135
|
+
|
136
|
+
# A shorter title for the navigation bar. Default is the same as html_title.
|
137
|
+
#html_short_title = None
|
138
|
+
|
139
|
+
# The name of an image file (relative to this directory) to place at the top
|
140
|
+
# of the sidebar.
|
141
|
+
html_logo = '_static/arista_logo_11-trans-w.png'
|
142
|
+
|
143
|
+
# The name of an image file (within the static path) to use as favicon of the
|
144
|
+
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
145
|
+
# pixels large.
|
146
|
+
html_favicon = '_static/favicon.ico'
|
147
|
+
|
148
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
149
|
+
# relative to this directory. They are copied after the builtin static files,
|
150
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
151
|
+
html_static_path = ['_static']
|
152
|
+
|
153
|
+
# Add any extra paths that contain custom files (such as robots.txt or
|
154
|
+
# .htaccess) here, relative to this directory. These files are copied
|
155
|
+
# directly to the root of the documentation.
|
156
|
+
#html_extra_path = []
|
157
|
+
|
158
|
+
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
159
|
+
# using the given strftime format.
|
160
|
+
#html_last_updated_fmt = '%b %d, %Y'
|
161
|
+
|
162
|
+
# If true, SmartyPants will be used to convert quotes and dashes to
|
163
|
+
# typographically correct entities.
|
164
|
+
#html_use_smartypants = True
|
165
|
+
|
166
|
+
# Custom sidebar templates, maps document names to template names.
|
167
|
+
#html_sidebars = {}
|
168
|
+
|
169
|
+
# Additional templates that should be rendered to pages, maps page names to
|
170
|
+
# template names.
|
171
|
+
#html_additional_pages = {}
|
172
|
+
|
173
|
+
# If false, no module index is generated.
|
174
|
+
#html_domain_indices = True
|
175
|
+
|
176
|
+
# If false, no index is generated.
|
177
|
+
#html_use_index = True
|
178
|
+
|
179
|
+
# If true, the index is split into individual pages for each letter.
|
180
|
+
#html_split_index = False
|
181
|
+
|
182
|
+
# If true, links to the reST sources are added to the pages.
|
183
|
+
#html_show_sourcelink = True
|
184
|
+
|
185
|
+
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
186
|
+
#html_show_sphinx = True
|
187
|
+
|
188
|
+
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
189
|
+
#html_show_copyright = True
|
190
|
+
|
191
|
+
# If true, an OpenSearch description file will be output, and all pages will
|
192
|
+
# contain a <link> tag referring to it. The value of this option must be the
|
193
|
+
# base URL from which the finished HTML is served.
|
194
|
+
#html_use_opensearch = ''
|
195
|
+
|
196
|
+
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
197
|
+
#html_file_suffix = None
|
198
|
+
|
199
|
+
# Output file base name for HTML help builder.
|
200
|
+
htmlhelp_basename = 'rbeapidoc'
|
201
|
+
|
202
|
+
|
203
|
+
# -- Options for LaTeX output ---------------------------------------------
|
204
|
+
|
205
|
+
latex_elements = {
|
206
|
+
# The paper size ('letterpaper' or 'a4paper').
|
207
|
+
#'papersize': 'letterpaper',
|
208
|
+
|
209
|
+
# The font size ('10pt', '11pt' or '12pt').
|
210
|
+
#'pointsize': '10pt',
|
211
|
+
|
212
|
+
# Additional stuff for the LaTeX preamble.
|
213
|
+
#'preamble': '',
|
214
|
+
}
|
215
|
+
|
216
|
+
# Grouping the document tree into LaTeX files. List of tuples
|
217
|
+
# (source start file, target name, title,
|
218
|
+
# author, documentclass [howto, manual, or own class]).
|
219
|
+
latex_documents = [
|
220
|
+
('index', 'rbeapi.tex', u'Rbeapi Documentation',
|
221
|
+
u'Arista Networks - EOS+ Consulting Services', 'manual'),
|
222
|
+
]
|
223
|
+
|
224
|
+
# The name of an image file (relative to this directory) to place at the top of
|
225
|
+
# the title page.
|
226
|
+
latex_logo = '_static/arista_logo_jpg-11.jpg'
|
227
|
+
|
228
|
+
# For "manual" documents, if this is true, then toplevel headings are parts,
|
229
|
+
# not chapters.
|
230
|
+
#latex_use_parts = False
|
231
|
+
|
232
|
+
# If true, show page references after internal links.
|
233
|
+
#latex_show_pagerefs = False
|
234
|
+
|
235
|
+
# If true, show URL addresses after external links.
|
236
|
+
#latex_show_urls = False
|
237
|
+
|
238
|
+
# Documents to append as an appendix to all manuals.
|
239
|
+
#latex_appendices = []
|
240
|
+
|
241
|
+
# If false, no module index is generated.
|
242
|
+
#latex_domain_indices = True
|
243
|
+
|
244
|
+
|
245
|
+
# -- Options for manual page output ---------------------------------------
|
246
|
+
|
247
|
+
# One entry per manual page. List of tuples
|
248
|
+
# (source start file, name, description, authors, manual section).
|
249
|
+
man_pages = [
|
250
|
+
('index', 'rbeapi', u'Rbeapi Documentation',
|
251
|
+
[u'Arista Networks - EOS+ Consulting Services'], 1)
|
252
|
+
]
|
253
|
+
|
254
|
+
# If true, show URL addresses after external links.
|
255
|
+
#man_show_urls = False
|
256
|
+
|
257
|
+
|
258
|
+
# -- Options for Texinfo output -------------------------------------------
|
259
|
+
|
260
|
+
# Grouping the document tree into Texinfo files. List of tuples
|
261
|
+
# (source start file, target name, title, author,
|
262
|
+
# dir menu entry, description, category)
|
263
|
+
texinfo_documents = [
|
264
|
+
('index', 'Rbeapi', u'Rbeapi Documentation',
|
265
|
+
u'Arista Networks - EOS+ Consulting Services', 'Rbeapi', 'Ruby API for EOS.',
|
266
|
+
'Miscellaneous'),
|
267
|
+
]
|
268
|
+
|
269
|
+
# Documents to append as an appendix to all manuals.
|
270
|
+
#texinfo_appendices = []
|
271
|
+
|
272
|
+
# If false, no module index is generated.
|
273
|
+
#texinfo_domain_indices = True
|
274
|
+
|
275
|
+
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
276
|
+
#texinfo_show_urls = 'footnote'
|
277
|
+
|
278
|
+
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
279
|
+
#texinfo_no_detailmenu = False
|