Merge pull request #535 from Ostrokrzew/by-id
Disallow to use other than by-id path to core or cache device
This commit is contained in:
@@ -19,12 +19,12 @@ class Cache:
|
||||
self.__metadata_size = None
|
||||
|
||||
def __get_cache_id(self):
|
||||
cmd = f"{list_cmd()} | grep {self.cache_device.system_path}"
|
||||
cmd = f"{list_cmd(by_id_path=False)} | grep {self.cache_device.short_path}"
|
||||
output = TestRun.executor.run(cmd)
|
||||
if output.exit_code == 0 and output.stdout.strip():
|
||||
return output.stdout.split()[1]
|
||||
else:
|
||||
raise Exception(f"There is no cache started on {self.cache_device.system_path}.")
|
||||
raise Exception(f"There is no cache started on {self.cache_device.path}.")
|
||||
|
||||
def get_core_devices(self):
|
||||
return get_cores(self.cache_id)
|
||||
|
Reference in New Issue
Block a user