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
Example URL
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
Internal error
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)) }
Example URL
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:restconf | object (clixon.restconf.Restconf) |
Object created
Internal error
Object already exists
Example URL
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
clixon-restconf:restconf-wrapper | object (clixon.restconf.RestconfWrapper) |
Object created
Object modified
Internal error
Example URL
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.
Object deleted
Internal error
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)) }
Example URL
List of server sockets that the restconf daemon listens to. Not fcgi
clixon.restconf.clixonrestconf.Socket to be added to list
socket | object (clixon.restconf.clixonrestconf.Socket) |
Object created
Internal error
Object already exists
Example URL
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
Internal error
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)) }
Example URL
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
clixon-restconf:socket-wrapper | object (clixon.restconf.clixonrestconf.SocketWrapper) |
Object created
Object modified
Internal error
Example URL
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 |
Object deleted
Internal error
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)) }
Example URL
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
Internal error
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)) }
Example URL
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
call-home | object (clixon.restconf.clixonrestconf.socket.CallHome) |
Object created
Internal error
Object already exists
Example URL
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
clixon-restconf:call-home-wrapper | object (clixon.restconf.clixonrestconf.socket.CallHomeWrapper) |
Object created
Object modified
Internal error
Example URL
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 |
Object deleted
Internal error
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