netgate-lldp API (19.02)

This YANG module provides a data model for the VPP LLDP Service.

Copyright 2019 Rubicon Communications, LLC.

lldp-config

returns netgate.lldp.LldpConfig

get /data/netgate-lldp:lldp-config

Example URL

https://hostname/restconf/data/netgate-lldp:lldp-config

returns netgate.lldp.LldpConfig

Responses

200

netgate.lldp.LldpConfig

400

Internal error

Request samples

Copy
package main

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

func main() {

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

creates netgate.lldp.LldpConfig

post /data/netgate-lldp:lldp-config

Example URL

https://hostname/restconf/data/netgate-lldp:lldp-config

creates netgate.lldp.LldpConfig

Request Body schema: application/yang-data+json

netgate.lldp.LldpConfig to be added to list

tx-interval
integer <int32>

transmit interval

tx-hold
integer <int32>

transmit hold time

system-name
string

LLDP system name

Responses

201

Object created

400

Internal error

409

Object already exists

Request samples

Content type
application/yang-data+json
Copy
Expand all Collapse all
{
  • "tx-interval": 0,
  • "tx-hold": 0,
  • "system-name": "string"
}

creates or updates netgate.lldp.LldpConfig

put /data/netgate-lldp:lldp-config

Example URL

https://hostname/restconf/data/netgate-lldp:lldp-config

creates or updates netgate.lldp.LldpConfig

Request Body schema: application/yang-data+json

netgate.lldp.LldpConfig to be added or updated

netgate-lldp:lldp-config
object (netgate.lldp.LldpConfig)

Responses

201

Object created

204

Object modified

400

Internal error

Request samples

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

removes netgate.lldp.LldpConfig

delete /data/netgate-lldp:lldp-config

Example URL

https://hostname/restconf/data/netgate-lldp:lldp-config

removes netgate.lldp.LldpConfig

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

}