Doc setsysctl action.

This commit is contained in:
dlavigne
2016-02-04 11:07:54 -05:00
parent 661c0e8cbe
commit ee8fa9d436

View File

@@ -19,7 +19,7 @@ The systemmanager class is used to retrieve information about the system. Every
| | | |
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
| action | | supported actions include "memorystats", "cpupercentage", "cputemps", "procinfo", "killproc", "batteryinfo", |
| | | "externalmounts", "systemmanager", and "sysctllist" |
| | | "externalmounts", "systemmanager", "sysctllist", and "setsysctl" |
| | | |
+---------------------------------+---------------+----------------------------------------------------------------------------------------------------------------------+
@@ -658,4 +658,70 @@ The "sysctllist" action lists returns the list of all setable sysctl values. Sin
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
.. index:: setsysctl, systemmanager
.. _Set a Sysctl:
Set a Sysctl
============
The "setsysctl" action sets the specified setable sysctl to the specified value. The response indicates that the old value was changed to the new value.
**REST Request**
.. code-block:: json
PUT /sysadm/systemmanager
{
"value" : "0",
"sysctl" : "security.jail.mount_devfs_allowed",
"action" : "setsysctl"
}
**REST Response**
.. code-block:: json
{
"args": {
"setsysctl": {
"response": "security.jail.mount_devfs_allowed: 1 -> 0",
"sysctl": "security.jail.mount_devfs_allowed",
"value": "0"
}
}
}
**WebSocket Request**
.. code-block:: json
{
"args" : {
"value" : "0",
"action" : "setsysctl",
"sysctl" : "security.jail.mount_devfs_allowed"
},
"name" : "systemmanager",
"namespace" : "sysadm",
"id" : "fooid"
}
**WebSocket Response**
.. code-block:: json
{
"args": {
"setsysctl": {
"response": "security.jail.mount_devfs_allowed: 1 -> 0",
"sysctl": "security.jail.mount_devfs_allowed",
"value": "0"
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}