From dd19b3cf88967ef611e51b98a67feb82802b6fc6 Mon Sep 17 00:00:00 2001 From: dlavigne Date: Mon, 28 Mar 2016 11:47:58 -0400 Subject: [PATCH] Doc pkg_upgrade action. --- api/classes/pkg.rst | 51 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/api/classes/pkg.rst b/api/classes/pkg.rst index 7b579f7..139a66d 100644 --- a/api/classes/pkg.rst +++ b/api/classes/pkg.rst @@ -20,7 +20,7 @@ Every pkg class request contains the following parameters: | namespace | sysadm | | | | | | +---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ -| action | | supported actions include "pkg_info", "pkg_search", "list_categories", "list_repos", "pkg_audit" | +| action | | supported actions include "pkg_info", "pkg_search", "list_categories", "list_repos", "pkg_audit", "pkg_upgrade" | | | | | +---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+ @@ -589,4 +589,53 @@ The "pkg_audit" action performs an audit of all installed packages and reports a "id": "fooid", "name": "response", "namespace": "sysadm" + } + +.. index:: pkg_upgrade, pkg + +.. _Upgrade Packages: + +Upgrade Packages +================ + +The "pkg_upgrade" action upgrades all currently installed packages. The messages from the upgrade will be returned as a dispatcher event. Refer to the :ref:`Dispatcher Subsystem` for +instructions on how to subscribe to and query dispatcher events. + +**REST Request** + +.. code-block:: json + + PUT /sysadm/pkg + { + "action" : "pkg_upgrade" + } + +**WebSocket Request** + +.. code-block:: json + + { + "args" : { + "action" : "pkg_upgrade" + }, + "name" : "pkg", + "namespace" : "sysadm", + "id" : "fooid" + } + +**Response** + +.. code-block:: json + + { + "args": { + "pkg_upgrade": { + "proc_cmd": "pkg upgrade -y", + "proc_id": "sysadm_pkg_upgrade-{19ace7c9-0d83-4a0d-9249-0b56cb105762}", + "status": "pending" + } + }, + "id": "fooid", + "name": "response", + "namespace": "sysadm" } \ No newline at end of file