Skip to content

Commit

Permalink
adding proxy field to node executor
Browse files Browse the repository at this point in the history
  • Loading branch information
jsboak committed Dec 6, 2023
1 parent e5e9ad8 commit 9b0f72f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contents/winrm-exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,9 @@ def filter(self, record):
else:
cleanescapingflg = False

if "RD_CONFIG_WINRMPROXY" in os.environ:
winrmproxy = os.getenv("RD_CONFIG_WINRMPROXY")

exec_command = os.getenv("RD_EXEC_COMMAND")
log.debug("Command will be executed: " + exec_command)

Expand Down Expand Up @@ -229,6 +232,7 @@ def filter(self, record):
log.debug("operationtimeout:" + str(operationtimeout))
log.debug("exit Behaviour:" + exitBehaviour)
log.debug("cleanescapingflg: " + str(cleanescapingflg))
log.debug("winrmproxy: " + str(winrmproxy))
log.debug("------------------------------------------")

if not URLLIB_INSTALLED:
Expand Down Expand Up @@ -268,6 +272,9 @@ def filter(self, record):
if(readtimeout):
arguments["read_timeout_sec"] = readtimeout

if(winrmproxy):
arguments["winrm_proxy"] = winrmproxy

if(operationtimeout):
arguments["operation_timeout_sec"] = operationtimeout

Expand Down
9 changes: 9 additions & 0 deletions plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ providers:
renderingOptions:
groupName: Connection
instance-scope-node-attribute: "winrm-readtimeout"
- name: winrmproxy
title: Proxy
description: "Specify a proxy address for communicating with Windows nodes. Example HTTP proxy strings are http://server:port and http://user:pass@server:port. An example SOCKS5 proxy string is socks5://user:pass@server:port."
type: String
required: false
scope: Instance
renderingOptions:
groupName: Connection
instance-scope-node-attribute: "winrm-proxy"
- name: operationtimeout
title: operation timeout
description: "maximum allowed time in seconds for any single wsman HTTP operation (default 20). Note that operation timeouts while receiving output (the only wsman operation that should take any significant time, and where these timeouts are expected) will be silently retried indefinitely. It can be overwriting at node level using `winrm-operationtimeout`"
Expand Down

0 comments on commit 9b0f72f

Please sign in to comment.