This YANG module provides a Netgate-defined data-model for GRE data.
Copyright 2018-2020 Rubicon Communications, LLC.
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-gre:gre-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-gre:gre-config": {- "netgate-gre:gre-table": {- "netgate-gre:tunnel": [- {- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
 }
 ]
 }
 }
}Configuration for GRE tunnels.
netgate.gre.GreConfig to be added to list
| object (netgate.gre.greconfig.GreTable)  GRE table. | 
{- "netgate-gre:gre-table": {- "netgate-gre:tunnel": [- {- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
 }
 ]
 }
}Configuration for GRE tunnels.
netgate.gre.GreConfig to be added or updated
| object (netgate.gre.GreConfig)  Configuration for GRE tunnels. | 
{- "netgate-gre:gre-config": {- "netgate-gre:gre-table": {- "netgate-gre:tunnel": [- {- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
 }
 ]
 }
 }
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-gre:gre-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-gre:gre-config/gre-table" 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-gre:gre-table": {- "netgate-gre:tunnel": [- {- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
 }
 ]
 }
}GRE table.
netgate.gre.greconfig.GreTable to be added to list
| Array of objects (netgate.gre.greconfig.gretable.Tunnel)  GRE tunnel configuration. | 
{- "netgate-gre:tunnel": [- {- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
 }
 ]
}GRE table.
netgate.gre.greconfig.GreTable to be added or updated
| object (netgate.gre.greconfig.GreTable)  GRE table. | 
{- "netgate-gre:gre-table": {- "netgate-gre:tunnel": [- {- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
 }
 ]
 }
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-gre:gre-config/gre-table" 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)) }
GRE tunnel configuration.
netgate.gre.greconfig.gretable.Tunnel to be added to list
| netgate-gre:tunnel-type | string (netgate.gre.GreTunnelType)   Enum: "l3" "teb" "erspan"  | 
| netgate-gre:instance | integer <int64>  Each GRE tunnel creates an interface.  The
             created interface will be named 'gre | 
| netgate-gre:erspan-session-id | integer <int64>  VNI value, u24. | 
| netgate-gre:encap-route-table | string Encapsulation route table name. | 
| netgate-gre:name | string The GRE tunnel identifier. A unique name for this GRE tunnel. | 
| netgate-gre:src-ip-address | string The source IP address. | 
| netgate-gre:dst-ip-address | string The destination IP address. | 
{- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
}GRE tunnel configuration.
| name required | string Id of tunnel | 
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-gre:gre-config/gre-table/tunnel=%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-gre:tunnel": {- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
 }
}GRE tunnel configuration.
| name required | string Id of tunnel | 
netgate.gre.greconfig.gretable.Tunnel to be added or updated
| object (netgate.gre.greconfig.gretable.Tunnel)  GRE tunnel configuration. | 
{- "netgate-gre:tunnel": {- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
 }
}GRE tunnel configuration.
| name required | string Id of tunnel | 
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-gre:gre-config/gre-table/tunnel=%7Bname%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-gre:gre-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-gre:gre-state": {- "netgate-gre:gre-table": {- "netgate-gre:tunnel": [- {- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
 }
 ]
 }
 }
}package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-gre:gre-state/gre-table" 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-gre:gre-table": {- "netgate-gre:tunnel": [- {- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
 }
 ]
 }
}GRE tunnel name.
| name required | string Id of tunnel | 
package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "http://hostname/restconf/data/netgate-gre:gre-state/gre-table/tunnel=%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-gre:tunnel": {- "netgate-gre:tunnel-type": "l3",
- "netgate-gre:instance": 0,
- "netgate-gre:erspan-session-id": 0,
- "netgate-gre:encap-route-table": "string",
- "netgate-gre:name": "string",
- "netgate-gre:src-ip-address": "string",
- "netgate-gre:dst-ip-address": "string"
 }
}