diff options
| author | Andy Grover <andy@groveronline.com> | 2018-04-30 11:18:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-30 11:18:45 -0700 |
| commit | f80ebf283cf753f57f4e5565537e7780eb7ba68f (patch) | |
| tree | 8501593117d48315944c5f6b9cf2e961a563962e | |
| parent | c8a077df610c94e7183b600a7b8169e1800af543 (diff) | |
| parent | ffafd9680228ec5c39cc721f0db50b7babc2c91d (diff) | |
| download | targetcli-f80ebf283cf753f57f4e5565537e7780eb7ba68f.tar.gz | |
Merge pull request #109 from pkalever/control_str
create: add a way to set control string
| -rw-r--r-- | targetcli/ui_backstore.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/targetcli/ui_backstore.py b/targetcli/ui_backstore.py index efa532f..0af29f0 100644 --- a/targetcli/ui_backstore.py +++ b/targetcli/ui_backstore.py @@ -615,7 +615,7 @@ class UIUserBackedBackstore(UIBackstore): print() def ui_command_create(self, name, size, cfgstring, wwn=None, - hw_max_sectors=None): + hw_max_sectors=None, control=None): ''' Creates a User-backed storage object. @@ -641,7 +641,8 @@ class UIUserBackedBackstore(UIBackstore): try: so = UserBackedStorageObject(name, size=size, config=config, - wwn=wwn, hw_max_sectors=hw_max_sectors) + wwn=wwn, hw_max_sectors=hw_max_sectors, + control=control) except: raise ExecutionError("UserBackedStorageObject creation failed.") @@ -675,6 +676,7 @@ class UIStorageObject(UIRTSLibNode): 'fabric_max_sectors': ('number', 'Maximum number of sectors the fabric can transfer at once.'), 'hw_block_size': ('number', 'Hardware block size in bytes.'), 'hw_max_sectors': ('number', 'Maximum number of sectors the hardware can transfer at once.'), + 'control': ('string', 'Comma separated string of control=value tuples that will be passed to kernel control file.'), 'hw_pi_prot_type': ('number', 'If non-zero, DIF protection is enabled on the underlying hardware.'), 'hw_queue_depth': ('number', 'Hardware queue depth.'), 'is_nonrot': ('number', 'If set to 1, the backstore is a non rotational device.'), |
