This YANG module provides a data-model for the NTP service.
Copyright 2018-2025 Rubicon Communications, LLC.
Network Time Protocol daemon configuration for time keeping and services.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:ntp-config": {
- "netgate-ntp:system": {
- "netgate-ntp:namespace": "host",
- "netgate-ntp:enable": true
}, - "netgate-ntp:daemon": {
- "netgate-ntp:makestep": {
- "netgate-ntp:limit": 0,
- "netgate-ntp:threshold": 0
}, - "netgate-ntp:interfaces": {
- "netgate-ntp:binddevice": "string",
- "netgate-ntp:bind": "string",
- "netgate-ntp:bind6": "string"
}, - "netgate-ntp:servers": {
- "netgate-ntp:server": [
- {
- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}
]
}, - "netgate-ntp:log": {
- "netgate-ntp:rtc": true,
- "netgate-ntp:rawmeasurements": true,
- "netgate-ntp:selection": true,
- "netgate-ntp:tempcomp": true,
- "netgate-ntp:refclocks": true,
- "netgate-ntp:tracking": true,
- "netgate-ntp:statistics": true,
- "netgate-ntp:measurements": true
}, - "netgate-ntp:tos": {
- "netgate-ntp:orphan": 0
}, - "netgate-ntp:maxchange": {
- "netgate-ntp:offset": 0,
- "netgate-ntp:start": 0,
- "netgate-ntp:ignore": 0
}, - "netgate-ntp:access-rules": {
- "netgate-ntp:access": [
- {
- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}
]
}, - "netgate-ntp:parameters": {
- "netgate-ntp:maxupdateskew": 0,
- "netgate-ntp:enabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}, - "netgate-ntp:driftfile": "string",
- "netgate-ntp:disabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}, - "netgate-ntp:logdir": "string"
}
}
}Network Time Protocol daemon configuration for time keeping and services.
netgate.ntp.NtpConfig to be added to list
object (netgate.ntp.ntpconfig.System) The NTP system parameters not managed by the daemon. | |
object (netgate.ntp.ntpconfig.Daemon) NTP daemon configuration parameters. |
{- "netgate-ntp:system": {
- "netgate-ntp:namespace": "host",
- "netgate-ntp:enable": true
}, - "netgate-ntp:daemon": {
- "netgate-ntp:makestep": {
- "netgate-ntp:limit": 0,
- "netgate-ntp:threshold": 0
}, - "netgate-ntp:interfaces": {
- "netgate-ntp:binddevice": "string",
- "netgate-ntp:bind": "string",
- "netgate-ntp:bind6": "string"
}, - "netgate-ntp:servers": {
- "netgate-ntp:server": [
- {
- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}
]
}, - "netgate-ntp:log": {
- "netgate-ntp:rtc": true,
- "netgate-ntp:rawmeasurements": true,
- "netgate-ntp:selection": true,
- "netgate-ntp:tempcomp": true,
- "netgate-ntp:refclocks": true,
- "netgate-ntp:tracking": true,
- "netgate-ntp:statistics": true,
- "netgate-ntp:measurements": true
}, - "netgate-ntp:tos": {
- "netgate-ntp:orphan": 0
}, - "netgate-ntp:maxchange": {
- "netgate-ntp:offset": 0,
- "netgate-ntp:start": 0,
- "netgate-ntp:ignore": 0
}, - "netgate-ntp:access-rules": {
- "netgate-ntp:access": [
- {
- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}
]
}, - "netgate-ntp:parameters": {
- "netgate-ntp:maxupdateskew": 0,
- "netgate-ntp:enabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}, - "netgate-ntp:driftfile": "string",
- "netgate-ntp:disabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}, - "netgate-ntp:logdir": "string"
}
}Network Time Protocol daemon configuration for time keeping and services.
netgate.ntp.NtpConfig to be added or updated
object (netgate.ntp.NtpConfig) Network Time Protocol daemon configuration for time keeping and services. |
{- "netgate-ntp:ntp-config": {
- "netgate-ntp:system": {
- "netgate-ntp:namespace": "host",
- "netgate-ntp:enable": true
}, - "netgate-ntp:daemon": {
- "netgate-ntp:makestep": {
- "netgate-ntp:limit": 0,
- "netgate-ntp:threshold": 0
}, - "netgate-ntp:interfaces": {
- "netgate-ntp:binddevice": "string",
- "netgate-ntp:bind": "string",
- "netgate-ntp:bind6": "string"
}, - "netgate-ntp:servers": {
- "netgate-ntp:server": [
- {
- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}
]
}, - "netgate-ntp:log": {
- "netgate-ntp:rtc": true,
- "netgate-ntp:rawmeasurements": true,
- "netgate-ntp:selection": true,
- "netgate-ntp:tempcomp": true,
- "netgate-ntp:refclocks": true,
- "netgate-ntp:tracking": true,
- "netgate-ntp:statistics": true,
- "netgate-ntp:measurements": true
}, - "netgate-ntp:tos": {
- "netgate-ntp:orphan": 0
}, - "netgate-ntp:maxchange": {
- "netgate-ntp:offset": 0,
- "netgate-ntp:start": 0,
- "netgate-ntp:ignore": 0
}, - "netgate-ntp:access-rules": {
- "netgate-ntp:access": [
- {
- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}
]
}, - "netgate-ntp:parameters": {
- "netgate-ntp:maxupdateskew": 0,
- "netgate-ntp:enabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}, - "netgate-ntp:driftfile": "string",
- "netgate-ntp:disabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}, - "netgate-ntp:logdir": "string"
}
}
}Network Time Protocol daemon configuration for time keeping and services.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:daemon": {
- "netgate-ntp:makestep": {
- "netgate-ntp:limit": 0,
- "netgate-ntp:threshold": 0
}, - "netgate-ntp:interfaces": {
- "netgate-ntp:binddevice": "string",
- "netgate-ntp:bind": "string",
- "netgate-ntp:bind6": "string"
}, - "netgate-ntp:servers": {
- "netgate-ntp:server": [
- {
- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}
]
}, - "netgate-ntp:log": {
- "netgate-ntp:rtc": true,
- "netgate-ntp:rawmeasurements": true,
- "netgate-ntp:selection": true,
- "netgate-ntp:tempcomp": true,
- "netgate-ntp:refclocks": true,
- "netgate-ntp:tracking": true,
- "netgate-ntp:statistics": true,
- "netgate-ntp:measurements": true
}, - "netgate-ntp:tos": {
- "netgate-ntp:orphan": 0
}, - "netgate-ntp:maxchange": {
- "netgate-ntp:offset": 0,
- "netgate-ntp:start": 0,
- "netgate-ntp:ignore": 0
}, - "netgate-ntp:access-rules": {
- "netgate-ntp:access": [
- {
- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}
]
}, - "netgate-ntp:parameters": {
- "netgate-ntp:maxupdateskew": 0,
- "netgate-ntp:enabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}, - "netgate-ntp:driftfile": "string",
- "netgate-ntp:disabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}, - "netgate-ntp:logdir": "string"
}
}NTP daemon configuration parameters.
netgate.ntp.ntpconfig.Daemon to be added to list
object (netgate.ntp.ntpconfig.daemon.Makestep) Allow stepping system clock. | |
object (netgate.ntp.ntpconfig.daemon.Interfaces) Interface binding specifications. | |
object (netgate.ntp.ntpconfig.daemon.Servers) | |
object (netgate.ntp.ntpconfig.daemon.Log) Logging options | |
object (netgate.ntp.ntpconfig.daemon.Tos) TOS options. | |
object (netgate.ntp.ntpconfig.daemon.Maxchange) Maxchange options. | |
object (netgate.ntp.ntpconfig.daemon.AccessRules) Access rules | |
object (netgate.ntp.ntpconfig.daemon.Parameters) The NTP parameters managed by the NTP daemon. | |
| netgate-ntp:logdir | string Full path name of the log directory. |
{- "netgate-ntp:makestep": {
- "netgate-ntp:limit": 0,
- "netgate-ntp:threshold": 0
}, - "netgate-ntp:interfaces": {
- "netgate-ntp:binddevice": "string",
- "netgate-ntp:bind": "string",
- "netgate-ntp:bind6": "string"
}, - "netgate-ntp:servers": {
- "netgate-ntp:server": [
- {
- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}
]
}, - "netgate-ntp:log": {
- "netgate-ntp:rtc": true,
- "netgate-ntp:rawmeasurements": true,
- "netgate-ntp:selection": true,
- "netgate-ntp:tempcomp": true,
- "netgate-ntp:refclocks": true,
- "netgate-ntp:tracking": true,
- "netgate-ntp:statistics": true,
- "netgate-ntp:measurements": true
}, - "netgate-ntp:tos": {
- "netgate-ntp:orphan": 0
}, - "netgate-ntp:maxchange": {
- "netgate-ntp:offset": 0,
- "netgate-ntp:start": 0,
- "netgate-ntp:ignore": 0
}, - "netgate-ntp:access-rules": {
- "netgate-ntp:access": [
- {
- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}
]
}, - "netgate-ntp:parameters": {
- "netgate-ntp:maxupdateskew": 0,
- "netgate-ntp:enabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}, - "netgate-ntp:driftfile": "string",
- "netgate-ntp:disabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}, - "netgate-ntp:logdir": "string"
}NTP daemon configuration parameters.
netgate.ntp.ntpconfig.Daemon to be added or updated
object (netgate.ntp.ntpconfig.Daemon) NTP daemon configuration parameters. |
{- "netgate-ntp:daemon": {
- "netgate-ntp:makestep": {
- "netgate-ntp:limit": 0,
- "netgate-ntp:threshold": 0
}, - "netgate-ntp:interfaces": {
- "netgate-ntp:binddevice": "string",
- "netgate-ntp:bind": "string",
- "netgate-ntp:bind6": "string"
}, - "netgate-ntp:servers": {
- "netgate-ntp:server": [
- {
- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}
]
}, - "netgate-ntp:log": {
- "netgate-ntp:rtc": true,
- "netgate-ntp:rawmeasurements": true,
- "netgate-ntp:selection": true,
- "netgate-ntp:tempcomp": true,
- "netgate-ntp:refclocks": true,
- "netgate-ntp:tracking": true,
- "netgate-ntp:statistics": true,
- "netgate-ntp:measurements": true
}, - "netgate-ntp:tos": {
- "netgate-ntp:orphan": 0
}, - "netgate-ntp:maxchange": {
- "netgate-ntp:offset": 0,
- "netgate-ntp:start": 0,
- "netgate-ntp:ignore": 0
}, - "netgate-ntp:access-rules": {
- "netgate-ntp:access": [
- {
- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}
]
}, - "netgate-ntp:parameters": {
- "netgate-ntp:maxupdateskew": 0,
- "netgate-ntp:enabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}, - "netgate-ntp:driftfile": "string",
- "netgate-ntp:disabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}, - "netgate-ntp:logdir": "string"
}
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/access-rules" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:access-rules": {
- "netgate-ntp:access": [
- {
- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}
]
}
}Access rules
netgate.ntp.ntpconfig.daemon.AccessRules to be added to list
Array of objects (netgate.ntp.ntpconfig.daemon.accessrules.Access) Allow and deny rules for NTP requests. |
{- "netgate-ntp:access": [
- {
- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}
]
}Access rules
netgate.ntp.ntpconfig.daemon.AccessRules to be added or updated
object (netgate.ntp.ntpconfig.daemon.AccessRules) Access rules |
{- "netgate-ntp:access-rules": {
- "netgate-ntp:access": [
- {
- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}
]
}
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/access-rules" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Allow and deny rules for NTP requests.
netgate.ntp.ntpconfig.daemon.accessrules.Access to be added to list
| netgate-ntp:all | boolean If true, allow access from all addresses. |
| netgate-ntp:sequence | integer <int64> The sequence numbers provide an ordering for the list of access commands. |
| netgate-ntp:action | string (netgate.ntp.NtpAccessAction) Enum: "allow" "deny" |
| netgate-ntp:prefix | string If specified, allow access from this subnet. |
{- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}Allow and deny rules for NTP requests.
| sequence required | integer <int64> Id of access |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/access-rules/access=%7Bsequence%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:access": {
- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}
}Allow and deny rules for NTP requests.
| sequence required | integer <int64> Id of access |
netgate.ntp.ntpconfig.daemon.accessrules.Access to be added or updated
object (netgate.ntp.ntpconfig.daemon.accessrules.Access) Allow and deny rules for NTP requests. |
{- "netgate-ntp:access": {
- "netgate-ntp:all": true,
- "netgate-ntp:sequence": 0,
- "netgate-ntp:action": "allow",
- "netgate-ntp:prefix": "string"
}
}Allow and deny rules for NTP requests.
| sequence required | integer <int64> Id of access |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/access-rules/access=%7Bsequence%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/interfaces" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:interfaces": {
- "netgate-ntp:binddevice": "string",
- "netgate-ntp:bind": "string",
- "netgate-ntp:bind6": "string"
}
}Interface binding specifications.
netgate.ntp.ntpconfig.daemon.Interfaces to be added to list
| netgate-ntp:binddevice | string Interface to bind to. |
| netgate-ntp:bind | string IPv4 address to bind to. |
| netgate-ntp:bind6 | string IPv6 address to bind to. |
{- "netgate-ntp:binddevice": "string",
- "netgate-ntp:bind": "string",
- "netgate-ntp:bind6": "string"
}Interface binding specifications.
netgate.ntp.ntpconfig.daemon.Interfaces to be added or updated
object (netgate.ntp.ntpconfig.daemon.Interfaces) Interface binding specifications. |
{- "netgate-ntp:interfaces": {
- "netgate-ntp:binddevice": "string",
- "netgate-ntp:bind": "string",
- "netgate-ntp:bind6": "string"
}
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/interfaces" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/log" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:log": {
- "netgate-ntp:rtc": true,
- "netgate-ntp:rawmeasurements": true,
- "netgate-ntp:selection": true,
- "netgate-ntp:tempcomp": true,
- "netgate-ntp:refclocks": true,
- "netgate-ntp:tracking": true,
- "netgate-ntp:statistics": true,
- "netgate-ntp:measurements": true
}
}Logging options
netgate.ntp.ntpconfig.daemon.Log to be added to list
| netgate-ntp:rtc | boolean Log RTC information |
| netgate-ntp:rawmeasurements | boolean Log raw NTP measurements |
| netgate-ntp:selection | boolean Log source selection |
| netgate-ntp:tempcomp | boolean Log temperature compensation |
| netgate-ntp:refclocks | boolean Log reference clock measurements |
| netgate-ntp:tracking | boolean Log changes to the estimate of system's gain or loss rate. |
| netgate-ntp:statistics | boolean Log statistics |
| netgate-ntp:measurements | boolean Log measurements |
{- "netgate-ntp:rtc": true,
- "netgate-ntp:rawmeasurements": true,
- "netgate-ntp:selection": true,
- "netgate-ntp:tempcomp": true,
- "netgate-ntp:refclocks": true,
- "netgate-ntp:tracking": true,
- "netgate-ntp:statistics": true,
- "netgate-ntp:measurements": true
}Logging options
netgate.ntp.ntpconfig.daemon.Log to be added or updated
object (netgate.ntp.ntpconfig.daemon.Log) Logging options |
{- "netgate-ntp:log": {
- "netgate-ntp:rtc": true,
- "netgate-ntp:rawmeasurements": true,
- "netgate-ntp:selection": true,
- "netgate-ntp:tempcomp": true,
- "netgate-ntp:refclocks": true,
- "netgate-ntp:tracking": true,
- "netgate-ntp:statistics": true,
- "netgate-ntp:measurements": true
}
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/log" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/makestep" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:makestep": {
- "netgate-ntp:limit": 0,
- "netgate-ntp:threshold": 0
}
}Allow stepping system clock.
netgate.ntp.ntpconfig.daemon.Makestep to be added to list
| netgate-ntp:limit | integer <int32> Number of initial clock updates during which stepping is allowed. |
| netgate-ntp:threshold | integer <int32> Step threshold. The system clock will be stepped if the adjustment is larger than the specified value. |
{- "netgate-ntp:limit": 0,
- "netgate-ntp:threshold": 0
}Allow stepping system clock.
netgate.ntp.ntpconfig.daemon.Makestep to be added or updated
object (netgate.ntp.ntpconfig.daemon.Makestep) Allow stepping system clock. |
{- "netgate-ntp:makestep": {
- "netgate-ntp:limit": 0,
- "netgate-ntp:threshold": 0
}
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/makestep" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/maxchange" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:maxchange": {
- "netgate-ntp:offset": 0,
- "netgate-ntp:start": 0,
- "netgate-ntp:ignore": 0
}
}Maxchange options.
netgate.ntp.ntpconfig.daemon.Maxchange to be added to list
| netgate-ntp:offset | integer <int32> Maximum clock update offset in seconds. If the offset is greater than this value, the NTP daemon will exit unless start and ignore values prevent it. |
| netgate-ntp:start | integer <int32> Number of clock updates after which to begin checking the offset. |
| netgate-ntp:ignore | integer <int32> Number of times to ignore clock updates greater than the offset. |
{- "netgate-ntp:offset": 0,
- "netgate-ntp:start": 0,
- "netgate-ntp:ignore": 0
}Maxchange options.
netgate.ntp.ntpconfig.daemon.Maxchange to be added or updated
object (netgate.ntp.ntpconfig.daemon.Maxchange) Maxchange options. |
{- "netgate-ntp:maxchange": {
- "netgate-ntp:offset": 0,
- "netgate-ntp:start": 0,
- "netgate-ntp:ignore": 0
}
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/maxchange" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
The NTP parameters managed by the NTP daemon.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/parameters" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:parameters": {
- "netgate-ntp:maxupdateskew": 0,
- "netgate-ntp:enabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}, - "netgate-ntp:driftfile": "string",
- "netgate-ntp:disabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}
}The NTP parameters managed by the NTP daemon.
netgate.ntp.ntpconfig.daemon.Parameters to be added to list
| netgate-ntp:maxupdateskew | integer <int32> Maximum skew update threshold. |
object (netgate.ntp.ntpconfig.daemon.parameters.EnabledFlags) Force monitor flags to enabled. | |
| netgate-ntp:driftfile | string Full path name of the drift file. If not specified, /var/lib/chrony/drift. |
object (netgate.ntp.ntpconfig.daemon.parameters.DisabledFlags) Force monitor flags to disabled. |
{- "netgate-ntp:maxupdateskew": 0,
- "netgate-ntp:enabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}, - "netgate-ntp:driftfile": "string",
- "netgate-ntp:disabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}The NTP parameters managed by the NTP daemon.
netgate.ntp.ntpconfig.daemon.Parameters to be added or updated
object (netgate.ntp.ntpconfig.daemon.Parameters) The NTP parameters managed by the NTP daemon. |
{- "netgate-ntp:parameters": {
- "netgate-ntp:maxupdateskew": 0,
- "netgate-ntp:enabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}, - "netgate-ntp:driftfile": "string",
- "netgate-ntp:disabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}
}The NTP parameters managed by the NTP daemon.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/parameters" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Force monitor flags to disabled.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/parameters/disabled-flags" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:disabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}Force monitor flags to disabled.
netgate.ntp.ntpconfig.daemon.parameters.DisabledFlags to be added to list
| netgate-ntp:rtcsync | boolean If true, disable RTC sync. |
| netgate-ntp:monitor | boolean If true, disable monitor. |
| netgate-ntp:leapsectz | boolean If true, disable getting leap second info from the timezone database. |
{- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}Force monitor flags to disabled.
netgate.ntp.ntpconfig.daemon.parameters.DisabledFlags to be added or updated
object (netgate.ntp.ntpconfig.daemon.parameters.DisabledFlags) Force monitor flags to disabled. |
{- "netgate-ntp:disabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}Force monitor flags to disabled.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/parameters/disabled-flags" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Force monitor flags to enabled.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/parameters/enabled-flags" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:enabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}Force monitor flags to enabled.
netgate.ntp.ntpconfig.daemon.parameters.EnabledFlags to be added to list
| netgate-ntp:rtcsync | boolean If true, enable RTC sync. |
| netgate-ntp:monitor | boolean If true, enable monitor. |
| netgate-ntp:leapsectz | boolean If true, enable getting leap second info from the timezone database. |
{- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}Force monitor flags to enabled.
netgate.ntp.ntpconfig.daemon.parameters.EnabledFlags to be added or updated
object (netgate.ntp.ntpconfig.daemon.parameters.EnabledFlags) Force monitor flags to enabled. |
{- "netgate-ntp:enabled-flags": {
- "netgate-ntp:rtcsync": true,
- "netgate-ntp:monitor": true,
- "netgate-ntp:leapsectz": true
}
}Force monitor flags to enabled.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/parameters/enabled-flags" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/servers" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:servers": {
- "netgate-ntp:server": [
- {
- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}
]
}
}creates netgate.ntp.ntpconfig.daemon.Servers
netgate.ntp.ntpconfig.daemon.Servers to be added to list
Array of objects (netgate.ntp.ntpconfig.daemon.servers.Server) |
{- "netgate-ntp:server": [
- {
- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}
]
}creates or updates netgate.ntp.ntpconfig.daemon.Servers
netgate.ntp.ntpconfig.daemon.Servers to be added or updated
object (netgate.ntp.ntpconfig.daemon.Servers) |
{- "netgate-ntp:servers": {
- "netgate-ntp:server": [
- {
- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}
]
}
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/servers" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
creates netgate.ntp.ntpconfig.daemon.servers.Server
netgate.ntp.ntpconfig.daemon.servers.Server to be added to list
| netgate-ntp:prefer | boolean If true, favor this server more than others. |
| netgate-ntp:operational-mode | string (netgate.ntp.NtpServerMode) Enum: "server" "pool" |
| netgate-ntp:maxsources | integer <int32> Desired number of sources to be used from the pool |
| netgate-ntp:host | string NTP server IP address or FQDN. |
| netgate-ntp:noselect | boolean If true, disable time sync for this server, track stats only. |
| netgate-ntp:burst | boolean If true, send a burst of attempts to an server that did not provide good measurements to speed up acquisition of time synchronization. |
| netgate-ntp:maxpoll | integer <int32> Maximum poll interval expressed as a power of 2 in seconds. |
| netgate-ntp:iburst | boolean If true, send a burst of attempts to an unreachable server to speed up acquisition of time synchronization. |
{- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}returns netgate.ntp.ntpconfig.daemon.servers.Server
| host required | string Id of server |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/servers/server=%7Bhost%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:server": {
- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}
}creates or updates netgate.ntp.ntpconfig.daemon.servers.Server
| host required | string Id of server |
netgate.ntp.ntpconfig.daemon.servers.Server to be added or updated
object (netgate.ntp.ntpconfig.daemon.servers.Server) |
{- "netgate-ntp:server": {
- "netgate-ntp:prefer": true,
- "netgate-ntp:operational-mode": "server",
- "netgate-ntp:maxsources": 0,
- "netgate-ntp:host": "string",
- "netgate-ntp:noselect": true,
- "netgate-ntp:burst": true,
- "netgate-ntp:maxpoll": 0,
- "netgate-ntp:iburst": true
}
}removes netgate.ntp.ntpconfig.daemon.servers.Server
| host required | string Id of server |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/servers/server=%7Bhost%7D" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/tos" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:tos": {
- "netgate-ntp:orphan": 0
}
}TOS options.
netgate.ntp.ntpconfig.daemon.Tos to be added to list
| netgate-ntp:orphan | integer <int32> Orphan stratum in the range 1 through 16. |
{- "netgate-ntp:orphan": 0
}TOS options.
netgate.ntp.ntpconfig.daemon.Tos to be added or updated
object (netgate.ntp.ntpconfig.daemon.Tos) TOS options. |
{- "netgate-ntp:tos": {
- "netgate-ntp:orphan": 0
}
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/daemon/tos" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/system" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:system": {
- "netgate-ntp:namespace": "host",
- "netgate-ntp:enable": true
}
}The NTP system parameters not managed by the daemon.
netgate.ntp.ntpconfig.System to be added to list
| netgate-ntp:namespace | string (netgate.common.NetworkNamespace) Enum: "host" "dataplane" |
| netgate-ntp:enable | boolean If true, the NTP daemon is enabled. |
{- "netgate-ntp:namespace": "host",
- "netgate-ntp:enable": true
}The NTP system parameters not managed by the daemon.
netgate.ntp.ntpconfig.System to be added or updated
object (netgate.ntp.ntpconfig.System) The NTP system parameters not managed by the daemon. |
{- "netgate-ntp:system": {
- "netgate-ntp:namespace": "host",
- "netgate-ntp:enable": true
}
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-config/system" req, _ := http.NewRequest("DELETE", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
Network Time Protocol daemon configuration for time keeping and services.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-state" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:ntp-state": {
- "netgate-ntp:peers": {
- "netgate-ntp:peer": [
- {
- "netgate-ntp:variables": {
- "netgate-ntp:variable": [
- {
- "netgate-ntp:name": "string",
- "netgate-ntp:decoded": "string",
- "netgate-ntp:raw": "string"
}
]
}, - "netgate-ntp:id": 0,
- "netgate-ntp:status": {
- "netgate-ntp:authentic": true,
- "netgate-ntp:raw": 0,
- "netgate-ntp:auth-enable": true,
- "netgate-ntp:selection": "selected",
- "netgate-ntp:reachable": true
}
}
]
}
}
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-state/peers" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:peers": {
- "netgate-ntp:peer": [
- {
- "netgate-ntp:variables": {
- "netgate-ntp:variable": [
- {
- "netgate-ntp:name": "string",
- "netgate-ntp:decoded": "string",
- "netgate-ntp:raw": "string"
}
]
}, - "netgate-ntp:id": 0,
- "netgate-ntp:status": {
- "netgate-ntp:authentic": true,
- "netgate-ntp:raw": 0,
- "netgate-ntp:auth-enable": true,
- "netgate-ntp:selection": "selected",
- "netgate-ntp:reachable": true
}
}
]
}
}returns netgate.ntp.ntpstate.peers.Peer
| id required | integer <int32> Id of peer |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-state/peers/peer=%7Bid%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:peer": {
- "netgate-ntp:variables": {
- "netgate-ntp:variable": [
- {
- "netgate-ntp:name": "string",
- "netgate-ntp:decoded": "string",
- "netgate-ntp:raw": "string"
}
]
}, - "netgate-ntp:id": 0,
- "netgate-ntp:status": {
- "netgate-ntp:authentic": true,
- "netgate-ntp:raw": 0,
- "netgate-ntp:auth-enable": true,
- "netgate-ntp:selection": "selected",
- "netgate-ntp:reachable": true
}
}
}The decoded peer status.
| id required | integer <int32> Id of peer |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-state/peers/peer=%7Bid%7D/status" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:status": {
- "netgate-ntp:authentic": true,
- "netgate-ntp:raw": 0,
- "netgate-ntp:auth-enable": true,
- "netgate-ntp:selection": "selected",
- "netgate-ntp:reachable": true
}
}The peer variables of an association.
| id required | integer <int32> Id of peer |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-state/peers/peer=%7Bid%7D/variables" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:variables": {
- "netgate-ntp:variable": [
- {
- "netgate-ntp:name": "string",
- "netgate-ntp:decoded": "string",
- "netgate-ntp:raw": "string"
}
]
}
}returns netgate.ntp.ntpstate.peers.peer.variables.Variable
| id required | integer <int32> Id of peer |
| name required | string Id of variable |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ntp:ntp-state/peers/peer=%7Bid%7D/variables/variable=%7Bname%7D" req, _ := http.NewRequest("GET", url, nil) res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }
{- "netgate-ntp:variable": {
- "netgate-ntp:name": "string",
- "netgate-ntp:decoded": "string",
- "netgate-ntp:raw": "string"
}
}operates on netgate.ntp.NtpConfigOperation
object (netgate.ntp.ntpconfigoperation.Input) |
{- "input": {
- "netgate-ntp:request": "string",
- "netgate-ntp:param": "string"
}
}{- "output": {
- "netgate-ntp:stdout": "string"
}
}operates on netgate.ntp.NtpControl
object (netgate.ntp.ntpcontrol.Input) |
{- "input": {
- "netgate-ntp:namespace": "host",
- "netgate-ntp:operation": "start"
}
}{- "output": {
- "netgate-ntp:stdout": "string"
}
}operates on netgate.ntp.NtpCoredump
object (netgate.ntp.ntpcoredump.Input) |
{- "input": {
- "netgate-ntp:namespace": "host",
- "netgate-ntp:operation": "enable"
}
}{- "output": {
- "netgate-ntp:stdout": "string"
}
}