Skip to content

Commit f0c3be7

Browse files
committed
models/ibm_sep.py: adding 'is_feature_available()' method
Adding the is_feature_available method so the SEP feature can be flagged as 'False' by the Capabilities API if there are no SEP support in the host. Signed-off-by: Daniel Henrique Barboza <[email protected]>
1 parent c332517 commit f0c3be7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

models/ibm_sep.py

+7
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,10 @@ def update(self, name, params):
137137
raise OperationFailed('GINSEP0004E', {'cmd': cmd, 'rc': rc,
138138
'error': error})
139139
self._sep_status = 'running'
140+
141+
def is_feature_available(self):
142+
cmd = ['/opt/ibm/seprovider/bin/getSubscriber']
143+
_, _, rc1 = run_command(cmd)
144+
cmd = ['/opt/ibm/seprovider/bin/sepcli', 'status']
145+
_, _, rc2 = run_command(cmd)
146+
return rc1 > 1 and rc2 == 0

0 commit comments

Comments
 (0)