pyocf: methods to get ocf_volume_t from cache/core exp obj vol
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
db2e4ecb68
commit
b4dd5dac00
@ -759,10 +759,16 @@ class Cache:
|
|||||||
self.cores.remove(core)
|
self.cores.remove(core)
|
||||||
|
|
||||||
def get_front_volume(self):
|
def get_front_volume(self):
|
||||||
return Volume.get_instance(lib.ocf_cache_get_front_volume(self.cache_handle))
|
return Volume.get_instance(self.get_c_front_volume())
|
||||||
|
|
||||||
|
def get_c_front_volume(self):
|
||||||
|
return lib.ocf_cache_get_front_volume(self.cache_handle)
|
||||||
|
|
||||||
def get_volume(self):
|
def get_volume(self):
|
||||||
return Volume.get_instance(lib.ocf_cache_get_volume(self.cache_handle))
|
return Volume.get_instance(self.get_c_volume())
|
||||||
|
|
||||||
|
def get_c_volume(self):
|
||||||
|
return lib.ocf_cache_get_volume(self.cache_handle)
|
||||||
|
|
||||||
def get_conf(self):
|
def get_conf(self):
|
||||||
cache_info = CacheInfo()
|
cache_info = CacheInfo()
|
||||||
|
@ -97,10 +97,16 @@ class Core:
|
|||||||
return self.handle
|
return self.handle
|
||||||
|
|
||||||
def get_front_volume(self):
|
def get_front_volume(self):
|
||||||
return Volume.get_instance(lib.ocf_core_get_front_volume(self.handle))
|
return Volume.get_instance(self.get_c_front_volume())
|
||||||
|
|
||||||
|
def get_c_front_volume(self):
|
||||||
|
return lib.ocf_core_get_front_volume(self.handle)
|
||||||
|
|
||||||
def get_volume(self):
|
def get_volume(self):
|
||||||
return Volume.get_instance(lib.ocf_core_get_volume(self.handle))
|
return Volume.get_instance(self.get_c_volume())
|
||||||
|
|
||||||
|
def get_c_volume(self):
|
||||||
|
return lib.ocf_core_get_volume(self.handle)
|
||||||
|
|
||||||
def get_default_queue(self):
|
def get_default_queue(self):
|
||||||
return self.cache.get_default_queue()
|
return self.cache.get_default_queue()
|
||||||
|
Loading…
Reference in New Issue
Block a user