Commit Graph

903 Commits

Author SHA1 Message Date
ZackaryWelch
6447b0fed1 Moved the SysAdm client manpage to the client repo 2017-08-24 13:21:10 -04:00
ZackaryWelch
cf5b11a539 Added a man page for the sysadm cli client 2017-08-24 11:26:23 -04:00
Tim Moore
93f4d89b7d Remove (Coming Soon) from SysAdm issues tracker 2017-08-21 12:27:56 -04:00
Ken Moore
4e23691d50 Commit some more work on an /etc/rc.conf writing routine for networking.
Not enabled for API calls yet.
2017-08-10 14:53:30 -04:00
Ken Moore
376eaa4e37 [API CHANGE] Add a new action for sysadm/network class:
"action" = "list-settings"
List all the settings for network devices that are saved in /etc/rc.conf
-----------------

REST Request (example):
-------------------------------
PUT /sysadm/network
{
   "action" : "list-settings"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "namespace" : "sysadm",
   "args" : {
      "action" : "list-settings"
   },
   "name" : "network"
}

Response:
-------------------------------
{
  "args": {
    "lo0": {
      "associated_device": "",
      "device": "lo0",
      "static_gateway": "",
      "static_ipv4": "",
      "static_ipv6": "",
      "static_netmask": "",
      "use_dhcp": "false"
    },
    "re0": {
      "associated_device": "",
      "device": "re0",
      "static_gateway": "",
      "static_ipv4": "",
      "static_ipv6": "",
      "static_netmask": "",
      "use_dhcp": "true"
    },
    "ue0": {
      "associated_device": "",
      "device": "ue0",
      "static_gateway": "",
      "static_ipv4": "",
      "static_ipv6": "",
      "static_netmask": "",
      "use_dhcp": "true"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2017-08-10 13:51:35 -04:00
Ken Moore
4dded17898 Important update to pkg backend:
1) Change the API calls to all be name-based instead of origin-based
2) This fixes the detection/viewing of base packages
3) This makes the AppCafe 100% ready for the flavours/subpackages which is coming from upstream pkg sometime soon.
2017-08-10 10:38:32 -04:00
Ken Moore
6ab7c3dc01 Adjust the logic of the dispatcher processes a bit:
For the incremental process notifications, only include the latest output from the process, not the full thing up to that point. Some processes (life preserver, pc-updatemanager) run for a long time and eventually get massive log files.
2017-08-07 11:52:06 -04:00
Ken Moore
34b388277d [API CHANGE] Add a new "action" for sysadm/systemmanager
"action"="deviceinfo" will return the full information about all devices attached to the system (via `pciconf -lv`)
-------------------

REST Request (example):
-------------------------------
PUT /sysadm/systemmanager
{
   "action" : "deviceinfo"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "name" : "systemmanager",
   "namespace" : "sysadm",
   "args" : {
      "action" : "deviceinfo"
   }
}

