netgate-nat API (19.02)

This YANG module provides a Netgate-defined data-model for Network Address Translation data.

Copyright 2017-2019 Rubicon Communications, LLC.

dslite-config

returns netgate.nat.DsliteConfig

get /data/netgate-nat:dslite-config

Example URL

https://hostname/restconf/data/netgate-nat:dslite-config

Dual-Stack Lite (DS-Lite) configuration.

Responses

200

netgate.nat.DsliteConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-nat:dslite-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-nat:dslite-config":
    {
    }
}

creates netgate.nat.DsliteConfig

post /data/netgate-nat:dslite-config

Example URL

https://hostname/restconf/data/netgate-nat:dslite-config

Dual-Stack Lite (DS-Lite) configuration.

Request Body schema: application/yang-data+json

netgate.nat.DsliteConfig to be added to list

b4
object (netgate.nat.dsliteconfig.B4)
dynamic
object (netgate.nat.dsliteconfig.Dynamic)
aftr
object (netgate.nat.dsliteconfig.Aftr)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "b4":
    {
    },
  • "dynamic":
    {
    },
  • "aftr":
    {
    }
}

creates or updates netgate.nat.DsliteConfig

put /data/netgate-nat:dslite-config

Example URL

https://hostname/restconf/data/netgate-nat:dslite-config

Dual-Stack Lite (DS-Lite) configuration.

Request Body schema: application/yang-data+json

netgate.nat.DsliteConfig to be added or updated

netgate-nat:dslite-config
object (netgate.nat.DsliteConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.nat.DsliteConfig

delete /data/netgate-nat:dslite-config

Example URL

https://hostname/restconf/data/netgate-nat:dslite-config

Dual-Stack Lite (DS-Lite) configuration.

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-nat:dslite-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.nat.dsliteconfig.Aftr

get /data/netgate-nat:dslite-config/netgate-nat:aftr

Example URL

https://hostname/restconf/data/netgate-nat:dslite-config/netgate-nat:aftr

Address Family Transition Router (AFTR) configuration.

Responses

200

netgate.nat.dsliteconfig.Aftr

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-nat:dslite-config/netgate-nat:aftr"

	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-nat:aftr":
    {
    }
}

creates netgate.nat.dsliteconfig.Aftr

post /data/netgate-nat:dslite-config/netgate-nat:aftr

Example URL

https://hostname/restconf/data/netgate-nat:dslite-config/netgate-nat:aftr

Address Family Transition Router (AFTR) configuration.

Request Body schema: application/yang-data+json

netgate.nat.dsliteconfig.Aftr to be added to list

endpoint
object (netgate.nat.dsliteconfig.aftr.Endpoint)

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

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

creates or updates netgate.nat.dsliteconfig.Aftr

put /data/netgate-nat:dslite-config/netgate-nat:aftr

Example URL

https://hostname/restconf/data/netgate-nat:dslite-config/netgate-nat:aftr

Address Family Transition Router (AFTR) configuration.

Request Body schema: application/yang-data+json

netgate.nat.dsliteconfig.Aftr to be added or updated

netgate-nat:aftr
object (netgate.nat.dsliteconfig.Aftr)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "netgate-nat:aftr":
    {
    }
}

removes netgate.nat.dsliteconfig.Aftr

delete /data/netgate-nat:dslite-config/netgate-nat:aftr

Example URL

https://hostname/restconf/data/netgate-nat:dslite-config/netgate-nat:aftr

Address Family Transition Router (AFTR) configuration.

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-nat:dslite-config/netgate-nat:aftr"

	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.nat.dsliteconfig.aftr.Endpoint

get /data/netgate-nat:dslite-config/netgate-nat:aftr/netgate-nat:endpoint

Example URL

https://hostname/restconf/data/netgate-nat:dslite-config/netgate-nat:aftr/netgate-nat:endpoint

An IPv6 tunnel endpoint.

Responses

200

netgate.nat.dsliteconfig.aftr.Endpoint

400

Internal error

Request samples

Copy
package main

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

func main() {

	url := "http://hostname/restconf/data/netgate-nat:dslite-config/netgate-nat:aftr/netgate-nat:endpoint"

	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-nat:endpoint":
    {
    }
}

creates netgate.nat.dsliteconfig.aftr.Endpoint

post /data/netgate-nat:dslite-config/netgate-nat:aftr/netgate-nat:endpoint

Example URL

https://hostname/restconf/data/netgate-nat:dslite-config/netgate-nat:aftr/netgate-nat:endpoint

An IPv6 tunnel endpoint.

Request Body schema: application/yang-data+json

netgate.nat.dsliteconfig.aftr.Endpoint to be added to list

ipv6-address
string

The IPv6 address of the tunnel e