diff options
author | Nathaniel Case <this.is@nathanielca.se> | 2021-02-22 15:29:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 20:29:16 +0000 |
commit | b24d755f5a45e9a6305c9705411d1a64a12b812e (patch) | |
tree | 2bb9c369c9869cac0a756a9c8aee49515d6c7342 /plugins/cliconf | |
parent | ea481d755414ee3390a2ff5792be9c67896fa567 (diff) | |
download | vyos-ansible-old-b24d755f5a45e9a6305c9705411d1a64a12b812e.tar.gz vyos-ansible-old-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
Diffstat (limited to 'plugins/cliconf')
-rw-r--r-- | plugins/cliconf/vyos.py | 13 |
1 files changed, 7 insertions, 6 deletions
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) |