From b24d755f5a45e9a6305c9705411d1a64a12b812e Mon Sep 17 00:00:00 2001 From: Nathaniel Case Date: Mon, 22 Feb 2021 15:29:16 -0500 Subject: 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 --- plugins/cliconf/vyos.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'plugins/cliconf') 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) -- cgit v1.2.3