mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
* nxos_bfd_global: initial commit This is an initial POC with just a few commands included. The code has been written somewhat generically so that it can act as a best practices template for re-use in future modules. The implementation follows the yaml cmd_ref style to define each command's getter/setter/type/default. It supports platform-specific defaults. The basic logic is to collect all relevant data in a `cmd_ref` dict and pass that around to various methods. In the BFD case the devices don't provide JSON output so we have to screen-scrape with show runs. BFD does not support present/absent states so there is no state param. BFD has three different property types to handle. We can add add'l types as needed: - int - int_list (list of ints) - str (needs support for 'no' keyword) * Use get_capabilities to find platform type * PR comment fixes, round 1 * Minor cleanups * nxos_bfd_global: create NxosCmdRef in module_utils This commit just takes the latest bfd global code and moves the bulk of the code into new `class NxosCmdRef` in `module_utils/nxos/nxos.py`. The only remaining code in `nxos_bfd_global.py` are the calls from `main()`. * Add remaining command properties and documentation * update argument_spec * Add check for _exclude; add sanity test * Add targets files for bfd * Context and state absent updates * Add dict support to cmd_ref * Changed remaining list commands to dict usage * Add idempotence check for dict * Fix existing overwrite bug * Move pattern matching logic into its own method * add support for 'command: absent' * Add `get_platform_shortname`; update BFD platform-specific settings * /absent/deleted/ * /sh/show/ in prepare_nxos_tests * add dict check to get_platform_shortname * Add normalize_defaults() * UTs for bfd_global * support yaml for both py2/py3 * update cmd_ref doc header * Fix python2.6 incompatibility with dict comprehensions * Fix bfd_global doc header (yaml syntax fail) * more shippable fixes * yet more shippable fixes * shippable: remove r' ' wrappers * docfix - remove ':' * escape regex ctl chars in yaml table * remove extra blank lines * Fix str(None) issue * Command context updates * import PY2,PY3 instead of import sys * fix ordereddict import & parent_context * try/except for yaml import * fix import issue for ordereddict * remove epdb * nxosCmdRef_import_check() workaround for shippable * fix PEP ws errors |
7 years ago | |
|---|---|---|
| .. | ||
| aireos | 7 years ago | |
| aruba | 7 years ago | |
| asa | 7 years ago | |
| basics | 9 years ago | |
| checkpoint | 7 years ago | |
| cli | 7 years ago | |
| cloudvision | 7 years ago | |
| cnos | 7 years ago | |
| cumulus | 8 years ago | |
| dellos6 | 7 years ago | |
| dellos9 | 7 years ago | |
| dellos10 | 7 years ago | |
| edgeos | 7 years ago | |
| edgeswitch | 7 years ago | |
| enos | 7 years ago | |
| eos | 7 years ago | |
| exos | 7 years ago | |
| f5 | 7 years ago | |
| fortimanager | 7 years ago | |
| frr | 7 years ago | |
| ftd | 7 years ago | |
| ingate | 7 years ago | |
| ios | 7 years ago | |
| iosxr | 7 years ago | |
| ironware | 7 years ago | |
| itential | 7 years ago | |
| junos | 7 years ago | |
| netact | 7 years ago | |
| netscaler | 7 years ago | |
| netvisor | 7 years ago | |
| nos | 7 years ago | |
| nso | 7 years ago | |
| nuage | 7 years ago | |
| nxos | 7 years ago | |
| onyx | 7 years ago | |
| opx | 7 years ago | |
| ovs | 7 years ago | |
| radware | 7 years ago | |
| routeros | 7 years ago | |
| slxos | 7 years ago | |
| voss | 7 years ago | |
| vyos | 7 years ago | |
| __init__.py | 9 years ago | |