utilsWiremock

can_connect_to

Test a connection to a host/port

Activity as code

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

Type
Modulechaoswm.utils
Namecan_connect_to
Returnboolean

Usage

JSON

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

YAML

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

Arguments

NameTypeDefaultRequiredTitleDescription
hoststringYesHostnameWireMock hostname
portintegerYesPortWireMock port

Signature

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