diff options
42 files changed, 53 insertions, 149 deletions
| diff --git a/changelogs/fragments/add_symlinks_redirection.yml b/changelogs/fragments/add_symlinks_redirection.yml new file mode 100644 index 00000000..ced71e95 --- /dev/null +++ b/changelogs/fragments/add_symlinks_redirection.yml @@ -0,0 +1,3 @@ +--- +bugfixes: +  - Add symlink of modules under plugins/action diff --git a/docs/vyos.vyos.vyos_cliconf.rst b/docs/vyos.vyos.vyos_cliconf.rst index 9ad60af1..816f07ca 100644 --- a/docs/vyos.vyos.vyos_cliconf.rst +++ b/docs/vyos.vyos.vyos_cliconf.rst @@ -41,6 +41,7 @@ Parameters                      <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>                      <div style="font-size: small">                          <span style="color: purple">list</span> +                         / <span style="color: purple">elements=string</span>                      </div>                      <div style="font-style: italic; font-size: small; color: darkgreen">added in 2.0.0</div>                  </td> diff --git a/meta/runtime.yml b/meta/runtime.yml index 814c20bb..8bd9d884 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,143 +1,6 @@  ---  requires_ansible: ">=2.9.10"  plugin_routing: -  action: -    vyos_banner: -      redirect: vyos.vyos.vyos -    banner: -      redirect: vyos.vyos.vyos -    vyos_bgp_global: -      redirect: vyos.vyos.vyos -    bgp_global: -      redirect: vyos.vyos.vyos -    vyos_bgp_address_family: -      redirect: vyos.vyos.vyos -    bgp_address_family: -      redirect: vyos.vyos.vyos -    vyos_command: -      redirect: vyos.vyos.vyos -    command: -      redirect: vyos.vyos.vyos -    vyos_config: -      redirect: vyos.vyos.vyos -    config: -      redirect: vyos.vyos.vyos -    vyos_facts: -      redirect: vyos.vyos.vyos -    facts: -      redirect: vyos.vyos.vyos -    vyos_firewall_global: -      redirect: vyos.vyos.vyos -    firewall_global: -      redirect: vyos.vyos.vyos -    vyos_firewall_interfaces: -      redirect: vyos.vyos.vyos -    firewall_interfaces: -      redirect: vyos.vyos.vyos -    vyos_firewall_rules: -      redirect: vyos.vyos.vyos -    firewall_rules: -      redirect: vyos.vyos.vyos -    vyos_hostname: -      redirect: vyos.vyos.vyos -    hostname: -      redirect: vyos.vyos.vyos -    vyos_interface: -      redirect: vyos.vyos.vyos -    interface: -      redirect: vyos.vyos.vyos -    vyos_interfaces: -      redirect: vyos.vyos.vyos -    interfaces: -      redirect: vyos.vyos.vyos -    vyos_l3_interface: -      redirect: vyos.vyos.vyos -    l3_interface: -      redirect: vyos.vyos.vyos -    vyos_l3_interfaces: -      redirect: vyos.vyos.vyos -    l3_interfaces: -      redirect: vyos.vyos.vyos -    vyos_lag_interfaces: -      redirect: vyos.vyos.vyos -    lag_interfaces: -      redirect: vyos.vyos.vyos -    vyos_linkagg: -      redirect: vyos.vyos.vyos -    linkagg: -      redirect: vyos.vyos.vyos -    vyos_lldp: -      redirect: vyos.vyos.vyos -    lldp: -      redirect: vyos.vyos.vyos -    vyos_lldp_global: -      redirect: vyos.vyos.vyos -    lldp_global: -      redirect: vyos.vyos.vyos -    vyos_lldp_interface: -      redirect: vyos.vyos.vyos -    lldp_interface: -      redirect: vyos.vyos.vyos -    vyos_lldp_interfaces: -      redirect: vyos.vyos.vyos -    lldp_interfaces: -      redirect: vyos.vyos.vyos -    vyos_logging: -      redirect: vyos.vyos.vyos -    vyos_logging_global: -      redirect: vyos.vyos.vyos -    logging_global: -      redirect: vyos.vyos.vyos -    logging: -      redirect: vyos.vyos.vyos -    vyos_ntp_global: -      redirect: vyos.vyos.vyos -    ntp_global: -      redirect: vyos.vyos.vyos -    vyos_ospfv2: -      redirect: vyos.vyos.vyos -    ospfv2: -      redirect: vyos.vyos.vyos -    vyos_ospfv3: -      redirect: vyos.vyos.vyos -    ospfv3: -      redirect: vyos.vyos.vyos -    vyos_ospf_interfaces: -      redirect: vyos.vyos.vyos -    ospf_interfaces: -      redirect: vyos.vyos.vyos -    vyos_ping: -      redirect: vyos.vyos.vyos -    ping: -      redirect: vyos.vyos.vyos -    vyos_prefix_lists: -      redirect: vyos.vyos.vyos -    prefix_lists: -      redirect: vyos.vyos.vyos -    vyos_snmp_server: -      redirect: vyos.vyos.vyos -    snmp_server: -      redirect: vyos.vyos.vyos -    vyos_static_route: -      redirect: vyos.vyos.vyos -    static_route: -      redirect: vyos.vyos.vyos -    vyos_static_routes: -      redirect: vyos.vyos.vyos -    static_routes: -      redirect: vyos.vyos.vyos -    vyos_system: -      redirect: vyos.vyos.vyos -    system: -      redirect: vyos.vyos.vyos -    vyos_user: -      redirect: vyos.vyos.vyos -    user: -      redirect: vyos.vyos.vyos -    vyos_vlan: -      redirect: vyos.vyos.vyos -    vlan: -      redirect: vyos.vyos.vyos    modules:      banner:        redirect: vyos.vyos.vyos_banner diff --git a/plugins/action/banner.py b/plugins/action/banner.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/banner.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/bgp_address_family.py b/plugins/action/bgp_address_family.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/bgp_address_family.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/bgp_global.py b/plugins/action/bgp_global.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/bgp_global.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/command.py b/plugins/action/command.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/command.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/config.py b/plugins/action/config.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/config.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/facts.py b/plugins/action/facts.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/facts.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/firewall_global.py b/plugins/action/firewall_global.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/firewall_global.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/firewall_interfaces.py b/plugins/action/firewall_interfaces.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/firewall_interfaces.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/firewall_rules.py b/plugins/action/firewall_rules.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/firewall_rules.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/hostname.py b/plugins/action/hostname.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/hostname.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/interface.py b/plugins/action/interface.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/interface.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/interfaces.py b/plugins/action/interfaces.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/interfaces.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/l3_interface.py b/plugins/action/l3_interface.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/l3_interface.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/l3_interfaces.py b/plugins/action/l3_interfaces.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/l3_interfaces.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/lag_interfaces.py b/plugins/action/lag_interfaces.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/lag_interfaces.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/linkagg.py b/plugins/action/linkagg.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/linkagg.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/lldp.py b/plugins/action/lldp.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/lldp.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/lldp_global.py b/plugins/action/lldp_global.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/lldp_global.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/lldp_interface.py b/plugins/action/lldp_interface.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/lldp_interface.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/lldp_interfaces.py b/plugins/action/lldp_interfaces.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/lldp_interfaces.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/logging.py b/plugins/action/logging.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/logging.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/logging_global.py b/plugins/action/logging_global.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/logging_global.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/ntp_global.py b/plugins/action/ntp_global.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/ntp_global.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/ospf_interfaces.py b/plugins/action/ospf_interfaces.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/ospf_interfaces.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/ospfv2.py b/plugins/action/ospfv2.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/ospfv2.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/ospfv3.py b/plugins/action/ospfv3.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/ospfv3.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/ping.py b/plugins/action/ping.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/ping.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/prefix_lists.py b/plugins/action/prefix_lists.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/prefix_lists.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/route_maps.py b/plugins/action/route_maps.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/route_maps.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/snmp_server.py b/plugins/action/snmp_server.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/snmp_server.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/static_route.py b/plugins/action/static_route.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/static_route.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/static_routes.py b/plugins/action/static_routes.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/static_routes.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/system.py b/plugins/action/system.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/system.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/user.py b/plugins/action/user.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/user.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/action/vlan.py b/plugins/action/vlan.py new file mode 120000 index 00000000..331a791f --- /dev/null +++ b/plugins/action/vlan.py @@ -0,0 +1 @@ +vyos.py
\ No newline at end of file diff --git a/plugins/cliconf/vyos.py b/plugins/cliconf/vyos.py index b100ce01..b1a55b1c 100644 --- a/plugins/cliconf/vyos.py +++ b/plugins/cliconf/vyos.py @@ -36,6 +36,7 @@ options:        to the device is present in this list, the existing cache is invalidated.      version_added: 2.0.0      type: list +    elements: str      default: []      vars:      - name: ansible_vyos_config_commands diff --git a/plugins/terminal/vyos.py b/plugins/terminal/vyos.py index 0b5e74b3..850e5283 100644 --- a/plugins/terminal/vyos.py +++ b/plugins/terminal/vyos.py @@ -30,28 +30,28 @@ from ansible.errors import AnsibleConnectionFailure  class TerminalModule(TerminalBase):      terminal_stdout_re = [ -        re.compile(br"[\r\n]?[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"), -        re.compile(br"\@[\w\-\.]+:\S+?[>#\$] ?$"), +        re.compile(rb"[\r\n]?[\w+\-\.:\/\[\]]+(?:\([^\)]+\)){,3}(?:>|#) ?$"), +        re.compile(rb"\@[\w\-\.]+:\S+?[>#\$] ?$"),      ]      terminal_stderr_re = [ -        re.compile(br"\n\s*Invalid command:"), -        re.compile(br"\nCommit failed"), -        re.compile(br"\n\s+Set failed"), -        re.compile(br"\n\s+Delete failed"), +        re.compile(rb"\n\s*Invalid command:"), +        re.compile(rb"\nCommit failed"), +        re.compile(rb"\n\s+Set failed"), +        re.compile(rb"\n\s+Delete failed"),      ]      ansi_re = TerminalBase.ansi_re + [          # Color codes -        re.compile(br"\x1b\[(\d+(;\d+)*)?m"), +        re.compile(rb"\x1b\[(\d+(;\d+)*)?m"),          # Clear line (CSI K) -        re.compile(br"\x1b\[K"), +        re.compile(rb"\x1b\[K"),          # Xterm change cursor mode (CSI ? 1 [h|l]) -        re.compile(br"\x1b\[\?1(h|l)"), +        re.compile(rb"\x1b\[\?1(h|l)"),          # Xterm change keypad (ESC [=|>]) -        re.compile(br"\x1b(=|>)"), +        re.compile(rb"\x1b(=|>)"),          # Xterm window title string (OSC <title string> BEL) -        re.compile(br"\x1b]0;[^\x07]*\x07"), +        re.compile(rb"\x1b]0;[^\x07]*\x07"),      ]      terminal_config_prompt = re.compile(r"^.+#$") diff --git a/test-requirements.txt b/test-requirements.txt index aa3427d6..5baa1387 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,4 @@ -black==21.12b0 ; python_version > '3.5' +black==22.3.0 ; python_version > '3.5'  flake8  mock  pexpect diff --git a/tests/sanity/ignore-2.14.txt b/tests/sanity/ignore-2.14.txt new file mode 100644 index 00000000..c835eef8 --- /dev/null +++ b/tests/sanity/ignore-2.14.txt @@ -0,0 +1 @@ +plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local` | 
