Extension chaoswm

Version 0.1.1
Repository https://github.com/chaostoolkit-incubator/chaostoolkit-wiremock

N/A

Exported Activities

probes


mappings

Type probe
Module chaoswm.probes
Name mappings
Return list

None

Signature:

def mappings(c: Dict[str, Dict[str, str]] = None) -> List[Any]:
    pass

Arguments:

Name Type Default Required
c mapping null No

Usage:

{
  "name": "mappings",
  "type": "probe",
  "provider": {
    "type": "python",
    "func": "mappings",
    "module": "chaoswm.probes"
  }
}
name: mappings
provider:
  func: mappings
  module: chaoswm.probes
  type: python
type: probe

server_running

Type probe
Module chaoswm.probes
Name server_running
Return integer

None

Signature:

def server_running(c: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
c mapping null No

Usage:

{
  "name": "server-running",
  "type": "probe",
  "provider": {
    "type": "python",
    "func": "server_running",
    "module": "chaoswm.probes"
  }
}
name: server-running
provider:
  func: server_running
  module: chaoswm.probes
  type: python
type: probe

utils


can_connect_to

Type
Module chaoswm.utils
Name can_connect_to
Return boolean

Test a connection to a host/port

Signature:

def can_connect_to(host: str, port: int) -> bool:
    pass

Arguments:

Name Type Default Required
host string Yes
port integer Yes

Usage:

{
  "name": "can-connect-to",
  "type": "",
  "provider": {
    "type": "python",
    "func": "can_connect_to",
    "arguments": {
      "host": "",
      "port": 0
    },
    "module": "chaoswm.utils"
  }
}
name: can-connect-to
provider:
  arguments:
    host: ''
    port: 0
  func: can_connect_to
  module: chaoswm.utils
  type: python
type: ''

check_configuration

Type
Module chaoswm.utils
Name check_configuration
Return boolean

None

Signature:

def check_configuration(c: Dict[str, Any] = None) -> bool:
    pass

Arguments:

Name Type Default Required
c mapping null No

Usage:

{
  "name": "check-configuration",
  "type": "",
  "provider": {
    "type": "python",
    "func": "check_configuration",
    "module": "chaoswm.utils"
  }
}
name: check-configuration
provider:
  func: check_configuration
  module: chaoswm.utils
  type: python
type: ''

get_wm_params

Type
Module chaoswm.utils
Name get_wm_params
Return Union[Dict[str, Any], NoneType]

None

Signature:

def get_wm_params(c: Dict[str, Any]) -> Union[Dict[str, Any], NoneType]:
    pass

Arguments:

Name Type Default Required
c mapping Yes

Usage:

{
  "name": "get-wm-params",
  "type": "",
  "provider": {
    "type": "python",
    "func": "get_wm_params",
    "arguments": {
      "c": {}
    },
    "module": "chaoswm.utils"
  }
}
name: get-wm-params
provider:
  arguments:
    c: {}
  func: get_wm_params
  module: chaoswm.utils
  type: python
type: ''

actions


add_mappings

Type action
Module chaoswm.actions
Name add_mappings
Return list

adds more mappings to wiremock returns the list of ids of the mappings added

Signature:

def add_mappings(mappings: List[Any],
                 configuration: Dict[str, Dict[str, str]] = None) -> List[Any]:
    pass

Arguments:

Name Type Default Required
mappings list Yes

Usage:

{
  "name": "add-mappings",
  "type": "action",
  "provider": {
    "type": "python",
    "func": "add_mappings",
    "arguments": {
      "mappings": []
    },
    "module": "chaoswm.actions"
  }
}
name: add-mappings
provider:
  arguments:
    mappings: []
  func: add_mappings
  module: chaoswm.actions
  type: python
type: action

chunked_dribble_delay

Type action
Module chaoswm.actions
Name chunked_dribble_delay
Return list

adds a chunked dribble delay to a list of mappings

Signature:

def chunked_dribble_delay(
        filter: List[Any],
        chunkedDribbleDelay: Mapping[str, Any],
        configuration: Dict[str, Dict[str, str]] = None) -> List[Any]:
    pass

Arguments:

Name Type Default Required
filter list Yes
chunkedDribbleDelay object Yes

Usage:

{
  "name": "chunked-dribble-delay",
  "type": "action",
  "provider": {
    "type": "python",
    "func": "chunked_dribble_delay",
    "arguments": {
      "filter": [],
      "chunkedDribbleDelay": null
    },
    "module": "chaoswm.actions"
  }
}
name: chunked-dribble-delay
provider:
  arguments:
    chunkedDribbleDelay: null
    filter: []
  func: chunked_dribble_delay
  module: chaoswm.actions
  type: python
type: action

delete_mappings

Type action
Module chaoswm.actions
Name delete_mappings
Return list

deletes a list of mappings returns the list of ids of the mappings deleted

Signature:

def delete_mappings(
        filter: List[Any],
        configuration: Dict[str, Dict[str, str]] = None) -> List[Any]:
    pass

Arguments:

Name Type Default Required
filter list Yes

Usage:

{
  "name": "delete-mappings",
  "type": "action",
  "provider": {
    "type": "python",
    "func": "delete_mappings",
    "arguments": {
      "filter": []
    },
    "module": "chaoswm.actions"
  }
}
name: delete-mappings
provider:
  arguments:
    filter: []
  func: delete_mappings
  module: chaoswm.actions
  type: python
type: action

down

Type action
Module chaoswm.actions
Name down
Return list

set a list of services down more correctly it adds a chunked dribble delay to the mapping as defined in the configuration section (or action attributes) Returns the list of delayed mappings

Signature:

def down(filter: List[Any],
         configuration: Dict[str, Dict[str, str]] = None) -> List[Any]:
    pass

Arguments:

Name Type Default Required
filter list Yes

Usage:

{
  "name": "down",
  "type": "action",
  "provider": {
    "type": "python",
    "func": "down",
    "arguments": {
      "filter": []
    },
    "module": "chaoswm.actions"
  }
}
name: down
provider:
  arguments:
    filter: []
  func: down
  module: chaoswm.actions
  type: python
type: action

fixed_delay

Type action
Module chaoswm.actions
Name fixed_delay
Return list

adds a fixed delay to a list of mappings

Signature:

def fixed_delay(filter: List[Any],
                fixedDelayMilliseconds: int,
                configuration: Dict[str, Dict[str, str]] = None) -> List[Any]:
    pass

Arguments:

Name Type Default Required
filter list Yes
fixedDelayMilliseconds integer Yes

Usage:

{
  "name": "fixed-delay",
  "type": "action",
  "provider": {
    "type": "python",
    "func": "fixed_delay",
    "arguments": {
      "filter": [],
      "fixedDelayMilliseconds": 0
    },
    "module": "chaoswm.actions"
  }
}
name: fixed-delay
provider:
  arguments:
    filter: []
    fixedDelayMilliseconds: 0
  func: fixed_delay
  module: chaoswm.actions
  type: python
type: action

global_fixed_delay

Type action
Module chaoswm.actions
Name global_fixed_delay
Return integer

add a fixed delay to all mappings

Signature:

def global_fixed_delay(fixedDelay: int = 0,
                       configuration: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
fixedDelay integer 0 No

Usage:

{
  "name": "global-fixed-delay",
  "type": "action",
  "provider": {
    "type": "python",
    "func": "global_fixed_delay",
    "module": "chaoswm.actions"
  }
}
name: global-fixed-delay
provider:
  func: global_fixed_delay
  module: chaoswm.actions
  type: python
type: action

global_random_delay

Type action
Module chaoswm.actions
Name global_random_delay
Return integer

adds a random delay to all mappings

Signature:

def global_random_delay(
        delayDistribution: Mapping[str, Any],
        configuration: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required
delayDistribution object Yes

Usage:

{
  "name": "global-random-delay",
  "type": "action",
  "provider": {
    "type": "python",
    "func": "global_random_delay",
    "arguments": {
      "delayDistribution": null
    },
    "module": "chaoswm.actions"
  }
}
name: global-random-delay
provider:
  arguments:
    delayDistribution: null
  func: global_random_delay
  module: chaoswm.actions
  type: python
type: action

populate_from_dir

Type action
Module chaoswm.actions
Name populate_from_dir
Return list

adds all mappings found in the passed folder returns the list of ids of the mappings added

Signature:

def populate_from_dir(
        dir: str = '.',
        configuration: Dict[str, Dict[str, str]] = None) -> List[Any]:
    pass

Arguments:

Name Type Default Required
dir string ”.” No

Usage:

{
  "name": "populate-from-dir",
  "type": "action",
  "provider": {
    "type": "python",
    "func": "populate_from_dir",
    "module": "chaoswm.actions"
  }
}
name: populate-from-dir
provider:
  func: populate_from_dir
  module: chaoswm.actions
  type: python
type: action

random_delay

Type action
Module chaoswm.actions
Name random_delay
Return list

adds a random delay to a list of mapppings

Signature:

def random_delay(filter: List[Any],
                 delayDistribution: Mapping[str, Any],
                 configuration: Dict[str, Dict[str, str]] = None) -> List[Any]:
    pass

Arguments:

Name Type Default Required
filter list Yes
delayDistribution object Yes

Usage:

{
  "name": "random-delay",
  "type": "action",
  "provider": {
    "type": "python",
    "func": "random_delay",
    "arguments": {
      "filter": [],
      "delayDistribution": null
    },
    "module": "chaoswm.actions"
  }
}
name: random-delay
provider:
  arguments:
    delayDistribution: null
    filter: []
  func: random_delay
  module: chaoswm.actions
  type: python
type: action

reset

Type action
Module chaoswm.actions
Name reset
Return integer

resets the wiremock server: deletes all mappings!

Signature:

def reset(configuration: Dict[str, Dict[str, str]] = None) -> int:
    pass

Arguments:

Name Type Default Required

Usage:

{
  "name": "reset",
  "type": "action",
  "provider": {
    "type": "python",
    "func": "reset",
    "module": "chaoswm.actions"
  }
}
name: reset
provider:
  func: reset
  module: chaoswm.actions
  type: python
type: action

up

Type action
Module chaoswm.actions
Name up
Return list

deletes all delays connected with a list of mappings

Signature:

def up(filter: List[Any],
       configuration: Dict[str, Dict[str, str]] = None) -> List[Any]:
    pass

Arguments:

Name Type Default Required
filter list Yes

Usage:

{
  "name": "up",
  "type": "action",
  "provider": {
    "type": "python",
    "func": "up",
    "arguments": {
      "filter": []
    },
    "module": "chaoswm.actions"
  }
}
name: up
provider:
  arguments:
    filter: []
  func: up
  module: chaoswm.actions
  type: python
type: action