mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
Adding RPC attribute parameters to junos_rpc network module (#32649)
* Adding RPC attribute arguments to `junos_rpc` network module. * Specifying module argument version. * Fixing DOCUMENTATION block. * First attempt at new test fixture. * Updated RPC_CLI_MAP. * Use `result` instead of `reply`.
This commit is contained in:
committed by
Ganesh Nalawade
parent
e24e771b88
commit
d9a52db17d
@@ -0,0 +1,6 @@
|
||||
<rpc-reply>
|
||||
<load-configuration-results>
|
||||
<load-success/>
|
||||
<load-error-count>0</load-error-count>
|
||||
</load-configuration-results>
|
||||
</rpc-reply>
|
||||
@@ -35,7 +35,8 @@ RPC_CLI_MAP = {
|
||||
'get-interface-information': 'show interfaces details',
|
||||
'get-system-memory-information': 'show system memory',
|
||||
'get-chassis-inventory': 'show chassis hardware',
|
||||
'get-system-storage': 'show system storage'
|
||||
'get-system-storage': 'show system storage',
|
||||
'load-configuration': 'load configuration'
|
||||
}
|
||||
|
||||
|
||||
@@ -91,3 +92,8 @@ class TestJunosCommandModule(TestJunosModule):
|
||||
args, kwargs = self.send_request.call_args
|
||||
reply = tostring(args[1]).decode()
|
||||
self.assertTrue(reply.find('<interface>em0</interface><media /></get-software-information>'))
|
||||
|
||||
def test_junos_rpc_attrs(self):
|
||||
set_module_args(dict(rpc='load-configuration', output='xml', attrs={'url': '/var/tmp/config.conf'}))
|
||||
result = self.execute_module(format='xml')
|
||||
self.assertTrue(result['xml'].find('<load-success/>'))
|
||||
|
||||
Reference in New Issue
Block a user