Doc pkg_upgrade action.

This commit is contained in:
dlavigne
2016-03-28 11:47:58 -04:00
parent 7aa65f4d22
commit dd19b3cf88

View File

@@ -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"
}