mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +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:
committed by
Nathaniel Case
parent
dbb58b34c3
commit
dfb2b3fdd5
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user