Skip to content

Commit

Permalink
Merge branch 'main' into libssh-algorithms
Browse files Browse the repository at this point in the history
  • Loading branch information
NilashishC authored Oct 23, 2024
2 parents bd87aa1 + 35be779 commit a6b7116
Show file tree
Hide file tree
Showing 73 changed files with 1,308 additions and 856 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
profile: production
exclude_paths:
- changelogs/changelog.yaml
- tests/unit/plugins/action/network/test_network.py
skip_list:
# ansible-lint does not like the `import-3.11` ignore in tests/sanity/ignore-*.txt
- sanity[cannot-ignore]
58 changes: 41 additions & 17 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,63 @@ count = true

# Don't even try to analyze these:
extend-exclude =
# vendored files
compat
# No need to traverse egg info dir
*.egg-info,
# tool cache dirs
*_cache
# project env vars
.env,
# GitHub configs
.github,
.mypy_cache
# Cache files of MyPy
.mypy_cache,
# Cache files of pytest
.pytest_cache,
tests/output/
.tox
# Occasional virtualenv dirs
# Temp dir of pytest-testmon
.tmontmp,
# Occasional virtualenv dir
.venv
venv
# VS Code
.vscode,
# Temporary build dir
build,
# This contains sdists and wheels of ansible-navigator that we don't want to check
dist,
# Metadata of `pip wheel` cmd is autogenerated
pip-wheel-metadata,
# adjacent venv
venv
# ansible won't let me
__init__.py

# IMPORTANT: avoid using ignore option, always use extend-ignore instead
# Completely and unconditionally ignore the following errors:
extend-ignore =
# E123, E125 skipped as they are invalid PEP-8.
E123,
E125,
# annoy black by allowing white space before : https://github.com/psf/black/issues/315
E203,
# ansible requires import after doc strings
E402,
# given the ansible_collections this is nearly impossible
F841,
# line-length
E501,
W503,
# module level import not at top of file
E402,
# white space before :
E203,

# Accessibility/large fonts and PEP8 unfriendly:
max-line-length = 100
max-line-length = 120

# Allow certain violations in certain files:
# Please keep both sections of this list sorted, as it will be easier for others to find and add entries in the future
per-file-ignores =
# The following ignores have been researched and should be considered permanent
# each should be preceeded with an explanation of each of the error codes
# If other ignores are added for a specific file in the section following this,
# these will need to be added to that line as well.


