Skip to content

Commit

Permalink
Fixes for Ansible Issue 133, 134 and 145 (#148)
Browse files Browse the repository at this point in the history
* fixes for Ansible Issue 133, 134 and 145

* change for new release 1.2.1

* no change

* to fix CI error

* breaking too long line

* breaking too long line

* breaking too long line

* reverted big line

* added devel

* reverted devel

* changed big line

* changed big line

* updated rel version 1.2.1

* updating CHANGELOG.rst and changelog.yaml for rel 1.2.1

---------

Co-authored-by: prasada.reddy <[email protected]>
  • Loading branch information
prasadapr and prasada.reddy authored Aug 31, 2023
1 parent 5ddb984 commit d081061
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ansible-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
- stable-2.13
- stable-2.14
- stable-2.15
- devel
runs-on: ubuntu-latest
steps:

Expand Down
17 changes: 17 additions & 0 deletions changelogs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ Ansible Network Collection for Dell EMC SmartFabric OS10 Release Notes

.. contents:: Topics

v1.2.1
======

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

This is the minor release of the ``dellemc.os10`` collection.
This changelog contains all changes to the modules in this collection
that have been added after the release of ``dellemc.os10`` 1.2.0.

Bugfixes
--------

- Fixed issue in os10_interface fails on vlan and loopback interfaces due to no negotiation (https://github.com/ansible-collections/dellemc.os10/issues/133)
- Fixed issue in Replace bool auto_neg with 4-option negotiation (https://github.com/ansible-collections/dellemc.os10/pull/134)
- Fixed issue in parsing error when trying to add more than 55 or more character in hostname (https://github.com/ansible-collections/dellemc.os10/issues/145)


v1.2.0
======
Expand Down
12 changes: 12 additions & 0 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,15 @@ releases:
- 81-vrf-interface-context-exit.yaml
- forward-error-correction-feature.yaml
release_date: '2022-03-11'
1.2.1:
changes:
bugfixes:
- Fixed issue in os10_interface fails on vlan and loopback interfaces due to no negotiation (https://github.com/ansible-collections/dellemc.os10/issues/133)
- Fixed issue in Replace bool auto_neg with 4-option negotiation (https://github.com/ansible-collections/dellemc.os10/pull/134)
- Fixed issue in parsing error when trying to add more than 55 or more character in hostname (https://github.com/ansible-collections/dellemc.os10/issues/145)
release_summary: 'This is the minor release of the ``dellemc.os10`` collection.
This changelog contains all changes to the modules in this collection
that have been added after the release of ``dellemc.os10`` 1.2.0.'
release_date: '2023-08-30'
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: os10
namespace: dellemc
readme: README.md
tags: [dell, dellemc, os10, emc, networking]
version: 1.2.0
version: 1.2.1
repository: https://github.com/ansible-collections/dellemc.os10
documentation: https://github.com/ansible-collections/dellemc.os10/tree/master/docs
homepage: https://github.com/ansible-collections/dellemc.os10
Expand Down
4 changes: 3 additions & 1 deletion plugins/module_utils/network/os10.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

from __future__ import (absolute_import, division, print_function)

# import re
import re

from ansible.module_utils._text import to_text
from ansible.module_utils.basic import env_fallback
Expand Down Expand Up @@ -106,6 +106,7 @@ def run_commands(module, commands, check_rc=True):
if check_rc and rc != 0:
module.fail_json(msg=to_text(err, errors='surrogate_or_strict'), rc=rc)
responses.append(to_text(out, errors='surrogate_or_strict'))
responses = [elm.split("\n", 1)[1] if "\u001b" in elm and len(elm.split("\n", 1)) > 1 else "" if "\u001b" in elm else elm for elm in responses]
return responses


Expand All @@ -120,6 +121,7 @@ def load_config(module, commands):
continue
rc, out, err = exec_command(module, command)
if rc != 0:
err = re.sub(r'\u001bE', '', err)
module.fail_json(msg=to_text(err, errors='surrogate_or_strict'), command=command, rc=rc)

exec_command(module, 'end')
Expand Down
2 changes: 1 addition & 1 deletion roles/os10_interface/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Role variables
| ``ipv6_bgp_unnum.state`` | string: absent,present\* | Disables auto discovery of BGP unnumbered peer if set to absent | os10 |
| ``ipv6_bgp_unnum.peergroup_type`` | string: ebgp,ibgp | Specifies the type of template to inherit from | os10 |
| ``stp_rpvst_default_behaviour`` | boolean: false,true | Configures RPVST default behaviour of BPDU's when set to True which is default | os10 |
| ``auto_neg`` | boolean: false,true\* | Configures whether interface speed negotiation is enabled or not | os10 |
| ``negotiation`` | string: auto,on,off | Configures whether interface speed negotiation is set to on, off or auto | os10 |

> **NOTE**: Asterisk (*) denotes the default value if none is specified.
Expand Down
10 changes: 5 additions & 5 deletions roles/os10_interface/templates/os10_interface.j2
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ interface {{ interface_key }}
no speed
{% endif %}
{% endif %}
{% if intf_vars.auto_neg is defined %}
{% if intf_vars.auto_neg %}
{% if intf_vars.negotiation is defined %}
{% if intf_vars.negotiation == "on" %}
negotiation on
{% else %}
{% elif intf_vars.negotiation == "off" %}
negotiation off
{% endif %}
{% else %}
no negotiation
negotiation auto
{% endif %}
{% endif %}
{% if intf_vars.ip_type_dynamic is defined %}
{% if intf_vars.ip_type_dynamic %}
Expand Down

0 comments on commit d081061

Please sign in to comment.