-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Created nornir_netconf * starting point * Docker+Compose+GH Actions+Tests (#2) * codecov (#3) * Lock (#4) * netconf-lock * test dirs, netconf lock * blank line * helper functions (#5) We will prevail * Tests + Various (#6) * Get Results Updates (#7) * Unlock operations (#8) * unlock operations * commit (#9) Removed connection to upstream fork Added commit method * iosxr-100 (#10) * some new docs * Documentation (#11) * some new docs * docs * documentation examples * docs * gitignore * Documentation (#12) Doc Examples * Edit config operations (#13) * start * operations * readme fix * CSR Tests - Always on DevNet Sandbox (#14) * alwayson sandbox tests * tests * release-v0.1.0 (#15) ## [0.1.0] - 2020-09-10 ### Added - netconf_capabilities - Return server capabilities from target - netconf_get - Returns state data based on the supplied xpath - netconf_get_config - Returns configuration from specified configuration store (default="running") - netconf_edit_config - Edits configuration on specified datastore (default="running") - netconf_lock - Locks or Unlocks a specified datastore (default="lock") - netconf_commit - Commits a change - readme - Integration tests Co-authored-by: Patrick Ogenstad <[email protected]>
- Loading branch information
1 parent
e04003e
commit 9311374
Showing
65 changed files
with
5,114 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
skips: [] | ||
# No need to check for security issues in the test scripts! | ||
exclude_dirs: | ||
- "./tests/" |
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,15 @@ | ||
[run] | ||
branch = True | ||
source = vip_tracker | ||
|
||
[report] | ||
show_missing = true | ||
|
||
exclude_lines = | ||
if self.debug: | ||
self.connection.close_session() | ||
parameters["ssh_config"] = ssh_config_file | ||
pragma: no cover | ||
raise NotImplementedError | ||
if __name__ == .__main__.: | ||
ignore_errors = True |
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,24 @@ | ||
# Docker related | ||
*.env | ||
environments/ | ||
|
||
# Python | ||
**/*.pyc | ||
**/*.pyo | ||
**/__pycache__/ | ||
**/.pytest_cache/ | ||
**/.venv/ | ||
|
||
|
||
# Other | ||
docs/_build | ||
FAQ.md | ||
.git/ | ||
.gitignore | ||
.github | ||
tasks.py | ||
LICENSE | ||
**/*.log | ||
**/.vscode/ | ||
invoke*.yml | ||
tasks.py |
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,4 @@ | ||
[flake8] | ||
# E501: Line length is enforced by Black, so flake8 doesn't need to check it | ||
# W503: Black disagrees with this rule, as does PEP 8; Black wins | ||
ignore = E501, W503 |
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,70 @@ | ||
--- | ||
name: nornir_netconf | ||
|
||
on: | ||
push: | ||
branches: [ "*" ] | ||
pull_request: | ||
branches: [ "develop", "master" ] | ||
|
||
jobs: | ||
linters: | ||
name: linters | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install poetry | ||
poetry install | ||
- name: Lint & Code Format | ||
run: | | ||
echo 'Running Flake8' && \ | ||
poetry run flake8 . && \ | ||
echo 'Running Black' && \ | ||
poetry run black --check --diff . && \ | ||
echo 'Running Yamllint' && \ | ||
poetry run yamllint . && \ | ||
echo 'Running pydocstyle' && \ | ||
poetry run pydocstyle . && \ | ||
echo 'Running Bandit' && \ | ||
poetry run bandit --recursive ./ --configfile .bandit.yml && \ | ||
echo 'Running MyPy' && \ | ||
poetry run mypy . | ||
test: | ||
name: Testing on Python ${{ matrix.python-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [ '3.6.14', '3.7', '3.8' ] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup python | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
|
||
- name: Start containers | ||
run: docker-compose up -d netconf1 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install poetry | ||
poetry install --no-interaction | ||
- name: Test with pytest | ||
run: | | ||
poetry run pytest --cov=nornir_netconf --cov-report=xml -vv | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
needs: [ linters ] |
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,117 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
*$py.class | ||
.pytest_cache/ | ||
.mypy_cache/ | ||
|
||
# Testing | ||
*.log | ||
*.xml | ||
tests/test_data/schema_path/ | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
downloads/ | ||
eggs/ | ||
.eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# PyInstaller | ||
# Usually these files are written by a python script from a template | ||
# before PyInstaller builds the exe, so as to inject date/other infos into it. | ||
*.manifest | ||
*.spec | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.coverage.* | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
*,cover | ||
.hypothesis/ | ||
|
||
# Translations | ||
*.mo | ||
*.pot | ||
|
||
# Django stuff: | ||
*.log | ||
*.log.* | ||
local_settings.py | ||
|
||
# Flask stuff: | ||
instance/ | ||
.webassets-cache | ||
|
||
# Scrapy stuff: | ||
.scrapy | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
docs/configuration/generated/*.rst | ||
|
||
# PyBuilder | ||
target/ | ||
|
||
# IPython Notebook | ||
.ipynb_checkpoints | ||
|
||
# pyenv | ||
.python-version | ||
|
||
# celery beat schedule file | ||
celerybeat-schedule | ||
|
||
# dotenv | ||
.env | ||
.envrc | ||
|
||
# virtualenv | ||
.venv/ | ||
venv/ | ||
ENV/ | ||
|
||
# Spyder project settings | ||
.spyderproject | ||
|
||
# Rope project settings | ||
.ropeproject | ||
|
||
*.swp | ||
tags | ||
|
||
.vagrant | ||
.vars | ||
output/ | ||
|
||
.DS_Store | ||
.vscode | ||
.idea | ||
|
||
pip-wheel-metadata/ | ||
|
||
## Type hints | ||
tests/stubs/*.pyi | ||
*sql* |
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,11 @@ | ||
[pydocstyle] | ||
convention = google | ||
inherit = false | ||
match = (?!__init__).*\.py | ||
match-dir = (?!tests|migrations|development)[^\.].* | ||
# D212 is enabled by default in google convention, and complains if we have a docstring like: | ||
# """ | ||
# My docstring is on the line after the opening quotes instead of on the same line as them. | ||
# """ | ||
# We've discussed and concluded that we consider this to be a valid style choice. | ||
add_ignore = D212 |
Oops, something went wrong.