Skip to content

Extension chaostoxi

Version 0.1.3
Repository https://github.com/chaostoolkit-incubator/chaostoolkit-toxiproxy

N/A

Exported Activities

proxy


create_proxy

Type action
Module chaostoxi.proxy.actions
Name create_proxy
Return None

Creates a proxy to which toxics can be added.

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

Arguments:

Name Type Default Required
proxy_name string Yes
upstream_host string Yes
upstream_port integer Yes
listen_host string “0.0.0.0” No
listen_port integer 0 No
enabled boolean true No

Usage:

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

delete_proxy

Type action
Module chaostoxi.proxy.actions
Name delete_proxy
Return None

Removes the proxy from the system.

Signature:

def delete_proxy(proxy_name: str,
                 configuration: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
proxy_name string Yes

Usage:

{
  "provider": {
    "module": "chaostoxi.proxy.actions",
    "type": "python",
    "arguments": {
      "proxy_name": ""
    },
    "func": "delete_proxy"
  },
  "type": "action",
  "name": "delete-proxy"
}
name: delete-proxy
provider:
  arguments:
    proxy_name: ''
  func: delete_proxy
  module: chaostoxi.proxy.actions
  type: python
type: action

disable_proxy

Type action
Module chaostoxi.proxy.actions
Name disable_proxy
Return None

Disables the proxy, this is useful to simulate a proxied service being down.

Signature:

def disable_proxy(proxy_name: str,
                  configuration: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
proxy_name string Yes

Usage:

{
  "provider": {
    "module": "chaostoxi.proxy.actions",
    "type": "python",
    "arguments": {
      "proxy_name": ""
    },
    "func": "disable_proxy"
  },
  "type": "action",
  "name": "disable-proxy"
}
name: disable-proxy
provider:
  arguments:
    proxy_name: ''
  func: disable_proxy
  module: chaostoxi.proxy.actions
  type: python
type: action

enable_proxy

Type action
Module chaostoxi.proxy.actions
Name enable_proxy
Return None

Enables a disabled proxy.

Signature:

def enable_proxy(proxy_name: str,
                 configuration: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
proxy_name string Yes

Usage:

{
  "provider": {
    "module": "chaostoxi.proxy.actions",
    "type": "python",
    "arguments": {
      "proxy_name": ""
    },
    "func": "enable_proxy"
  },
  "type": "action",
  "name": "enable-proxy"
}
name: enable-proxy
provider:
  arguments:
    proxy_name: ''
  func: enable_proxy
  module: chaostoxi.proxy.actions
  type: python
type: action

get_proxy_attribute

Type probe
Module chaostoxi.proxy.probes
Name get_proxy_attribute
Return None

Returns an attribute of a specified proxy.

Signature:

def get_proxy_attribute(proxy_name: str,
                        attribute: str,
                        configuration: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
proxy_name string Yes
attribute string Yes

Usage:

{
  "provider": {
    "module": "chaostoxi.proxy.probes",
    "type": "python",
    "arguments": {
      "proxy_name": "",
      "attribute": ""
    },
    "func": "get_proxy_attribute"
  },
  "type": "probe",
  "name": "get-proxy-attribute"
}
name: get-proxy-attribute
provider:
  arguments:
    attribute: ''
    proxy_name: ''
  func: get_proxy_attribute
  module: chaostoxi.proxy.probes
  type: python
type: probe

modify_proxy

Type action
Module chaostoxi.proxy.actions
Name modify_proxy
Return None

Modify the configuration of a given proxy. Useful to change the upstream configiuration. Only arguments supplied result in modification of the proxy.

Signature:

def modify_proxy(proxy_name: str,
                 listen_address: str = None,
                 upstream_address: str = None,
                 enabled: bool = None,
                 configuration: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
proxy_name string Yes
listen_address string null No
upstream_address string null No
enabled boolean null No

Usage:

{
  "provider": {
    "module": "chaostoxi.proxy.actions",
    "type": "python",
    "arguments": {
      "proxy_name": ""
    },
    "func": "modify_proxy"
  },
  "type": "action",
  "name": "modify-proxy"
}
name: modify-proxy
provider:
  arguments:
    proxy_name: ''
  func: modify_proxy
  module: chaostoxi.proxy.actions
  type: python
type: action

proxy_exist

Type probe
Module chaostoxi.proxy.probes
Name proxy_exist
Return None

Returns True of False if a given proxy exists.

Signature:

def proxy_exist(proxy_name: str,
                configuration: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
proxy_name string Yes

Usage:

{
  "provider": {
    "module": "chaostoxi.proxy.probes",
    "type": "python",
    "arguments": {
      "proxy_name": ""
    },
    "func": "proxy_exist"
  },
  "type": "probe",
  "name": "proxy-exist"
}
name: proxy-exist
provider:
  arguments:
    proxy_name: ''
  func: proxy_exist
  module: chaostoxi.proxy.probes
  type: python
type: probe

toxic


create_bandwith_degradation_toxic

Type action
Module chaostoxi.toxic.actions
Name create_bandwith_degradation_toxic
Return mapping

Limit the bandwith of a downstream connection with a toxicity of 100%.

Signature:

def create_bandwith_degradation_toxic(
        for_proxy: str,
        toxic_name: str,
        rate: int,
        configuration: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass

Arguments:

Name Type Default Required
for_proxy string Yes
toxic_name string Yes
rate integer Yes

Usage:

{
  "provider": {
    "module": "chaostoxi.toxic.actions",
    "type": "python",
    "arguments": {
      "toxic_name": "",
      "for_proxy": "",
      "rate": 0
    },
    "func": "create_bandwith_degradation_toxic"
  },
  "type": "action",
  "name": "create-bandwith-degradation-toxic"
}
name: create-bandwith-degradation-toxic
provider:
  arguments:
    for_proxy: ''
    rate: 0
    toxic_name: ''
  func: create_bandwith_degradation_toxic
  module: chaostoxi.toxic.actions
  type: python
type: action

create_latency_toxic

Type action
Module chaostoxi.toxic.actions
Name create_latency_toxic
Return mapping

Add a delay to all data going through the proxy using a downstream with a toxicity of 100%.

Signature:

def create_latency_toxic(
        for_proxy: str,
        toxic_name: str,
        latency: int,
        jitter: int = 0,
        configuration: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass

Arguments:

Name Type Default Required
for_proxy string Yes
toxic_name string Yes
latency integer Yes
jitter integer 0 No

Usage:

{
  "provider": {
    "module": "chaostoxi.toxic.actions",
    "type": "python",
    "arguments": {
      "toxic_name": "",
      "latency": 0,
      "for_proxy": ""
    },
    "func": "create_latency_toxic"
  },
  "type": "action",
  "name": "create-latency-toxic"
}
name: create-latency-toxic
provider:
  arguments:
    for_proxy: ''
    latency: 0
    toxic_name: ''
  func: create_latency_toxic
  module: chaostoxi.toxic.actions
  type: python
type: action

create_limiter_toxic

Type action
Module chaostoxi.toxic.actions
Name create_limiter_toxic
Return mapping

Closes connections when transmitted data after the limit, sets it up as a dowsntream, 100% toxicity.

Signature:

def create_limiter_toxic(
        for_proxy: str,
        toxic_name: str,
        bytes_limit: int,
        configuration: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass

Arguments:

Name Type Default Required
for_proxy string Yes
toxic_name string Yes
bytes_limit integer Yes

Usage:

{
  "provider": {
    "module": "chaostoxi.toxic.actions",
    "type": "python",
    "arguments": {
      "toxic_name": "",
      "bytes_limit": 0,
      "for_proxy": ""
    },
    "func": "create_limiter_toxic"
  },
  "type": "action",
  "name": "create-limiter-toxic"
}
name: create-limiter-toxic
provider:
  arguments:
    bytes_limit: 0
    for_proxy: ''
    toxic_name: ''
  func: create_limiter_toxic
  module: chaostoxi.toxic.actions
  type: python
type: action

create_slicer_toxic

Type action
Module chaostoxi.toxic.actions
Name create_slicer_toxic
Return mapping

Slices TCP data up into small bits, optionally adding a delay between each sliced “packet” with a toxicity of 100%.

Signature:

def create_slicer_toxic(
        for_proxy: str,
        toxic_name: str,
        average_size: int,
        size_variation: int,
        delay: int,
        configuration: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass

Arguments:

Name Type Default Required
for_proxy string Yes
toxic_name string Yes
average_size integer Yes
size_variation integer Yes
delay integer Yes

Usage:

{
  "provider": {
    "module": "chaostoxi.toxic.actions",
    "type": "python",
    "arguments": {
      "toxic_name": "",
      "size_variation": 0,
      "delay": 0,
      "average_size": 0,
      "for_proxy": ""
    },
    "func": "create_slicer_toxic"
  },
  "type": "action",
  "name": "create-slicer-toxic"
}
name: create-slicer-toxic
provider:
  arguments:
    average_size: 0
    delay: 0
    for_proxy: ''
    size_variation: 0
    toxic_name: ''
  func: create_slicer_toxic
  module: chaostoxi.toxic.actions
  type: python
type: action

create_slow_connection_close_toxic

Type action
Module chaostoxi.toxic.actions
Name create_slow_connection_close_toxic
Return mapping

Limit the bandwith of a downstream connection with a toxicity of 100%.

Signature:

def create_slow_connection_close_toxic(
        for_proxy: str,
        toxic_name: str,
        delay: int,
        configuration: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass

Arguments:

Name Type Default Required
for_proxy string Yes
toxic_name string Yes
delay integer Yes

Usage:

{
  "provider": {
    "module": "chaostoxi.toxic.actions",
    "type": "python",
    "arguments": {
      "toxic_name": "",
      "delay": 0,
      "for_proxy": ""
    },
    "func": "create_slow_connection_close_toxic"
  },
  "type": "action",
  "name": "create-slow-connection-close-toxic"
}
name: create-slow-connection-close-toxic
provider:
  arguments:
    delay: 0
    for_proxy: ''
    toxic_name: ''
  func: create_slow_connection_close_toxic
  module: chaostoxi.toxic.actions
  type: python
type: action

create_timeout_toxic

Type action
Module chaostoxi.toxic.actions
Name create_timeout_toxic
Return mapping

Generate as downstream delayed TCP close with a toxicity of 100%.

Signature:

def create_timeout_toxic(
        for_proxy: str,
        toxic_name: str,
        timeout: int,
        configuration: Dict[str, Dict[str, str]] = None) -> Dict[str, Any]:
    pass

Arguments:

Name Type Default Required
for_proxy string Yes
toxic_name string Yes
timeout integer Yes

Usage:

{
  "provider": {
    "module": "chaostoxi.toxic.actions",
    "type": "python",
    "arguments": {
      "toxic_name": "",
      "for_proxy": "",
      "timeout": 0
    },
    "func": "create_timeout_toxic"
  },
  "type": "action",
  "name": "create-timeout-toxic"
}
name: create-timeout-toxic
provider:
  arguments:
    for_proxy: ''
    timeout: 0
    toxic_name: ''
  func: create_timeout_toxic
  module: chaostoxi.toxic.actions
  type: python
type: action

create_toxic

Type action
Module chaostoxi.toxic.actions
Name create_toxic
Return boolean

Allows you to create any of the supported types of toxics with their attributes.

Signature:

def create_toxic(for_proxy: str,
                 toxic_name: str,
                 toxic_type: str,
                 stream: str = 'downstream',
                 toxicity: float = 1.0,
                 attributes: Dict[str, Any] = None,
                 configuration: Dict[str, Dict[str, str]] = None) -> bool:
    pass

Arguments:

Name Type Default Required
for_proxy string Yes
toxic_name string Yes
toxic_type string Yes
stream string “downstream” No
toxicity number 1.0 No
attributes mapping null No

Usage:

{
  "provider": {
    "module": "chaostoxi.toxic.actions",
    "type": "python",
    "arguments": {
      "toxic_name": "",
      "toxic_type": "",
      "for_proxy": ""
    },
    "func": "create_toxic"
  },
  "type": "action",
  "name": "create-toxic"
}
name: create-toxic
provider:
  arguments:
    for_proxy: ''
    toxic_name: ''
    toxic_type: ''
  func: create_toxic
  module: chaostoxi.toxic.actions
  type: python
type: action

delete_toxic

Type action
Module chaostoxi.toxic.actions
Name delete_toxic
Return None

Deletes the a given toxic.

Signature:

def delete_toxic(for_proxy: str,
                 toxic_name: str,
                 configuration: Dict[str, Dict[str, str]] = None):
    pass

Arguments:

Name Type Default Required
for_proxy string Yes
toxic_name string Yes

Usage:

{
  "provider": {
    "module": "chaostoxi.toxic.actions",
    "type": "python",
    "arguments": {
      "toxic_name": "",
      "for_proxy": ""
    },
    "func": "delete_toxic"
  },
  "type": "action",
  "name": "delete-toxic"
}
name: delete-toxic
provider:
  arguments:
    for_proxy: ''
    toxic_name: ''
  func: delete_toxic
  module: chaostoxi.toxic.actions
  type: python
type: action