diff options
author | sayaleeraut <saraut@redhat.com> | 2020-08-11 22:46:11 +0530 |
---|---|---|
committer | Sayalee Raut <saraut@redhat.com> | 2020-08-12 05:20:03 +0000 |
commit | 1d0ff4497fa3df2f4acebbc0eef044fb122b64d9 (patch) | |
tree | b3448f10e5a37816dabb256d587c8b12278c12b8 /examples/test_peer_ops.py | |
parent | d4ee7ad936e45019275e536f0041addee54812c4 (diff) |
[LibFix] Add encoding type to get_fattr()
Currently the get_fattr() function returns the xattr value in the
hex encoding format. Adding the option to add/specify other
encoding types, i.e. text and base64, where hex will be the default
encoding format.
Reason -
When the xattrs are custom set through mountpoint, it becomes
easier to test if the value is correct by using the "text"
encoding.
Example -
>>> ret = get_fattr(host, fqpath, fattr)
>>> print ret
0x414243
>>> ret = get_fattr(host, fqpath, fattr, encode="text")
>>> print ret
"ABC"
The value "ABC" is easily readable as opposed to 0x414243 when
performing a test.
Change-Id: Ie2377b924816ebab0a2af116d82600e01f03d61f
Signed-off-by: sayaleeraut <saraut@redhat.com>
Diffstat (limited to 'examples/test_peer_ops.py')
0 files changed, 0 insertions, 0 deletions