Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added directory_usage to utils (#629)
* Added console_has_banner parameter This parameter allows to modify login state machine behavior in case of a hung state. * Added directory_usage to utils This utility is similar to "show system directory-usage" Junos command (or UNIX "du" command). It allows to see how much space is taken by a particular directory on disk. Unit test added as well. * Modified directory_usage() to return dict and add depth parameter * Improving exception handling in directory_usage() util * Update test_fs.py
- Loading branch information
1 parent
b84b8a6
commit 6b9faac
Showing
3 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
tests/unit/utils/rpc-reply/get-directory-usage-information.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/12.1X47/junos"> | ||
<directory-usage-information> | ||
<directory> | ||
<directory-name>/var/tmp</directory-name> | ||
<directory> | ||
<directory-name>/var/tmp/install</directory-name> | ||
<used-space used-blocks="4"> | ||
2.0K | ||
</used-space> | ||
</directory> | ||
<directory> | ||
<directory-name>/var/tmp/vi.recover</directory-name> | ||
<used-space used-blocks="4"> | ||
2.0K | ||
</used-space> | ||
</directory> | ||
<directory> | ||
<directory-name>/var/tmp/pics</directory-name> | ||
<used-space used-blocks="4"> | ||
2.0K | ||
</used-space> | ||
</directory> | ||
<directory> | ||
<directory-name>/var/tmp/gres-tp</directory-name> | ||
<used-space used-blocks="68"> | ||
34K | ||
</used-space> | ||
</directory> | ||
<directory> | ||
<directory-name>/var/tmp/rtsdb</directory-name> | ||
<used-space used-blocks="4"> | ||
2.0K | ||
</used-space> | ||
</directory> | ||
<directory> | ||
<directory-name>/var/tmp/sec-download</directory-name> | ||
<used-space used-blocks="8"> | ||
4.0K | ||
</used-space> | ||
</directory> | ||
<used-space used-blocks="456076"> | ||
223M | ||
</used-space> | ||
</directory> | ||
</directory-usage-information> | ||
<cli> | ||
<banner></banner> | ||
</cli> | ||
</rpc-reply> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters