ToxiProxy
create_toxic
Create any of the supported types of toxics with their attributes
Below are the details and signature of the activity Python module.
Type | action |
Module | chaostoxi.proxy.actions |
Name | create_proxy |
Return | None |
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
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 |
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