Skip to content

Commit fb8f74c

Browse files
authored
add conditions for start stop restart sys (#28)
* add conditions for start, stop and restart system * add fragment
1 parent fed5cfc commit fb8f74c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
bugfixes:
2+
- sapcontrol_exec - This pr fixes problems on c(StartSystem), c(StopSystem), c(RestartSystem) which needs parameters
3+
they ca not provided by the parameters argument because of special format like c(waittimeout=1) without string quotes.
4+
This is caused by the suds module itself.

plugins/modules/sap_control_exec.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,10 @@ def connection(hostname, port, username, password, function, parameter):
324324
_function = getattr(client.service, function)
325325
if parameter is not None:
326326
result = _function(parameter)
327+
elif function == "StartSystem":
328+
result = _function(waittimeout=0)
329+
elif function == "StopSystem" or function == "RestartSystem":
330+
result = _function(waittimeout=0, softtimeout=0)
327331
else:
328332
result = _function()
329333

0 commit comments

Comments
 (0)