action Proxy

create_toxic

Create any of the supported types of toxics with their attributes

Activity as code

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

Typeaction
Modulechaostoxi.toxic.actions
Namecreate_toxic
Returnboolean

Usage

JSON

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

YAML

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

Arguments

NameTypeDefaultRequired
for_proxystringYes
toxic_namestringYes
toxic_typestringYes
streamstring“downstream”No
toxicitynumber1.0No
attributesmappingnullNo

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