This YANG module provides mappings of the CLI command structure to the underlying data-model elements for the Netgate router.
Copyright 2016-2020 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
tunnel | Array of objects (netgate.ipsec.ipsecconfig.Tunnel) IPsec tunnel configurations |
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 | object (netgate.ipsec.IpsecConfig) |
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
remote-type | string (netgate.ipsec.RemoteType) Enum: "gateway" "endpoint" |
tunnel-type | string (netgate.ipsec.TunnelType) Value: "interface" |
remote-addr | string IP address or hostname of remote tunnel peer. |
instance | integer <int64> Numeric identifier of tunnel |
local-addr | string IP address used locally to terminate tunnel. |
crypto | object (netgate.ipsec.ipsecconfig.tunnel.Crypto) |
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/netgate-ipsec: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)) }