Add 3 new API calls (all almost the same - just different "actions" and the return message will be slightly different)
"action":"start" OR "stop" OR "restart"
This will [start/stop/restart] services on the system.
REQUIRED ARGUMENTS:
"services" : <string with a single service, or array of services>
EXAMPLE "start" command (change "services_started" in responce to "services_[started/stopped/restarted]" as needed to match the action:
REST Request (example):
-------------------------------
PUT /sysadm/services
{
"action" : "start",
"services" : [
"cupsd"
]
}
WebSocket Request:
-------------------------------
{
"args" : {
"action" : "start",
"services" : [
"cupsd"
]
},
"name" : "services",
"id" : "fooid",
"namespace" : "sysadm"
}
Response:
-------------------------------
{
"args": {
"services_started": [
"cupsd"
]
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
Modify the output fields for the sysadm/services, "list_services" action:
Now each service entry will look like this:
"accounting": {
"description": "",
"is_enabled": "false",
"name": "accounting",
"path": "/etc/rc.d/accounting",
"tag": "accounting_enable"
}
I will probably be adding an "is_running" [true/false] field here soon as well - the backend for that still needs to be written first.
Add a new API class/call to sysadm:
namespace: sysadm
name: services
This class is for managing all the background daemons on the system.
Initial API call:
args : {"action" : "list_services" }
This will return a list of all services available on the system.
*Note: return message shortened for example purposes - there are usually tons of services available
REST Request (example):
-------------------------------
PUT /sysadm/services
{
"action" : "list_services"
}
WebSocket Request:
-------------------------------
{
"args" : {
"action" : "list_services"
},
"id" : "fooid",
"namespace" : "sysadm",
"name" : "services"
}
Response:
-------------------------------
{
"args": {
"services": {
"accounting": {
"name": "accounting",
"tag": "accounting_enable"
},
"addswap": {
"name": "addswap",
"tag": "addswap_enable"
},
"amd": {
"name": "amd",
"tag": "amd_enable"
},
"apm": {
"name": "apm",
"tag": "apm_enable"
},
"apmd": {
"name": "apmd",
"tag": "apmd_enable"
},
"atm": {
"name": "atm",
"tag": "atm_enable"
}
}
},
"id": "fooid",
"name": "response",
"namespace": "sysadm"
}
- Line by line review of all .rst files in the API Reference Guide.
- Fix whitespace issues.
- Fix numerous spelling and grammar errors.
- Reworked numerous sections for clarity and flow.
- Fixed oversize tables to be fully PEP8 compliant.
- Whitespace fixes.
- Reworking text.
- Reducing the size of tables for better PEP8 conformity.
- Altering admonition box titles (use tip and danger).
- Update roles (use :guilabel: and verify other uses).
- Updated trueos_style to current.
- Updated menuselection arrow replacement patch to current.
- Reviewed API reference guide:
- Reviewed for :guilabel: additions.
- Added missing trademark symbols.
- Update Server handbook:
- Added missing trademaks.
- Replaced outdated link.
- Updated admonition boxes.
- Added :guilabel: role where necessary.
- Add more descriptive text of SysAdm and the goals of the project.
- Updated code-boxes.
- Moved API docs to general "docs" folder; all handbooks are now in the same area.
- Deleted "pcbsd_style" from all three handbooks as it is now trueos_style.
- Fixed a number of themeing elements for server and client handbooks.
- Added logos to both handbooks.
Add a new action to the sysadm/users class: "groupmod"
This action allows for modifying a given group on the system
REQUIRED: "name"="<name of group to modify>"
and any one of these options is also required:
"users":["array of users"] (will set the list of users for this group)
"add_users":["array of users"] (will add the listed users to the current users)
"remove_users":["array of users"] (will remove the listed users from the current users)
Example API Request (JSON)
{
"id":"sample",
"namespace":"sysadm",
"name":"users",
"args":{
"action":"groupmod",
"name":"operator",
"users":["user1","user2"]
}
}
In the sysadm/users "action"="usershow" output, put a "canremove"="false" within the object of the currently-active user (so the client knows which user(s) cannot be removed right now). We might be able to extend this later on the server side to set that flag for *all* active users on the system instead.
Modify a couple sysadm/users API calls:
"action"="usermod":
Add in the optional PersonaCrypt arguments:
1) "personacrypt_init"="<device>" AND "personacrypt_password"="<password for device>"
This will initialize a personacrypt device and move the current home directory contents onto the device.
2) "personacrypt_import"="<base64-encoded contents of a PC key file>"
This will import an existing key for the designated user and allow a previously initialized device to be used for this user.
3) "personacrypt_disable"="<device password>"
This will disable the personacrypt key for this user, and merge any data from the device back onto the local system (if <device password> is valid/non-empty)
- Added trueos_style to themes/
- Added sysadm_circle_red.png
- Edited conf.py:
- Use trueos_style for html builds.
- Use sysadm_circle_red.png as the sidebar logo.
- Altered handbook name to "SysAdm API reference guide".
Add a new optional input argument to the sysadm/updates, "checkupdates" action:
"force":"[true/false]" (default is false)
This tells the check system to skip all previous checks for updates and re-run the update routines to look for new updates (if force==true), otherwise it might return the previous result of the update check if not enough time has passed since the other check.
Add a new field in the output args for the sysadm/updates check for updates:
"last_check":"<ISO date/time stamp>"
This returns the timestamp the last time a "full" check was performed (since some checks are flagged as quick/automatic and just re-use the previous check unless a significant amount of time has passed first - 12 hours is what it is set to right now).
This will look for any currently-running pc-updatemanager processes and kill/stop them as needed.
Example:
{
"id":"dummy",
"namespace":"sysadm",
"name":"update",
"args": {
"action":"stopupdate"
}
}
Output arguments:
"args":{
"stopupdate":{
"result":"success" or "error:<error text>"
}
}
Remove the "fbsdupdate" and "fbsdupdatepkgs" options within the sysadm-update API call for starting an update. These options are no longer available with base pkgs (everything is run through the "pkgupdate" option instead).
- Fixed every sphinx build error for JSON parsing.
- For invalid JSON messages, replaced .. code-block:: JSON with the
generic code block directive ::.
- Fixed multiple errors across various valid JSON code blocks.
- Fixed a few spacing errors with .. note:: entries.