Skip to content
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

adding proxy to node executor #100

Merged
merged 10 commits into from
Jan 11, 2024
7 changes: 7 additions & 0 deletions contents/winrm-exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ def httpclient_log(*args):
else:
cleanescapingflg = False

ltamaster marked this conversation as resolved.
Show resolved Hide resolved
if "RD_CONFIG_WINRMPROXY" in os.environ:
winrmproxy = os.getenv("RD_CONFIG_WINRMPROXY")
log.debug("winrmproxy: " + str(winrmproxy))

if "RD_CONFIG_ENABLEDHTTPDEBUG" in os.environ:
if os.getenv("RD_CONFIG_ENABLEDHTTPDEBUG") == "true":
enabledHttpDebug = True
Expand Down Expand Up @@ -306,6 +310,9 @@ def httpclient_log(*args):
if(readtimeout):
arguments["read_timeout_sec"] = readtimeout

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

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

Expand Down
6 changes: 6 additions & 0 deletions contents/winrm-filecopier.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ def winrm_upload(self,
if "RD_CONFIG_CERTPATH" in os.environ:
certpath = os.getenv("RD_CONFIG_CERTPATH")

ltamaster marked this conversation as resolved.
Show resolved Hide resolved
if "RD_CONFIG_WINRMPROXY" in os.environ:
winrmproxy = os.getenv("RD_CONFIG_WINRMPROXY")

if "RD_OPTION_USERNAME" in os.environ and os.getenv("RD_OPTION_USERNAME"):
#take user from job
username = os.getenv("RD_OPTION_USERNAME").strip('\'')
Expand Down Expand Up @@ -363,6 +366,9 @@ def winrm_upload(self,

arguments["credssp_disable_tlsv1_2"] = diabletls12

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

if(readtimeout):
arguments["read_timeout_sec"] = readtimeout

Expand Down
18 changes: 18 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 Expand Up @@ -362,6 +371,15 @@ providers:
required: false
renderingOptions:
groupName: Kerberos
- 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: enabledhttpdebug
title: Enable HTTP logging in debug mode
description: "Print extra http logging in debug mode"
Expand Down