Compare commits
1 Commits
02a209aff8
...
5f0a32cddb
Author | SHA1 | Date | |
---|---|---|---|
5f0a32cddb |
@ -219,9 +219,6 @@ class cas_config(object):
|
||||
if not stat.S_ISBLK(mode):
|
||||
raise ValueError(f'{path} is not block device')
|
||||
|
||||
def __str__(self):
|
||||
return f"cas_config(caches={[str(cache) for cache in self.caches.values()]}, cores={[str(core) for core in self.cores]}, version_tag={self.version_tag})"
|
||||
|
||||
class cache_config(object):
|
||||
def __init__(self, cache_id, device, cache_mode, **params):
|
||||
self.cache_id = int(cache_id)
|
||||
@ -230,9 +227,6 @@ class cas_config(object):
|
||||
self.params = params
|
||||
self.cores = dict()
|
||||
|
||||
def __str__(self):
|
||||
return f"cache_config(cache_id={self.cache_id}, device={self.device}, cache_mode={self.cache_mode}, params={self.params}, cores={self.cores})"
|
||||
|
||||
@classmethod
|
||||
def from_line(cls, line, allow_incomplete=False):
|
||||
values = line.split()
|
||||
@ -393,9 +387,6 @@ class cas_config(object):
|
||||
self.device = path
|
||||
self.params = params
|
||||
|
||||
def __str__(self):
|
||||
return f"core_config(cache_id={self.cache_id}, core_id={self.core_id}, device={self.device}, params={self.params})"
|
||||
|
||||
@classmethod
|
||||
def from_line(cls, line, allow_incomplete=False):
|
||||
values = line.split()
|
||||
@ -655,12 +646,12 @@ def configure_cache(cache):
|
||||
)
|
||||
|
||||
|
||||
def add_core(core, try_add):
|
||||
def add_core(core, attach):
|
||||
casadm.add_core(
|
||||
device=core.device,
|
||||
cache_id=core.cache_id,
|
||||
core_id=core.core_id,
|
||||
try_add=try_add)
|
||||
try_add=attach)
|
||||
|
||||
# Another helper functions
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user