Commit Graph

3 Commits

Author SHA1 Message Date
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
1146b14917 Cleanup the library/server interactions for sysadm: Now the "library" directory is just an internal collection of classes/files, rather than an actual library of system calls. This allows for in-server globals usage (such as the dispatcher/events systems) within the library files as needed. 2016-02-01 12:29:25 -05:00