github.com/choria-io/go-choria@v0.28.1-0.20240416190746-b3bf9c7d5a45/providers/ddlresolver/testdata/dir1/choria/agent/one.json (about)

     1  {
     2      "$schema": "https://choria.io/schemas/mcorpc/agent:1.json",
     3      "metadata": {
     4          "name": "one",
     5          "description": "Manage Operating System Packages",
     6          "author": "R.I.Pienaar <rip@devco.net>",
     7          "license": "Apache-2.0",
     8          "version": "5.0.0",
     9          "url": "https://github.com/choria-plugins/package-agent",
    10          "timeout": 180
    11      },
    12      "actions": [
    13          {
    14              "action": "apt_checkupdates",
    15              "input": {},
    16              "output": {
    17                  "output": {
    18                      "description": "Output from APT",
    19                      "display_as": "Output",
    20                      "default": null
    21                  },
    22                  "outdated_packages": {
    23                      "description": "Outdated packages",
    24                      "display_as": "Outdated Packages",
    25                      "default": null
    26                  },
    27                  "exitcode": {
    28                      "description": "The exitcode from the apt command",
    29                      "display_as": "Exit Code",
    30                      "default": null
    31                  }
    32              },
    33              "display": "always",
    34              "description": "Check for APT updates"
    35          },
    36          {
    37              "action": "apt_update",
    38              "input": {},
    39              "output": {
    40                  "output": {
    41                      "description": "Output from apt-get",
    42                      "display_as": "Output",
    43                      "default": null
    44                  },
    45                  "exitcode": {
    46                      "description": "The exitcode from the apt-get command",
    47                      "display_as": "Exit Code",
    48                      "default": null
    49                  }
    50              },
    51              "display": "failed",
    52              "description": "Update the apt cache"
    53          },
    54          {
    55              "action": "checkupdates",
    56              "input": {},
    57              "output": {
    58                  "package_manager": {
    59                      "description": "The detected package manager",
    60                      "display_as": "Package Manager",
    61                      "default": null
    62                  },
    63                  "output": {
    64                      "description": "Output from Package Manager",
    65                      "display_as": "Output",
    66                      "default": null
    67                  },
    68                  "outdated_packages": {
    69                      "description": "Outdated packages",
    70                      "display_as": "Outdated Packages",
    71                      "default": null
    72                  },
    73                  "exitcode": {
    74                      "description": "The exitcode from the package manager command",
    75                      "display_as": "Exit Code",
    76                      "default": null
    77                  }
    78              },
    79              "display": "always",
    80              "description": "Check for updates"
    81          },
    82          {
    83              "action": "count",
    84              "input": {},
    85              "output": {
    86                  "output": {
    87                      "description": "Count of packages installed",
    88                      "display_as": "Count",
    89                      "default": null
    90                  },
    91                  "exitcode": {
    92                      "description": "The exitcode from the rpm/dpkg command",
    93                      "display_as": "Exit Code",
    94                      "default": null
    95                  }
    96              },
    97              "display": "failed",
    98              "description": "Get number of packages installed",
    99              "aggregate": [
   100                  {
   101                      "function": "summary",
   102                      "args": [
   103                          "output"
   104                      ]
   105                  },
   106                  {
   107                      "function": "summary",
   108                      "args": [
   109                          "output"
   110                      ]
   111                  }
   112              ]
   113          },
   114          {
   115              "action": "install",
   116              "input": {
   117                  "package": {
   118                      "prompt": "Package Name",
   119                      "description": "Package to install",
   120                      "type": "string",
   121                      "default": null,
   122                      "optional": false,
   123                      "validation": "shellsafe",
   124                      "maxlength": 90
   125                  },
   126                  "version": {
   127                      "prompt": "Package version",
   128                      "description": "Version of package to install",
   129                      "type": "string",
   130                      "default": null,
   131                      "optional": true,
   132                      "validation": "shellsafe",
   133                      "maxlength": 90
   134                  }
   135              },
   136              "output": {
   137                  "output": {
   138                      "description": "Output from the package manager",
   139                      "display_as": "Output",
   140                      "default": null
   141                  },
   142                  "epoch": {
   143                      "description": "Package epoch number",
   144                      "display_as": "Epoch",
   145                      "default": null
   146                  },
   147                  "arch": {
   148                      "description": "Package architecture",
   149                      "display_as": "Arch",
   150                      "default": null
   151                  },
   152                  "ensure": {
   153                      "description": "Full package version",
   154                      "display_as": "Ensure",
   155                      "default": null
   156                  },
   157                  "version": {
   158                      "description": "Version number",
   159                      "display_as": "Version",
   160                      "default": null
   161                  },
   162                  "provider": {
   163                      "description": "Provider used to retrieve information",
   164                      "display_as": "Provider",
   165                      "default": null
   166                  },
   167                  "name": {
   168                      "description": "Package name",
   169                      "display_as": "Name",
   170                      "default": null
   171                  },
   172                  "release": {
   173                      "description": "Package release number",
   174                      "display_as": "Release",
   175                      "default": null
   176                  }
   177              },
   178              "display": "failed",
   179              "description": "Install a package",
   180              "aggregate": [
   181                  {
   182                      "function": "summary",
   183                      "args": [
   184                          "ensure"
   185                      ]
   186                  },
   187                  {
   188                      "function": "summary",
   189                      "args": [
   190                          "ensure"
   191                      ]
   192                  }
   193              ]
   194          },
   195          {
   196              "action": "md5",
   197              "input": {},
   198              "output": {
   199                  "output": {
   200                      "description": "md5 of list of packages installed",
   201                      "display_as": "MD5",
   202                      "default": null
   203                  },
   204                  "exitcode": {
   205                      "description": "The exitcode from the rpm/dpkg command",
   206                      "display_as": "Exit Code",
   207                      "default": null
   208                  }
   209              },
   210              "display": "failed",
   211              "description": "Get md5 digest of list of packages installed",
   212              "aggregate": [
   213                  {
   214                      "function": "summary",
   215                      "args": [
   216                          "output"
   217                      ]
   218                  },
   219                  {
   220                      "function": "summary",
   221                      "args": [
   222                          "output"
   223                      ]
   224                  }
   225              ]
   226          },
   227          {
   228              "action": "purge",
   229              "input": {
   230                  "package": {
   231                      "prompt": "Package Name",
   232                      "description": "Package to purge",
   233                      "type": "string",
   234                      "default": null,
   235                      "optional": false,
   236                      "validation": "shellsafe",
   237                      "maxlength": 90
   238                  }
   239              },
   240              "output": {
   241                  "output": {
   242                      "description": "Output from the package manager",
   243                      "display_as": "Output",
   244                      "default": null
   245                  },
   246                  "epoch": {
   247                      "description": "Package epoch number",
   248                      "display_as": "Epoch",
   249                      "default": null
   250                  },
   251                  "arch": {
   252                      "description": "Package architecture",
   253                      "display_as": "Arch",
   254                      "default": null
   255                  },
   256                  "ensure": {
   257                      "description": "Full package version",
   258                      "display_as": "Ensure",
   259                      "default": null
   260                  },
   261                  "version": {
   262                      "description": "Version number",
   263                      "display_as": "Version",
   264                      "default": null
   265                  },
   266                  "provider": {
   267                      "description": "Provider used to retrieve information",
   268                      "display_as": "Provider",
   269                      "default": null
   270                  },
   271                  "name": {
   272                      "description": "Package name",
   273                      "display_as": "Name",
   274                      "default": null
   275                  },
   276                  "release": {
   277                      "description": "Package release number",
   278                      "display_as": "Release",
   279                      "default": null
   280                  }
   281              },
   282              "display": "failed",
   283              "description": "Purge a package",
   284              "aggregate": [
   285                  {
   286                      "function": "summary",
   287                      "args": [
   288                          "ensure"
   289                      ]
   290                  },
   291                  {
   292                      "function": "summary",
   293                      "args": [
   294                          "ensure"
   295                      ]
   296                  }
   297              ]
   298          },
   299          {
   300              "action": "status",
   301              "input": {
   302                  "package": {
   303                      "prompt": "Package Name",
   304                      "description": "Package to retrieve the status of",
   305                      "type": "string",
   306                      "default": null,
   307                      "optional": false,
   308                      "validation": "shellsafe",
   309                      "maxlength": 90
   310                  }
   311              },
   312              "output": {
   313                  "output": {
   314                      "description": "Output from the package manager",
   315                      "display_as": "Output",
   316                      "default": null
   317                  },
   318                  "epoch": {
   319                      "description": "Package epoch number",
   320                      "display_as": "Epoch",
   321                      "default": null
   322                  },
   323                  "arch": {
   324                      "description": "Package architecture",
   325                      "display_as": "Arch",
   326                      "default": null
   327                  },
   328                  "ensure": {
   329                      "description": "Full package version",
   330                      "display_as": "Ensure",
   331                      "default": null
   332                  },
   333                  "version": {
   334                      "description": "Version number",
   335                      "display_as": "Version",
   336                      "default": null
   337                  },
   338                  "provider": {
   339                      "description": "Provider used to retrieve information",
   340                      "display_as": "Provider",
   341                      "default": null
   342                  },
   343                  "name": {
   344                      "description": "Package name",
   345                      "display_as": "Name",
   346                      "default": null
   347                  },
   348                  "release": {
   349                      "description": "Package release number",
   350                      "display_as": "Release",
   351                      "default": null
   352                  }
   353              },
   354              "display": "always",
   355              "description": "Get the status of a package",
   356              "aggregate": [
   357                  {
   358                      "function": "summary",
   359                      "args": [
   360                          "ensure"
   361                      ]
   362                  },
   363                  {
   364                      "function": "summary",
   365                      "args": [
   366                          "arch"
   367                      ]
   368                  },
   369                  {
   370                      "function": "summary",
   371                      "args": [
   372                          "ensure"
   373                      ]
   374                  },
   375                  {
   376                      "function": "summary",
   377                      "args": [
   378                          "arch"
   379                      ]
   380                  }
   381              ]
   382          },
   383          {
   384              "action": "uninstall",
   385              "input": {
   386                  "package": {
   387                      "prompt": "Package Name",
   388                      "description": "Package to uninstall",
   389                      "type": "string",
   390                      "default": null,
   391                      "optional": false,
   392                      "validation": "shellsafe",
   393                      "maxlength": 90
   394                  }
   395              },
   396              "output": {
   397                  "output": {
   398                      "description": "Output from the package manager",
   399                      "display_as": "Output",
   400                      "default": null
   401                  },
   402                  "epoch": {
   403                      "description": "Package epoch number",
   404                      "display_as": "Epoch",
   405                      "default": null
   406                  },
   407                  "arch": {
   408                      "description": "Package architecture",
   409                      "display_as": "Arch",
   410                      "default": null
   411                  },
   412                  "ensure": {
   413                      "description": "Full package version",
   414                      "display_as": "Ensure",
   415                      "default": null
   416                  },
   417                  "version": {
   418                      "description": "Version number",
   419                      "display_as": "Version",
   420                      "default": null
   421                  },
   422                  "provider": {
   423                      "description": "Provider used to retrieve information",
   424                      "display_as": "Provider",
   425                      "default": null
   426                  },
   427                  "name": {
   428                      "description": "Package name",
   429                      "display_as": "Name",
   430                      "default": null
   431                  },
   432                  "release": {
   433                      "description": "Package release number",
   434                      "display_as": "Release",
   435                      "default": null
   436                  }
   437              },
   438              "display": "failed",
   439              "description": "Uninstall a package",
   440              "aggregate": [
   441                  {
   442                      "function": "summary",
   443                      "args": [
   444                          "ensure"
   445                      ]
   446                  },
   447                  {
   448                      "function": "summary",
   449                      "args": [
   450                          "ensure"
   451                      ]
   452                  }
   453              ]
   454          },
   455          {
   456              "action": "update",
   457              "input": {
   458                  "package": {
   459                      "prompt": "Package Name",
   460                      "description": "Package to update",
   461                      "type": "string",
   462                      "default": null,
   463                      "optional": false,
   464                      "validation": "shellsafe",
   465                      "maxlength": 90
   466                  }
   467              },
   468              "output": {
   469                  "output": {
   470                      "description": "Output from the package manager",
   471                      "display_as": "Output",
   472                      "default": null
   473                  },
   474                  "epoch": {
   475                      "description": "Package epoch number",
   476                      "display_as": "Epoch",
   477                      "default": null
   478                  },
   479                  "arch": {
   480                      "description": "Package architecture",
   481                      "display_as": "Arch",
   482                      "default": null
   483                  },
   484                  "ensure": {
   485                      "description": "Full package version",
   486                      "display_as": "Ensure",
   487                      "default": null
   488                  },
   489                  "version": {
   490                      "description": "Version number",
   491                      "display_as": "Version",
   492                      "default": null
   493                  },
   494                  "provider": {
   495                      "description": "Provider used to retrieve information",
   496                      "display_as": "Provider",
   497                      "default": null
   498                  },
   499                  "name": {
   500                      "description": "Package name",
   501                      "display_as": "Name",
   502                      "default": null
   503                  },
   504                  "release": {
   505                      "description": "Package release number",
   506                      "display_as": "Release",
   507                      "default": null
   508                  }
   509              },
   510              "display": "failed",
   511              "description": "Update a package",
   512              "aggregate": [
   513                  {
   514                      "function": "summary",
   515                      "args": [
   516                          "ensure"
   517                      ]
   518                  },
   519                  {
   520                      "function": "summary",
   521                      "args": [
   522                          "ensure"
   523                      ]
   524                  }
   525              ]
   526          },
   527          {
   528              "action": "yum_checkupdates",
   529              "input": {},
   530              "output": {
   531                  "output": {
   532                      "description": "Output from YUM",
   533                      "display_as": "Output",
   534                      "default": null
   535                  },
   536                  "outdated_packages": {
   537                      "description": "Outdated packages",
   538                      "display_as": "Outdated Packages",
   539                      "default": null
   540                  },
   541                  "exitcode": {
   542                      "description": "The exitcode from the yum command",
   543                      "display_as": "Exit Code",
   544                      "default": null
   545                  }
   546              },
   547              "display": "always",
   548              "description": "Check for YUM updates"
   549          },
   550          {
   551              "action": "yum_clean",
   552              "input": {
   553                  "mode": {
   554                      "prompt": "Yum clean mode",
   555                      "description": "One of the various supported clean modes",
   556                      "type": "list",
   557                      "default": null,
   558                      "optional": true,
   559                      "list": [
   560                          "all",
   561                          "headers",
   562                          "packages",
   563                          "metadata",
   564                          "dbcache",
   565                          "plugins",
   566                          "expire-cache"
   567                      ]
   568                  }
   569              },
   570              "output": {
   571                  "output": {
   572                      "description": "Output from YUM",
   573                      "display_as": "Output",
   574                      "default": null
   575                  },
   576                  "exitcode": {
   577                      "description": "The exitcode from the yum command",
   578                      "display_as": "Exit Code",
   579                      "default": null
   580                  }
   581              },
   582              "display": "failed",
   583              "description": "Clean the YUM cache"
   584          }
   585      ]
   586  }