Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

initial add of the ios_facts module #2586

Closed
wants to merge 1 commit into from
Closed

initial add of the ios_facts module #2586

wants to merge 1 commit into from

Conversation

privateip
Copy link
Contributor

This commit is the initial add of the ios_facts module. This module has a dependency on ansible/ansible PR 13357 and PR 13358 being merged

@gregdek
Copy link
Contributor

gregdek commented Dec 1, 2015

Putting into core review, since this is part of the new networking feature set.

@bcoca bcoca added this to the next milestone Dec 1, 2015
This commit adds the module doc strings to the ios_facts module
@ogenstad
Copy link
Contributor

ogenstad commented Dec 7, 2015

I've done some testing and I'm seeing some issues with the do_vlans, do_routing, do_interfaces functions. Basically you can't switch them off. Though I'm not quite sure the problem comes from this module.

Looking at this function module.params['include_interfaces'] always evaluates to True.
def do_interfaces(module):
if module.params['include_interfaces']:
return ('interfaces', 'show interfaces')

I think it's some issue with the boolean lookup. Below is the output from a -vvv

{"module_args": {"include_interfaces": "false", "include_routing": "no", "include_vlans": "false"

I believe that the param gets set to "false" or "no" instead of False in Python and anything but False or None evaluates to True.

Let me know if you need any more information about this.

@ogenstad
Copy link
Contributor

ogenstad commented Dec 7, 2015

Another issue with this module is that I tested it against a Catalyst 2960 where the command to show vlans is "show vlan" instead of "show vlans". If I just remove the "s" it works.

However I think it would be better to have a module which can return structured data.

@privateip privateip closed this Jan 5, 2016
@privateip privateip deleted the module_ios_facts branch January 5, 2016 02:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants