Skip to content

Commit

Permalink
Merge pull request #83 from CiscoDevNet/1.2.0
Browse files Browse the repository at this point in the history
1.2.0 Release
  • Loading branch information
praveenramoorthy authored Jul 15, 2021
2 parents 735248f + cea03be commit 79fcc03
Show file tree
Hide file tree
Showing 20 changed files with 2,745 additions and 949 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [1.2.0] - 2021-07

### Added

* cisco.dcnm.dcnm_network:
* New parameter `is_l2only:`
* New parameter `vlan_name:`
* New parameter `int_desc:`
* New parameter `mtu_l3intf:`
* New parameter `arp_suppress:`
* New parameter `dhcp_srvr1_ip:`
* New parameter `dhcp_srvr1_vrf:`
* New parameter `dhcp_srvr2_ip:`
* New parameter `dhcp_srvr2_vrf:`
* New parameter `dhcp_srvr3_ip:`
* New parameter `dhcp_srvr3_vrf:`

## [1.1.1] - 2021-05

### Fixed
Expand Down Expand Up @@ -78,6 +95,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.
[1.2.0]: https://github.com/CiscoDevNet/ansible-dcnm/compare/1.1.1...1.2.0
[1.1.1]: https://github.com/CiscoDevNet/ansible-dcnm/compare/1.1.0...1.1.1
[1.1.0]: https://github.com/CiscoDevNet/ansible-dcnm/compare/1.0.0...1.1.0
[1.0.0]: https://github.com/CiscoDevNet/ansible-dcnm/compare/0.9.0...1.0.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ You can also include it in a `requirements.yml` file and install it with `ansibl
---
collections:
- name: cisco.dcnm
version: 1.1.1
version: 1.2.0
```
## Using this collection
Expand Down
185 changes: 184 additions & 1 deletion docs/cisco.dcnm.dcnm_network_module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,26 @@ Parameters
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>arp_suppress</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
<li>yes</li>
</ul>
</td>
<td>
<div>ARP suppression</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>attach</b>
Expand Down Expand Up @@ -146,6 +166,102 @@ Parameters
<div>Global knob to control whether to deploy the attachment</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>dhcp_srvr1_ip</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">ipv4</span>
</div>
</td>
<td>
</td>
<td>
<div>DHCP relay IP address of the first DHCP server</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>dhcp_srvr1_vrf</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>VRF ID of first DHCP server</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>dhcp_srvr2_ip</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">ipv4</span>
</div>
</td>
<td>
</td>
<td>
<div>DHCP relay IP address of the second DHCP server</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>dhcp_srvr2_vrf</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>VRF ID of second DHCP server</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>dhcp_srvr3_ip</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">ipv4</span>
</div>
</td>
<td>
</td>
<td>
<div>DHCP relay IP address of the third DHCP server</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>dhcp_srvr3_vrf</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>VRF ID of third DHCP server</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
Expand All @@ -162,6 +278,58 @@ Parameters
<div>Gateway with subnet for the network</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>int_desc</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Description for the interface</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>is_l2only</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">boolean</span>
</div>
</td>
<td>
<ul style="margin: 0; padding: 0"><b>Choices:</b>
<li><div style="color: blue"><b>no</b>&nbsp;&larr;</div></li>
<li>yes</li>
</ul>
</td>
<td>
<div>Layer 2 only network</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>mtu_l3intf</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">integer</span>
</div>
</td>
<td>
</td>
<td>
<div>MTU for Layer 3 interfaces</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
Expand Down Expand Up @@ -262,6 +430,22 @@ Parameters
<div>VLAN ID for the network</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
<div class="ansibleOptionAnchor" id="parameter-"></div>
<b>vlan_name</b>
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
</div>
</td>
<td>
</td>
<td>
<div>Name of the vlan configured</div>
</td>
</tr>
<tr>
<td class="elbow-placeholder"></td>
<td colspan="2">
Expand All @@ -270,7 +454,6 @@ Parameters
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
<div style="font-size: small">
<span style="color: purple">string</span>
/ <span style="color: red">required</span>
</div>
</td>
<td>
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: cisco
name: dcnm
version: 1.1.1
version: 1.2.0
readme: README.md
authors:
- Shrishail Kariyappanavar <nkshrishail>
Expand Down
24 changes: 10 additions & 14 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
---
requires_ansible: '>=2.9.10,<2.11'
plugin_routing:
action:
dcnm_inventory:
redirect: cisco.dcnm.dcnm
dcnm_interface:
redirect: cisco.dcnm.dcnm
dcnm_network:
redirect: cisco.dcnm.dcnm
dcnm_vrf:
redirect: cisco.dcnm.dcnm
dcnm_rest:
redirect: cisco.dcnm.dcnm
# This file is used to redirect to a default action plugin if needed.
# The example below demonstrates how running the dcnm_inventory module
# will redirect to a common action plugin called cisco.dcnm.dcnm
#
#---
#requires_ansible: '>=2.9.10,<2.11'
#plugin_routing:
# action:
# dcnm_inventory:
# redirect: cisco.dcnm.dcnm
23 changes: 7 additions & 16 deletions plugins/action/dcnm_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,10 @@

__metaclass__ = type

import copy
import re
import sys

from ansible_collections.ansible.netcommon.plugins.action.network import (
ActionModule as ActionNetworkModule,
)
from ansible.module_utils.connection import Connection
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
load_provider,
)
from ansible.utils.display import Display
from pprint import pprint


class ActionModule(ActionNetworkModule):
def run(self, tmp=None, task_vars=None):
Expand All @@ -51,21 +42,21 @@ def run(self, tmp=None, task_vars=None):
msg = " !!! Switches included in playbook profiles must be individual items, but given switch element = {} is a list ".format(sw)
warnings.append(msg)
flattened = True
flat_sw_list.extend (sw)
flat_sw_list.extend(sw)
if (flattened is True):
cfg['switch'] = flat_sw_list
cfg['switch'] = flat_sw_list

keys = cfg.keys()

for k in keys:

if (('profile' in k) and (k != 'profile')):
msg = " !!! Profile name included in playbook tasks must be 'profile', but given profile name = '{}' ".format(k)
warnings.append(msg)
pop_key = k
pop_key = k

if (pop_key != ''):
cfg['profile'] = cfg[pop_key]
cfg['profile'] = cfg[pop_key]
cfg.pop(pop_key)

self.result = super(ActionModule, self).run(task_vars=task_vars)
Expand Down
8 changes: 0 additions & 8 deletions plugins/action/dcnm_inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,9 @@

__metaclass__ = type

import copy
import re
import sys

from ansible_collections.ansible.netcommon.plugins.action.network import (
ActionModule as ActionNetworkModule,
)
from ansible.module_utils.connection import Connection
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
load_provider,
)
from ansible.utils.display import Display

display = Display()
Expand Down
11 changes: 1 addition & 10 deletions plugins/action/dcnm_vrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,14 @@

__metaclass__ = type

import copy
import re
import sys

from ansible_collections.ansible.netcommon.plugins.action.network import (
ActionModule as ActionNetworkModule,
)
from ansible.module_utils.connection import Connection
from ansible_collections.ansible.netcommon.plugins.module_utils.network.common.utils import (
load_provider,
)
from ansible.utils.display import Display

display = Display()


class ActionModule(ActionNetworkModule):
def run(self, tmp=None, task_vars=None):

Expand All @@ -45,5 +38,3 @@ def run(self, tmp=None, task_vars=None):

self.result = super(ActionModule, self).run(task_vars=task_vars)
return self.result


Loading

0 comments on commit 79fcc03

Please sign in to comment.