File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -56,15 +56,22 @@ def _changes_available(isamAppliance):
56
56
return False
57
57
58
58
59
- def commit (isamAppliance , check_mode = False , force = False ):
59
+ def commit (isamAppliance , publish = False , check_mode = False , force = False ):
60
60
"""
61
61
Commit the current pending changes.
62
62
"""
63
- if force is True or _changes_available (isamAppliance ) is True :
64
- if check_mode is True :
63
+ if force or _changes_available (isamAppliance ):
64
+ if check_mode :
65
65
return isamAppliance .create_return_object (changed = True )
66
66
else :
67
- return isamAppliance .invoke_put ("Committing the changes" ,
67
+ iviaVersion = isamAppliance .facts ['version' ]
68
+ if publish and ibmsecurity .utilities .tools .version_compare (iviaVersion , "10.0.8.0" ) >= 0 :
69
+ logger .debug ("Publishing" )
70
+ return isamAppliance .invoke_put ("Committing the changes (containers)" ,
71
+ f"/isam/pending_changes?publish={ publish } " ,
72
+ {})
73
+ else :
74
+ return isamAppliance .invoke_put ("Committing the changes" ,
68
75
"/isam/pending_changes" ,
69
76
{})
70
77
You can’t perform that action at this time.
0 commit comments