pyocf: add get_bytes() function to Volume and Data
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
683174c78f
commit
c43059a4cf
@ -223,3 +223,7 @@ class Data:
|
||||
m = md5()
|
||||
m.update(string_at(self.handle, self.size))
|
||||
return m.hexdigest()
|
||||
|
||||
def get_bytes(self):
|
||||
return string_at(self.handle, self.size)
|
||||
|
||||
|
@ -312,6 +312,9 @@ class Volume(Structure):
|
||||
m.update(string_at(self._storage, self.size))
|
||||
return m.hexdigest()
|
||||
|
||||
def get_bytes(self):
|
||||
return string_at(self._storage, self.size)
|
||||
|
||||
|
||||
class ErrorDevice(Volume):
|
||||
def __init__(
|
||||
|
Loading…
Reference in New Issue
Block a user