Skip to content

Commit

Permalink
prep v1.1.0 (#276)
Browse files Browse the repository at this point in the history
* prep v1.1.0

* fix changelog
  • Loading branch information
jeffkala authored Apr 13, 2023
1 parent a70bb3b commit 7787e53
Show file tree
Hide file tree
Showing 9 changed files with 101 additions and 9 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ Networktocode.Netauto Release Notes
.. contents:: Topics


v1.1.0
======

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

This release adds functionality to support jdiff, via a module and a action plugin.

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

- networktocode.netauto.jdiff - Ansible module wrapper on jdiff python library.

v1.0.0
======

Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"collection_info": {
"namespace": "networktocode",
"name": "netauto",
"version": "1.0.0",
"version": "1.1.0",
"authors": [
"Network to Code <opensource@networktocode.com>"
],
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Multi-vendor collection of Ansible Modules to automate repeateable tasks and dat
* **ntc_reboot** - reboots a network device. Uses SSH/netmiko for IOS, NX-API for Nexus, and eAPI for Arista.
* **ntc_rollback** - performs two major functions. (1) Creates a checkpoint file or backup running config on box. (2) Rolls back to the previously created checkpoint/backup config. Use case is to create the checkpoint/backup as the first task in a playbook and then rollback to it _if_ needed using block/rescue, i.e. try/except in Ansible. Uses SSH/netmiko for IOS, NX-API for Nexus, and eAPI for Arista.
* **ntc_install_os** - installs a new operating system or just sets boot options. Depends on platform. Does not issue a "reload" command, but the device may perform an automatic reboot. Common workflow is to use ntc_file_copy, ntc_install_os, and then ntc_reboot (if needed) for upgrades. Uses SSH/netmiko for IOS, NX-API for Nexus, and eAPI for Arista. For Cisco stack switches pyntc leverages `install_mode` flag to install with the install command. This has an optional parameter of `install_mode` available on install_os.

* **ntc_validate_schema** - Validate data against required schema using json schema.
* **jdiff** - `jdiff` is a lightweight Python library allowing you to examine structured data. `jdiff` provides an interface to intelligently compare--via key presense/absense and value comparison--JSON data objects.

## Background

Expand Down
7 changes: 6 additions & 1 deletion changelogs/.plugin-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ plugins:
inventory: {}
lookup: {}
module:
jdiff:
description: Ansible module for jdiff.
name: jdiff
namespace: ''
version_added: 1.1.0
ntc_config_command:
description: Writes config data to devices
name: ntc_config_command
Expand Down Expand Up @@ -54,4 +59,4 @@ plugins:
shell: {}
strategy: {}
vars: {}
version: 1.0.0
version: 1.1.0
11 changes: 10 additions & 1 deletion changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@ releases:
changes:
release_summary: This is the first official release of an Ansible Collection
for what was previously just a repo of ansible things called ntc-ansible.
release_date: '2023-04-07'
release_date: '2023-04-13'
1.1.0:
changes:
release_summary: This release adds functionality to support jdiff, via a module
and a action plugin.
modules:
- description: Ansible module wrapper on jdiff python library.
name: jdiff
namespace: ''
release_date: '2023-04-13'
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace: "networktocode"
name: "netauto"

# The version of the collection. Must be compatible with semantic versioning
version: "1.0.0"
version: "1.1.0"

# The path to the Markdown (.md) readme file. This path is relative to the root of the collection
readme: "README.md"
Expand Down
6 changes: 4 additions & 2 deletions plugins/action/jdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Jdiff Action Plugin for jdiff library."""

from __future__ import (absolute_import, division, print_function)
from __future__ import absolute_import, division, print_function

from ansible.plugins.action import ActionBase
from ansible.errors import AnsibleError
from ansible.module_utils.six import raise_from
from ansible.plugins.action import ActionBase

try:
from jdiff import CheckType, extract_data_from_json
Expand Down Expand Up @@ -54,12 +54,14 @@ def main(args):

class ActionModule(ActionBase):
"""Ansible Action Module to interact with jdiff.
Args:
ActionBase (ActionBase): Ansible Action Plugin
"""

def run(self, tmp=None, task_vars=None):
"""Run of action plugin for interacting with jdiff.
Args:
tmp ([type], optional): [description]. Defaults to None.
task_vars ([type], optional): [description]. Defaults to None.
Expand Down
63 changes: 62 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "ntc-ansible"
version = "1.0.0"
version = "1.1.0"
description = "Multi-vendor Ansible Collection for Network Automation"
authors = ["Network to Code <opensource@networktocode.com>"]
license = "Apache 2.0"
Expand All @@ -10,6 +10,7 @@ python = "^3.7.2"
pyntc = "^1.0.0"
jsonschema = "^4.17.3"
ansible = "^2.9"
jdiff = "^0.0.2"

[tool.poetry.dev-dependencies]
black = "^22.6.0"
Expand Down

0 comments on commit 7787e53

Please sign in to comment.