Response:
-------------------------------
{
  "args": {
    "deviceinfo": {
      "ahci0": {
        "class": "mass storage",
        "device": "8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode]",
        "subclass": "SATA",
        "vendor": "Intel Corporation"
      },
      "ehci0": {
        "class": "serial bus",
        "device": "8 Series/C220 Series Chipset Family USB EHCI",
        "subclass": "USB",
        "vendor": "Intel Corporation"
      },
      "ehci1": {
        "class": "serial bus",
        "device": "8 Series/C220 Series Chipset Family USB EHCI",
        "subclass": "USB",
        "vendor": "Intel Corporation"
      },
      "hdac0": {
        "class": "multimedia",
        "subclass": "HDA",
        "vendor": "NVIDIA Corporation"
      },
      "hdac1": {
        "class": "multimedia",
        "device": "8 Series/C220 Series Chipset High Definition Audio Controller",
        "subclass": "HDA",
        "vendor": "Intel Corporation"
      },
      "hostb0": {
        "class": "bridge",
        "device": "4th Gen Core Processor DRAM Controller",
        "subclass": "HOST-PCI",
        "vendor": "Intel Corporation"
      },
      "isab0": {
        "class": "bridge",
        "device": "B85 Express LPC Controller",
        "subclass": "PCI-ISA",
        "vendor": "Intel Corporation"
      },
      "none0": {
        "class": "simple comms",
        "device": "8 Series/C220 Series Chipset Family MEI Controller",
        "vendor": "Intel Corporation"
      },
      "none1": {
        "class": "serial bus",
        "device": "8 Series/C220 Series Chipset Family SMBus Controller",
        "subclass": "SMBus",
        "vendor": "Intel Corporation"
      },
      "pcib1": {
        "class": "bridge",
        "device": "Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller",
        "subclass": "PCI-PCI",
        "vendor": "Intel Corporation"
      },
      "pcib2": {
        "class": "bridge",
        "device": "8 Series/C220 Series Chipset Family PCI Express Root Port",
        "subclass": "PCI-PCI",
        "vendor": "Intel Corporation"
      },
      "pcib3": {
        "class": "bridge",
        "device": "8 Series/C220 Series Chipset Family PCI Express Root Port",
        "subclass": "PCI-PCI",
        "vendor": "Intel Corporation"
      },
      "pcib4": {
        "class": "bridge",
        "device": "8 Series/C220 Series Chipset Family PCI Express Root Port",
        "subclass": "PCI-PCI",
        "vendor": "Intel Corporation"
      },
      "pcib5": {
        "class": "bridge",
        "device": "82801 PCI Bridge",
        "subclass": "PCI-PCI",
        "vendor": "Intel Corporation"
      },
      "re0": {
        "class": "network",
        "device": "RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller",
        "subclass": "ethernet",
        "vendor": "Realtek Semiconductor Co., Ltd."
      },
      "vgapci0": {
        "class": "display",
        "device": "GM206 [GeForce GTX 960]",
        "subclass": "VGA",
        "vendor": "NVIDIA Corporation"
      },
      "xhci0": {
        "class": "serial bus",
        "device": "8 Series/C220 Series Chipset Family USB xHCI",
        "subclass": "USB",
        "vendor": "Intel Corporation"
      }
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2017-08-02 11:14:38 -04:00
Ken Moore
00251895a3 [API CHANGE] Add a new "pkg_install_verify" action to sysadm/pkg
Add an "action" = "pkg_install_verify" option to the sysadm/pkg API call.
REQUIRED: "pkg_origins" - string or array of pkg origins
	"repo" - remote repository that the package will be installed from.
----------

REST Request (example):
-------------------------------
PUT /sysadm/pkg
{
   "repo" : "trueos-major",
   "action" : "pkg_install_verify",
   "pkg_origins" : [
      "www/qupzilla-qt5-webkit"
   ]
}

WebSocket Request:
-------------------------------
{
   "name" : "pkg",
   "namespace" : "sysadm",
   "id" : "fooid",
   "args" : {
      "action" : "pkg_install_verify",
      "pkg_origins" : [
         "www/qupzilla-qt5-webkit"
      ],
      "repo" : "trueos-major"
   }
}

Response:
-------------------------------
{
  "args": {
    "pkg_install_verify": {
      "conflicts": [],
      "install": {
        "qupzilla-qt5-webkit": {
          "comment": "Web browser based on WebKit engine and Qt Framework",
          "flatsize": "13380132",
          "name": "qupzilla-qt5-webkit",
          "origin": "www/qupzilla-qt5-webkit",
          "pkgsize": "2574460",
          "version": "1.8.9_3"
        }
      }
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2017-08-01 13:08:51 -04:00
Ken Moore
09c41edaca Clean up some more whitespace in sysadm server files. 2017-07-27 15:19:54 -04:00
Ken Moore
4a866b924f Disable some debug statements that were dumping Life Preserver logs into the webserver log file. 2017-07-27 15:14:22 -04:00
Ken Moore
58d309031f Fix up a couple Qt5 dependencies in the sysutils/sysadm port. 2017-07-07 09:11:06 -04:00
Ken Moore
e78f6a003f Merge branch 'master' of github.com:trueos/sysadm 2017-07-03 10:36:52 -04:00
Ken Moore
724c8ac7a8 Cleanup some whitespace in SysAdm files while I was looking for something... 2017-07-03 10:36:21 -04:00
q5sys
c4750152a6 prototype sourcetree management for sysadm 2017-06-05 11:40:50 -04:00
q5sys
a0a585353c a few additions to sysadm-general 2017-06-05 10:41:40 -04:00
Ken Moore
3276b32f80 NEW API: sysadm/iocage "action"="cleantemplates"
This will delete all templates which have been cached on the local system.
-----------

REST Request (example):
-------------------------------
PUT /sysadm/iocage
{
   "action" : "cleantemplates"
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "args" : {
      "action" : "cleantemplates"
   },
   "id" : "fooid",
   "name" : "iocage"
}

Response:
-------------------------------
{
  "args": {
    "cleantemplates": {
      "success": "All templates have been cleaned."
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2017-06-02 11:13:29 -04:00
Ken Moore
c744785115 New API: sysadm/iocage "action"="cleanreleases"
This will remove all the RELEASE's which have been downloaded/cached on the local system.

----------

REST Request (example):
-------------------------------
PUT /sysadm/iocage
{
   "action" : "cleanreleases"
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "args" : {
      "action" : "cleanreleases"
   },
   "id" : "fooid",
   "name" : "iocage"
}

Response:
-------------------------------
{
  "args": {
    "cleanreleases": {
      "success": "All RELEASEs have been cleaned."
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2017-06-02 11:11:46 -04:00
Ken Moore
acbf8d6730 Adjust the fetch plugin function to use the new syntax that brandon just committed upstream (did not work properly anyway with the old syntax) 2017-06-02 10:29:52 -04:00
Ken Moore
b428fb531a NEW API: sysadm/iocage "action"="createplugin"
This will fetch/create a new plugin jail.
Required Arguements:
"action"="createplugin"
"plugin"="name_of_plugin"
"net_device"="network_device_to_use"
"ip4" *or* "ip6" with the address to assign to the new jail (IPv4 or IPv6 address)

Changelog: yes
------------

REST Request (example):
-------------------------------
PUT /sysadm/iocage
{
   "plugin" : "gitlab",
   "net_device" : "re0",
   "action" : "createplugin",
   "ip4" : "10.20.0.130"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "name" : "iocage",
   "args" : {
      "ip4" : "10.20.0.130",
      "plugin" : "gitlab",
      "net_device" : "re0",
      "action" : "createplugin"
   },
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "createplugin": {
      "started_dispatcher_id": "sysadm_iocage_fetch_plugin_gitlab"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2017-06-02 09:52:53 -04:00
Ken Moore
737e90c42a NEW API CALL: sysadm/iocage "action"="fetchreleases"
This will fetch any remotely-available FreeBSD releases and update/cache them on the local system for use when spinning up jails.
REQUIRED ARGUMENTS:
"action" = "fetchreleases"
"releases": String *or* Array of strings containing the version/release to fetch.

Changelog: yes
-----------------

REST Request (example):
-------------------------------
PUT /sysadm/iocage
{
   "action" : "fetchreleases",
   "releases" : [
      "10.3-RELEASE",
      "10.2-RELEASE"
   ]
}

WebSocket Request:
-------------------------------
{
   "args" : {
      "releases" : [
         "10.3-RELEASE",
         "10.2-RELEASE"
      ],
      "action" : "fetchreleases"
   },
   "name" : "iocage",
   "namespace" : "sysadm",
   "id" : "fooid"
}

Response:
-------------------------------
{
  "args": {
    "fetchreleases": {
      "started_dispatcher_id": [
        "sysadm_iocage_fetch_release_10.3-RELEASE",
        "sysadm_iocage_fetch_release_10.2-RELEASE"
      ]
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2017-06-02 08:24:45 -04:00
Ken Moore
a3c44a5f5b NEW API: sysadm/iocage "action"="listjails"
This will list all the current jails on the system.

Output syntax is almost exactly the same as the listtemplates action:

{
  "listjails":{
    "jails:{
      "jid_1":{
        [same 10 fields: jid, uuid, boot, state, tag, type, release, ip4, ip6, template]
      },
      "jid_2":{
        [same 10 fields]
      }
    }
  }
}
2017-06-01 16:13:34 -04:00
Ken Moore
fdd864e298 NEW API: sysadm/iocage "action"="listtemplates"
This will list all the jail templates currently available on the local system.

Example Arguments Reply:

{
 "listtemplates":{
  "templates" : {
   "template_1" : {
    "jid" : "jail_id",
    "uuid": "unique_id_string",
    "boot": "on/off",
    "state":"jail_state",
    "tag":"jail_tag",
    "type":"jail_type",
    "release":"freebsd_release",
    "ip4":"ipv4_address",
    "ip6":"ipv6_address",
    "template":"template_1"
   }
  }
 }
}
2017-06-01 16:04:01 -04:00
Ken Moore
4333ac6fba API Adjustment: sysadm/iocage "action"="listplugins"
Adjust the output syntax to also include "local" plugins (those already installed). The "remote" plugin format is unchanged.

Output Arguments example:
{
 "listplugins":{
  "remote" : { [same as before] },
  "local" : {
    "pluginname_jid" : {
      "jid" : "number",
      "uuid" : "uuid_string",
      "boot" : "on/off",
      "state" : "activestate",
      "tag" : "pluginname",
      "type" : "plugin",
      "release" : "freebsd_release",
      "ip4" : "ipv4_address",
      "ip6" : "ipv6_address",
      "template" : "-"
    }
  }
 }
}
2017-06-01 15:34:26 -04:00
Ken Moore
859b441ae2 New API Call: sysadm/iocage "action"="activatestatus"
This will list the current pool which is activated for iocage to use.

Example API return (arguments):
{
  "activatestatus":{
    "activated":"true",
    "pool":"my_zpool"
  }
}

Changelog: yes
2017-06-01 13:50:10 -04:00
Ken Moore
ebae121639 Start fixing up the iocage plugin fetch function - not working yet. 2017-05-31 14:34:54 -04:00
Ken Moore
2bf23b8aaf API Change: sysadm/iocage - "action"="listreleases"
Add an API call for listing all the FreeBSD releases supported for iocage jails

REST Request (example):
-------------------------------
PUT /sysadm/iocage
{
   "action" : "listreleases"
}

WebSocket Request:
-------------------------------
{
   "args" : {
      "action" : "listreleases"
   },
   "name" : "iocage",
   "id" : "fooid",
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "listreleases": {
      "local": [
        ""
      ],
      "remote": [
        "9.3-RELEASE (EOL)",
        "10.1-RELEASE (EOL)",
        "10.2-RELEASE (EOL)",
        "10.3-RELEASE",
        "11.0-RELEASE"
      ]
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}

Changelog: yes
2017-05-31 14:24:21 -04:00
Ken Moore
f1c3651ba5 API CHANGE: sysadm/iocage - "action"="listplugins"
Add this API call to list all the available plugins for iocage.

REST Request (example):
-------------------------------
PUT /sysadm/iocage
{
   "action" : "listplugins"
}

WebSocket Request:
-------------------------------
{
   "namespace" : "sysadm",
   "args" : {
      "action" : "listplugins"
   },
   "name" : "iocage",
   "id" : "fooid"
}

Response:
-------------------------------
{
  "args": {
    "listplugins": {
      "remote": {
        "btsync": {
          "description": "Resilient, fast and scalable file sync software for enterprises and individuals.",
          "id": "btsync",
          "name": "BitTorrent Sync"
        },
        "couchpotato": {
          "description": "CouchPotato is an automatic NZB and torrent downloader.",
          "id": "couchpotato",
          "name": "CouchPotato"
        },
        "crashplan": {
          "description": "Computer backup and data storage made simple.",
          "id": "crashplan",
          "name": "Crashplan"
        },
        "deluge": {
          "description": "Bittorrent client using Python, and libtorrent-rasterbar",
          "id": "deluge",
          "name": "Deluge"
        },
        "emby": {
          "description": "Home media server built using mono and other open source technologies",
          "id": "emby",
          "name": "Emby"
        },
        "gitlab": {
          "description": "Powerful features for modern software development",
          "id": "gitlab",
          "name": "GitLab"
        },
        "jenkins": {
          "description": "Jenkins CI",
          "id": "jenkins",
          "name": "Jenkins"
        },
        "jenkins-lts": {
          "description": "Jenkins CI (Long Term Support Version)",
          "id": "jenkins-lts",
          "name": "Jenkins (LTS)"
        },
        "madsonic": {
          "description": "Open-source web-based media streamer and jukebox.",
          "id": "madsonic",
          "name": "MadSonic"
        },
        "nextcloud": {
          "description": "Access, share and protect your files, calendars, contacts, communication & more at home and in your enterprise.",
          "id": "nextcloud",
          "name": "NextCloud"
        },
        "plexmediaserver": {
          "description": "The Plex media server system",
          "id": "plexmediaserver",
          "name": "Plex Media Server"
        },
        "plexmediaserver-plexpass": {
          "description": "The Plex media server system",
          "id": "plexmediaserver-plexpass",
          "name": "Plex Media Server (PlexPass)"
        },
        "quasselcore": {
          "description": "Quassel Core is a daemon/headless IRC client, part of Quassel, that supports 24/7 connectivity. Quassel Client can be attached to it to.",
          "id": "quasselcore",
          "name": "Quasselcore"
        },
        "sickrage": {
          "description": "Automatic Video Library Manager for TV Shows",
          "id": "sickrage",
          "name": "SickRage"
        },
        "sonarr": {
          "description": "PVR for Usenet and BitTorrent users",
          "id": "sonarr",
          "name": "Sonarr"
        },
        "subsonic": {
          "description": "Open-source web-based media streamer and jukebox.",
          "id": "subsonic",
          "name": "SubSonic"
        },
        "syncthing": {
          "description": "Personal cloud sync",
          "id": "syncthing",
          "name": "Syncthing"
        },
        "transmission": {
          "description": "Fast and lightweight daemon BitTorrent client",
          "id": "transmission",
          "name": "Transmission"
        }
      }
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}

Changelog: yes
2017-05-31 14:19:10 -04:00
Ken Moore
35759b12a1 Merge branch 'master' of github.com:trueos/sysadm 2017-05-30 11:46:59 -04:00
Ken Moore
0e2d941ae1 Add the qMDNS class to SysAdm's backend source tree (not tied in yet) 2017-05-30 11:46:31 -04:00
Tim Moore
2105b59780 Move TrueOS website link. 2017-05-19 14:33:21 -04:00
Ken Moore
6392cc362f Merge branch 'master' of github.com:trueos/sysadm 2017-04-28 09:41:26 -04:00
Ken Moore
dfb6e1b6a6 Move the pkg update routine in SysAdm to the pkg queue in the dispatcher so that it does not conflict with other possible pkg commands that get started soon after. 2017-04-28 09:40:38 -04:00
Tim Moore
cad95cbec8 Update README.md
Add project general info.
2017-04-10 11:51:07 -04:00
Kris Moore
97f82a06d8 Minor updates to Makefile and pkg-descr 2017-03-08 06:46:40 -05:00
Ken Moore
b446bef363 Update some more of the iocage API backend. These changes not tied to front-facing API calls yet. v1.0 2017-02-17 13:03:18 -05:00
Ken Moore
9cb26f211e API CHANGE:
Re-enable the sysadm/iocage "deactivatepool" API call.
Description: This will deactivate a ZFS pool from being used by iocage (may result in loss of data regarding iocage-created jails).
Required arguments: "pool" = "zfs pool to deactivate"
-----------

REST Request (example):
-------------------------------
PUT /sysadm/iocage
{
   "pool" : "tank1",
   "action" : "deactivatepool"
}

WebSocket Request:
-------------------------------
{
   "name" : "iocage",
   "args" : {
      "action" : "deactivatepool",
      "pool" : "tank1"
   },
   "id" : "fooid",
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "deactivatepool": {
      "success": "pool tank1 deactivated."
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2017-02-17 11:55:31 -05:00
Ken Moore
2047491544 API CHANGE:
Re-enable the sysadm/iocage "activatepool" API call:
Description: This will activate a specific ZFS pool so iocage can use it.
Required arguments: "pool" = "name of ZFS pool to activate"
------------------

REST Request (example):
-------------------------------
PUT /sysadm/iocage
{
   "action" : "activatepool",
   "pool" : "tank1"
}

WebSocket Request:
-------------------------------
{
   "name" : "iocage",
   "args" : {
      "pool" : "tank1",
      "action" : "activatepool"
   },
   "id" : "fooid",
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "activatepool": {
      "success": "pool tank1 activated."
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2017-02-17 11:49:14 -05:00
Ken Moore
4fe277350a API CHANGE:
De-activate the entire sysadm/iocage class of API calls. There is enough changes in the move to the new version of iocage, and the old API class was disused enough, that it is probably best to just scrap it and start from scratch.
I will start re-enabling the individual API calls one per commit tomorrow probably (backend changes getting close to being finished).

Also finish of the conversion of a bunch more backend funtions to work with the new version of iocage.
2017-02-16 14:28:49 -05:00
Ken Moore
af7e620544 Oops - fix a couple compile issues with the new iocage backend. 2017-02-16 12:23:43 -05:00
Ken Moore
8d479b4061 Another large batch of work on the new sysadm/iocage API backend. Not yet attached to API calls yet. 2017-02-16 12:21:48 -05:00
Ken Moore
f7d5e99010 API Change:
Remove the sysadm/iocage "getdefaultsettings" action from the available API calls. This action is not longer supported by the newer version of iocage.
2017-02-14 09:46:36 -05:00
Ken Moore
d382ec9e8f Validate/Fix the sysadm/iocage "activatepool" and "deactivatepoll" API calls.
No change to the API, just cleaned it up to work with the newer python version of iocage.
2017-02-14 09:41:26 -05:00
Kris Moore
4c118796dc Merge branch 'master' of http://github.com/trueos/sysadm 2017-02-13 16:19:39 -05:00
Kris Moore
487e9d7655 Fix iocage detection 2017-02-13 16:19:27 -05:00
Ken Moore
1863b10340 Quick fix for the sysadm init.d files. 2017-02-13 08:09:06 -05:00
Joe Maloney
8080a83e1b Add stop fix for supervisor. Requires new openrc-run patch in freebsd base. 2017-02-12 17:23:55 -05:00
Ken Moore
de9b9af3c0 API CHANGE: New class - sysadm/powerd
This is a class for managing the "powerd" service on the system.

Available "action"s:
"list_options": List all the available options and possible settings for each.
"read_options": Show all the current settings.
"set_options":  Modify any settings.
"list_status":  List the current state of the service (running, enabled)
"set_active":   Enable this device for starting on bootup.
"set_inactive": Disable this device from starting on bootup.
"start":        Start this service now.
"stop":         Stop this service now.

Example API Calls:
==================

REST Request (example):
-------------------------------
PUT /sysadm/powerd
{
   "action" : "list_options"
}

WebSocket Request:
-------------------------------
{
   "name" : "powerd",
   "namespace" : "sysadm",
   "args" : {
      "action" : "list_options"
   },
   "id" : "fooid"
}

Response:
-------------------------------
{
  "args": {
    "list_options": {
      "ac_power_mode": [
        "maximum",
        "hiadaptive",
        "adaptive",
        "minumum"
      ],
      "adaptive_lower_threshold_percent": "int min=1 max=100",
      "adaptive_raise_threshold_percent": "int min=1 max=100",
      "battery_power_mode": [
        "maximum",
        "hiadaptive",
        "adaptive",
        "minumum"
      ],
      "max_cpu_freq": "int frequency(hz)>0",
      "min_cpu_freq": "int frequency(hz)>0",
      "polling_interval_ms": "int milliseconds>0",
      "unknown_power_mode": [
        "maximum",
        "hiadaptive",
        "adaptive",
        "minumum"
      ]
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
===============================

REST Request (example):
-------------------------------
PUT /sysadm/powerd
{
   "action" : "read_options"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "name" : "powerd",
   "args" : {
      "action" : "read_options"
   },
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "read_options": {
      "ac_power_mode": "maximum",
      "adaptive_lower_threshold_percent": "50",
      "adaptive_raise_threshold_percent": "75",
      "battery_power_mode": "adaptive",
      "max_cpu_freq": "-1",
      "min_cpu_freq": "-1",
      "polling_interval_ms": "250",
      "unknown_power_mode": "adaptive"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
===========================

REST Request (example):
-------------------------------
PUT /sysadm/powerd
{
   "action" : "list_status"
}

WebSocket Request:
-------------------------------
{
   "id" : "fooid",
   "name" : "powerd",
   "namespace" : "sysadm",
   "args" : {
      "action" : "list_status"
   }
}

Response:
-------------------------------
{
  "args": {
    "list_status": {
      "enabled": "true",
      "running": "true"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
===================

REST Request (example):
-------------------------------
PUT /sysadm/powerd
{
   "action" : "stop"
}

WebSocket Request:
-------------------------------
{
   "args" : {
      "action" : "stop"
   },
   "id" : "fooid",
   "namespace" : "sysadm",
   "name" : "powerd"
}

Response:
-------------------------------
{
  "args": {
    "stop": {
      "stopped": "true"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
==================

REST Request (example):
-------------------------------
PUT /sysadm/powerd
{
   "battery_power_mode" : "minimum",
   "action" : "set_options"
}

WebSocket Request:
-------------------------------
{
   "name" : "powerd",
   "args" : {
      "action" : "set_options",
      "battery_power_mode" : "minimum"
   },
   "id" : "fooid",
   "namespace" : "sysadm"
}

Response:
-------------------------------
{
  "args": {
    "set_options": {
      "ac_power_mode": "maximum",
      "adaptive_lower_threshold_percent": "50",
      "adaptive_raise_threshold_percent": "75",
      "battery_power_mode": "minimum",
      "max_cpu_freq": "-1",
      "min_cpu_freq": "-1",
      "polling_interval_ms": "250",
      "unknown_power_mode": "adaptive"
    }
  },
  "id": "fooid",
  "name": "response",
  "namespace": "sysadm"
}
2017-02-07 12:34:33 -05:00
Ken Moore
e67f77f447 Add a 1 minute delay on boot for the SysAdm health checks to start. This gives a bit more time for the network connectivity to settle down first. 2017-02-07 10:05:52 -05:00
Ken Moore
57e197669e Make sure we clean up any extra empty lines in the update check. 2017-01-23 15:16:32 -05:00