github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/internal/fs/ddl/cache/agent/choria_util.json (about)

     1  {
     2    "$schema": "https://choria.io/schemas/mcorpc/ddl/v1/agent.json",
     3    "metadata": {
     4      "name": "choria_util",
     5      "description": "Choria Utilities",
     6      "author": "R.I.Pienaar <rip@devco.net>",
     7      "license": "Apache-2.0",
     8      "version": "0.28.0",
     9      "url": "https://choria.io",
    10      "timeout": 2
    11    },
    12    "actions": [
    13      {
    14        "action": "info",
    15        "input": {
    16        },
    17        "output": {
    18          "security": {
    19            "description": "Security Provider plugin",
    20            "display_as": "Security Provider",
    21            "type": "string"
    22          },
    23          "secure_protocol": {
    24            "description": "If the protocol is running with PKI security enabled",
    25            "display_as": "Protocol Secure",
    26            "type": "boolean"
    27          },
    28          "connector": {
    29            "description": "Connector plugin",
    30            "display_as": "Connector",
    31            "type": "string"
    32          },
    33          "connector_tls": {
    34            "description": "If the connector is running with TLS security enabled",
    35            "display_as": "Connector TLS",
    36            "type": "boolean"
    37          },
    38          "path": {
    39            "description": "Active OS PATH",
    40            "display_as": "Path",
    41            "type": "string"
    42          },
    43          "choria_version": {
    44            "description": "Choria version",
    45            "display_as": "Choria Version",
    46            "type": "string"
    47          },
    48          "client_version": {
    49            "description": "Middleware client library version",
    50            "display_as": "Middleware Client Library Version",
    51            "type": "string"
    52          },
    53          "client_flavour": {
    54            "description": "Middleware client library flavour",
    55            "display_as": "Middleware Client Flavour",
    56            "type": "string"
    57          },
    58          "client_options": {
    59            "description": "Active Middleware client options",
    60            "display_as": "Middleware Client Options",
    61            "type": "hash"
    62          },
    63          "connected_server": {
    64            "description": "Connected middleware server",
    65            "display_as": "Connected Broker",
    66            "type": "string"
    67          },
    68          "client_stats": {
    69            "description": "Middleware client statistics",
    70            "display_as": "Middleware Client Stats",
    71            "type": "hash"
    72          },
    73          "facter_domain": {
    74            "description": "Facter domain",
    75            "display_as": "Facter Domain",
    76            "type": "string"
    77          },
    78          "facter_command": {
    79            "description": "Command used for Facter",
    80            "display_as": "Facter",
    81            "type": "string"
    82          },
    83          "srv_domain": {
    84            "description": "Configured SRV domain",
    85            "display_as": "SRV Domain",
    86            "type": "string"
    87          },
    88          "using_srv": {
    89            "description": "Indicates if SRV records are considered",
    90            "display_as": "SRV Used",
    91            "type": "boolean"
    92          },
    93          "middleware_servers": {
    94            "description": "Middleware Servers configured or discovered",
    95            "display_as": "Middleware",
    96            "type": "array"
    97          }
    98        },
    99        "display": "failed",
   100        "description": "Choria related information from the running Daemon and Middleware",
   101        "aggregate": [
   102          {
   103            "function": "summary",
   104            "args": [
   105              "choria_version"
   106            ]
   107          },
   108          {
   109            "function": "summary",
   110            "args": [
   111              "client_version"
   112            ]
   113          },
   114          {
   115            "function": "summary",
   116            "args": [
   117              "client_flavour"
   118            ]
   119          },
   120          {
   121            "function": "summary",
   122            "args": [
   123              "connected_server"
   124            ]
   125          },
   126          {
   127            "function": "summary",
   128            "args": [
   129              "srv_domain"
   130            ]
   131          },
   132          {
   133            "function": "summary",
   134            "args": [
   135              "using_srv"
   136            ]
   137          },
   138          {
   139            "function": "summary",
   140            "args": [
   141              "secure_protocol"
   142            ]
   143          },
   144          {
   145            "function": "summary",
   146            "args": [
   147              "connector_tls"
   148            ]
   149          }
   150        ]
   151      },
   152      {
   153        "action": "machine_state",
   154        "description": "Retrieves the current state of a specific Choria Autonomous Agent",
   155        "display": "ok",
   156        "input": {
   157          "instance": {
   158            "prompt": "Instance ID",
   159            "description": "Machine Instance ID",
   160            "type": "string",
   161            "default": null,
   162            "optional": true,
   163            "validation": "^.+-.+-.+-.+-.+$",
   164            "maxlength": 36
   165          },
   166          "name": {
   167            "prompt": "Name",
   168            "description": "Machine Name",
   169            "type": "string",
   170            "default": null,
   171            "optional": true,
   172            "validation": "^[a-zA-Z][a-zA-Z0-9_-]+",
   173            "maxlength": 128
   174          },
   175          "path": {
   176            "prompt": "Path",
   177            "description": "Machine Path",
   178            "type": "string",
   179            "default": null,
   180            "optional": true,
   181            "validation": ".+",
   182            "maxlength": 512
   183          }
   184        },
   185        "aggregate": [
   186          {
   187            "function": "summary",
   188            "args": [
   189              "state"
   190            ]
   191          },
   192          {
   193            "function": "summary",
   194            "args": [
   195              "name"
   196            ]
   197          },
   198          {
   199            "function": "summary",
   200            "args": [
   201              "version"
   202            ]
   203          }
   204        ],
   205        "output": {
   206          "name": {
   207            "type": "string",
   208            "description": "The name of the autonomous agent",
   209            "display_as": "Name"
   210          },
   211          "version": {
   212            "type": "string",
   213            "description": "The version of the autonomous agent",
   214            "display_as": "Version"
   215          },
   216          "state": {
   217            "type": "string",
   218            "description": "The current state the agent is in",
   219            "display_as": "State"
   220          },
   221          "path": {
   222            "type": "string",
   223            "description": "The location on disk where the autonomous agent is stored",
   224            "display_as": "Path"
   225          },
   226          "id": {
   227            "type": "string",
   228            "description": "The unique running ID of the autonomous agent",
   229            "display_as": "ID"
   230          },
   231          "start_time": {
   232            "type": "string",
   233            "description": "The time the autonomous agent was started in unix seconds",
   234            "display_as": "Started"
   235          },
   236          "available_transitions": {
   237            "type": "array",
   238            "description": "The list of available transitions this autonomous agent can make",
   239            "display_as": "Available Transitions"
   240          },
   241          "scout": {
   242            "type": "boolean",
   243            "description": "True when this autonomous agent represents a Choria Scout Check",
   244            "display_as": "Scout Check"
   245          },
   246          "current_state": {
   247            "description": "The Choria Scout specific state for Scout checks",
   248            "display_as": "Scout State"
   249          }
   250        }
   251      },
   252      {
   253        "action": "machine_states",
   254        "input": {
   255        },
   256        "output": {
   257          "machine_names": {
   258            "description": "List of running machine names",
   259            "display_as": "Machine Names",
   260            "type": "array"
   261          },
   262          "machine_ids": {
   263            "description": "List of running machine IDs",
   264            "display_as": "Machine IDs",
   265            "type": "array"
   266          },
   267          "states": {
   268            "description": "Hash map of machine statusses indexed by machine ID",
   269            "display_as": "Machine States",
   270            "type": "hash"
   271          }
   272        },
   273        "display": "always",
   274        "description": "States of the hosted Choria Autonomous Agents",
   275        "aggregate": [
   276          {
   277            "function": "summary",
   278            "args": [
   279              "machine_names"
   280            ]
   281          }
   282        ]
   283      },
   284      {
   285        "action": "machine_transition",
   286        "input": {
   287          "instance": {
   288            "prompt": "Instance ID",
   289            "description": "Machine Instance ID",
   290            "type": "string",
   291            "default": null,
   292            "optional": true,
   293            "validation": "^.+-.+-.+-.+-.+$",
   294            "maxlength": 36
   295          },
   296          "version": {
   297            "prompt": "Version",
   298            "description": "Machine Version",
   299            "type": "string",
   300            "default": null,
   301            "optional": true,
   302            "validation": "^\\d+\\.\\d+\\.\\d+$",
   303            "maxlength": 20
   304          },
   305          "name": {
   306            "prompt": "Name",
   307            "description": "Machine Name",
   308            "type": "string",
   309            "default": null,
   310            "optional": true,
   311            "validation": "^[a-zA-Z][a-zA-Z0-9_-]+",
   312            "maxlength": 128
   313          },
   314          "path": {
   315            "prompt": "Path",
   316            "description": "Machine Path",
   317            "type": "string",
   318            "default": null,
   319            "optional": true,
   320            "validation": ".+",
   321            "maxlength": 512
   322          },
   323          "transition": {
   324            "prompt": "Transition Name",
   325            "description": "The transition event to send to the machine",
   326            "type": "string",
   327            "default": null,
   328            "optional": false,
   329            "validation": "^[a-zA-Z][a-zA-Z0-9_-]+$",
   330            "maxlength": 128
   331          }
   332        },
   333        "output": {
   334          "success": {
   335            "description": "Indicates if the transition was successfully accepted",
   336            "display_as": "Accepted",
   337            "type": "boolean"
   338          }
   339        },
   340        "display": "failed",
   341        "description": "Attempts to force a transition in a hosted Choria Autonomous Agent"
   342      }
   343    ]
   344  }