netgate-tunnel API (22.10)

This YANG module provides a Netgate-defined data model for tunnel management.

Copyright 2022 Rubicon Communications, LLC.

tunnels-config

returns netgate.tunnel.TunnelsConfig

get /data/netgate-tunnel:tunnels-config

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config

Tunnel-related configurations.

Responses

200

netgate.tunnel.TunnelsConfig

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-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))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnels-config-wrapper":
    {
    }
}

creates netgate.tunnel.TunnelsConfig

post /data/netgate-tunnel:tunnels-config

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config

Tunnel-related configurations.

Request Body schema: application/yang-data+json

netgate.tunnel.TunnelsConfig to be added to list

netgate-tunnel:tunnels-config
object (netgate.tunnel.TunnelsConfig)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnels-config":
    {
    }
}

creates or updates netgate.tunnel.TunnelsConfig

put /data/netgate-tunnel:tunnels-config

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config

Tunnel-related configurations.

Request Body schema: application/yang-data+json

netgate.tunnel.TunnelsConfig to be added or updated

netgate-tunnel:tunnels-config-wrapper
object (netgate.tunnel.TunnelsConfigWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnels-config-wrapper":
    {
    }
}

removes netgate.tunnel.TunnelsConfig

delete /data/netgate-tunnel:tunnels-config

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config

Tunnel-related configurations.

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-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))

}

returns netgate.tunnel.tunnelsconfig.NextHops

get /data/netgate-tunnel:tunnels-config/next-hops

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops

Next hop configurations for multipoint tunnels.

Responses

200

netgate.tunnel.tunnelsconfig.NextHops

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops"

	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))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:next-hops-wrapper":
    {
    }
}

creates netgate.tunnel.tunnelsconfig.NextHops

post /data/netgate-tunnel:tunnels-config/next-hops

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops

Next hop configurations for multipoint tunnels.

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.NextHops to be added to list

next-hops
object (netgate.tunnel.tunnelsconfig.NextHops)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "next-hops":
    {
    }
}

creates or updates netgate.tunnel.tunnelsconfig.NextHops

put /data/netgate-tunnel:tunnels-config/next-hops

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops

Next hop configurations for multipoint tunnels.

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.NextHops to be added or updated

netgate-tunnel:next-hops-wrapper
object (netgate.tunnel.tunnelsconfig.NextHopsWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:next-hops-wrapper":
    {
    }
}

removes netgate.tunnel.tunnelsconfig.NextHops

delete /data/netgate-tunnel:tunnels-config/next-hops

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops

Next hop configurations for multipoint tunnels.

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops"

	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))

}

creates netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

post /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface

Next-hop configuration for a tunnel interface.

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface to be added to list

tunnel-interface
object (netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "tunnel-interface":
    {
    }
}

returns netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

get /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Next-hop configuration for a tunnel interface.

path Parameters
name
required
string

Id of tunnel-interface

Responses

200

netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%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))

}

Response samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnel-interface-wrapper":
    {
    }
}

creates or updates netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

put /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Next-hop configuration for a tunnel interface.

path Parameters
name
required
string

Id of tunnel-interface

Request Body schema: application/yang-data+json

netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface to be added or updated

netgate-tunnel:tunnel-interface-wrapper
object (netgate.tunnel.tunnelsconfig.nexthops.TunnelInterfaceWrapper)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-tunnel:tunnel-interface-wrapper":
    {
    }
}

removes netgate.tunnel.tunnelsconfig.nexthops.TunnelInterface

delete /data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Example URL

https://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface={name}

Next-hop configuration for a tunnel interface.

path Parameters
name
required
string

Id of tunnel-interface

Responses

204

Object deleted

400

Internal error

Request samples

Copy
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "http://hostname/restconf/data/netgate-tunnel:tunnels-config/next-hops/tunnel-interface=%7Bname%7D"

	req