actionProxy

create_proxy

Creates a proxy to which toxics can be added

Activity as code

Below are the details and signature of the activity Python module.

Typeaction
Modulechaostoxi.proxy.actions
Namecreate_proxy
ReturnNone

Usage

JSON

{
  "name": "create-proxy",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "chaostoxi.proxy.actions",
    "func": "create_proxy",
    "arguments": {
      "proxy_name": "",
      "upstream_host": "",
      "upstream_port": 0
    }
  }
}

YAML

name: create-proxy
provider:
  arguments:
    proxy_name: ""
    upstream_host: ""
    upstream_port: 0
  func: create_proxy
  module: chaostoxi.proxy.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
proxy_namestringYesProxy NameName of the proxy to create
upstream_hoststringYesUpstream HostHost of the upstream server
upstream_portintegerYesUpstream PortPort of the upstream server
listen_hoststring“0.0.0.0”NoListening HostHost of the listening server
listen_portinteger0NoListening PortPort of the listening server
enabledbooleantrueNoEnabledWhether this proxy is enabled or not

Signature

def create_proxy(proxy_name: str,
                 upstream_host: str,
                 upstream_port: int,
                 listen_host: str = '0.0.0.0',
                 listen_port: int = 0,
                 enabled: bool = True,
                 configuration: Dict[str, Dict[str, str]] = None):
    pass