This YANG module provides mappings of the CLI command structure to the underlying data-model elements for the Netgate router.
Copyright 2016-2023 Rubicon Communications, LLC.
Example URL
returns netgate.ipsec.IpsecConfig
netgate.ipsec.IpsecConfig
Internal error
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ipsec:ipsec-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)) }
Example URL
creates netgate.ipsec.IpsecConfig
netgate.ipsec.IpsecConfig to be added to list
netgate-ipsec:ipsec-config | object (netgate.ipsec.IpsecConfig) |
Object created
Internal error
Object already exists
Example URL
creates or updates netgate.ipsec.IpsecConfig
netgate.ipsec.IpsecConfig to be added or updated
netgate-ipsec:ipsec-config-wrapper | object (netgate.ipsec.IpsecConfigWrapper) |
Object created
Object modified
Internal error
Example URL
removes netgate.ipsec.IpsecConfig
Object deleted
Internal error
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ipsec:ipsec-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)) }
Example URL
IPsec tunnel configurations
netgate.ipsec.ipsecconfig.Tunnel to be added to list
tunnel | object (netgate.ipsec.ipsecconfig.Tunnel) |
Object created
Internal error
Object already exists
Example URL
IPsec tunnel configurations
instance required | integer <int64> Id of tunnel |
netgate.ipsec.ipsecconfig.Tunnel
Internal error
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-ipsec:ipsec-config/tunnel=%7Binstance%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)) }