pycsco
pycsco copied to clipboard
adding support for vlanmode per issue #15
Implementing support to return current vlan mode, see issue https://github.com/jedelman8/pycsco/issues/15
Hi, as i understand CE is default mode for vlan and if fabric feature not installed or not enabled - 'mode' option even is not available for setting and can raise an error.
get_vlan() will return the current vlan mode regardless of whether fabricpath is enabled or not. See response from NXAPI sandbox with no fabricpath:
{ "jsonrpc": "2.0", "result": { "body": { "vlanshowrspan-vlantype": "notrspan", "is-vtp-manageable": "enabled", "TABLE_vlanbriefid": { "ROW_vlanbriefid": { "vlanshowbr-vlanid": 15, "vlanshowbr-vlanid-utf": 15, "vlanshowbr-vlanname": "test15", "vlanshowbr-vlanstate": "active", "vlanshowbr-shutstate": "noshutdown", "vlanshowplist-ifidx": "Ethernet1/4" } }, "TABLE_mtuinfoid": { "ROW_mtuinfoid": { "vlanshowinfo-vlanid": 15, "vlanshowinfo-media-type": "enet", "vlanshowinfo-vlanmode": "ce-vlan" } } }
For the module the mode argument is not mandatory so I see no problem with that.
ok, i missed, i thought about setting vlan mode, but already found it in other pull request https://github.com/jedelman8/nxos-ansible/pull/29/files