From c7d2bdfbf88f4e067d32d5b424adbd2eef22489a Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Tue, 5 Sep 2023 09:39:23 -0400
Subject: [PATCH 1/4] [pre-commit.ci] pre-commit autoupdate (#581)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
updates:
- [github.com/pre-commit/mirrors-prettier: v3.0.0 → v3.0.3](https://github.com/pre-commit/mirrors-prettier/compare/v3.0.0...v3.0.3)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
---
.pre-commit-config.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index d621d44c2..1470d21ef 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -15,7 +15,7 @@ repos:
- id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-prettier
- rev: "v3.0.0"
+ rev: "v3.0.3"
hooks:
- id: prettier
additional_dependencies:
From 21c7afaa12cf4cbe88fa4f30716d243cec460120 Mon Sep 17 00:00:00 2001
From: michaelpsomiadis <49224103+michaelpsomiadis@users.noreply.github.com>
Date: Wed, 6 Sep 2023 23:15:58 +1000
Subject: [PATCH 2/4] Added crlf/lf option to telnet (#440)
* Added crlf/lf option to telnet
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
---
.../fragments/440-telnet-add-crlf-option.yml | 2 ++
docs/ansible.netcommon.telnet_module.rst | 19 +++++++++++++++++++
plugins/action/telnet.py | 18 +++++++++++++-----
plugins/modules/telnet.py | 6 ++++++
4 files changed, 40 insertions(+), 5 deletions(-)
create mode 100644 changelogs/fragments/440-telnet-add-crlf-option.yml
diff --git a/changelogs/fragments/440-telnet-add-crlf-option.yml b/changelogs/fragments/440-telnet-add-crlf-option.yml
new file mode 100644
index 000000000..c914268ce
--- /dev/null
+++ b/changelogs/fragments/440-telnet-add-crlf-option.yml
@@ -0,0 +1,2 @@
+minor_changes:
+ - telnet - add crlf option to send CRLF instead of just LF (https://github.com/ansible-collections/ansible.netcommon/pull/440).
diff --git a/docs/ansible.netcommon.telnet_module.rst b/docs/ansible.netcommon.telnet_module.rst
index 78a0020e2..e28190bdc 100644
--- a/docs/ansible.netcommon.telnet_module.rst
+++ b/docs/ansible.netcommon.telnet_module.rst
@@ -52,6 +52,25 @@ Parameters
diff --git a/plugins/action/telnet.py b/plugins/action/telnet.py
index 74adb32a1..0c2a6ca71 100644
--- a/plugins/action/telnet.py
+++ b/plugins/action/telnet.py
@@ -49,12 +49,18 @@ def run(self, tmp=None, task_vars=None):
pause = int(self._task.args.get("pause", 1))
send_newline = self._task.args.get("send_newline", False)
+ clrf = self._task.args.get("clrf", False)
login_prompt = to_text(self._task.args.get("login_prompt", "login: "))
password_prompt = to_text(self._task.args.get("password_prompt", "Password: "))
prompts = self._task.args.get("prompts", ["\\$ "])
commands = self._task.args.get("command") or self._task.args.get("commands")
+ if clrf:
+ line_ending = "\r\n"
+ else:
+ line_ending = "\n"
+
if isinstance(commands, text_type):
commands = commands.split(",")
@@ -64,25 +70,27 @@ def run(self, tmp=None, task_vars=None):
self.output = bytes()
try:
if send_newline:
- self.tn.write(b"\n")
+ self.tn.write(to_bytes(line_ending))
self.await_prompts([login_prompt], timeout)
- self.tn.write(to_bytes(user + "\n"))
+ display.vvvvv(">>>user: %s" % user)
+ self.tn.write(to_bytes(user + line_ending))
if password:
self.await_prompts([password_prompt], timeout)
- self.tn.write(to_bytes(password + "\n"))
+ display.vvvvv(">>>password: %s" % password)
+ self.tn.write(to_bytes(password + line_ending))
self.await_prompts(prompts, timeout)
for cmd in commands:
display.vvvvv(">>> %s" % cmd)
- self.tn.write(to_bytes(cmd + "\n"))
+ self.tn.write(to_bytes(cmd + line_ending))
self.await_prompts(prompts, timeout)
display.vvvvv("<<< %s" % cmd)
sleep(pause)
- self.tn.write(b"exit\n")
+ self.tn.write(to_bytes("exit" + line_ending))
except EOFError as e:
result["failed"] = True
diff --git a/plugins/modules/telnet.py b/plugins/modules/telnet.py
index a5abac726..65311eede 100644
--- a/plugins/modules/telnet.py
+++ b/plugins/modules/telnet.py
@@ -84,6 +84,12 @@
required: false
type: bool
default: false
+ crlf:
+ description:
+ - Sends a CRLF (Carrage Return) instead of just a LF (Line Feed).
+ required: false
+ type: bool
+ default: false
notes:
- The C(environment) keyword does not work with this task
author:
From c65e32ce9364e7963dcbd7087ed7b46287820feb Mon Sep 17 00:00:00 2001
From: jk464 <44260911+jk464@users.noreply.github.com>
Date: Wed, 6 Sep 2023 14:16:25 +0100
Subject: [PATCH 3/4] Fix load_provider returning None on
AnsibleFallbackNotFound (#557) (#558)
---
changelogs/fragments/558-load_provider.yml | 2 ++
plugins/module_utils/network/common/utils.py | 16 +++++++---------
2 files changed, 9 insertions(+), 9 deletions(-)
create mode 100644 changelogs/fragments/558-load_provider.yml
diff --git a/changelogs/fragments/558-load_provider.yml b/changelogs/fragments/558-load_provider.yml
new file mode 100644
index 000000000..b203911d3
--- /dev/null
+++ b/changelogs/fragments/558-load_provider.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - "Ensure that all connection plugin options that should be strings are actually strings (https://github.com/ansible-collections/ansible.netcommon/pull/549)."
diff --git a/plugins/module_utils/network/common/utils.py b/plugins/module_utils/network/common/utils.py
index 4644a0717..6f7a50b5d 100644
--- a/plugins/module_utils/network/common/utils.py
+++ b/plugins/module_utils/network/common/utils.py
@@ -468,12 +468,12 @@ def load_provider(spec, args):
provider = args.get("provider") or {}
for key, value in iteritems(spec):
if key not in provider:
- if "fallback" in value:
+ try:
+ # Get fallback if defined, and valid
provider[key] = _fallback(value["fallback"])
- elif "default" in value:
- provider[key] = value["default"]
- else:
- provider[key] = None
+ except (basic.AnsibleFallbackNotFound, KeyError):
+ # Get default if defined, otherwise set to None
+ provider[key] = value.get("default")
if "authorize" in provider:
# Coerce authorize to provider if a string has somehow snuck in.
provider["authorize"] = boolean(provider["authorize"] or False)
@@ -491,10 +491,8 @@ def _fallback(fallback):
kwargs = item
else:
args = item
- try:
- return strategy(*args, **kwargs)
- except basic.AnsibleFallbackNotFound:
- pass
+
+ return strategy(*args, **kwargs)
def generate_dict(spec):
From d2eb3d9727ca87c906b2cc66d122a93326e0e205 Mon Sep 17 00:00:00 2001
From: Sagar Paul
Date: Thu, 7 Sep 2023 14:30:54 +0530
Subject: [PATCH 4/4] prepare release 5.2.0 (#584)
* prepare release 5.2.0
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
---
CHANGELOG.rst | 28 +
changelogs/changelog.yaml | 1166 +++++++++--------
.../fragments/440-telnet-add-crlf-option.yml | 2 -
changelogs/fragments/558-load_provider.yml | 2 -
changelogs/fragments/default-cliconf.yaml | 5 -
changelogs/fragments/httpapi_options.yaml | 5 -
changelogs/fragments/ssh_args.yaml | 3 -
changelogs/fragments/vlan_extender.yaml | 10 -
galaxy.yml | 2 +-
9 files changed, 623 insertions(+), 600 deletions(-)
delete mode 100644 changelogs/fragments/440-telnet-add-crlf-option.yml
delete mode 100644 changelogs/fragments/558-load_provider.yml
delete mode 100644 changelogs/fragments/default-cliconf.yaml
delete mode 100644 changelogs/fragments/httpapi_options.yaml
delete mode 100644 changelogs/fragments/ssh_args.yaml
delete mode 100644 changelogs/fragments/vlan_extender.yaml
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index ec20039aa..a457c5b1b 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -5,6 +5,34 @@ Ansible Netcommon Collection Release Notes
.. contents:: Topics
+v5.2.0
+======
+
+Minor Changes
+-------------
+
+- Add a new cliconf plugin ``default`` that can be used when no cliconf plugin is found for a given network_os. This plugin only supports ``get()``. (https://github.com/ansible-collections/ansible.netcommon/pull/569)
+- httpapi - Add additional option ``ca_path``, ``client_cert``, ``client_key``, and ``http_agent`` that are available in open_url but not to httpapi. (https://github.com/ansible-collections/ansible.netcommon/issues/528)
+- telnet - add crlf option to send CRLF instead of just LF (https://github.com/ansible-collections/ansible.netcommon/pull/440).
+
+Deprecated Features
+-------------------
+
+- libssh - the ssh_*_args options are now marked that they will be removed after 2026-01-01.
+
+Bugfixes
+--------
+
+- Ensure that all connection plugin options that should be strings are actually strings (https://github.com/ansible-collections/ansible.netcommon/pull/549).
+
+New Plugins
+-----------
+
+Cliconf
+~~~~~~~
+
+- default - General purpose cliconf plugin for new platforms
+
v5.1.3
======
diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml
index e9ec97d1a..98493aba6 100644
--- a/changelogs/changelog.yaml
+++ b/changelogs/changelog.yaml
@@ -1,312 +1,383 @@
----
-ancestor:
+ancestor: null
releases:
- 5.1.3:
+ 1.0.0:
+ modules:
+ - description: Run a cli command on cli-based network devices
+ name: cli_command
+ namespace: ""
+ - description: Push text based configuration to network devices over network_cli
+ name: cli_config
+ namespace: ""
+ - description: Copy a file from a network device to Ansible Controller
+ name: net_get
+ namespace: ""
+ - description: Tests reachability using ping from a network device
+ name: net_ping
+ namespace: ""
+ - description: Copy a file from Ansible Controller to a network device
+ name: net_put
+ namespace: ""
+ - description: netconf device configuration
+ name: netconf_config
+ namespace: ""
+ - description: Fetch configuration/state data from NETCONF enabled network devices.
+ name: netconf_get
+ namespace: ""
+ - description: Execute operations on NETCONF enabled network devices.
+ name: netconf_rpc
+ namespace: ""
+ - description:
+ Handles create, update, read and delete of configuration data on
+ RESTCONF enabled devices.
+ name: restconf_config
+ namespace: ""
+ - description: Fetch configuration/state data from RESTCONF enabled devices.
+ name: restconf_get
+ namespace: ""
+ - description: Executes a low-down and dirty telnet command
+ name: telnet
+ namespace: ""
+ plugins:
+ become:
+ - description: Switch to elevated permissions on a network device
+ name: enable
+ namespace: null
+ connection:
+ - description: Use httpapi to run command on network appliances
+ name: httpapi
+ namespace: null
+ - description: Provides a persistent connection using the netconf protocol
+ name: netconf
+ namespace: null
+ - description: Use network_cli to run command on network appliances
+ name: network_cli
+ namespace: null
+ - description: Use a persistent unix socket for connection
+ name: persistent
+ namespace: null
+ httpapi:
+ - description: HttpApi Plugin for devices supporting Restconf API
+ name: restconf
+ namespace: null
+ netconf:
+ - description:
+ Use default netconf plugin to run standard netconf commands as
+ per RFC
+ name: default
+ namespace: null
+ release_date: "2020-06-23"
+ 1.1.0:
changes:
bugfixes:
- - Vendor telnetlib from cpython (https://github.com/ansible-collections/ansible.netcommon/pull/546)
+ - Replace deprecated `getiterator` call with `iter`
+ - ipaddr - "host" query supports /31 subnets properly
+ - ipaddr filter - Fixed issue where the first IPv6 address in a subnet was not
+ being considered a valid address.
+ - ipaddr filter now returns empty list instead of False on empty list input
+ - net_put - Restore missing function removed when action plugin stopped inheriting
+ NetworkActionBase
+ - nthhost filter now returns str instead of IPAddress object
+ - slaac filter now returns str instead of IPAddress object
+ major_changes:
+ - Add libssh connection plugin and refactor network_cli (https://github.com/ansible-collections/ansible.netcommon/pull/30)
+ minor_changes:
+ - Add content option validation for netconf_config module (https://github.com/ansible-collections/ansible.netcommon/pull/66)
+ - Documentation of module arguments updated to match expected types where missing.
+ - "Resource Modules: changed flag is set to true in check_mode for all ACTION_STATES
+ (https://github.com/ansible-collections/ansible.netcommon/pull/82)"
+ removed_features:
+ - module_utils.network.common.utils.ComplexDict has been removed
fragments:
- - telnet.yaml
- release_date: "2023-07-24"
- 5.1.2:
+ - 103-net-put-handle-src.yaml
+ - 30-add-libssh-connection-support.yaml
+ - 34-ipaddr-empty-list.yaml
+ - 66-netconf-config-vaildation.yml
+ - 72-ipv6-first-address-fix.yaml
+ - 74-remove-getiterator.yaml
+ - 75-unit-tests.yaml
+ - 78-sanity-cleanup.yaml
+ - 82-changed_true_action_states_check_mode_yes.yml
+ - 95-ipaddr.yaml
+ release_date: "2020-07-30"
+ 1.1.1:
changes:
- bugfixes:
- - Ensure that all connection plugin options that should be strings are actually
- strings (https://github.com/ansible-collections/ansible.netcommon/pull/549).
+ release_summary: Rereleased 1.1.0 with regenerated documentation.
fragments:
- - 549-connection-strings.yml
- - 550-ansible-lint.yml
- - gha_release.yaml
- - line-length.yaml
- release_date: "2023-07-05"
- 5.1.1:
+ - 1.1.1.yaml
+ release_date: "2020-07-31"
+ 1.1.2:
changes:
- bugfixes:
- - network_resource - do not append network_os to module names when building
- supported resources list. This fix is only valid for cases where FACTS_RESOURCE_SUBSETS
- is undefined.
+ release_summary: Rereleased 1.1.1 with updated changelog.
fragments:
- - resource_manager.yaml
- release_date: "2023-05-09"
- 5.1.0:
+ - 1.1.2.yaml
+ release_date: "2020-08-06"
+ 1.2.0:
changes:
bugfixes:
- - httpapi - ``send()`` method no longer applied leftover kwargs to ``open_url()``.
- Fix applies those arguments as intended (https://github.com/ansible-collections/ansible.netcommon/pull/524).
- - network_resource - fix a potential UnboundLocalError if the module fails
- to import a Resource Module. (https://github.com/ansible-collections/ansible.netcommon/pull/513)
- - restconf - creation of new resources is no longer erroneously forced to
- use POST. (https://github.com/ansible-collections/ansible.netcommon/issues/502)
- - network_cli - when receiving longer responses with libssh, parts of the
- response were sometimes repeated. The response is now returned as it is
- received (https://github.com/ansible-collections/community.routeros/issues/132).
- - network_cli - network cli connection avoids traceback when using invalid
- user
+ - cli_config fixes issue when rollback_id = 0 evalutes to False
+ - sort_list will sort a list of dicts using the sorted method with key as an
+ argument.
minor_changes:
- - telnet - apply ``timeout`` to command prompts.
- - telnet - add support for regexes to ``login_prompt`` and ``password_prompt``.
- - telnet - add ``stdout`` and ``stdout_lines`` to module output.
- - parse_cli - add support for multiple matches inside a block by adding new
- dictionary key to result
- - libssh - add ``config_file`` option to specify an alternate SSH config file
- to use.
+ - Added description to collection galaxy.yml file.
+ - NetworkConfig objects now have an optional `comment_tokens` parameter which
+ takes a list of strings which will override the DEFAULT_COMMENT_TOKENS list.
+ - New cli_parse module for parsing structured text using a variety of parsers.
+ The initial implemetation of cli_parse can be used with json, native, ntc_templates,
+ pyats, textfsm, ttp, and xml.
+ - The httpapi connection plugin now works with `wait_for_connection`. This will
+ periodically request the root page of the server described by the plugin's
+ options until the request succeeds. This can only test that the server is
+ reachable, the correctness or usability of the API is not guaranteed.
fragments:
- - 530-parse_cli.yaml
- - httpapi-kwargs.yaml
- - libssh-repeated-text.yaml
- - libssh_config_file.yaml
- - lint.yaml
- - network_cli_bad_user.yaml
- - restconf_put.yaml
- - telnet-refactoring.yml
- - ule-docs.yaml
- release_date: "2023-04-03"
- 5.0.0:
+ - 105-wait_for_conn-httpapi.yaml
+ - 109-cli_parse_module_addition.yaml
+ - 110-NetworkConfig-comments.yaml
+ - 114-sort_list_listofdicts.yaml
+ - 118-cli_config.yaml
+ - 127-galaxy-fragment.yaml
+ release_date: "2020-08-25"
+ 1.2.1:
changes:
- breaking_changes:
- - VALID_MASKS, is_masklen, is_netmask, to_bits, to_ipv6_network, to_masklen,
- to_netmask, and to_subnet are no longer importable from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils
- and should now be found at their proper location ansible.module_utils.common.network
- - ResourceModule is no longer importable from ansible_collections.ansible.netcommon.plugins.module_utils.network.common
- and should now be found at its proper location
- ansible_collections.ansible.netcommon.plugins.module_utils.network.common.rm_base.resource_module
- - NetworkTemplate is no longer importable from ansible_collections.ansible.netcommon.plugins.module_utils.network.common
- and should now be found at its proper location
- ansible_collections.ansible.netcommon.plugins.module_utils.network.common.rm_base.network_template
- - NetworkConnectionBase now inherits from PersistentConnectionBase in ansible.utils.
- As a result, the minimum ansible.utils version has increased to 2.7.0.
bugfixes:
- - Cast AnsibleUnsafeText to str in convert_doc_to_ansible_module_kwargs()
- to keep CSafeLoader happy. This fixes issues with content scaffolding tools.
- minor_changes:
- - httpapi - Add option netcommon_httpapi_ciphers to allow overriding default
- SSL/TLS ciphers. (https://github.com/ansible-collections/ansible.netcommon/pull/494)
- removed_features:
- - cli_parse - This plugin was moved to ansible.utils in version 1.0.0, and
- the redirect to that collection has now been removed.
+ - Fixed "Object of type Capabilities is not JSON serializable" when using default
+ netconf plugin.
fragments:
- - 23H1_breaking.yaml
- - flake8.yaml
- - netcommon_httpapi_ciphers.yaml
- - persistentbase.yaml
- - telnet.yaml
- release_date: "2023-02-27"
- 4.1.0:
+ - netconf-capabilites-fix.yaml
+ release_date: "2020-09-04"
+ 1.3.0:
changes:
bugfixes:
- - restconf_get - fix direction of XML deserialization when ``output == 'xml'``
+ - cli_parse - Ensure only native types are returned to the control node from
+ the parser.
+ - netconf - Changed log level for message of using default netconf plugin to
+ match the level used when a platform-specific netconf plugin is found
minor_changes:
- - Add implementation for content_templates_parser.
+ - Confirmed commit fails with TypeError in IOS XR netconf plugin (https://github.com/ansible-collections/cisco.iosxr/issues/74)
+ - The netconf_config module now allows root tag with namespace prefix.
+ - "cli_config: Add new return value diff which is returned when the cliconf
+ plugin supports onbox diff"
+ - "cli_config: Clarify when commands is returned when the module is run"
fragments:
- - add_content_template_parser.yaml
- - fix_wrong_xml_direction.yaml
- release_date: "2022-11-02"
- 4.0.0:
+ - 134-cli-config-diff.yaml
+ - allow_root_tag_with_prefix.yaml
+ - cli_parse_fix.yaml
+ - iosxr_netconf_config_commit_testcase.yaml
+ - netconf-default.yaml
+ release_date: "2020-09-29"
+ 1.4.0:
changes:
- removed_features:
- - net_vrf - Use _vrf instead.
- - net_vlan - Use _vlans instead.
- - net_user - Use _user instead.
- - net_system - Use _system instead.
- - net_static_route - Use _static_routes instead.
- - net_logging - Use _logging_global instead.
- - net_lldp_interface - Use _lldp_interfaces instead.
- - net_lldp - Use _lldp_global instead.
- - net_linkagg - Use _lag_interfaces instead.
- - net_l3_interface - Use _l3_interfaces instead.
- - net_l2_interface - Use _l2_interfaces instead.
- - net_interface - Use _interfaces instead.
- - net_banner - Use _banner instead.
- - napalm - Removed unused connection plugin.
+ bugfixes:
+ - Added support for private key based authentication with libssh transport (https://github.com/ansible-collections/ansible.netcommon/issues/168)
+ - Fixed ipaddr filter plugins in ansible.netcommon collections is not working
+ with latest Ansible (https://github.com/ansible-collections/ansible.netcommon/issues/157)
+ - Fixed netconf_rpc task fails due to encoding issue in the response (https://github.com/ansible-collections/ansible.netcommon/issues/151)
+ - Fixed ssh_type none issue while using net_put and net_get module (https://github.com/ansible-collections/ansible.netcommon/issues/153)
+ - Fixed unit tests under python3.5
+ - 'ipaddr filter - query "address/prefix" (also: "gateway", "gw", "host/prefix",
+ "hostnet", and "router") now handles addresses with /32 prefix or /255.255.255.255
+ netmask'
+ - network_cli - Update underlying ssh connection's play_context in update_play_context,
+ so that the username or password can be updated
+ minor_changes:
+ - "'prefix' added to NetworkTemplate class, inorder to handle the negate operation
+ for vyos config commands."
+ - Add support for json format input format for netconf modules using ``xmltodict``
+ - Update docs for netconf_get and netconf_config examples using display=native
fragments:
- - 2H22_removal.yaml
- - license.yaml
- release_date: "2022-10-13"
- 3.1.3:
+ - 135-network-cli-change-password.yaml
+ - 144-test-fixes.yaml
+ - 151-netconf_rpc_fix.yaml
+ - 153-part1-fix_ssh_type_none_issue.yaml
+ - 157-ipaddr-fix.yaml
+ - 168-libssh-privatekey-support.yaml
+ - ipaddr-host-prefix-32.yaml
+ - negate-command-vyos.yaml
+ - netconf_get_config_doc_updates.yaml
+ - netconf_xmltodict_support.yaml
+ release_date: "2020-10-29"
+ 1.4.1:
changes:
release_summary:
- The v3.1.2 is unavailable on Ansible Automation Hub because
- a technical issue. Please download and use v3.1.3 from Automation Hub.
+ Change how black config is specified to avoid issues with Automation
+ Hub release process
fragments:
- - prepare_312.yaml
- release_date: "2022-10-04"
- 3.1.2:
+ - revert_pyproject.yaml
+ release_date: "2020-10-29"
+ 1.5.0:
changes:
bugfixes:
- - libssh - check for minimum ansible-pylibssh version before using password_prompt
- option. (https://github.com/ansible-collections/ansible.netcommon/pull/467)
+ - Add netconf_config integration tests for nxos (https://github.com/ansible-collections/ansible.netcommon/pull/185)
+ - Fix GetReply object has no attribute strip() (https://github.com/ansible-collections/cisco.iosxr/issues/97)
+ - Fix config diff logic if parent configuration is present more than once in
+ the candidate config and update docs (https://github.com/ansible-collections/ansible.netcommon/pull/189)
+ - Fix missing changed from net_get (https://github.com/ansible-collections/ansible.netcommon/issues/198)
+ - Fix netconf_config module integration test issuea (https://github.com/ansible-collections/ansible.netcommon/pull/177)
+ - Fix restconf_config incorrectly spoofs HTTP 409 codes (https://github.com/ansible-collections/ansible.netcommon/issues/191)
+ - Split checks for prompt and errors in network_cli so that detected errors
+ are not lost if the prompt is in a later chunk.
+ minor_changes:
+ - Add 'purged' to ACTION_STATES.
fragments:
- - 2.15-ignores.yaml
- - libssh_check.yaml
- release_date: "2022-09-30"
- 3.1.1:
+ - 177_netconf_config_test_issue.yaml
+ - 189_config_diff_fix.yaml
+ - 191_restconf_config_fix.yaml
+ - 198_net_get_missing_changed.yaml
+ - 97_getReplyobject_has_no_attribute_strip_issue.yaml
+ - add_purged_action_state.yaml
+ - error-independently.yaml
+ - netconf_nxos_tests.yaml
+ release_date: "2021-01-27"
+ 2.0.0:
changes:
+ breaking_changes:
+ - Removed vendored ipaddress package from collection. If you use ansible_collections.ansible.netcommon.plugins.module_utils.compat.ipaddress
+ in your collection, you will need to change this to import ipaddress instead.
+ If your content using ipaddress supports Python 2.7, you will additionally
+ need to make sure that the user has the ipaddress package installed. Please
+ refer to https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_best_practices.html#importing-and-using-shared-code
+ to see how to safely import external packages that may be missing from the
+ user's system A backport of ipaddress for Python 2.7 is available at https://pypi.org/project/ipaddress/
bugfixes:
- - libssh - add ssh_args, ssh_common_args, and ssh_extra_args options. These
- options are exclusively for collecting proxy information from as an alternative
- to the proxy_command option.
- - libssh - Removed the wording "Tech preview". From version 3.0.0 the default
- if installed.
- - Fix to set connection plugin options correctly.
- - Fix a small number of potential use-before-assignment issues.
- fragments:
- - 441-pre-commit.yaml
- - 448-set_options.yaml
- - 451-libssh-remove-tech-preview.yaml
- - 454-legacy_cleanup.yaml
- - pylint.yaml
- release_date: "2022-09-06"
- 3.1.0:
- changes:
+ - Expose connection class object to rm_template (https://github.com/ansible-collections/ansible.netcommon/pull/180)
+ - network_cli - When using ssh_type libssh, handle closed connection gracefully
+ instead of throwing an exception
+ deprecated_features:
+ - Deprecate cli_parse module and textfsm, ttp, xml, json parser plugins as they
+ are moved to ansible.utils collection (https://github.com/ansible-collections/ansible.netcommon/pull/182
+ https://github.com/ansible-collections/ansible.utils/pull/28)
+ major_changes:
+ - Remove deprecated connection arguments from netconf_config
minor_changes:
- - libssh - Added `password_prompt` option to override default "password:"
- prompt used by pylibssh
- - Adds a new option `terminal_errors` in network_cli, that determines how
- terminal setting failures are handled.
- - Add grpc connection plugin support.
+ - Add SCP support when using ssh_type libssh
+ - Add `single_user_mode` option for command output caching.
+ - Move cli_config idempotent warning message with the task response under `warnings`
+ key if `changed` is `True`
+ - Reduce CPU usage and network module run time when using `ansible_network_import_modules`
+ - Support any() and all() filters in Jinja2.
fragments:
- - add-grpc-connection-plugin.yaml
- - libssh-password-prompt.yaml
- - terminal_errors.yaml
- modules:
- - description: Fetch configuration/state data from gRPC enabled target hosts.
- name: grpc_config
- namespace: ""
- - description: Fetch configuration/state data from gRPC enabled target hosts.
- name: grpc_get
- namespace: ""
+ - 180_RMbase_engine.yaml
+ - 182-cli_parse_deprecate.yaml
+ - 212-update-documentation.yaml
+ - 213-docs-updates.yaml
+ - 217-pylibssh-conn-closed.yaml
+ - 226-libssh-scp.yaml
+ - 93-remove-ipaddress.yaml
+ - ansible_network_direct_execution.yaml
+ - config_module_warning_msg.yaml
+ - remove-netconf_config-args.yaml
+ - support_caching.yaml
+ - support_custom_filters.yaml
+ - update_requires_ansible.yaml
+ - yamllint.yaml
plugins:
- connection:
- - description: Provides a persistent connection using the gRPC protocol
- name: grpc
- namespace:
- release_date: "2022-08-02"
- 3.0.1:
+ cache:
+ - description: RAM backed, non persistent cache.
+ name: memory
+ namespace: null
+ release_date: "2021-03-01"
+ 2.0.1:
changes:
bugfixes:
- - restconf - When non-JSON data is encountered, return the bytes found instead
- of nothing.
- - libssh - Fix for improperly set hostname in connect
- - httpapi - Fix for improperly set hostname in url
- fragments:
- - 412-unit-updates.yaml
- - 419-prettier.yaml
- - 428.yaml
- - 432.yaml
- - fix-changelog-location.yaml
- - import_modules-logging.yaml
- - libssh-tests.yaml
- - remote_addr.yaml
- - restconf-not-json.yaml
- - update-pre-commit.yaml
- release_date: "2022-05-31"
- 3.0.0:
- changes:
- breaking_changes:
- - network_cli - Change default value of ``import_modules`` option from ``no``
- to ``yes``
- - netconf - Change default value of ``import_modules`` option from ``no``
- to ``yes``
- - httpapi - Change default value of ``import_modules`` option from ``no``
- to ``yes``
- known_issues:
- - "eos - When using eos modules on Ansible 2.9, tasks will occasionally fail
- with ``import_modules`` enabled. This can be avoided by setting ``import_modules:
- no``"
- major_changes:
- - "network_cli - Change default value of `ssh_type` option from `paramiko`
- to `auto`. This value will use libssh if the ansible-pylibssh module is
- installed, otherwise will fallback to paramiko.\n"
- - cli_parse - this module has been moved to the ansible.utils collection.
- ``ansible.netcommon.cli_parse`` will continue to work to reference the module
- in its new location, but this redirect will be removed in a future release
+ - Allow setting `host_key_checking` through a play/task var for `network_cli`.
+ - Ensure passed-in terminal_initial_prompt and terminal_initial_answer values
+ are cast to bytes before using
+ - Update valid documentation for net_ping module.
+ - ncclient - catch and handle exception to prevent stack trace when running
+ in FIPS mode
+ - net_put - Remove temp file created when file already exist on destination
+ when mode is 'text'.
+ minor_changes:
+ - Several module_utils files were intended to be licensed BSD, but missing a
+ license preamble in the files. The preamble has been added, and all authors
+ for the files have given their assent to the intended license https://github.com/ansible-collections/ansible.netcommon/pull/122
fragments:
- - 364-pre-commit-ci.yaml
- - 384-cli_parse-move.yaml
- - 387-change-defaults.yaml
- - 390-sanity.yaml
- - 394-change-defaults.yaml
- - pre-commit-add-docs.yaml
- - update-linter-config.yaml
- release_date: "2022-04-26"
- 2.6.1:
+ - 100-bugfix-net-ping-docs.yaml
+ - 122-add-license.yaml
+ - 220-initial-prompt-bytes.yaml
+ - 227-remove_tests_sanity_requirements.yml
+ - 231-unit-tests.yaml
+ - 235-fix-net-put-issue.yaml
+ - 240-document-libssh-requirement.yaml
+ - fips-ncclient-import-error.yaml
+ - new_action_state.yaml
+ - no_log_fix.yaml
+ - set_host_key_checking.yaml
+ release_date: "2021-03-30"
+ 2.0.2:
changes:
bugfixes:
- - Fix validate-module sanity test.
- release_summary: Rereleased 2.6.0 with updated utils dependancy.
+ - Fix cli_parse issue with parsers in utils collection (https://github.com/ansible-collections/ansible.netcommon/pull/270)
+ - Support single_user_mode with Ansible 2.9.
fragments:
- - 2.6.0.yaml
- - fix_sanity.yaml
- release_date: "2022-03-10"
- 2.6.0:
+ - 254-add_ignore_txt.yml
+ - cli_parse_fix.yaml
+ - single_user_mode.yaml
+ release_date: "2021-04-28"
+ 2.1.0:
changes:
bugfixes:
- - No activity on the transport's channel was triggering a socket.timeout()
- after 30 secs, even if persistent_command_timeout is set to a higher value.
- This patch fixes it.
- - Fix issue with cli_parse native_parser plugin when input is empty (https://github.com/ansible-collections/ansible.netcommon/issues/347).
+ - Variables in play_context will now be updated for netconf connections on each
+ task run.
+ - fix SCP/SFTP when using network_cli with libssh
minor_changes:
- - Redirected ipaddr filters to ansible.utils (https://github.com/ansible-collections/ansible.netcommon/pull/359).
- - httpapi - new parameter retries in send() method limits the number of times
- a request is retried when a HTTP error that can be worked around is encountered.
- The default is to retry indefinitely to maintain old behavior, but this
- default may change in a later breaking release.
+ - Add support for ProxyCommand with netconf connection.
fragments:
- - 364-pre-commit-ci.yaml
- - add_remove_prompt.yaml
- - bugfix_cli_parse_native_parser.yaml
- - deprecate_ipaddr_filters.yaml
- - httpapi-retries.yaml
- - shell_timeout.yaml
- release_date: "2022-03-01"
- 2.5.1:
+ - 259-netconf-play-context.yaml
+ - drop-base-cache.yaml
+ - libssh-get-put.yaml
+ - support_proxycommand_netconf.yaml
+ release_date: "2021-05-17"
+ 2.2.0:
changes:
bugfixes:
- - Fixed plugins inheriting from netcommon's base plugins (for example httpapi/restconf
- or netconf/default) so that they can be properly loaded (https://github.com/ansible-collections/ansible.netcommon/issues/356).
+ - libssh - Fix fromatting of authenticity error message when not prompting for
+ input (https://github.com/ansible-collections/ansible.netcommon/issues/283)
+ - netconf - Fix connection with ncclient versions < 0.6.10
+ - network_cli - Fix for execution failing when ansible_ssh_password is used
+ to specify password (https://github.com/ansible-collections/ansible.netcommon/issues/288)
+ minor_changes:
+ - Add variable to control ProxyCommand with libssh connection.
+ - "NetworkTemplate and ResouceModule base classes have been moved under module_utils.network.common.rm_base.
+ Stubs have been kept for backwards compatibility. These will be removed after
+ 2023-01-01. Please update imports for existing modules that subclass them.
+ The `cli_rm_builder `_
+ has been updated to use the new imports.
+
+ "
fragments:
- - 358-pluginloader.yaml
- - pre-commit.yaml
- release_date: "2022-02-09"
- 2.5.0:
+ - 257-libssh-proxy-var.yaml
+ - 288-netcli-password.yaml
+ - libssh-auth-msg.yaml
+ - ncclient-sock-arg.yaml
+ - update_rmbase.yaml
+ release_date: "2021-06-23"
+ 2.3.0:
changes:
- bugfixes:
- - network_cli - fix issue when multiple terminal_initial_(prompt|answer) values
- are given (https://github.com/ansible-collections/ansible.netcommon/issues/331).
- - network_cli - Provide clearer error message when a prompt regex fails to
- compile
minor_changes:
- - "`network_cli` - added new option 'become_errors' to determine how privilege
- escalation failures are handled."
- - Support removal of non-config lines from running config while taking backup.
- - Make ansible_network_os as optional param for httpapi connection plugin.
- - Copied the cliconf, httpapi, netconf, and terminal base plugins and NetworkConnectionBase
- into netcommon. These base plugins may now be imported from netcommmon instead
- of ansible if a collection depends on netcommon versions newer than this
- version, allowing features and bugfixes to flow to those collections without
- upgrading ansible.
+ - Add vlan_expander filter
+ - Persistent connection options (persistent_command_timeout, persistent_log_messages,
+ etc.) have been unified across all persistent connections. New persistent
+ connections may also now get these options by extending the connection_persistent
+ documentation fragment.
fragments:
- - 0-copy_ignore_txt.yml
- - 334-base-plugins.yaml
- - httpapi_make_ansible_network_os_optional_param.yaml
- - initial_prompt-bytes-fix.yaml
- - non_config.yaml
- - on_become_errors.yaml
- - prompt-regex.yaml
- release_date: "2021-12-07"
+ - 280-vlan_expander.yaml
+ - 295-connection-tests.yaml
+ - 308-unify-persistent.yaml
+ - fix_integration_test_iosxr_7.0.2.yaml
+ release_date: "2021-07-27"
2.4.0:
changes:
bugfixes:
- - network_cli - Add ability to set options inherited from paramiko/libssh
- in ansible >= 2.11 (https://github.com/ansible-collections/ansible.netcommon/pull/271).
+ - network_cli - Add ability to set options inherited from paramiko/libssh in
+ ansible >= 2.11 (https://github.com/ansible-collections/ansible.netcommon/pull/271).
deprecated_features:
- network_cli - The paramiko_ssh setting ``look_for_keys`` was set automatically
- based on the values of the ``password`` and ``private_key_file`` options
- passed to network_cli. This option can now be set explicitly, and the automatic
- setting of ``look_for_keys`` will be removed after 2024-01-01 (https://github.com/ansible-collections/ansible.netcommon/pull/271).
+ based on the values of the ``password`` and ``private_key_file`` options passed
+ to network_cli. This option can now be set explicitly, and the automatic setting
+ of ``look_for_keys`` will be removed after 2024-01-01 (https://github.com/ansible-collections/ansible.netcommon/pull/271).
minor_changes:
- - Add network_resource plugin to manage and provide single entry point for
- all resource modules for higher oder roles.
+ - Add network_resource plugin to manage and provide single entry point for all
+ resource modules for higher oder roles.
fragments:
- 271-net-cli-options.yaml
- 318-netcli-tests.yaml
@@ -319,369 +390,320 @@ releases:
name: network_resource
namespace: ""
release_date: "2021-08-27"
- 2.3.0:
+ 2.5.0:
changes:
+ bugfixes:
+ - network_cli - Provide clearer error message when a prompt regex fails to compile
+ - network_cli - fix issue when multiple terminal_initial_(prompt|answer) values
+ are given (https://github.com/ansible-collections/ansible.netcommon/issues/331).
minor_changes:
- - Persistent connection options (persistent_command_timeout, persistent_log_messages,
- etc.) have been unified across all persistent connections. New persistent
- connections may also now get these options by extending the connection_persistent
- documentation fragment.
- - Add vlan_expander filter
+ - Copied the cliconf, httpapi, netconf, and terminal base plugins and NetworkConnectionBase
+ into netcommon. These base plugins may now be imported from netcommmon instead
+ of ansible if a collection depends on netcommon versions newer than this version,
+ allowing features and bugfixes to flow to those collections without upgrading
+ ansible.
+ - Make ansible_network_os as optional param for httpapi connection plugin.
+ - Support removal of non-config lines from running config while taking backup.
+ - "`network_cli` - added new option 'become_errors' to determine how privilege
+ escalation failures are handled."
fragments:
- - 280-vlan_expander.yaml
- - 295-connection-tests.yaml
- - 308-unify-persistent.yaml
- - fix_integration_test_iosxr_7.0.2.yaml
- release_date: "2021-07-27"
- 2.2.0:
+ - 0-copy_ignore_txt.yml
+ - 334-base-plugins.yaml
+ - httpapi_make_ansible_network_os_optional_param.yaml
+ - initial_prompt-bytes-fix.yaml
+ - non_config.yaml
+ - on_become_errors.yaml
+ - prompt-regex.yaml
+ release_date: "2021-12-07"
+ 2.5.1:
changes:
bugfixes:
- - network_cli - Fix for execution failing when ansible_ssh_password is used
- to specify password (https://github.com/ansible-collections/ansible.netcommon/issues/288)
- - netconf - Fix connection with ncclient versions < 0.6.10
- - libssh - Fix fromatting of authenticity error message when not prompting
- for input (https://github.com/ansible-collections/ansible.netcommon/issues/283)
- minor_changes:
- - "NetworkTemplate and ResouceModule base classes have been moved under module_utils.network.common.rm_base.
- Stubs have been kept for backwards compatibility. These will be removed
- after 2023-01-01. Please update imports for existing modules that subclass
- them. The `cli_rm_builder `_
- has been updated to use the new imports.\n"
- - Add variable to control ProxyCommand with libssh connection.
+ - Fixed plugins inheriting from netcommon's base plugins (for example httpapi/restconf
+ or netconf/default) so that they can be properly loaded (https://github.com/ansible-collections/ansible.netcommon/issues/356).
fragments:
- - 257-libssh-proxy-var.yaml
- - 288-netcli-password.yaml
- - libssh-auth-msg.yaml
- - ncclient-sock-arg.yaml
- - update_rmbase.yaml
- release_date: "2021-06-23"
- 2.1.0:
+ - 358-pluginloader.yaml
+ - pre-commit.yaml
+ release_date: "2022-02-09"
+ 2.6.0:
changes:
bugfixes:
- - fix SCP/SFTP when using network_cli with libssh
- - Variables in play_context will now be updated for netconf connections on
- each task run.
+ - Fix issue with cli_parse native_parser plugin when input is empty (https://github.com/ansible-collections/ansible.netcommon/issues/347).
+ - No activity on the transport's channel was triggering a socket.timeout() after
+ 30 secs, even if persistent_command_timeout is set to a higher value. This
+ patch fixes it.
minor_changes:
- - Add support for ProxyCommand with netconf connection.
+ - Redirected ipaddr filters to ansible.utils (https://github.com/ansible-collections/ansible.netcommon/pull/359).
+ - httpapi - new parameter retries in send() method limits the number of times
+ a request is retried when a HTTP error that can be worked around is encountered.
+ The default is to retry indefinitely to maintain old behavior, but this default
+ may change in a later breaking release.
fragments:
- - 259-netconf-play-context.yaml
- - drop-base-cache.yaml
- - libssh-get-put.yaml
- - support_proxycommand_netconf.yaml
- release_date: "2021-05-17"
- 2.0.2:
+ - 364-pre-commit-ci.yaml
+ - add_remove_prompt.yaml
+ - bugfix_cli_parse_native_parser.yaml
+ - deprecate_ipaddr_filters.yaml
+ - httpapi-retries.yaml
+ - shell_timeout.yaml
+ release_date: "2022-03-01"
+ 2.6.1:
changes:
bugfixes:
- - Fix cli_parse issue with parsers in utils collection (https://github.com/ansible-collections/ansible.netcommon/pull/270)
- - Support single_user_mode with Ansible 2.9.
+ - Fix validate-module sanity test.
+ release_summary: Rereleased 2.6.0 with updated utils dependancy.
fragments:
- - 254-add_ignore_txt.yml
- - cli_parse_fix.yaml
- - single_user_mode.yaml
- release_date: "2021-04-28"
- 2.0.1:
+ - 2.6.0.yaml
+ - fix_sanity.yaml
+ release_date: "2022-03-10"
+ 3.0.0:
changes:
- bugfixes:
- - net_put - Remove temp file created when file already exist on destination
- when mode is 'text'.
- - ncclient - catch and handle exception to prevent stack trace when running
- in FIPS mode
- - Update valid documentation for net_ping module.
- - Ensure passed-in terminal_initial_prompt and terminal_initial_answer values
- are cast to bytes before using
- - Allow setting `host_key_checking` through a play/task var for `network_cli`.
- minor_changes:
- - Several module_utils files were intended to be licensed BSD, but missing
- a license preamble in the files. The preamble has been added, and all authors
- for the files have given their assent to the intended license https://github.com/ansible-collections/ansible.netcommon/pull/122
+ breaking_changes:
+ - httpapi - Change default value of ``import_modules`` option from ``no`` to
+ ``yes``
+ - netconf - Change default value of ``import_modules`` option from ``no`` to
+ ``yes``
+ - network_cli - Change default value of ``import_modules`` option from ``no``
+ to ``yes``
+ known_issues:
+ - "eos - When using eos modules on Ansible 2.9, tasks will occasionally fail
+ with ``import_modules`` enabled. This can be avoided by setting ``import_modules:
+ no``"
+ major_changes:
+ - cli_parse - this module has been moved to the ansible.utils collection. ``ansible.netcommon.cli_parse``
+ will continue to work to reference the module in its new location, but this
+ redirect will be removed in a future release
+ - "network_cli - Change default value of `ssh_type` option from `paramiko` to
+ `auto`. This value will use libssh if the ansible-pylibssh module is installed,
+ otherwise will fallback to paramiko.
+
+ "
fragments:
- - 100-bugfix-net-ping-docs.yaml
- - 122-add-license.yaml
- - 220-initial-prompt-bytes.yaml
- - 227-remove_tests_sanity_requirements.yml
- - 231-unit-tests.yaml
- - 235-fix-net-put-issue.yaml
- - 240-document-libssh-requirement.yaml
- - fips-ncclient-import-error.yaml
- - new_action_state.yaml
- - no_log_fix.yaml
- - set_host_key_checking.yaml
- release_date: "2021-03-30"
- 2.0.0:
+ - 364-pre-commit-ci.yaml
+ - 384-cli_parse-move.yaml
+ - 387-change-defaults.yaml
+ - 390-sanity.yaml
+ - 394-change-defaults.yaml
+ - pre-commit-add-docs.yaml
+ - update-linter-config.yaml
+ release_date: "2022-04-26"
+ 3.0.1:
changes:
- breaking_changes:
- - Removed vendored ipaddress package from collection. If you use ansible_collections.ansible.netcommon.plugins.module_utils.compat.ipaddress
- in your collection, you will need to change this to import ipaddress instead.
- If your content using ipaddress supports Python 2.7, you will additionally
- need to make sure that the user has the ipaddress package installed. Please
- refer to
- https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_best_practices.html#importing-and-using-shared-code
- to see how to safely import external packages that may be missing from the
- user's system A backport of ipaddress for Python 2.7 is available at https://pypi.org/project/ipaddress/
bugfixes:
- - Expose connection class object to rm_template (https://github.com/ansible-collections/ansible.netcommon/pull/180)
- - network_cli - When using ssh_type libssh, handle closed connection gracefully
- instead of throwing an exception
- deprecated_features:
- - Deprecate cli_parse module and textfsm, ttp, xml, json parser plugins as
- they are moved to ansible.utils collection (https://github.com/ansible-collections/ansible.netcommon/pull/182
- https://github.com/ansible-collections/ansible.utils/pull/28)
- major_changes:
- - Remove deprecated connection arguments from netconf_config
+ - httpapi - Fix for improperly set hostname in url
+ - libssh - Fix for improperly set hostname in connect
+ - restconf - When non-JSON data is encountered, return the bytes found instead
+ of nothing.
+ fragments:
+ - 412-unit-updates.yaml
+ - 419-prettier.yaml
+ - 428.yaml
+ - 432.yaml
+ - fix-changelog-location.yaml
+ - import_modules-logging.yaml
+ - libssh-tests.yaml
+ - remote_addr.yaml
+ - restconf-not-json.yaml
+ - update-pre-commit.yaml
+ release_date: "2022-05-31"
+ 3.1.0:
+ changes:
minor_changes:
- - Support any() and all() filters in Jinja2.
- - Reduce CPU usage and network module run time when using `ansible_network_import_modules`
- - Move cli_config idempotent warning message with the task response under
- `warnings` key if `changed` is `True`
- - Add `single_user_mode` option for command output caching.
- - Add SCP support when using ssh_type libssh
+ - Add grpc connection plugin support.
+ - Adds a new option `terminal_errors` in network_cli, that determines how terminal
+ setting failures are handled.
+ - libssh - Added `password_prompt` option to override default "password:" prompt
+ used by pylibssh
fragments:
- - 180_RMbase_engine.yaml
- - 182-cli_parse_deprecate.yaml
- - 212-update-documentation.yaml
- - 213-docs-updates.yaml
- - 217-pylibssh-conn-closed.yaml
- - 226-libssh-scp.yaml
- - 93-remove-ipaddress.yaml
- - ansible_network_direct_execution.yaml
- - config_module_warning_msg.yaml
- - remove-netconf_config-args.yaml
- - support_caching.yaml
- - support_custom_filters.yaml
- - update_requires_ansible.yaml
- - yamllint.yaml
+ - add-grpc-connection-plugin.yaml
+ - libssh-password-prompt.yaml
+ - terminal_errors.yaml
+ modules:
+ - description: Fetch configuration/state data from gRPC enabled target hosts.
+ name: grpc_config
+ namespace: ""
+ - description: Fetch configuration/state data from gRPC enabled target hosts.
+ name: grpc_get
+ namespace: ""
plugins:
- cache:
- - description: RAM backed, non persistent cache.
- name: memory
- namespace:
- release_date: "2021-03-01"
- 1.5.0:
+ connection:
+ - description: Provides a persistent connection using the gRPC protocol
+ name: grpc
+ namespace: null
+ release_date: "2022-08-02"
+ 3.1.1:
changes:
bugfixes:
- - Fix config diff logic if parent configuration is present more than once
- in the candidate config and update docs (https://github.com/ansible-collections/ansible.netcommon/pull/189)
- - Add netconf_config integration tests for nxos (https://github.com/ansible-collections/ansible.netcommon/pull/185)
- - Fix netconf_config module integration test issuea (https://github.com/ansible-collections/ansible.netcommon/pull/177)
- - Split checks for prompt and errors in network_cli so that detected errors
- are not lost if the prompt is in a later chunk.
- - Fix restconf_config incorrectly spoofs HTTP 409 codes (https://github.com/ansible-collections/ansible.netcommon/issues/191)
- - Fix missing changed from net_get (https://github.com/ansible-collections/ansible.netcommon/issues/198)
- - Fix GetReply object has no attribute strip() (https://github.com/ansible-collections/cisco.iosxr/issues/97)
- minor_changes:
- - Add 'purged' to ACTION_STATES.
+ - Fix a small number of potential use-before-assignment issues.
+ - Fix to set connection plugin options correctly.
+ - libssh - Removed the wording "Tech preview". From version 3.0.0 the default
+ if installed.
+ - libssh - add ssh_args, ssh_common_args, and ssh_extra_args options. These
+ options are exclusively for collecting proxy information from as an alternative
+ to the proxy_command option.
fragments:
- - 177_netconf_config_test_issue.yaml
- - 189_config_diff_fix.yaml
- - 191_restconf_config_fix.yaml
- - 198_net_get_missing_changed.yaml
- - 97_getReplyobject_has_no_attribute_strip_issue.yaml
- - add_purged_action_state.yaml
- - error-independently.yaml
- - netconf_nxos_tests.yaml
- release_date: "2021-01-27"
- 1.4.1:
+ - 441-pre-commit.yaml
+ - 448-set_options.yaml
+ - 451-libssh-remove-tech-preview.yaml
+ - 454-legacy_cleanup.yaml
+ - pylint.yaml
+ release_date: "2022-09-06"
+ 3.1.2:
+ changes:
+ bugfixes:
+ - libssh - check for minimum ansible-pylibssh version before using password_prompt
+ option. (https://github.com/ansible-collections/ansible.netcommon/pull/467)
+ fragments:
+ - 2.15-ignores.yaml
+ - libssh_check.yaml
+ release_date: "2022-09-30"
+ 3.1.3:
changes:
release_summary:
- Change how black config is specified to avoid issues with Automation
- Hub release process
+ The v3.1.2 is unavailable on Ansible Automation Hub because
+ a technical issue. Please download and use v3.1.3 from Automation Hub.
fragments:
- - revert_pyproject.yaml
- release_date: "2020-10-29"
- 1.4.0:
+ - prepare_312.yaml
+ release_date: "2022-10-04"
+ 4.0.0:
+ changes:
+ removed_features:
+ - napalm - Removed unused connection plugin.
+ - net_banner - Use _banner instead.
+ - net_interface - Use _interfaces instead.
+ - net_l2_interface - Use _l2_interfaces instead.
+ - net_l3_interface - Use _l3_interfaces instead.
+ - net_linkagg - Use _lag_interfaces instead.
+ - net_lldp - Use _lldp_global instead.
+ - net_lldp_interface - Use _lldp_interfaces instead.
+ - net_logging - Use _logging_global instead.
+ - net_static_route - Use _static_routes instead.
+ - net_system - Use _system instead.
+ - net_user - Use _user instead.
+ - net_vlan - Use _vlans instead.
+ - net_vrf - Use _vrf instead.
+ fragments:
+ - 2H22_removal.yaml
+ - license.yaml
+ release_date: "2022-10-13"
+ 4.1.0:
changes:
bugfixes:
- - network_cli - Update underlying ssh connection's play_context in update_play_context,
- so that the username or password can be updated
- - 'ipaddr filter - query "address/prefix" (also: "gateway", "gw", "host/prefix",
- "hostnet", and "router") now handles addresses with /32 prefix or /255.255.255.255
- netmask'
- - Fixed unit tests under python3.5
- - Fixed ssh_type none issue while using net_put and net_get module (https://github.com/ansible-collections/ansible.netcommon/issues/153)
- - Fixed netconf_rpc task fails due to encoding issue in the response (https://github.com/ansible-collections/ansible.netcommon/issues/151)
- - Fixed ipaddr filter plugins in ansible.netcommon collections is not working
- with latest Ansible (https://github.com/ansible-collections/ansible.netcommon/issues/157)
- - Added support for private key based authentication with libssh transport
- (https://github.com/ansible-collections/ansible.netcommon/issues/168)
+ - restconf_get - fix direction of XML deserialization when ``output == 'xml'``
minor_changes:
- - Update docs for netconf_get and netconf_config examples using display=native
- - Add support for json format input format for netconf modules using ``xmltodict``
- - "'prefix' added to NetworkTemplate class, inorder to handle the negate operation
- for vyos config commands."
+ - Add implementation for content_templates_parser.
fragments:
- - 135-network-cli-change-password.yaml
- - 144-test-fixes.yaml
- - 151-netconf_rpc_fix.yaml
- - 153-part1-fix_ssh_type_none_issue.yaml
- - 157-ipaddr-fix.yaml
- - 168-libssh-privatekey-support.yaml
- - ipaddr-host-prefix-32.yaml
- - negate-command-vyos.yaml
- - netconf_get_config_doc_updates.yaml
- - netconf_xmltodict_support.yaml
- release_date: "2020-10-29"
- 1.3.0:
+ - add_content_template_parser.yaml
+ - fix_wrong_xml_direction.yaml
+ release_date: "2022-11-02"
+ 5.0.0:
changes:
+ breaking_changes:
+ - NetworkConnectionBase now inherits from PersistentConnectionBase in ansible.utils.
+ As a result, the minimum ansible.utils version has increased to 2.7.0.
+ - NetworkTemplate is no longer importable from ansible_collections.ansible.netcommon.plugins.module_utils.network.common
+ and should now be found at its proper location ansible_collections.ansible.netcommon.plugins.module_utils.network.common.rm_base.network_template
+ - ResourceModule is no longer importable from ansible_collections.ansible.netcommon.plugins.module_utils.network.common
+ and should now be found at its proper location ansible_collections.ansible.netcommon.plugins.module_utils.network.common.rm_base.resource_module
+ - VALID_MASKS, is_masklen, is_netmask, to_bits, to_ipv6_network, to_masklen,
+ to_netmask, and to_subnet are no longer importable from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils
+ and should now be found at their proper location ansible.module_utils.common.network
bugfixes:
- - netconf - Changed log level for message of using default netconf plugin
- to match the level used when a platform-specific netconf plugin is found
- - cli_parse - Ensure only native types are returned to the control node from
- the parser.
+ - Cast AnsibleUnsafeText to str in convert_doc_to_ansible_module_kwargs() to
+ keep CSafeLoader happy. This fixes issues with content scaffolding tools.
minor_changes:
- - "cli_config: Clarify when commands is returned when the module is run"
- - "cli_config: Add new return value diff which is returned when the cliconf
- plugin supports onbox diff"
- - The netconf_config module now allows root tag with namespace prefix.
- - Confirmed commit fails with TypeError in IOS XR netconf plugin (https://github.com/ansible-collections/cisco.iosxr/issues/74)
+ - httpapi - Add option netcommon_httpapi_ciphers to allow overriding default
+ SSL/TLS ciphers. (https://github.com/ansible-collections/ansible.netcommon/pull/494)
+ removed_features:
+ - cli_parse - This plugin was moved to ansible.utils in version 1.0.0, and the
+ redirect to that collection has now been removed.
fragments:
- - 134-cli-config-diff.yaml
- - allow_root_tag_with_prefix.yaml
- - cli_parse_fix.yaml
- - iosxr_netconf_config_commit_testcase.yaml
- - netconf-default.yaml
- release_date: "2020-09-29"
- 1.2.1:
+ - 23H1_breaking.yaml
+ - flake8.yaml
+ - netcommon_httpapi_ciphers.yaml
+ - persistentbase.yaml
+ - telnet.yaml
+ release_date: "2023-02-27"
+ 5.1.0:
changes:
bugfixes:
- - Fixed "Object of type Capabilities is not JSON serializable" when using
- default netconf plugin.
+ - httpapi - ``send()`` method no longer applied leftover kwargs to ``open_url()``.
+ Fix applies those arguments as intended (https://github.com/ansible-collections/ansible.netcommon/pull/524).
+ - network_cli - network cli connection avoids traceback when using invalid user
+ - network_cli - when receiving longer responses with libssh, parts of the response
+ were sometimes repeated. The response is now returned as it is received (https://github.com/ansible-collections/community.routeros/issues/132).
+ - network_resource - fix a potential UnboundLocalError if the module fails to
+ import a Resource Module. (https://github.com/ansible-collections/ansible.netcommon/pull/513)
+ - restconf - creation of new resources is no longer erroneously forced to use
+ POST. (https://github.com/ansible-collections/ansible.netcommon/issues/502)
+ minor_changes:
+ - libssh - add ``config_file`` option to specify an alternate SSH config file
+ to use.
+ - parse_cli - add support for multiple matches inside a block by adding new
+ dictionary key to result
+ - telnet - add ``stdout`` and ``stdout_lines`` to module output.
+ - telnet - add support for regexes to ``login_prompt`` and ``password_prompt``.
+ - telnet - apply ``timeout`` to command prompts.
fragments:
- - netconf-capabilites-fix.yaml
- release_date: "2020-09-04"
- 1.2.0:
+ - 530-parse_cli.yaml
+ - httpapi-kwargs.yaml
+ - libssh-repeated-text.yaml
+ - libssh_config_file.yaml
+ - lint.yaml
+ - network_cli_bad_user.yaml
+ - restconf_put.yaml
+ - telnet-refactoring.yml
+ - ule-docs.yaml
+ release_date: "2023-04-03"
+ 5.1.1:
changes:
bugfixes:
- - sort_list will sort a list of dicts using the sorted method with key as
- an argument.
- - cli_config fixes issue when rollback_id = 0 evalutes to False
- minor_changes:
- - The httpapi connection plugin now works with `wait_for_connection`. This
- will periodically request the root page of the server described by the plugin's
- options until the request succeeds. This can only test that the server is
- reachable, the correctness or usability of the API is not guaranteed.
- - New cli_parse module for parsing structured text using a variety of parsers.
- The initial implemetation of cli_parse can be used with json, native, ntc_templates,
- pyats, textfsm, ttp, and xml.
- - NetworkConfig objects now have an optional `comment_tokens` parameter which
- takes a list of strings which will override the DEFAULT_COMMENT_TOKENS list.
- - Added description to collection galaxy.yml file.
+ - network_resource - do not append network_os to module names when building
+ supported resources list. This fix is only valid for cases where FACTS_RESOURCE_SUBSETS
+ is undefined.
fragments:
- - 105-wait_for_conn-httpapi.yaml
- - 109-cli_parse_module_addition.yaml
- - 110-NetworkConfig-comments.yaml
- - 114-sort_list_listofdicts.yaml
- - 118-cli_config.yaml
- - 127-galaxy-fragment.yaml
- release_date: "2020-08-25"
- 1.1.2:
+ - resource_manager.yaml
+ release_date: "2023-05-09"
+ 5.1.2:
changes:
- release_summary: Rereleased 1.1.1 with updated changelog.
+ bugfixes:
+ - Ensure that all connection plugin options that should be strings are actually
+ strings (https://github.com/ansible-collections/ansible.netcommon/pull/549).
fragments:
- - 1.1.2.yaml
- release_date: "2020-08-06"
- 1.1.1:
+ - 549-connection-strings.yml
+ - 550-ansible-lint.yml
+ - gha_release.yaml
+ - line-length.yaml
+ release_date: "2023-07-05"
+ 5.1.3:
changes:
- release_summary: Rereleased 1.1.0 with regenerated documentation.
+ bugfixes:
+ - Vendor telnetlib from cpython (https://github.com/ansible-collections/ansible.netcommon/pull/546)
fragments:
- - 1.1.1.yaml
- release_date: "2020-07-31"
- 1.1.0:
+ - telnet.yaml
+ release_date: "2023-07-24"
+ 5.2.0:
changes:
bugfixes:
- - slaac filter now returns str instead of IPAddress object
- - nthhost filter now returns str instead of IPAddress object
- - net_put - Restore missing function removed when action plugin stopped inheriting
- NetworkActionBase
- - ipaddr filter now returns empty list instead of False on empty list input
- - ipaddr filter - Fixed issue where the first IPv6 address in a subnet was
- not being considered a valid address.
- - ipaddr - "host" query supports /31 subnets properly
- - Replace deprecated `getiterator` call with `iter`
- major_changes:
- - Add libssh connection plugin and refactor network_cli (https://github.com/ansible-collections/ansible.netcommon/pull/30)
+ - Ensure that all connection plugin options that should be strings are actually
+ strings (https://github.com/ansible-collections/ansible.netcommon/pull/549).
+ deprecated_features:
+ - libssh - the ssh_*_args options are now marked that they will be removed after
+ 2026-01-01.
minor_changes:
- - "Resource Modules: changed flag is set to true in check_mode for all ACTION_STATES
- (https://github.com/ansible-collections/ansible.netcommon/pull/82)"
- - Add content option validation for netconf_config module (https://github.com/ansible-collections/ansible.netcommon/pull/66)
- - Documentation of module arguments updated to match expected types where
- missing.
- removed_features:
- - module_utils.network.common.utils.ComplexDict has been removed
- fragments:
- - 103-net-put-handle-src.yaml
- - 30-add-libssh-connection-support.yaml
- - 34-ipaddr-empty-list.yaml
- - 66-netconf-config-vaildation.yml
- - 72-ipv6-first-address-fix.yaml
- - 74-remove-getiterator.yaml
- - 75-unit-tests.yaml
- - 78-sanity-cleanup.yaml
- - 82-changed_true_action_states_check_mode_yes.yml
- - 95-ipaddr.yaml
- release_date: "2020-07-30"
- 1.0.0:
- modules:
- - description: Run a cli command on cli-based network devices
- name: cli_command
- namespace: ""
- - description: Push text based configuration to network devices over network_cli
- name: cli_config
- namespace: ""
- - description: Copy a file from a network device to Ansible Controller
- name: net_get
- namespace: ""
- - description: Tests reachability using ping from a network device
- name: net_ping
- namespace: ""
- - description: Copy a file from Ansible Controller to a network device
- name: net_put
- namespace: ""
- - description: netconf device configuration
- name: netconf_config
- namespace: ""
- - description: Fetch configuration/state data from NETCONF enabled network devices.
- name: netconf_get
- namespace: ""
- - description: Execute operations on NETCONF enabled network devices.
- name: netconf_rpc
- namespace: ""
- - description:
- Handles create, update, read and delete of configuration data
- on RESTCONF enabled devices.
- name: restconf_config
- namespace: ""
- - description: Fetch configuration/state data from RESTCONF enabled devices.
- name: restconf_get
- namespace: ""
- - description: Executes a low-down and dirty telnet command
- name: telnet
- namespace: ""
+ - Add a new cliconf plugin ``default`` that can be used when no cliconf plugin
+ is found for a given network_os. This plugin only supports ``get()``. (https://github.com/ansible-collections/ansible.netcommon/pull/569)
+ - httpapi - Add additional option ``ca_path``, ``client_cert``, ``client_key``,
+ and ``http_agent`` that are available in open_url but not to httpapi. (https://github.com/ansible-collections/ansible.netcommon/issues/528)
+ - telnet - add crlf option to send CRLF instead of just LF (https://github.com/ansible-collections/ansible.netcommon/pull/440).
+ fragments:
+ - 440-telnet-add-crlf-option.yml
+ - 558-load_provider.yml
+ - default-cliconf.yaml
+ - httpapi_options.yaml
+ - ssh_args.yaml
+ - vlan_extender.yaml
plugins:
- become:
- - description: Switch to elevated permissions on a network device
- name: enable
- namespace:
- connection:
- - description: Use httpapi to run command on network appliances
- name: httpapi
- namespace:
- - description: Provides a persistent connection using the netconf protocol
- name: netconf
- namespace:
- - description: Use network_cli to run command on network appliances
- name: network_cli
- namespace:
- - description: Use a persistent unix socket for connection
- name: persistent
- namespace:
- httpapi:
- - description: HttpApi Plugin for devices supporting Restconf API
- name: restconf
- namespace:
- netconf:
- - description:
- Use default netconf plugin to run standard netconf commands
- as per RFC
+ cliconf:
+ - description: General purpose cliconf plugin for new platforms
name: default
- namespace:
- release_date: "2020-06-23"
+ namespace: null
+ release_date: "2023-09-07"
diff --git a/changelogs/fragments/440-telnet-add-crlf-option.yml b/changelogs/fragments/440-telnet-add-crlf-option.yml
deleted file mode 100644
index c914268ce..000000000
--- a/changelogs/fragments/440-telnet-add-crlf-option.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-minor_changes:
- - telnet - add crlf option to send CRLF instead of just LF (https://github.com/ansible-collections/ansible.netcommon/pull/440).
diff --git a/changelogs/fragments/558-load_provider.yml b/changelogs/fragments/558-load_provider.yml
deleted file mode 100644
index b203911d3..000000000
--- a/changelogs/fragments/558-load_provider.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-bugfixes:
- - "Ensure that all connection plugin options that should be strings are actually strings (https://github.com/ansible-collections/ansible.netcommon/pull/549)."
diff --git a/changelogs/fragments/default-cliconf.yaml b/changelogs/fragments/default-cliconf.yaml
deleted file mode 100644
index de1a87504..000000000
--- a/changelogs/fragments/default-cliconf.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-minor_changes:
- - Add a new cliconf plugin ``default`` that can be used when no cliconf
- plugin is found for a given network_os. This plugin only supports ``get()``.
- (https://github.com/ansible-collections/ansible.netcommon/pull/569)
diff --git a/changelogs/fragments/httpapi_options.yaml b/changelogs/fragments/httpapi_options.yaml
deleted file mode 100644
index ef9cdb511..000000000
--- a/changelogs/fragments/httpapi_options.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-minor_changes:
- - httpapi - Add additional option ``ca_path``, ``client_cert``, ``client_key``, and
- ``http_agent`` that are available in open_url but not to httpapi.
- (https://github.com/ansible-collections/ansible.netcommon/issues/528)
diff --git a/changelogs/fragments/ssh_args.yaml b/changelogs/fragments/ssh_args.yaml
deleted file mode 100644
index 64c02a692..000000000
--- a/changelogs/fragments/ssh_args.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-deprecated_features:
- - libssh - the ssh_*_args options are now marked that they will be removed after 2026-01-01.
diff --git a/changelogs/fragments/vlan_extender.yaml b/changelogs/fragments/vlan_extender.yaml
deleted file mode 100644
index da69abfb5..000000000
--- a/changelogs/fragments/vlan_extender.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-trivial:
- - vlan_expander - Filter plugin updated as individual plugin.
- - vlan_parser - Filter plugin updated as individual plugin.
- - type5_pw - Filter plugin updated as individual plugin.
- - parse_xml - Filter plugin updated as individual plugin.
- - comp_type5 - Filter plugin updated as individual plugin.
- - hash_salt - Filter plugin updated as individual plugin.
- - parse_cli - Filter plugin updated as individual plugin.
- - parse_cli_textfsm - Filter plugin updated as individual plugin.
diff --git a/galaxy.yml b/galaxy.yml
index aa409f2ff..caf8b06b2 100644
--- a/galaxy.yml
+++ b/galaxy.yml
@@ -13,4 +13,4 @@ readme: README.md
repository: https://github.com/ansible-collections/ansible.netcommon
issues: https://github.com/ansible-collections/ansible.netcommon/issues
tags: [networking, security, cloud, network_cli, netconf, httpapi, grpc]
-version: 5.1.3
+version: 5.2.0
|