This YANG module provides a data-model for the Clixon RESTCONF daemon. There is also clixon-config also including some restconf options. The separation is not always logical but there are some reasons for the split:
Some of this spec if in-lined from ietf-restconf-server@2022-05-24.yang
This presence is strictly not necessary since the enable flag in clixon-restconf is the flag bearing the actual semantics. However, removing the presence leads to default config in all clixon installations, even those which do not use backend-started restconf. One could see this as mostly cosmetically annoying. Alternative would be to make the inclusion of this yang conditional.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf" 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)) }
{- "clixon-restconf:restconf": {
- "clixon-restconf:pretty": true,
- "clixon-restconf:server-key-path": "string",
- "clixon-restconf:debug": 0,
- "clixon-restconf:enable-core-dump": false,
- "clixon-restconf:log-destination": "syslog",
- "clixon-restconf:enable": false,
- "clixon-restconf:server-ca-cert-path": "string",
- "clixon-restconf:socket": [
- {
- "clixon-restconf:namespace": "string",
- "clixon-restconf:description": "string",
- "clixon-restconf:address": "string",
- "clixon-restconf:port": 0,
- "clixon-restconf:ssl": true,
- "clixon-restconf:call-home": {
- "clixon-restconf:connection-type": {
- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}, - "clixon-restconf:reconnect-strategy": {
- "clixon-restconf:max-attempts": 3
}
}
}
], - "clixon-restconf:fcgi-socket": "/www-data/fastcgi_restconf.sock",
- "clixon-restconf:auth-type": "none",
- "clixon-restconf:enable-http-data": false,
- "clixon-restconf:server-cert-path": "string"
}
}
This presence is strictly not necessary since the enable flag in clixon-restconf is the flag bearing the actual semantics. However, removing the presence leads to default config in all clixon installations, even those which do not use backend-started restconf. One could see this as mostly cosmetically annoying. Alternative would be to make the inclusion of this yang conditional.
clixon.restconf.Restconf to be added to list
clixon-restconf:pretty | boolean Default: true Restconf return value pretty print. Restconf clients may add HTTP header: Accept: application/yang-data+json, or Accept: application/yang-data+xml to get return value in XML or JSON. RFC 8040 examples print XML and JSON in pretty-printed form. Setting this value to false makes restconf return not pretty-printed which may be desirable for performance or tests This replaces the CLICON_RESTCONF_PRETTY option in clixon-config.yang |
clixon-restconf:server-key-path | string Path to server key file Note only applies if socket has ssl enabled |
clixon-restconf:debug | integer <int64> Default: 0 Set debug level of restconf daemon. 0 is no debug, 1 is debugging, more is detailed debug. Debug logs will be directed to log-destination with LOG_DEBUG level (for syslog) |
clixon-restconf:enable-core-dump | boolean Default: false enable core dumps. this is a no-op on systems that don't support it. |
clixon-restconf:log-destination | string (clixon.restconf.LogDestination) Enum: "syslog" "file" |
clixon-restconf:enable | boolean Default: false Enables RESTCONF functionality. Note that starting/stopping of a restconf daemon is different from it being enabled or not. For example, if the restconf daemon is under systemd management, the restconf daemon will only start if enable=true. |
clixon-restconf:server-ca-cert-path | string Path to server CA cert file Note only applies if socket has ssl enabled |
Array of objects (clixon.restconf.clixonrestconf.Socket) List of server sockets that the restconf daemon listens to. Not fcgi | |
clixon-restconf:fcgi-socket | string Default: "/www-data/fastcgi_restconf.sock" Path to FastCGI unix socket. Should be specified in webserver Eg in nginx: fastcgi_pass unix:/www-data/clicon_restconf.sock Only if with-restconf=fcgi, NOT native This replaces CLICON_RESTCONF_PATH option in clixon-config.yang |
clixon-restconf:auth-type | string (clixon.restconf.AuthType) Enum: "none" "client-certificate" "user" |
clixon-restconf:enable-http-data | boolean Default: false Enables Limited static http-data functionality. enable must be true for this option to be meaningful. |
clixon-restconf:server-cert-path | string Path to server certificate file. Note only applies if socket has ssl enabled |
{- "clixon-restconf:pretty": true,
- "clixon-restconf:server-key-path": "string",
- "clixon-restconf:debug": 0,
- "clixon-restconf:enable-core-dump": false,
- "clixon-restconf:log-destination": "syslog",
- "clixon-restconf:enable": false,
- "clixon-restconf:server-ca-cert-path": "string",
- "clixon-restconf:socket": [
- {
- "clixon-restconf:namespace": "string",
- "clixon-restconf:description": "string",
- "clixon-restconf:address": "string",
- "clixon-restconf:port": 0,
- "clixon-restconf:ssl": true,
- "clixon-restconf:call-home": {
- "clixon-restconf:connection-type": {
- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}, - "clixon-restconf:reconnect-strategy": {
- "clixon-restconf:max-attempts": 3
}
}
}
], - "clixon-restconf:fcgi-socket": "/www-data/fastcgi_restconf.sock",
- "clixon-restconf:auth-type": "none",
- "clixon-restconf:enable-http-data": false,
- "clixon-restconf:server-cert-path": "string"
}
This presence is strictly not necessary since the enable flag in clixon-restconf is the flag bearing the actual semantics. However, removing the presence leads to default config in all clixon installations, even those which do not use backend-started restconf. One could see this as mostly cosmetically annoying. Alternative would be to make the inclusion of this yang conditional.
clixon.restconf.Restconf to be added or updated
object (clixon.restconf.Restconf) HTTP RESTCONF configuration. |
{- "clixon-restconf:restconf": {
- "clixon-restconf:pretty": true,
- "clixon-restconf:server-key-path": "string",
- "clixon-restconf:debug": 0,
- "clixon-restconf:enable-core-dump": false,
- "clixon-restconf:log-destination": "syslog",
- "clixon-restconf:enable": false,
- "clixon-restconf:server-ca-cert-path": "string",
- "clixon-restconf:socket": [
- {
- "clixon-restconf:namespace": "string",
- "clixon-restconf:description": "string",
- "clixon-restconf:address": "string",
- "clixon-restconf:port": 0,
- "clixon-restconf:ssl": true,
- "clixon-restconf:call-home": {
- "clixon-restconf:connection-type": {
- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}, - "clixon-restconf:reconnect-strategy": {
- "clixon-restconf:max-attempts": 3
}
}
}
], - "clixon-restconf:fcgi-socket": "/www-data/fastcgi_restconf.sock",
- "clixon-restconf:auth-type": "none",
- "clixon-restconf:enable-http-data": false,
- "clixon-restconf:server-cert-path": "string"
}
}
This presence is strictly not necessary since the enable flag in clixon-restconf is the flag bearing the actual semantics. However, removing the presence leads to default config in all clixon installations, even those which do not use backend-started restconf. One could see this as mostly cosmetically annoying. Alternative would be to make the inclusion of this yang conditional.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf" 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)) }
List of server sockets that the restconf daemon listens to. Not fcgi
clixon.restconf.clixonrestconf.Socket to be added to list
clixon-restconf:namespace | string Network namespace. On platforms where namespaces are not suppported, 'default' Default value can be changed by RESTCONF_NETNS_DEFAULT |
clixon-restconf:description | string |
clixon-restconf:address | string IP address to bind to |
clixon-restconf:port | integer <int32> TCP port to bind to |
clixon-restconf:ssl | boolean Default: true Enable for HTTPS otherwise HTTP protocol |
object (clixon.restconf.clixonrestconf.socket.CallHome) See RFC 8071 NETCONF Call Home and RESTCONF Call Home |
{- "clixon-restconf:namespace": "string",
- "clixon-restconf:description": "string",
- "clixon-restconf:address": "string",
- "clixon-restconf:port": 0,
- "clixon-restconf:ssl": true,
- "clixon-restconf:call-home": {
- "clixon-restconf:connection-type": {
- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}, - "clixon-restconf:reconnect-strategy": {
- "clixon-restconf:max-attempts": 3
}
}
}
List of server sockets that the restconf daemon listens to. Not fcgi
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%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)) }
{- "clixon-restconf:socket": {
- "clixon-restconf:namespace": "string",
- "clixon-restconf:description": "string",
- "clixon-restconf:address": "string",
- "clixon-restconf:port": 0,
- "clixon-restconf:ssl": true,
- "clixon-restconf:call-home": {
- "clixon-restconf:connection-type": {
- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}, - "clixon-restconf:reconnect-strategy": {
- "clixon-restconf:max-attempts": 3
}
}
}
}
List of server sockets that the restconf daemon listens to. Not fcgi
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
clixon.restconf.clixonrestconf.Socket to be added or updated
object (clixon.restconf.clixonrestconf.Socket) List of server sockets that the restconf daemon listens to. Not fcgi |
{- "clixon-restconf:socket": {
- "clixon-restconf:namespace": "string",
- "clixon-restconf:description": "string",
- "clixon-restconf:address": "string",
- "clixon-restconf:port": 0,
- "clixon-restconf:ssl": true,
- "clixon-restconf:call-home": {
- "clixon-restconf:connection-type": {
- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}, - "clixon-restconf:reconnect-strategy": {
- "clixon-restconf:max-attempts": 3
}
}
}
}
List of server sockets that the restconf daemon listens to. Not fcgi
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%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)) }
See RFC 8071 NETCONF Call Home and RESTCONF Call Home
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%7D/call-home" 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)) }
{- "clixon-restconf:call-home": {
- "clixon-restconf:connection-type": {
- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}, - "clixon-restconf:reconnect-strategy": {
- "clixon-restconf:max-attempts": 3
}
}
}
See RFC 8071 NETCONF Call Home and RESTCONF Call Home
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
clixon.restconf.clixonrestconf.socket.CallHome to be added to list
object (clixon.restconf.clixonrestconf.socket.callhome.ConnectionType) Indicates the RESTCONF server's preference for how the RESTCONF connection is maintained. | |
object (clixon.restconf.clixonrestconf.socket.callhome.ReconnectStrategy) |
{- "clixon-restconf:connection-type": {
- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}, - "clixon-restconf:reconnect-strategy": {
- "clixon-restconf:max-attempts": 3
}
}
See RFC 8071 NETCONF Call Home and RESTCONF Call Home
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
clixon.restconf.clixonrestconf.socket.CallHome to be added or updated
object (clixon.restconf.clixonrestconf.socket.CallHome) See RFC 8071 NETCONF Call Home and RESTCONF Call Home |
{- "clixon-restconf:call-home": {
- "clixon-restconf:connection-type": {
- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}, - "clixon-restconf:reconnect-strategy": {
- "clixon-restconf:max-attempts": 3
}
}
}
See RFC 8071 NETCONF Call Home and RESTCONF Call Home
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%7D/call-home" 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)) }
Indicates the RESTCONF server's preference for how the RESTCONF connection is maintained.
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%7D/call-home/connection-type" 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)) }
{- "clixon-restconf:connection-type": {
- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}
}
Indicates the RESTCONF server's preference for how the RESTCONF connection is maintained.
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
clixon.restconf.clixonrestconf.socket.callhome.ConnectionType to be added to list
clixon-restconf:persistent | object (clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.persistentconnection.Persistent) |
object (clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.periodicconnection.Periodic) |
{- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}
Indicates the RESTCONF server's preference for how the RESTCONF connection is maintained.
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
clixon.restconf.clixonrestconf.socket.callhome.ConnectionType to be added or updated
object (clixon.restconf.clixonrestconf.socket.callhome.ConnectionType) Indicates the RESTCONF server's preference for how the RESTCONF connection is maintained. |
{- "clixon-restconf:connection-type": {
- "clixon-restconf:persistent": { },
- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}
}
Indicates the RESTCONF server's preference for how the RESTCONF connection is maintained.
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%7D/call-home/connection-type" 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)) }
returns clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.periodicconnection.Periodic
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%7D/call-home/connection-type/periodic" 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)) }
{- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}
creates clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.periodicconnection.Periodic
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.periodicconnection.Periodic to be added to list
clixon-restconf:period | integer <int64> Default: 3600 Duration of time between periodic connections. |
clixon-restconf:idle-timeout | integer <int32> Default: 120 Specifies the maximum number of seconds that the underlying TCP session may remain idle. A TCP session will be dropped if it is idle for an interval longer than this number of seconds. If set to zero, then the server will never drop a session because it is idle. |
{- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
creates or updates clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.periodicconnection.Periodic
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.periodicconnection.Periodic to be added or updated
object (clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.periodicconnection.Periodic) |
{- "clixon-restconf:periodic": {
- "clixon-restconf:period": 3600,
- "clixon-restconf:idle-timeout": 120
}
}
removes clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.periodicconnection.Periodic
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%7D/call-home/connection-type/periodic" 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)) }
returns clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.persistentconnection.Persistent
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%7D/call-home/connection-type/persistent" 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)) }
{- "clixon-restconf:persistent": { }
}
creates clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.persistentconnection.Persistent
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.persistentconnection.Persistent to be added to list
{ }
creates or updates clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.persistentconnection.Persistent
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.persistentconnection.Persistent to be added or updated
clixon-restconf:persistent | object (clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.persistentconnection.Persistent) |
{- "clixon-restconf:persistent": { }
}
removes clixon.restconf.clixonrestconf.socket.callhome.connectiontype.connectiontype.persistentconnection.Persistent
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%7D/call-home/connection-type/persistent" 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)) }
returns clixon.restconf.clixonrestconf.socket.callhome.ReconnectStrategy
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%7D/call-home/reconnect-strategy" 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)) }
{- "clixon-restconf:reconnect-strategy": {
- "clixon-restconf:max-attempts": 3
}
}
creates clixon.restconf.clixonrestconf.socket.callhome.ReconnectStrategy
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
clixon.restconf.clixonrestconf.socket.callhome.ReconnectStrategy to be added to list
clixon-restconf:max-attempts | integer <int32> Default: 3 Specifies the number times the RESTCONF server tries to connect to a specific endpoint before moving on to the next endpoint in the list (round robin). |
{- "clixon-restconf:max-attempts": 3
}
creates or updates clixon.restconf.clixonrestconf.socket.callhome.ReconnectStrategy
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
clixon.restconf.clixonrestconf.socket.callhome.ReconnectStrategy to be added or updated
object (clixon.restconf.clixonrestconf.socket.callhome.ReconnectStrategy) |
{- "clixon-restconf:reconnect-strategy": {
- "clixon-restconf:max-attempts": 3
}
}
removes clixon.restconf.clixonrestconf.socket.callhome.ReconnectStrategy
namespace required | string Id of socket |
address required | string Id of socket |
port required | integer <int32> Id of socket |
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/clixon-restconf:restconf/socket=%7Bnamespace%7D,%7Baddress%7D,%7Bport%7D/call-home/reconnect-strategy" 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)) }