summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathaniel Case <this.is@nathanielca.se>2021-02-22 15:29:16 -0500
committerGitHub <noreply@github.com>2021-02-22 20:29:16 +0000
commitb24d755f5a45e9a6305c9705411d1a64a12b812e (patch)
tree2bb9c369c9869cac0a756a9c8aee49515d6c7342
parentea481d755414ee3390a2ff5792be9c67896fa567 (diff)
downloadvyos.vyos-b24d755f5a45e9a6305c9705411d1a64a12b812e.tar.gz
vyos.vyos-b24d755f5a45e9a6305c9705411d1a64a12b812e.zip
Subsequent calls to get_capabilities are duplicating entries in `rpc`. (#122)
Subsequent calls to get_capabilities are duplicating entries in `rpc`. Reviewed-by: https://github.com/apps/ansible-zuul
-rw-r--r--README.md8
-rw-r--r--changelogs/fragments/.keep0
-rw-r--r--changelogs/fragments/122-rpc-unbloat.yaml3
-rw-r--r--docs/vyos.vyos.vyos_banner_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_command_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_config_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_facts_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_firewall_global_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_firewall_interfaces_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_firewall_rules_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_interface_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_interfaces_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_l3_interface_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_l3_interfaces_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_lag_interfaces_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_linkagg_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_lldp_global_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_lldp_interface_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_lldp_interfaces_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_lldp_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_logging_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_ospf_interfaces_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_ospfv2_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_ospfv3_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_ping_module.rst4
-rw-r--r--docs/vyos.vyos.vyos_static_route_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_static_routes_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_system_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_user_module.rst2
-rw-r--r--docs/vyos.vyos.vyos_vlan_module.rst2
-rw-r--r--plugins/cliconf/vyos.py13
31 files changed, 42 insertions, 38 deletions
diff --git a/README.md b/README.md
index 2a63d7d..2bd4565 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,10 @@ Name | Description
Name | Description
--- | ---
+### Inventory plugins
+Name | Description
+--- | ---
+
### Modules
Name | Description
--- | ---
@@ -64,10 +68,6 @@ Name | Description
[vyos.vyos.vyos_user](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_user_module.rst)|Manage the collection of local users on VyOS device
[vyos.vyos.vyos_vlan](https://github.com/ansible-collections/vyos.vyos/blob/main/docs/vyos.vyos.vyos_vlan_module.rst)|Manage VLANs on VyOS network devices
-### Inventory plugins
-Name | Description
---- | ---
-
<!--end collection content-->
Click the ``Content`` button to see the list of content included in this collection.
diff --git a/changelogs/fragments/.keep b/changelogs/fragments/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/changelogs/fragments/.keep
diff --git a/changelogs/fragments/122-rpc-unbloat.yaml b/changelogs/fragments/122-rpc-unbloat.yaml
new file mode 100644
index 0000000..0bee3e8
--- /dev/null
+++ b/changelogs/fragments/122-rpc-unbloat.yaml
@@ -0,0 +1,3 @@
+---
+bugfixes:
+ - cliconf plugin - Prevent `get_capabilities()` from getting larger every time it is called
diff --git a/docs/vyos.vyos.vyos_banner_module.rst b/docs/vyos.vyos.vyos_banner_module.rst
index 8e14ce3..d046cc4 100644
--- a/docs/vyos.vyos.vyos_banner_module.rst
+++ b/docs/vyos.vyos.vyos_banner_module.rst
@@ -220,7 +220,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: configure the pre-login banner
vyos.vyos.vyos_banner:
diff --git a/docs/vyos.vyos.vyos_command_module.rst b/docs/vyos.vyos.vyos_command_module.rst
index 41041bc..36ae764 100644
--- a/docs/vyos.vyos.vyos_command_module.rst
+++ b/docs/vyos.vyos.vyos_command_module.rst
@@ -255,7 +255,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: show configuration on ethernet devices eth0 and eth1
vyos.vyos.vyos_command:
diff --git a/docs/vyos.vyos.vyos_config_module.rst b/docs/vyos.vyos.vyos_config_module.rst
index 0914d8e..d6f2f6b 100644
--- a/docs/vyos.vyos.vyos_config_module.rst
+++ b/docs/vyos.vyos.vyos_config_module.rst
@@ -333,7 +333,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: configure the remote device
vyos.vyos.vyos_config:
diff --git a/docs/vyos.vyos.vyos_facts_module.rst b/docs/vyos.vyos.vyos_facts_module.rst
index d285864..3177888 100644
--- a/docs/vyos.vyos.vyos_facts_module.rst
+++ b/docs/vyos.vyos.vyos_facts_module.rst
@@ -199,7 +199,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Gather all facts
- vyos.vyos.vyos_facts:
diff --git a/docs/vyos.vyos.vyos_firewall_global_module.rst b/docs/vyos.vyos.vyos_firewall_global_module.rst
index 30f7ecf..b37cf02 100644
--- a/docs/vyos.vyos.vyos_firewall_global_module.rst
+++ b/docs/vyos.vyos.vyos_firewall_global_module.rst
@@ -783,7 +783,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using merged
#
diff --git a/docs/vyos.vyos.vyos_firewall_interfaces_module.rst b/docs/vyos.vyos.vyos_firewall_interfaces_module.rst
index 7c55b04..8a18fc6 100644
--- a/docs/vyos.vyos.vyos_firewall_interfaces_module.rst
+++ b/docs/vyos.vyos.vyos_firewall_interfaces_module.rst
@@ -216,7 +216,7 @@ Parameters
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using merged
#
diff --git a/docs/vyos.vyos.vyos_firewall_rules_module.rst b/docs/vyos.vyos.vyos_firewall_rules_module.rst
index 15073b1..cebe64c 100644
--- a/docs/vyos.vyos.vyos_firewall_rules_module.rst
+++ b/docs/vyos.vyos.vyos_firewall_rules_module.rst
@@ -1327,7 +1327,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using deleted to delete firewall rules based on rule-set name
#
diff --git a/docs/vyos.vyos.vyos_interface_module.rst b/docs/vyos.vyos.vyos_interface_module.rst
index 111ff31..46af72d 100644
--- a/docs/vyos.vyos.vyos_interface_module.rst
+++ b/docs/vyos.vyos.vyos_interface_module.rst
@@ -572,7 +572,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: configure interface
vyos.vyos.vyos_interface:
diff --git a/docs/vyos.vyos.vyos_interfaces_module.rst b/docs/vyos.vyos.vyos_interfaces_module.rst
index 5bf5d23..52ae1cc 100644
--- a/docs/vyos.vyos.vyos_interfaces_module.rst
+++ b/docs/vyos.vyos.vyos_interfaces_module.rst
@@ -319,7 +319,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using merged
#
diff --git a/docs/vyos.vyos.vyos_l3_interface_module.rst b/docs/vyos.vyos.vyos_l3_interface_module.rst
index a8fe604..8c76dcb 100644
--- a/docs/vyos.vyos.vyos_l3_interface_module.rst
+++ b/docs/vyos.vyos.vyos_l3_interface_module.rst
@@ -322,7 +322,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: Set eth0 IPv4 address
vyos.vyos.vyos_l3_interface:
diff --git a/docs/vyos.vyos.vyos_l3_interfaces_module.rst b/docs/vyos.vyos.vyos_l3_interfaces_module.rst
index 38dd3e9..94b3d58 100644
--- a/docs/vyos.vyos.vyos_l3_interfaces_module.rst
+++ b/docs/vyos.vyos.vyos_l3_interfaces_module.rst
@@ -303,7 +303,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using merged
#
diff --git a/docs/vyos.vyos.vyos_lag_interfaces_module.rst b/docs/vyos.vyos.vyos_lag_interfaces_module.rst
index 153e20e..52da867 100644
--- a/docs/vyos.vyos.vyos_lag_interfaces_module.rst
+++ b/docs/vyos.vyos.vyos_lag_interfaces_module.rst
@@ -273,7 +273,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using merged
#
diff --git a/docs/vyos.vyos.vyos_linkagg_module.rst b/docs/vyos.vyos.vyos_linkagg_module.rst
index ae7eea7..f7586d6 100644
--- a/docs/vyos.vyos.vyos_linkagg_module.rst
+++ b/docs/vyos.vyos.vyos_linkagg_module.rst
@@ -348,7 +348,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: configure link aggregation group
vyos.vyos.vyos_linkagg:
diff --git a/docs/vyos.vyos.vyos_lldp_global_module.rst b/docs/vyos.vyos.vyos_lldp_global_module.rst
index 9224421..851ed20 100644
--- a/docs/vyos.vyos.vyos_lldp_global_module.rst
+++ b/docs/vyos.vyos.vyos_lldp_global_module.rst
@@ -180,7 +180,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using merged
#
diff --git a/docs/vyos.vyos.vyos_lldp_interface_module.rst b/docs/vyos.vyos.vyos_lldp_interface_module.rst
index 1c860e7..0103664 100644
--- a/docs/vyos.vyos.vyos_lldp_interface_module.rst
+++ b/docs/vyos.vyos.vyos_lldp_interface_module.rst
@@ -264,7 +264,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: Enable LLDP on eth1
net_lldp_interface:
diff --git a/docs/vyos.vyos.vyos_lldp_interfaces_module.rst b/docs/vyos.vyos.vyos_lldp_interfaces_module.rst
index c5ea47b..030cd73 100644
--- a/docs/vyos.vyos.vyos_lldp_interfaces_module.rst
+++ b/docs/vyos.vyos.vyos_lldp_interfaces_module.rst
@@ -370,7 +370,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using merged
#
diff --git a/docs/vyos.vyos.vyos_lldp_module.rst b/docs/vyos.vyos.vyos_lldp_module.rst
index 92aa732..88d0211 100644
--- a/docs/vyos.vyos.vyos_lldp_module.rst
+++ b/docs/vyos.vyos.vyos_lldp_module.rst
@@ -209,7 +209,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: Enable LLDP service
vyos.vyos.vyos_lldp:
diff --git a/docs/vyos.vyos.vyos_logging_module.rst b/docs/vyos.vyos.vyos_logging_module.rst
index f651b7a..9cb024d 100644
--- a/docs/vyos.vyos.vyos_logging_module.rst
+++ b/docs/vyos.vyos.vyos_logging_module.rst
@@ -360,7 +360,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: configure console logging
vyos.vyos.vyos_logging:
diff --git a/docs/vyos.vyos.vyos_ospf_interfaces_module.rst b/docs/vyos.vyos.vyos_ospf_interfaces_module.rst
index 141c0cf..0417088 100644
--- a/docs/vyos.vyos.vyos_ospf_interfaces_module.rst
+++ b/docs/vyos.vyos.vyos_ospf_interfaces_module.rst
@@ -461,7 +461,7 @@ Parameters
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using merged
#
diff --git a/docs/vyos.vyos.vyos_ospfv2_module.rst b/docs/vyos.vyos.vyos_ospfv2_module.rst
index 50ed5d3..9433538 100644
--- a/docs/vyos.vyos.vyos_ospfv2_module.rst
+++ b/docs/vyos.vyos.vyos_ospfv2_module.rst
@@ -1649,7 +1649,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using merged
#
diff --git a/docs/vyos.vyos.vyos_ospfv3_module.rst b/docs/vyos.vyos.vyos_ospfv3_module.rst
index d1ee1b1..568dbab 100644
--- a/docs/vyos.vyos.vyos_ospfv3_module.rst
+++ b/docs/vyos.vyos.vyos_ospfv3_module.rst
@@ -348,7 +348,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using merged
#
diff --git a/docs/vyos.vyos.vyos_ping_module.rst b/docs/vyos.vyos.vyos_ping_module.rst
index e3377fc..f9c4a68 100644
--- a/docs/vyos.vyos.vyos_ping_module.rst
+++ b/docs/vyos.vyos.vyos_ping_module.rst
@@ -284,7 +284,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: Test reachability to 10.10.10.10
vyos.vyos.vyos_ping:
@@ -405,7 +405,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late
<div>The round trip time (RTT) stats.</div>
<br/>
<div style="font-size: smaller"><b>Sample:</b></div>
- <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">AnsibleMapping([(&#x27;avg&#x27;, 2), (&#x27;max&#x27;, 8), (&#x27;min&#x27;, 1), (&#x27;mdev&#x27;, 24)])</div>
+ <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{&#x27;avg&#x27;: 2, &#x27;max&#x27;: 8, &#x27;min&#x27;: 1, &#x27;mdev&#x27;: 24}</div>
</td>
</tr>
</table>
diff --git a/docs/vyos.vyos.vyos_static_route_module.rst b/docs/vyos.vyos.vyos_static_route_module.rst
index 74f296d..69afb56 100644
--- a/docs/vyos.vyos.vyos_static_route_module.rst
+++ b/docs/vyos.vyos.vyos_static_route_module.rst
@@ -354,7 +354,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: configure static route
vyos.vyos.vyos_static_route:
diff --git a/docs/vyos.vyos.vyos_static_routes_module.rst b/docs/vyos.vyos.vyos_static_routes_module.rst
index 53942a5..5a6884b 100644
--- a/docs/vyos.vyos.vyos_static_routes_module.rst
+++ b/docs/vyos.vyos.vyos_static_routes_module.rst
@@ -343,7 +343,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
# Using merged
#
diff --git a/docs/vyos.vyos.vyos_system_module.rst b/docs/vyos.vyos.vyos_system_module.rst
index a71303c..bc521f0 100644
--- a/docs/vyos.vyos.vyos_system_module.rst
+++ b/docs/vyos.vyos.vyos_system_module.rst
@@ -248,7 +248,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: configure hostname and domain-name
vyos.vyos.vyos_system:
diff --git a/docs/vyos.vyos.vyos_user_module.rst b/docs/vyos.vyos.vyos_user_module.rst
index 04a7a6e..f47ab01 100644
--- a/docs/vyos.vyos.vyos_user_module.rst
+++ b/docs/vyos.vyos.vyos_user_module.rst
@@ -408,7 +408,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: create a new user
vyos.vyos.vyos_user:
diff --git a/docs/vyos.vyos.vyos_vlan_module.rst b/docs/vyos.vyos.vyos_vlan_module.rst
index d00260e..b6e3ccf 100644
--- a/docs/vyos.vyos.vyos_vlan_module.rst
+++ b/docs/vyos.vyos.vyos_vlan_module.rst
@@ -434,7 +434,7 @@ Notes
Examples
--------
-.. code-block:: yaml+jinja
+.. code-block:: yaml
- name: Create vlan
vyos.vyos.vyos_vlan:
diff --git a/plugins/cliconf/vyos.py b/plugins/cliconf/vyos.py
index c8aaff9..d63c677 100644
--- a/plugins/cliconf/vyos.py
+++ b/plugins/cliconf/vyos.py
@@ -58,6 +58,13 @@ from ansible.plugins.cliconf import CliconfBase
class Cliconf(CliconfBase):
+ __rpc__ = CliconfBase.__rpc__ + [
+ "commit",
+ "discard_changes",
+ "get_diff",
+ "run_commands",
+ ]
+
def __init__(self, *args, **kwargs):
super(Cliconf, self).__init__(*args, **kwargs)
self._device_info = {}
@@ -339,12 +346,6 @@ class Cliconf(CliconfBase):
def get_capabilities(self):
result = super(Cliconf, self).get_capabilities()
- result["rpc"] += [
- "commit",
- "discard_changes",
- "get_diff",
- "run_commands",
- ]
result["device_operations"] = self.get_device_operations()
result.update(self.get_option_values())
return json.dumps(result)