Skip to content
This repository was archived by the owner on Nov 15, 2024. It is now read-only.

Commit 9d2c346

Browse files
authored
Merge pull request #24 from netdevops/nornir_connection
utilize netnir built connections, rather than nornir connection plugins
2 parents 0bfea2e + ea22ebc commit 9d2c346

122 files changed

Lines changed: 2897 additions & 578 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# netnir
22

3+
[![CodeFactor](https://www.codefactor.io/repository/github/netdevops/netnir/badge)](https://www.codefactor.io/repository/github/netdevops/netnir) ![Build and Test](https://github.com/netdevops/netnir/workflows/Build%20and%20Test/badge.svg) ![Publish Netnir Package](https://github.com/netdevops/netnir/workflows/Publish%20Netnir%20Package/badge.svg)
4+
35
netnir is a modular cli utility that utilizes [nornir](https://nornir.readthedocs.io/en/latest/) as a backend.
46

57
Check out the [quick start tutorial](https://netdevops.io/netnir/tutorial/) to get started.

docs/.buildinfo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: e8dc5ab993291239158a09692f969606
3+
config: 0d44a81fcc93a6b3f3db8c726b1f1583
44
tags: d77d1c0d9ca2f4c8421862c7c5a0d620
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Sphinx build info version 1
22
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3-
config: e8dc5ab993291239158a09692f969606
3+
config: 0d44a81fcc93a6b3f3db8c726b1f1583
44
tags: d77d1c0d9ca2f4c8421862c7c5a0d620

docs/_mkdocs/_build/dirhtml/_modules/index.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<meta name="viewport" content="width=device-width, initial-scale=1.0">
99

10-
<title>Overview: module code &mdash; netnir 0.0.19 0.0.19 documentation</title>
10+
<title>Overview: module code &mdash; netnir 0.0.20 0.0.20 documentation</title>
1111

1212

1313

@@ -49,7 +49,7 @@
4949

5050

5151

52-
<a href="../" class="icon icon-home" alt="Documentation Home"> netnir 0.0.19
52+
<a href="../" class="icon icon-home" alt="Documentation Home"> netnir 0.0.20
5353

5454

5555

@@ -99,7 +99,7 @@
9999
<nav class="wy-nav-top" aria-label="top navigation">
100100

101101
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
102-
<a href="../">netnir 0.0.19</a>
102+
<a href="../">netnir 0.0.20</a>
103103

104104
</nav>
105105

@@ -147,7 +147,10 @@
147147

148148
<h1>All modules for which code is available</h1>
149149
<ul><li><a href="netnir/cli/">netnir.cli</a></li>
150-
<li><a href="netnir/core/credentials/">netnir.core.credentials</a></li>
150+
<li><a href="netnir/core/connection/">netnir.core.connection</a></li>
151+
<ul><li><a href="netnir/core/connection/netconf/">netnir.core.connection.netconf</a></li>
152+
<li><a href="netnir/core/connection/netmiko/">netnir.core.connection.netmiko</a></li>
153+
</ul><li><a href="netnir/core/credentials/">netnir.core.credentials</a></li>
151154
<li><a href="netnir/core/inventory/">netnir.core.inventory</a></li>
152155
<li><a href="netnir/core/output/">netnir.core.output</a></li>
153156
<li><a href="netnir/core/tasks/config_plan/">netnir.core.tasks.config_plan</a></li>

docs/_mkdocs/_build/dirhtml/_modules/netnir/cli/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<meta name="viewport" content="width=device-width, initial-scale=1.0">
99

10-
<title>netnir.cli &mdash; netnir 0.0.19 0.0.19 documentation</title>
10+
<title>netnir.cli &mdash; netnir 0.0.20 0.0.20 documentation</title>
1111

1212

1313

@@ -49,7 +49,7 @@
4949

5050

5151

52-
<a href="../../../" class="icon icon-home" alt="Documentation Home"> netnir 0.0.19
52+
<a href="../../../" class="icon icon-home" alt="Documentation Home"> netnir 0.0.20
5353

5454

5555

@@ -99,7 +99,7 @@
9999
<nav class="wy-nav-top" aria-label="top navigation">
100100

101101
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
102-
<a href="../../../">netnir 0.0.19</a>
102+
<a href="../../../">netnir 0.0.20</a>
103103

104104
</nav>
105105

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
2+
3+
<!DOCTYPE html>
4+
<html class="writer-html5" lang="en" >
5+
<head>
6+
<meta charset="utf-8">
7+
8+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
9+
10+
<title>netnir.core.connection &mdash; netnir 0.0.20 0.0.20 documentation</title>
11+
12+
13+
14+
<link rel="stylesheet" href="../../../../_static/css/theme.css" type="text/css" />
15+
<link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
16+
17+
18+
19+
20+
21+
22+
23+
<!--[if lt IE 9]>
24+
<script src="../../../../_static/js/html5shiv.min.js"></script>
25+
<![endif]-->
26+
27+
28+
<script type="text/javascript" id="documentation_options" data-url_root="../../../../" src="../../../../_static/documentation_options.js"></script>
29+
<script src="../../../../_static/jquery.js"></script>
30+
<script src="../../../../_static/underscore.js"></script>
31+
<script src="../../../../_static/doctools.js"></script>
32+
<script src="../../../../_static/language_data.js"></script>
33+
34+
<script type="text/javascript" src="../../../../_static/js/theme.js"></script>
35+
36+
37+
<link rel="index" title="Index" href="../../../../genindex/" />
38+
<link rel="search" title="Search" href="../../../../search/" />
39+
</head>
40+
41+
<body class="wy-body-for-nav">
42+
43+
44+
<div class="wy-grid-for-nav">
45+
46+
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
47+
<div class="wy-side-scroll">
48+
<div class="wy-side-nav-search" >
49+
50+
51+
52+
<a href="../../../../" class="icon icon-home" alt="Documentation Home"> netnir 0.0.20
53+
54+
55+
56+
</a>
57+
58+
59+
60+
61+
62+
63+
64+
<div role="search">
65+
<form id="rtd-search-form" class="wy-form" action="../../../../search/" method="get">
66+
<input type="text" name="q" placeholder="Search docs" />
67+
<input type="hidden" name="check_keywords" value="yes" />
68+
<input type="hidden" name="area" value="default" />
69+
</form>
70+
</div>
71+
72+
73+
</div>
74+
75+
76+
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
77+
78+
79+
80+
81+
82+
83+
<p class="caption"><span class="caption-text">Contents:</span></p>
84+
<ul>
85+
<li class="toctree-l1"><a class="reference internal" href="../../../../tutorial/">netnir at a glance</a></li>
86+
<li class="toctree-l1"><a class="reference internal" href="../../../../netnir/">code documentation</a></li>
87+
</ul>
88+
89+
90+
91+
</div>
92+
93+
</div>
94+
</nav>
95+
96+
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
97+
98+
99+
<nav class="wy-nav-top" aria-label="top navigation">
100+
101+
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
102+
<a href="../../../../">netnir 0.0.20</a>
103+
104+
</nav>
105+
106+
107+
<div class="wy-nav-content">
108+
109+
<div class="rst-content">
110+
111+
112+
113+
114+
115+
116+
117+
118+
119+
120+
121+
122+
123+
124+
125+
126+
127+
<div role="navigation" aria-label="breadcrumbs navigation">
128+
129+
<ul class="wy-breadcrumbs">
130+
131+
<li><a href="../../../../" class="icon icon-home"></a> &raquo;</li>
132+
133+
<li><a href="../../../">Module code</a> &raquo;</li>
134+
135+
<li>netnir.core.connection</li>
136+
137+
138+
<li class="wy-breadcrumbs-aside">
139+
140+
</li>
141+
142+
</ul>
143+
144+
145+
<hr/>
146+
</div>
147+
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
148+
<div itemprop="articleBody">
149+
150+
<h1>Source code for netnir.core.connection</h1><div class="highlight"><pre>
151+
<div class="viewcode-block" id="register_connections"><a class="viewcode-back" href="../../../../netnir/netnir.core.connection/#netnir.core.connection.register_connections">[docs]</a><span></span><span class="k">def</span> <span class="nf">register_connections</span><span class="p">():</span>
152+
<span class="sd">&quot;&quot;&quot;</span>
153+
<span class="sd"> register nornir connection plugins</span>
154+
<span class="sd"> &quot;&quot;&quot;</span>
155+
<span class="kn">from</span> <span class="nn">nornir.core.connections</span> <span class="kn">import</span> <span class="n">Connections</span>
156+
<span class="kn">from</span> <span class="nn">netnir.core.connection.netmiko</span> <span class="kn">import</span> <span class="n">Netmiko</span>
157+
<span class="kn">from</span> <span class="nn">netnir.core.connection.netconf</span> <span class="kn">import</span> <span class="n">Netconf</span>
158+
159+
<span class="n">Connections</span><span class="o">.</span><span class="n">deregister_all</span><span class="p">()</span>
160+
<span class="n">Connections</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s2">&quot;netconf&quot;</span><span class="p">,</span> <span class="n">plugin</span><span class="o">=</span><span class="n">Netconf</span><span class="p">)</span>
161+
<span class="n">Connections</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="s2">&quot;netmiko&quot;</span><span class="p">,</span> <span class="n">plugin</span><span class="o">=</span><span class="n">Netmiko</span><span class="p">)</span></div>
162+
</pre></div>
163+
164+
</div>
165+
166+
</div>
167+
<footer>
168+
169+
170+
<hr/>
171+
172+
<div role="contentinfo">
173+
<p>
174+
175+
&copy; Copyright 2020, James Williams
176+
177+
</p>
178+
</div>
179+
180+
181+
182+
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a
183+
184+
<a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a>
185+
186+
provided by <a href="https://readthedocs.org">Read the Docs</a>.
187+
188+
</footer>
189+
190+
</div>
191+
</div>
192+
193+
</section>
194+
195+
</div>
196+
197+
198+
<script type="text/javascript">
199+
jQuery(function () {
200+
SphinxRtdTheme.Navigation.enable(true);
201+
});
202+
</script>
203+
204+
205+
206+
207+
208+
209+
</body>
210+
</html>

0 commit comments

Comments
 (0)