mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Add platform facts in network facts modules (#51434)
* Add platform facts in network facts modules Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * Add nxos Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * Add vyos Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * Add iosxr Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * Add junos Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * fix pep8 Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * update unit test Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * fix vyos_facts unittest Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * fix ios_facts unittest Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * fix iosxr unittests Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * fix CI failure Signed-off-by: Trishna Guha <trishnaguha17@gmail.com> * fix junos test Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
@@ -33,9 +33,23 @@ class TestIosFactsModule(TestIosModule):
|
||||
self.mock_run_commands = patch('ansible.modules.network.ios.ios_facts.run_commands')
|
||||
self.run_commands = self.mock_run_commands.start()
|
||||
|
||||
self.mock_get_capabilities = patch('ansible.modules.network.ios.ios_facts.get_capabilities')
|
||||
self.get_capabilities = self.mock_get_capabilities.start()
|
||||
self.get_capabilities.return_value = {
|
||||
'device_info': {
|
||||
'network_os': 'ios',
|
||||
'network_os_hostname': 'an-ios-01',
|
||||
'network_os_image': 'flash0:/vios-adventerprisek9-m',
|
||||
'network_os_model': 'WS-C3750-24TS',
|
||||
'network_os_version': '15.6(3)M2'
|
||||
},
|
||||
'network_api': 'cliconf'
|
||||
}
|
||||
|
||||
def tearDown(self):
|
||||
super(TestIosFactsModule, self).tearDown()
|
||||
self.mock_run_commands.stop()
|
||||
self.mock_get_capabilities.stop()
|
||||
|
||||
def load_fixtures(self, commands=None):
|
||||
def load_from_file(*args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user