Skip to content

add conditions for start stop restart sys #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelogs/fragments/28-fix-sapcontrol-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bugfixes:
- sapcontrol_exec - This pr fixes problems on c(StartSystem), c(StopSystem), c(RestartSystem) which needs parameters
they ca not provided by the parameters argument because of special format like c(waittimeout=1) without string quotes.
This is caused by the suds module itself.
4 changes: 4 additions & 0 deletions plugins/modules/sap_control_exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,10 @@ def connection(hostname, port, username, password, function, parameter):
_function = getattr(client.service, function)
if parameter is not None:
result = _function(parameter)
elif function == "StartSystem":
result = _function(waittimeout=0)
elif function == "StopSystem" or function == "RestartSystem":
result = _function(waittimeout=0, softtimeout=0)
else:
result = _function()

Expand Down