mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-03 17:18:54 +00:00
ios_facts: Report space of file systems (#41850)
* ios_facts: Report file system space Parse total and free space from dir output. For this, add a hash filesystems_info containing the keys spacetotal_kb and spacefree_kb. * ios_facts: Add unit test for file system space reporting * ios_facts: Add integration test for file system space reporting
This commit is contained in:
parent
dbb58b34c3
commit
dfb2b3fdd5
7 changed files with 62 additions and 0 deletions
|
|
@ -77,3 +77,13 @@ class TestIosFactsModule(TestIosModule):
|
|||
self.assertIsNone(
|
||||
result['ansible_facts']['ansible_net_interfaces']['Tunnel1110']['macaddress']
|
||||
)
|
||||
|
||||
def test_ios_facts_filesystems_info(self):
|
||||
set_module_args(dict(gather_subset='hardware'))
|
||||
result = self.execute_module()
|
||||
self.assertEqual(
|
||||
result['ansible_facts']['ansible_net_filesystems_info']['bootflash:']['spacetotal_kb'], 7712692.0
|
||||
)
|
||||
self.assertEqual(
|
||||
result['ansible_facts']['ansible_net_filesystems_info']['bootflash:']['spacefree_kb'], 6453180.0
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue