arista-eosplus/ansible-eos — pull request #7 by rsolomo (2014-09-17 21:38:21+00:00)
Title: updated eos_switchport trunk_allowed_vlans to not cast None

This PR is intended to resolve the following:

When I run a plain Ansible task similar to this:

```yml
tasks:
- name: expected to do nothing
eos_switchport:
name: Ethernet5
eapi_username: "{{ eapi_username }}"
eapi_password: "{{ eapi_password }}"
eapi_hostname: "{{ inventory_hostname }}"
register: results

- debug:
var: results.commands
```

Trunk switchports have their allowed vlans set to none, instead of taking no action.

Here is the pre-run output of `show interfaces Ethernet5 switchport`.

```
Name: Et5
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
MAC Address Learning: enabled
Access Mode VLAN: 30 (VLAN0030)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: disabled
Administrative private VLAN mapping: ALL
Trunking VLANs Enabled: 10,100
Trunk Groups:
```

And post run output:

```
Name: Et5
Switchport: Enabled
Administrative Mode: trunk
Operational Mode: trunk
MAC Address Learning: enabled
Access Mode VLAN: 30 (VLAN0030)
Trunking Native Mode VLAN: 1 (default)
Administrative Native VLAN tagging: disabled
Administrative private VLAN mapping: ALL
Trunking VLANs Enabled: NONE
Trunk Groups:
```

Finally, here is part of the debug task output:

```
"results.commands": [
{
"cmd": "enable",
"input": ""
},
"enable",
"configure",
"interface Ethernet5",
"switchport trunk allowed vlan None"
]
```

Let me know if there are any questions or concerns. Thanks!