Skip to content

Commit

Permalink
Merge pull request #19 from liveaction/develop
Browse files Browse the repository at this point in the history
feat: add support to configure controller jbod mode
  • Loading branch information
ralequi authored May 28, 2024
2 parents c9cfcec + dcdd68e commit fea8bd3
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions pystorcli2/controller/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class Controller(object):
patrolread (dict): current patrol read settings (also setter)
cc (dict): current patrol read settings (also setter)
has_foreign_configurations (bool): true if controller has foreign configurations
jbod (str): enables/disables JBOD mode; by default, drives become system drives.
Methods:
create_vd (:obj:VirtualDrive): create virtual drive
Expand Down Expand Up @@ -503,6 +504,38 @@ def import_foreign_configurations(self, securitykey: Optional[str] = None):
args.append(f'securitykey={securitykey}')
return common.response_cmd(self._run(args))

@property
@common.lower
def jbod(self):
"""Get/Set jbod mode state
One of the following options can be set (str):
on - enables jbod mode
off - disables jbod mode
Returns:
(str): on / off
"""
args = [
'show',
'jbod'
]

for pr in common.response_property(self._run(args)):
if pr['Ctrl_Prop'] == "JBOD":
return pr['Value']
return 'off'

@jbod.setter
def jbod(self, value):
"""
"""
args = [
'set',
'jbod={0}'.format(value)
]
return common.response_setter(self._run(args))


class Controllers(object):
"""StorCLI Controllers
Expand Down

0 comments on commit fea8bd3

Please sign in to comment.