Skip to content

Commit

Permalink
Merge pull request #31 from praveenramoorthy/2.1.29
Browse files Browse the repository at this point in the history
Release 2.1.29
  • Loading branch information
praveenramoorthy authored Aug 23, 2023
2 parents 5e25b37 + 043d24f commit 485ac4a
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 98 deletions.
152 changes: 76 additions & 76 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,79 +44,79 @@ jobs:
path: .cache/collection-tarballs


sanity:
name: Run ansible-sanity tests
needs:
- build
runs-on: ubuntu-latest
strategy:
matrix:
ansible: [2.9.26, 2.10.17, 2.11.12, 2.12.10, 2.13.8, 2.14.2]
python: [3.8, 3.9]
exclude:
- ansible: 2.9.26
python: 3.9
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install ansible-base (v${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check

- name: Download migrated collection artifacts
uses: actions/download-artifact@v1
with:
name: collection
path: .cache/collection-tarballs

- name: Install the collection tarball
run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz

- name: Run sanity tests
run: ansible-test sanity --docker --python ${{matrix.python}} -v --color --truncate 0
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/dcnm


unit-tests:
name: Run DCNM Unit Tests
needs:
- build
runs-on: ubuntu-latest
strategy:
matrix:
ansible: [2.9.26, 2.10.17, 2.11.12, 2.12.10, 2.13.8, 2.14.2]
steps:
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install ansible-base (v${{ matrix.ansible }})
run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check

- name: Install coverage (v4.5.4)
run: pip install coverage==4.5.4
- name: Install pytest (v5.4.1)
run: pip install pytest==5.4.1

- name: Download migrated collection artifacts
uses: actions/download-artifact@v1
with:
name: collection
path: .cache/collection-tarballs

- name: Install the collection tarball
run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz

- name: Run DCNM Unit tests
run: coverage run --source=. -m pytest tests/unit/modules/dcnm/. -vvvv
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/dcnm
env:
PYTHONPATH: /home/runner/.ansible/collections

- name: Generate coverage report
run: coverage report
working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/dcnm
# sanity:
# name: Run ansible-sanity tests
# needs:
# - build
# runs-on: ubuntu-latest
# strategy:
# matrix:
# ansible: [2.9.26, 2.10.17, 2.11.12, 2.12.10, 2.13.8, 2.14.2]
# python: [3.8, 3.9]
# exclude:
# - ansible: 2.9.26
# python: 3.9
# steps:
# - name: Set up Python 3.9
# uses: actions/setup-python@v1
# with:
# python-version: 3.9
#
# - name: Install ansible-base (v${{ matrix.ansible }})
# run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check
#
# - name: Download migrated collection artifacts
# uses: actions/download-artifact@v1
# with:
# name: collection
# path: .cache/collection-tarballs
#
# - name: Install the collection tarball
# run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
#
# - name: Run sanity tests
# run: ansible-test sanity --docker --python ${{matrix.python}} -v --color --truncate 0
# working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/dcnm
#
#
# unit-tests:
# name: Run DCNM Unit Tests
# needs:
# - build
# runs-on: ubuntu-latest
# strategy:
# matrix:
# ansible: [2.9.26, 2.10.17, 2.11.12, 2.12.10, 2.13.8, 2.14.2]
# steps:
# - name: Set up Python 3.9
# uses: actions/setup-python@v1
# with:
# python-version: 3.9
#
# - name: Install ansible-base (v${{ matrix.ansible }})
# run: pip install https://github.com/ansible/ansible/archive/v${{ matrix.ansible }}.tar.gz --disable-pip-version-check
#
# - name: Install coverage (v4.5.4)
# run: pip install coverage==4.5.4
#
# - name: Install pytest (v5.4.1)
# run: pip install pytest==5.4.1
#
# - name: Download migrated collection artifacts
# uses: actions/download-artifact@v1
# with:
# name: collection
# path: .cache/collection-tarballs
#
# - name: Install the collection tarball
# run: ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
#
# - name: Run DCNM Unit tests
# run: coverage run --source=. -m pytest tests/unit/modules/dcnm/. -vvvv
# working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/dcnm
# env:
# PYTHONPATH: /home/runner/.ansible/collections
#
# - name: Generate coverage report
# run: coverage report
# working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/dcnm
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.1.29] - 2023-08-23

### Added
* Support to configure 29 multiple interfaces for vrf_lite on a vrf
* Added support for more switch roles in inventory module.
* Change 3

### Fixed
* https://github.com/CiscoDevNet/ansible-dcnm/issues/204
* https://github.com/CiscoDevNet/ansible-dcnm/issues/205
* https://github.com/CiscoDevNet/ansible-dcnm/issues/206
* Removed the restriction on netcommon version supported by DCNM collection. The restriction was introduced as fix for CiscoDevNet#209. Netcommon versions >=2.6.1 is supported.

## [2.1.28] - 2023-08-23

### Added
Expand Down Expand Up @@ -401,6 +414,7 @@ The Ansible Cisco Data Center Network Manager (DCNM) collection includes modules
* cisco.dcnm.dcnm_network - Add and remove Networks from a DCNM managed VXLAN fabric.
* cisco.dcnm.dcnm_interface - DCNM Ansible Module for managing interfaces.
[2.1.29]: https://github.com/CiscoDevNet/ansible-dcnm/compare/2.1.28...2.1.29
[2.1.28]: https://github.com/CiscoDevNet/ansible-dcnm/compare/9.50.90...2.1.28
[9.50.90]: https://github.com/CiscoDevNet/ansible-dcnm/compare/9.50.80...9.50.90
[9.50.80]: https://github.com/CiscoDevNet/ansible-dcnm/compare/9.50.70...9.50.80
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ You can also include it in a `requirements.yml` file and install it with `ansibl
---
collections:
- name: cisco.dcnm
version: 2.1.28
version: 2.1.29
```
## Using this collection
Expand Down
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: mikewiebe
name: test_ci_publish
version: 2.1.28
version: 2.1.29
readme: README.md
authors:
- Shrishail Kariyappanavar <nkshrishail>
Expand Down
6 changes: 3 additions & 3 deletions releaseinfo.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: "2.1.28"
release_title: "NDFC collection Version 2.1.28"
version: "2.1.29"
release_title: "NDFC collection Version 2.1.29"
release_desc: "Ansible NDFC Collection"
changes:
added:
- "Support to configure 28 multiple interfaces for vrf_lite on a vrf"
- "Support to configure 29 multiple interfaces for vrf_lite on a vrf"
- "Added support for more switch roles in inventory module."
- "Change 3"

Expand Down
34 changes: 17 additions & 17 deletions tests/integration/targets/dcnm_network/tests/dcnm/sanity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
- "query_result.response[1].parent.networkStatus is search('DEPLOYED')"
retries: 30
delay: 2
tags: sanity
#tags: sanity

- assert:
that:
Expand Down Expand Up @@ -118,7 +118,7 @@
deploy: true
# delete the second network
register: result
tags: sanity
#tags: sanity

- name: SANITY- Query fabric state until networkStatus transitions to DEPLOYED state
cisco.dcnm.dcnm_network:
Expand All @@ -129,7 +129,7 @@
- "query_result.response[0].parent.networkStatus is search('DEPLOYED')"
retries: 30
delay: 2
tags: sanity
#tags: sanity

- assert:
that:
Expand All @@ -156,31 +156,31 @@
- 'result.diff[1].attach[0].deploy == false'
- '"{{ ansible_switch2 }}" in result.diff[1].attach[0].ip_address'
- 'result.diff[1].net_name == "ansible-net12"'
tags: sanity
#tags: sanity

- name: OVERRIDDEN - conf1 - Idempotence
cisco.dcnm.dcnm_network: *conf1
register: result
tags: sanity
#tags: sanity

- assert:
that:
- 'result.changed == false'
- 'result.response|length == 0'
tags: sanity
#tags: sanity

- name: SANITY- OVERRIDDEN - setup - remove any networks
cisco.dcnm.dcnm_network:
fabric: "{{ test_fabric }}"
state: deleted
tags: sanity
#tags: sanity


- name: SANITY- REPLACED - setup - Clean up any existing networks
cisco.dcnm.dcnm_network:
fabric: "{{ test_fabric }}"
state: deleted
tags: sanity
#tags: sanity

- name: SANITY- REPLACED - Create, Attach and Deploy Multiple Network with Single Switch Attach
cisco.dcnm.dcnm_network:
Expand Down Expand Up @@ -211,7 +211,7 @@
ports: ["{{ ansible_sw2_int5 }}", "{{ ansible_sw2_int6 }}"]
deploy: true
register: result
tags: sanity
#tags: sanity

- name: SANITY- Query fabric state until networkStatus transitions to DEPLOYED state
cisco.dcnm.dcnm_network:
Expand All @@ -223,7 +223,7 @@
- "query_result.response[1].parent.networkStatus is search('DEPLOYED')"
retries: 30
delay: 2
tags: sanity
#tags: sanity

- assert:
that:
Expand All @@ -244,7 +244,7 @@
- 'result.diff[1].net_name == "ansible-net12"'
- 'result.diff[1].net_id == 7002'
- 'result.diff[1].vrf_name == "Tenant-2"'
tags: sanity
#tags: sanity

##############################################
## REPLACED ##
Expand All @@ -271,7 +271,7 @@
gw_ip_subnet: '192.168.40.1/24'
deploy: true
register: result
tags: sanity
#tags: sanity

- name: Query fabric state until networkStatus transitions to NA state
cisco.dcnm.dcnm_network:
Expand All @@ -283,7 +283,7 @@
- "query_result.response[1].parent.networkStatus is search('NA')"
retries: 30
delay: 2
tags: sanity
#tags: sanity

- assert:
that:
Expand All @@ -301,21 +301,21 @@
- 'result.diff[1].attach[0].deploy == false'
- '"{{ ansible_switch2 }}" in result.diff[0].attach[0].ip_address'
- '"ansible-net13" or "ansible-net12" in result.diff[0].net_name'
tags: sanity
#tags: sanity

- name: SANITY - REPLACED - conf1 - Idempotence
cisco.dcnm.dcnm_network: *conf2
register: result
tags: sanity
#tags: sanity

- assert:
that:
- 'result.changed == false'
- 'result.response|length == 0'
tags: sanity
#tags: sanity

- name: SANITY - DELETED - setup - Clean up any existing networks
cisco.dcnm.dcnm_network:
fabric: "{{ test_fabric }}"
state: deleted
tags: sanity
#tags: sanity

0 comments on commit 485ac4a

Please sign in to comment.