# S101: Allow the use of assert within the tests directory, since tests require it.
tests/**.py: S101

# The following were present during the initial implementation.
# They are expected to be fixed and unignored over time.

# Count the number of occurrences of each error/warning code and print a report:
statistics = true
10 changes: 3 additions & 7 deletions .github/workflows/ack.yml → .github/workflows/check_label.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
---
# See https://github.com/ansible-community/devtools/blob/main/.github/workflows/ack.yml
name: ack

name: "Check label"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

on: # yamllint disable-line rule:truthy
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]

jobs:
ack:
uses: ansible/devtools/.github/workflows/ack.yml@main
check_label:
uses: ansible/ansible-content-actions/.github/workflows/check_label.yaml@main
1 change: 1 addition & 0 deletions .github/workflows/codecoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: code_coverage

on: # yamllint disable-line rule:truthy
push:
branches: [ main ]
pull_request:
branches: [ main ]

Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/draft_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: "Draft release"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on: # yamllint disable-line rule:truthy
workflow_dispatch:
env:
NAMESPACE: ${{ github.repository_owner }}
COLLECTION_NAME: netcommon
ANSIBLE_COLLECTIONS_PATHS: ./
jobs:
update_release_draft:
uses: ansible/ansible-content-actions/.github/workflows/draft_release.yaml@main
with:
repo: ${{ github.event.pull_request.head.repo.full_name }}
secrets:
BOT_PAT: ${{ secrets.BOT_PAT }}
12 changes: 0 additions & 12 deletions .github/workflows/lint.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/workflows/push.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: release
name: "Release collection"
on: # yamllint disable-line rule:truthy
release:
types: [published]

jobs:
release:
uses: ansible/devtools/.github/workflows/release_collection.yml@main
uses: ansible/ansible-content-actions/.github/workflows/release.yaml@main
with:
environment: release
secrets:
Expand Down
21 changes: 15 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
---
name: test_collection
name: "CI"

concurrency:
group: ${{ github.head_ref }}
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on: # yamllint disable-line rule:truthy
pull_request:
branches: [main]
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
changelog:
uses: ansible-network/github_actions/.github/workflows/changelog.yml@main
uses: ansible/ansible-content-actions/.github/workflows/changelog.yaml@main
if: github.event_name == 'pull_request'
build-import:
uses: ansible/ansible-content-actions/.github/workflows/build_import.yaml@main
ansible-lint:
uses: ansible/ansible-content-actions/.github/workflows/ansible_lint.yaml@main
sanity:
uses: ansible-network/github_actions/.github/workflows/sanity.yml@main
uses: ansible/ansible-content-actions/.github/workflows/sanity.yaml@main
unit-galaxy:
uses: ansible-network/github_actions/.github/workflows/unit_galaxy.yml@main
uses: ansible/ansible-content-actions/.github/workflows/unit.yaml@main
unit-source:
uses: ansible-network/github_actions/.github/workflows/unit_source.yml@main
with:
Expand All @@ -27,6 +34,7 @@ jobs:
needs:
- changelog
- sanity
- ansible-lint
- unit-galaxy
- unit-source
runs-on: ubuntu-latest
Expand All @@ -37,5 +45,6 @@ jobs:
'${{ needs.changelog.result }}',
'${{ needs.sanity.result }}',
'${{ needs.unit-galaxy.result }}',
'${{ needs.unit-source.result }}'
'${{ needs.unit-source.result }}',
'${{ needs.ansible-lint.result }}'
])"
2 changes: 1 addition & 1 deletion .github/workflows/token_refresh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on: # yamllint disable-line rule:truthy

jobs:
refresh:
uses: ansible/devtools/.github/workflows/ah_token_refresh.yml@main
uses: ansible/ansible-content-actions/.github/workflows/refresh_ah_token.yaml@main
with:
environment: release
secrets:
Expand Down
15 changes: 10 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,34 @@ repos:
- id: update-docs

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: end-of-file-fixer
- id: no-commit-to-branch
- id: trailing-whitespace

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.3"
- repo: https://github.com/pycontribs/mirrors-prettier
rev: "v3.3.3"
hooks:
- id: prettier
additional_dependencies:
- prettier
- prettier-plugin-toml

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["--filter-files"]

- repo: https://github.com/psf/black
rev: 23.7.0
rev: 24.10.0
hooks:
- id: black

- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
98 changes: 98 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,104 @@ Ansible Netcommon Collection Release Notes

.. contents:: Topics

v7.1.0
======

Minor Changes
-------------

- ansible.netcommon.persistent - Connection local is marked deprecated and all dependent collections are advised to move to a proper connection plugin, complete support of connection local will be removed in a release after 01-01-2027.

Bugfixes
--------

- Updated the error message for the content_templates parser to include the correct parser name and detailed error information.

Documentation Changes
---------------------

- Add a simple regexp match example for multiple prompt with multiple answers. This example could be used to for restarting a network device with a delay.

v7.0.0
======

Release Summary
---------------

Starting from this release, the minimum `ansible-core` version this collection requires is `2.15.0`. The last known version compatible with ansible-core<2.15 is v6.1.3.

Major Changes
-------------

- Bumping `requires_ansible` to `>=2.15.0`, since previous ansible-core versions are EoL now.

Bugfixes
--------

- Fix get api call during scp with libssh.
- Handle sftp error messages for file not present for routerOS.

Known Issues
------------

- libssh - net_put and net_get fail when the destination file intended to be fetched is not present.

v6.1.3
======

Bugfixes
--------

- The v6.1.2 release introduced a change in cliconfbase's edit_config() signature which broke many platform cliconfs. This patch release reverts that change.

v6.1.2
======

Documentation Changes
---------------------

- Fixed module name and log consistency in parse_cli_textfsm filter doc.

v6.1.1
======

Bugfixes
--------

- Added guidance for users to open an issue for the respective platform if plugin support is needed.
- Improved module execution to gracefully handle cases where plugin support is required, providing a clear error message to the user.

v6.1.0
======

Minor Changes
-------------

- Add new module cli_restore that exclusively handles restoring of backup configuration to target applaince.

Bugfixes
--------

- libssh connection plugin - stop using deprecated ``PlayContext.verbosity`` property that is no longer present in ansible-core 2.18 (https://github.com/ansible-collections/ansible.netcommon/pull/626).
- network_cli - removed deprecated play_context.verbosity property.

New Modules
-----------

- cli_restore - Restore device configuration to network devices over network_cli

v6.0.0
======

Release Summary
---------------

Starting from this release, the minimum `ansible-core` version this collection requires is `2.14.0`. That last known version compatible with ansible-core<2.14 is `v5.3.0`.

Major Changes
-------------

- Bumping `requires_ansible` to `>=2.14.0`, since previous ansible-core versions are EoL now.

v5.3.0
======
Expand Down
Loading

0 comments on commit a6b7116

Please sign in to comment.